1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 // MARKER(update_precomp.py): autogen include statement, do not remove 29 #include "precompiled_xmloff.hxx" 30 #include <com/sun/star/animations/TransitionType.hpp> 31 #include <com/sun/star/ucb/XAnyCompareFactory.hpp> 32 #include <com/sun/star/container/XIndexReplace.hpp> 33 #include <com/sun/star/drawing/LineStyle.hpp> 34 #include <com/sun/star/drawing/LineJoint.hpp> 35 #include <com/sun/star/drawing/FillStyle.hpp> 36 #include <com/sun/star/presentation/AnimationSpeed.hpp> 37 #include <com/sun/star/presentation/FadeEffect.hpp> 38 #include <com/sun/star/drawing/ConnectorType.hpp> 39 #include <com/sun/star/drawing/RectanglePoint.hpp> 40 #include <com/sun/star/drawing/CircleKind.hpp> 41 42 #ifndef _COM_SUN_STAR_DRAWING_BitmapMode_HPP_ 43 #include <com/sun/star/drawing/BitmapMode.hpp> 44 #endif 45 #include <com/sun/star/text/WritingMode.hpp> 46 #include <xmloff/EnumPropertyHdl.hxx> 47 #include <xmloff/NamedBoolPropertyHdl.hxx> 48 #include <xmloff/WordWrapPropertyHdl.hxx> 49 #include "numithdl.hxx" 50 #include "XMLBitmapRepeatOffsetPropertyHandler.hxx" 51 #include "XMLFillBitmapSizePropertyHandler.hxx" 52 #include "XMLBitmapLogicalSizePropertyHandler.hxx" 53 #include <com/sun/star/drawing/TextAnimationKind.hpp> 54 #include <com/sun/star/drawing/TextAnimationDirection.hpp> 55 #include <com/sun/star/drawing/TextHorizontalAdjust.hpp> 56 #include <com/sun/star/drawing/TextVerticalAdjust.hpp> 57 #include <com/sun/star/drawing/TextFitToSizeType.hpp> 58 #include <com/sun/star/drawing/MeasureTextHorzPos.hpp> 59 #include <com/sun/star/drawing/MeasureTextVertPos.hpp> 60 #include <xmloff/controlpropertyhdl.hxx> 61 #include <xmloff/xmltoken.hxx> 62 #include "sdpropls.hxx" 63 #include "propimp0.hxx" 64 #include <xmloff/xmlexp.hxx> 65 #include <xmloff/xmlnmspe.hxx> 66 #include <com/sun/star/drawing/NormalsKind.hpp> 67 #include <com/sun/star/drawing/TextureProjectionMode.hpp> 68 #include <com/sun/star/drawing/TextureKind.hpp> 69 #include <com/sun/star/drawing/TextureMode.hpp> 70 #include <xmloff/txtprmap.hxx> 71 #include "XMLClipPropertyHandler.hxx" 72 #include "XMLIsPercentagePropertyHandler.hxx" 73 #include "XMLPercentOrMeasurePropertyHandler.hxx" 74 #include "animations.hxx" 75 #include <xmloff/xmluconv.hxx> 76 77 #include "sdxmlexp_impl.hxx" 78 79 using ::com::sun::star::uno::Any; 80 using ::com::sun::star::uno::Reference; 81 82 using ::rtl::OUString; 83 using ::rtl::OUStringBuffer; 84 85 using namespace ::com::sun::star; 86 using namespace ::xmloff::token; 87 88 #define _MAP(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFVER_010 } 89 #define _MAPV(name,prefix,token,type,context,version) { name, sizeof(name)-1, prefix, token, type, context, version } 90 #define GMAP(name,prefix,token,type,context) _MAP(name,prefix,token,type|XML_TYPE_PROP_GRAPHIC,context) 91 #define GMAPV(name,prefix,token,type,context,version) _MAPV(name,prefix,token,type|XML_TYPE_PROP_GRAPHIC,context,version) 92 #define DPMAP(name,prefix,token,type,context) _MAP(name,prefix,token,type|XML_TYPE_PROP_DRAWING_PAGE,context) 93 #define TMAP(name,prefix,token,type,context) _MAP(name,prefix,token,type|XML_TYPE_PROP_TEXT,context) 94 #define PMAP(name,prefix,token,type,context) _MAP(name,prefix,token,type|XML_TYPE_PROP_PARAGRAPH,context) 95 #define MAP_END() { 0L, 0, 0, XML_EMPTY, 0 ,0, SvtSaveOptions::ODFVER_010} 96 97 ////////////////////////////////////////////////////////////////////////////// 98 // entry list for graphic properties 99 100 const XMLPropertyMapEntry aXMLSDProperties[] = 101 { 102 // this entry must be first! this is needed for XMLShapeImportHelper::CreateExternalShapePropMapper 103 GMAP( "UserDefinedAttributes", XML_NAMESPACE_TEXT, XML_XMLNS, XML_TYPE_ATTRIBUTE_CONTAINER | MID_FLAG_SPECIAL_ITEM, 0 ), 104 105 // stroke attributes 106 GMAP( "LineStyle", XML_NAMESPACE_DRAW, XML_STROKE, XML_SD_TYPE_STROKE, 0 ), 107 GMAP( "LineDashName", XML_NAMESPACE_DRAW, XML_STROKE_DASH, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT , CTF_DASHNAME ), 108 GMAP( "LineWidth", XML_NAMESPACE_SVG, XML_STROKE_WIDTH, XML_TYPE_MEASURE, 0 ), 109 GMAP( "LineColor", XML_NAMESPACE_SVG, XML_STROKE_COLOR, XML_TYPE_COLOR, 0 ), 110 GMAP( "LineStartName", XML_NAMESPACE_DRAW, XML_MARKER_START, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_LINESTARTNAME ), 111 GMAP( "LineStartWidth", XML_NAMESPACE_DRAW, XML_MARKER_START_WIDTH, XML_TYPE_MEASURE, 0 ), 112 GMAP( "LineStartCenter", XML_NAMESPACE_DRAW, XML_MARKER_START_CENTER, XML_TYPE_BOOL, 0 ), 113 GMAP( "LineEndName", XML_NAMESPACE_DRAW, XML_MARKER_END, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_LINEENDNAME ), 114 GMAP( "LineEndWidth", XML_NAMESPACE_DRAW, XML_MARKER_END_WIDTH, XML_TYPE_MEASURE, 0 ), 115 GMAP( "LineEndCenter", XML_NAMESPACE_DRAW, XML_MARKER_END_CENTER, XML_TYPE_BOOL, 0 ), 116 GMAP( "LineTransparence", XML_NAMESPACE_SVG, XML_STROKE_OPACITY, XML_SD_TYPE_OPACITY, 0 ), 117 GMAP( "LineJoint", XML_NAMESPACE_DRAW, XML_STROKE_LINEJOIN, XML_SD_TYPE_LINEJOIN, 0 ), 118 119 // fill attributes 120 GMAP( "FillStyle", XML_NAMESPACE_DRAW, XML_FILL, XML_SD_TYPE_FILLSTYLE, 0 ), 121 GMAP( "FillColor", XML_NAMESPACE_DRAW, XML_FILL_COLOR, XML_TYPE_COLOR, 0 ), 122 GMAP( "FillColor2", XML_NAMESPACE_DRAW, XML_SECONDARY_FILL_COLOR, XML_TYPE_COLOR, 0 ), 123 GMAP( "FillGradientName", XML_NAMESPACE_DRAW, XML_FILL_GRADIENT_NAME, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_FILLGRADIENTNAME ), 124 GMAP( "FillGradientStepCount", XML_NAMESPACE_DRAW, XML_GRADIENT_STEP_COUNT, XML_TYPE_NUMBER16, 0 ), 125 GMAP( "FillHatchName", XML_NAMESPACE_DRAW, XML_FILL_HATCH_NAME, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_FILLHATCHNAME ), 126 GMAP( "FillBackground", XML_NAMESPACE_DRAW, XML_FILL_HATCH_SOLID, XML_TYPE_BOOL, 0 ), 127 GMAP( "FillBitmapName", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_NAME, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_FILLBITMAPNAME ), 128 GMAP( "FillTransparence", XML_NAMESPACE_DRAW, XML_OPACITY, XML_TYPE_NEG_PERCENT16|MID_FLAG_MULTI_PROPERTY, 0 ), // exists in SW, too 129 GMAP( "FillTransparenceGradientName", XML_NAMESPACE_DRAW, XML_OPACITY_NAME, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_FILLTRANSNAME ), 130 131 GMAP( "FillBitmapSizeX", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_WIDTH, XML_SD_TYPE_FILLBITMAPSIZE|MID_FLAG_MULTI_PROPERTY, 0 ), 132 GMAP( "FillBitmapLogicalSize", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_WIDTH, XML_SD_TYPE_LOGICAL_SIZE|MID_FLAG_MULTI_PROPERTY, 0 ), 133 GMAP( "FillBitmapSizeY", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_HEIGHT, XML_SD_TYPE_FILLBITMAPSIZE|MID_FLAG_MULTI_PROPERTY, 0 ), 134 GMAP( "FillBitmapLogicalSize", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_HEIGHT, XML_SD_TYPE_LOGICAL_SIZE|MID_FLAG_MULTI_PROPERTY, 0 ), 135 GMAP( "FillBitmapMode", XML_NAMESPACE_STYLE,XML_REPEAT, XML_SD_TYPE_BITMAP_MODE|MID_FLAG_MULTI_PROPERTY, 0 ), 136 GMAP( "FillBitmapPositionOffsetX", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT_X, XML_TYPE_PERCENT, 0 ), 137 GMAP( "FillBitmapPositionOffsetY", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT_Y, XML_TYPE_PERCENT, 0 ), 138 GMAP( "FillBitmapRectanglePoint", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT, XML_SD_TYPE_BITMAP_REFPOINT, 0 ), 139 GMAP( "FillBitmapOffsetX", XML_NAMESPACE_DRAW, XML_TILE_REPEAT_OFFSET, XML_SD_TYPE_BITMAPREPOFFSETX|MID_FLAG_MULTI_PROPERTY, CTF_REPEAT_OFFSET_X ), 140 GMAP( "FillBitmapOffsetY", XML_NAMESPACE_DRAW, XML_TILE_REPEAT_OFFSET, XML_SD_TYPE_BITMAPREPOFFSETY|MID_FLAG_MULTI_PROPERTY, CTF_REPEAT_OFFSET_Y ), 141 142 // text frame attributes 143 GMAP( "TextHorizontalAdjust", XML_NAMESPACE_DRAW, XML_TEXTAREA_HORIZONTAL_ALIGN, XML_SD_TYPE_TEXT_ALIGN, 0 ), 144 GMAP( "TextVerticalAdjust", XML_NAMESPACE_DRAW, XML_TEXTAREA_VERTICAL_ALIGN, XML_SD_TYPE_VERTICAL_ALIGN, 0 ), 145 GMAP( "TextAutoGrowHeight", XML_NAMESPACE_DRAW, XML_AUTO_GROW_HEIGHT, XML_TYPE_BOOL, 0 ), 146 GMAP( "TextAutoGrowWidth", XML_NAMESPACE_DRAW, XML_AUTO_GROW_WIDTH, XML_TYPE_BOOL, 0 ), 147 GMAP( "TextFitToSize", XML_NAMESPACE_DRAW, XML_FIT_TO_SIZE, XML_SD_TYPE_FITTOSIZE, 0 ), 148 GMAP( "TextContourFrame", XML_NAMESPACE_DRAW, XML_FIT_TO_CONTOUR, XML_TYPE_BOOL, 0 ), 149 GMAP( "TextMaximumFrameHeight", XML_NAMESPACE_FO, XML_MAX_HEIGHT, XML_TYPE_MEASURE, 0 ), 150 GMAP( "TextMaximumFrameWidth", XML_NAMESPACE_FO, XML_MAX_WIDTH, XML_TYPE_MEASURE, 0 ), 151 GMAP( "TextMinimumFrameHeight", XML_NAMESPACE_FO, XML_MIN_HEIGHT, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, 0 ), // exists in SW, too 152 GMAP( "TextMinimumFrameWidth", XML_NAMESPACE_FO, XML_MIN_WIDTH, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, 0 ), 153 GMAP( "TextUpperDistance", XML_NAMESPACE_FO, XML_PADDING_TOP, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, 0 ), // exists in SW, too 154 GMAP( "TextLowerDistance", XML_NAMESPACE_FO, XML_PADDING_BOTTOM, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, 0 ), // exists in SW, too 155 GMAP( "TextLeftDistance", XML_NAMESPACE_FO, XML_PADDING_LEFT, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, 0 ), // exists in SW, too 156 GMAP( "TextRightDistance", XML_NAMESPACE_FO, XML_PADDING_RIGHT, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, 0 ), // exists in SW, too 157 PMAP( "TextWritingMode", XML_NAMESPACE_STYLE,XML_WRITING_MODE, XML_SD_TYPE_WRITINGMODE|MID_FLAG_MULTI_PROPERTY, CTF_WRITINGMODE ), 158 GMAP( "NumberingRules", XML_NAMESPACE_TEXT, XML_LIST_STYLE, XML_SD_TYPE_NUMBULLET|MID_FLAG_ELEMENT_ITEM, CTF_NUMBERINGRULES ), 159 GMAP( "NumberingRules", XML_NAMESPACE_TEXT, XML_LIST_STYLE_NAME, XML_TYPE_STRING, CTF_SD_NUMBERINGRULES_NAME ), 160 GMAP( "TextWordWrap", XML_NAMESPACE_FO, XML_WRAP_OPTION, XML_TYPE_WRAP_OPTION, 0 ), 161 162 // shadow attributes 163 GMAP( "Shadow", XML_NAMESPACE_DRAW, XML_SHADOW, XML_SD_TYPE_SHADOW, 0 ), 164 GMAP( "ShadowXDistance", XML_NAMESPACE_DRAW, XML_SHADOW_OFFSET_X, XML_TYPE_MEASURE, 0 ), 165 GMAP( "ShadowYDistance", XML_NAMESPACE_DRAW, XML_SHADOW_OFFSET_Y, XML_TYPE_MEASURE, 0 ), 166 GMAP( "ShadowColor", XML_NAMESPACE_DRAW, XML_SHADOW_COLOR, XML_TYPE_COLOR, 0 ), 167 GMAP( "ShadowTransparence", XML_NAMESPACE_DRAW, XML_SHADOW_OPACITY, XML_TYPE_NEG_PERCENT, 0 ), 168 169 // graphic attributes 170 GMAP( "GraphicColorMode", XML_NAMESPACE_DRAW, XML_COLOR_MODE, XML_TYPE_COLOR_MODE, 0 ), // exists in SW, too, with same property name 171 GMAP( "AdjustLuminance", XML_NAMESPACE_DRAW, XML_LUMINANCE, XML_TYPE_PERCENT16, 0 ), // signed? exists in SW, too, with same property name 172 GMAP( "AdjustContrast", XML_NAMESPACE_DRAW, XML_CONTRAST, XML_TYPE_PERCENT16, 0 ), // signed? exists in SW, too, with same property name 173 GMAP( "Gamma", XML_NAMESPACE_DRAW, XML_GAMMA, XML_TYPE_DOUBLE_PERCENT, 0 ), // signed? exists in SW, too, with same property name 174 GMAP( "AdjustRed", XML_NAMESPACE_DRAW, XML_RED, XML_TYPE_PERCENT16, 0 ), // signed? exists in SW, too, with same property name 175 GMAP( "AdjustGreen", XML_NAMESPACE_DRAW, XML_GREEN, XML_TYPE_PERCENT16, 0 ), // signed? exists in SW, too, with same property name 176 GMAP( "AdjustBlue", XML_NAMESPACE_DRAW, XML_BLUE, XML_TYPE_PERCENT16, 0 ), // signed? exists in SW, too, with same property name 177 GMAPV( "GraphicCrop", XML_NAMESPACE_FO, XML_CLIP, XML_TYPE_TEXT_CLIP, CTF_TEXT_CLIP, SvtSaveOptions::ODFVER_012 ), // exists in SW, too, with same property name 178 GMAP( "GraphicCrop", XML_NAMESPACE_FO, XML_CLIP, XML_TYPE_TEXT_CLIP11, CTF_TEXT_CLIP11 ), // exists in SW, too, with same property name 179 GMAP( "Transparency", XML_NAMESPACE_DRAW, XML_IMAGE_OPACITY, XML_TYPE_NEG_PERCENT16|MID_FLAG_MULTI_PROPERTY, 0 ), // exists in SW, too, with same property name // #i25616# 180 GMAP( "IsMirrored", XML_NAMESPACE_STYLE, XML_MIRROR, XML_TYPE_SD_MIRROR|MID_FLAG_MULTI_PROPERTY, 0 ), // exists in SW, too // #i40214# 181 182 // animation text attributes 183 TMAP( "TextAnimationKind", XML_NAMESPACE_STYLE,XML_TEXT_BLINKING, XML_TYPE_TEXT_ANIMATION_BLINKING, CTF_TEXTANIMATION_BLINKING ), 184 GMAP( "TextAnimationKind", XML_NAMESPACE_TEXT, XML_ANIMATION, XML_TYPE_TEXT_ANIMATION, CTF_TEXTANIMATION_KIND ), 185 GMAP( "TextAnimationDirection", XML_NAMESPACE_TEXT, XML_ANIMATION_DIRECTION, XML_TYPE_TEXT_ANIMATION_DIRECTION, 0 ), 186 GMAP( "TextAnimationStartInside", XML_NAMESPACE_TEXT, XML_ANIMATION_START_INSIDE, XML_TYPE_BOOL, 0 ), 187 GMAP( "TextAnimationStopInside", XML_NAMESPACE_TEXT, XML_ANIMATION_STOP_INSIDE, XML_TYPE_BOOL, 0 ), 188 GMAP( "TextAnimationCount", XML_NAMESPACE_TEXT, XML_ANIMATION_REPEAT, XML_TYPE_NUMBER16, 0 ), 189 GMAP( "TextAnimationDelay", XML_NAMESPACE_TEXT, XML_ANIMATION_DELAY, XML_TYPE_DURATION16_MS, 0 ), 190 GMAP( "TextAnimationAmount", XML_NAMESPACE_TEXT, XML_ANIMATION_STEPS, XML_TYPE_TEXT_ANIMATION_STEPS, 0 ), 191 192 // connector attributes 193 GMAP( "EdgeNode1HorzDist", XML_NAMESPACE_DRAW, XML_START_LINE_SPACING_HORIZONTAL, XML_TYPE_MEASURE, 0 ), 194 GMAP( "EdgeNode1VertDist", XML_NAMESPACE_DRAW, XML_START_LINE_SPACING_VERTICAL, XML_TYPE_MEASURE, 0 ), 195 GMAP( "EdgeNode2HorzDist", XML_NAMESPACE_DRAW, XML_END_LINE_SPACING_HORIZONTAL, XML_TYPE_MEASURE, 0 ), 196 GMAP( "EdgeNode2VertDist", XML_NAMESPACE_DRAW, XML_END_LINE_SPACING_VERTICAL, XML_TYPE_MEASURE, 0 ), 197 198 // measure attributes 199 GMAP( "MeasureLineDistance", XML_NAMESPACE_DRAW, XML_LINE_DISTANCE, XML_TYPE_MEASURE, 0 ), 200 GMAP( "MeasureHelpLineOverhang", XML_NAMESPACE_DRAW, XML_GUIDE_OVERHANG, XML_TYPE_MEASURE, 0 ), 201 GMAP( "MeasureHelpLineDistance", XML_NAMESPACE_DRAW, XML_GUIDE_DISTANCE, XML_TYPE_MEASURE, 0 ), 202 GMAP( "MeasureHelpLine1Length", XML_NAMESPACE_DRAW, XML_START_GUIDE, XML_TYPE_MEASURE, 0 ), 203 GMAP( "MeasureHelpLine2Length", XML_NAMESPACE_DRAW, XML_END_GUIDE, XML_TYPE_MEASURE, 0 ), 204 GMAP( "MeasureTextHorizontalPosition", XML_NAMESPACE_DRAW, XML_MEASURE_ALIGN, XML_SD_TYPE_MEASURE_HALIGN, 0 ), 205 GMAP( "MeasureTextVerticalPosition", XML_NAMESPACE_DRAW, XML_MEASURE_VERTICAL_ALIGN, XML_SD_TYPE_MEASURE_VALIGN, 0 ), 206 GMAP( "MeasureUnit", XML_NAMESPACE_DRAW, XML_UNIT, XML_SD_TYPE_MEASURE_UNIT, 0 ), 207 GMAP( "MeasureShowUnit", XML_NAMESPACE_DRAW, XML_SHOW_UNIT, XML_TYPE_BOOL, 0 ), 208 GMAP( "MeasureBelowReferenceEdge", XML_NAMESPACE_DRAW, XML_PLACING, XML_SD_TYPE_MEASURE_PLACING, 0 ), 209 GMAP( "MeasureTextRotate90", XML_NAMESPACE_DRAW, XML_PARALLEL, XML_TYPE_BOOL, 0 ), 210 GMAP( "MeasureDecimalPlaces", XML_NAMESPACE_DRAW, XML_DECIMAL_PLACES, XML_TYPE_NUMBER16, 0 ), 211 212 // 3D geometry attributes 213 GMAP( "D3DHorizontalSegments", XML_NAMESPACE_DR3D, XML_HORIZONTAL_SEGMENTS, XML_TYPE_NUMBER, 0 ), 214 GMAP( "D3DVerticalSegments", XML_NAMESPACE_DR3D, XML_VERTICAL_SEGMENTS, XML_TYPE_NUMBER, 0 ), 215 GMAP( "D3DPercentDiagonal", XML_NAMESPACE_DR3D, XML_EDGE_ROUNDING, XML_TYPE_PERCENT, 0 ), 216 GMAP( "D3DBackscale", XML_NAMESPACE_DR3D, XML_BACK_SCALE, XML_TYPE_PERCENT, 0 ), 217 GMAP( "D3DEndAngle", XML_NAMESPACE_DR3D, XML_END_ANGLE, XML_TYPE_NUMBER, 0 ), 218 GMAP( "D3DDepth", XML_NAMESPACE_DR3D, XML_DEPTH, XML_TYPE_MEASURE, 0 ), 219 GMAP( "D3DDoubleSided", XML_NAMESPACE_DR3D, XML_BACKFACE_CULLING, XML_SD_TYPE_BACKFACE_CULLING, 0 ), 220 221 // #107245# New 3D properties which are possible for lathe and extrude 3d objects 222 GMAP( "D3DCloseFront", XML_NAMESPACE_DR3D, XML_CLOSE_FRONT, XML_TYPE_BOOL, 0 ), 223 GMAP( "D3DCloseBack", XML_NAMESPACE_DR3D, XML_CLOSE_BACK, XML_TYPE_BOOL, 0 ), 224 225 // 3D lighting attributes 226 GMAP( "D3DNormalsKind", XML_NAMESPACE_DR3D, XML_NORMALS_KIND, XML_SD_TYPE_NORMALS_KIND, 0 ), 227 GMAP( "D3DNormalsInvert", XML_NAMESPACE_DR3D, XML_NORMALS_DIRECTION, XML_SD_TYPE_NORMALS_DIRECTION, 0 ), 228 229 // 3D texture attributes 230 GMAP( "D3DTextureProjectionX", XML_NAMESPACE_DR3D, XML_TEX_GENERATION_MODE_X, XML_SD_TYPE_TEX_GENERATION_MODE_X, 0 ), 231 GMAP( "D3DTextureProjectionY", XML_NAMESPACE_DR3D, XML_TEX_GENERATION_MODE_Y, XML_SD_TYPE_TEX_GENERATION_MODE_Y, 0 ), 232 GMAP( "D3DTextureKind", XML_NAMESPACE_DR3D, XML_TEX_KIND, XML_SD_TYPE_TEX_KIND, 0 ), 233 GMAP( "D3DTextureMode", XML_NAMESPACE_DR3D, XML_TEX_MODE, XML_SD_TYPE_TEX_MODE, 0 ), 234 GMAP( "D3DTextureFilter", XML_NAMESPACE_DR3D, XML_TEX_FILTER, XML_SD_TYPE_BACKFACE_CULLING, 0 ), 235 236 // 3D material attributes 237 GMAP( "D3DMaterialColor", XML_NAMESPACE_DR3D, XML_DIFFUSE_COLOR, XML_TYPE_COLOR, 0 ), 238 GMAP( "D3DMaterialEmission", XML_NAMESPACE_DR3D, XML_EMISSIVE_COLOR, XML_TYPE_COLOR, 0 ), 239 GMAP( "D3DMaterialSpecular", XML_NAMESPACE_DR3D, XML_SPECULAR_COLOR, XML_TYPE_COLOR, 0 ), 240 GMAP( "D3DMaterialSpecularIntensity", XML_NAMESPACE_DR3D, XML_SHININESS, XML_TYPE_PERCENT, 0 ), 241 242 // 3D shadow attributes 243 GMAP( "D3DShadow3D", XML_NAMESPACE_DR3D, XML_SHADOW, XML_SD_TYPE_SHADOW, 0 ), 244 245 // #FontWork# attributes 246 GMAP( "FontWorkStyle", XML_NAMESPACE_DRAW, XML_FONTWORK_STYLE, XML_SD_TYPE_FONTWORK_STYLE, CTF_FONTWORK_STYLE ), 247 GMAP( "FontWorkAdjust", XML_NAMESPACE_DRAW, XML_FONTWORK_ADJUST, XML_SD_TYPE_FONTWORK_ADJUST,CTF_FONTWORK_ADJUST ), 248 GMAP( "FontWorkDistance", XML_NAMESPACE_DRAW, XML_FONTWORK_DISTANCE, XML_TYPE_MEASURE, CTF_FONTWORK_DISTANCE ), 249 GMAP( "FontWorkStart", XML_NAMESPACE_DRAW, XML_FONTWORK_START, XML_TYPE_MEASURE, CTF_FONTWORK_START ), 250 GMAP( "FontWorkMirror", XML_NAMESPACE_DRAW, XML_FONTWORK_MIRROR, XML_TYPE_BOOL, CTF_FONTWORK_MIRROR ), 251 GMAP( "FontWorkOutline", XML_NAMESPACE_DRAW, XML_FONTWORK_OUTLINE, XML_TYPE_BOOL, CTF_FONTWORK_OUTLINE ), 252 GMAP( "FontWorkShadow", XML_NAMESPACE_DRAW, XML_FONTWORK_SHADOW, XML_SD_TYPE_FONTWORK_SHADOW,CTF_FONTWORK_SHADOW ), 253 GMAP( "FontWorkShadowColor", XML_NAMESPACE_DRAW, XML_FONTWORK_SHADOW_COLOR, XML_TYPE_COLOR, CTF_FONTWORK_SHADOWCOLOR ), 254 GMAP( "FontWorkShadowOffsetX", XML_NAMESPACE_DRAW, XML_FONTWORK_SHADOW_OFFSET_X, XML_TYPE_MEASURE, CTF_FONTWORK_SHADOWOFFSETX ), 255 GMAP( "FontWorkShadowOffsetY", XML_NAMESPACE_DRAW, XML_FONTWORK_SHADOW_OFFSET_Y, XML_TYPE_MEASURE, CTF_FONTWORK_SHADOWOFFSETY ), 256 GMAP( "FontWorkForm", XML_NAMESPACE_DRAW, XML_FONTWORK_FORM, XML_SD_TYPE_FONTWORK_FORM, CTF_FONTWORK_FORM ), 257 GMAP( "FontWorkHideForm", XML_NAMESPACE_DRAW, XML_FONTWORK_HIDE_FORM, XML_TYPE_BOOL, CTF_FONTWORK_HIDEFORM ), 258 GMAP( "FontWorkShadowTransparence", XML_NAMESPACE_DRAW, XML_FONTWORK_SHADOW_TRANSPARENCE, XML_TYPE_PERCENT, CTF_FONTWORK_SHADOWTRANSPARENCE ), 259 260 // control attributes (border exists one mor time for the text additions of shapes) 261 GMAP( "ControlSymbolColor", XML_NAMESPACE_DRAW, XML_SYMBOL_COLOR, XML_TYPE_COLOR, 0 ), 262 GMAP( "ControlBackground", XML_NAMESPACE_FO, XML_BACKGROUND_COLOR, XML_TYPE_COLOR|MID_FLAG_MULTI_PROPERTY, 0 ), 263 GMAP( "ControlBorder", XML_NAMESPACE_FO, XML_BORDER, XML_SD_TYPE_CONTROL_BORDER|MID_FLAG_MULTI_PROPERTY|MID_FLAG_MERGE_ATTRIBUTE, 0 ), 264 GMAP( "ControlBorderColor", XML_NAMESPACE_FO, XML_BORDER, XML_SD_TYPE_CONTROL_BORDER_COLOR|MID_FLAG_MULTI_PROPERTY|MID_FLAG_MERGE_ATTRIBUTE, 0 ), 265 GMAP( "ControlDataStyle", XML_NAMESPACE_STYLE,XML_DATA_STYLE_NAME, XML_TYPE_STRING|MID_FLAG_NO_PROPERTY_EXPORT|MID_FLAG_SPECIAL_ITEM, CTF_SD_CONTROL_SHAPE_DATA_STYLE ), 266 GMAP( "ControlTextEmphasis", XML_NAMESPACE_STYLE,XML_TEXT_EMPHASIZE, XML_TYPE_CONTROL_TEXT_EMPHASIZE, 0 ), 267 GMAP( "ImageScaleMode", XML_NAMESPACE_STYLE,XML_REPEAT, XML_SD_TYPE_IMAGE_SCALE_MODE|MID_FLAG_MULTI_PROPERTY, 0 ), 268 GMAP( "ControlWritingMode", XML_NAMESPACE_STYLE,XML_WRITING_MODE, XML_TYPE_TEXT_WRITING_MODE_WITH_DEFAULT|MID_FLAG_MULTI_PROPERTY, CTF_CONTROLWRITINGMODE ), 269 270 // special entries for floating frames 271 GMAP( "FrameIsAutoScroll", XML_NAMESPACE_DRAW, XML_FRAME_DISPLAY_SCROLLBAR, XML_TYPE_BOOL|MID_FLAG_MULTI_PROPERTY, CTF_FRAME_DISPLAY_SCROLLBAR ), 272 GMAP( "FrameIsBorder", XML_NAMESPACE_DRAW, XML_FRAME_DISPLAY_BORDER, XML_TYPE_BOOL|MID_FLAG_MULTI_PROPERTY, CTF_FRAME_DISPLAY_BORDER ), 273 GMAP( "FrameMarginWidth", XML_NAMESPACE_DRAW, XML_FRAME_MARGIN_HORIZONTAL, XML_TYPE_MEASURE_PX|MID_FLAG_MULTI_PROPERTY, CTF_FRAME_MARGIN_HORI ), 274 GMAP( "FrameMarginHeight", XML_NAMESPACE_DRAW, XML_FRAME_MARGIN_VERTICAL, XML_TYPE_MEASURE_PX|MID_FLAG_MULTI_PROPERTY, CTF_FRAME_MARGIN_VERT ), 275 GMAP( "VisibleArea", XML_NAMESPACE_DRAW, XML_VISIBLE_AREA_LEFT, XML_TYPE_RECTANGLE_LEFT|MID_FLAG_MERGE_PROPERTY|MID_FLAG_MULTI_PROPERTY|MID_FLAG_NO_PROPERTY, CTF_SD_OLE_VIS_AREA_IMPORT_LEFT ), 276 GMAP( "VisibleArea", XML_NAMESPACE_DRAW, XML_VISIBLE_AREA_TOP, XML_TYPE_RECTANGLE_TOP|MID_FLAG_MERGE_PROPERTY|MID_FLAG_MULTI_PROPERTY|MID_FLAG_NO_PROPERTY, CTF_SD_OLE_VIS_AREA_IMPORT_TOP ), 277 GMAP( "VisibleArea", XML_NAMESPACE_DRAW, XML_VISIBLE_AREA_WIDTH, XML_TYPE_RECTANGLE_WIDTH|MID_FLAG_MERGE_PROPERTY|MID_FLAG_MULTI_PROPERTY|MID_FLAG_NO_PROPERTY, CTF_SD_OLE_VIS_AREA_IMPORT_WIDTH ), 278 GMAP( "VisibleArea", XML_NAMESPACE_DRAW, XML_VISIBLE_AREA_HEIGHT, XML_TYPE_RECTANGLE_HEIGHT|MID_FLAG_MERGE_PROPERTY|MID_FLAG_MULTI_PROPERTY|MID_FLAG_NO_PROPERTY, CTF_SD_OLE_VIS_AREA_IMPORT_HEIGHT ), 279 GMAP( "IsInternal", XML_NAMESPACE_DRAW, XML__EMPTY, XML_TYPE_BUILDIN_CMP_ONLY, CTF_SD_OLE_ISINTERNAL ), 280 GMAP( "IsInternal", XML_NAMESPACE_DRAW, XML_VISIBLE_AREA_LEFT, XML_TYPE_RECTANGLE_LEFT|MID_FLAG_MERGE_PROPERTY|MID_FLAG_MULTI_PROPERTY|MID_FLAG_NO_PROPERTY_IMPORT, CTF_SD_OLE_VIS_AREA_EXPORT_LEFT ), 281 GMAP( "IsInternal", XML_NAMESPACE_DRAW, XML_VISIBLE_AREA_TOP, XML_TYPE_RECTANGLE_TOP|MID_FLAG_MERGE_PROPERTY|MID_FLAG_MULTI_PROPERTY|MID_FLAG_NO_PROPERTY_IMPORT, CTF_SD_OLE_VIS_AREA_EXPORT_TOP ), 282 GMAP( "IsInternal", XML_NAMESPACE_DRAW, XML_VISIBLE_AREA_WIDTH, XML_TYPE_RECTANGLE_WIDTH|MID_FLAG_MERGE_PROPERTY|MID_FLAG_MULTI_PROPERTY|MID_FLAG_NO_PROPERTY_IMPORT, CTF_SD_OLE_VIS_AREA_EXPORT_WIDTH ), 283 GMAP( "IsInternal", XML_NAMESPACE_DRAW, XML_VISIBLE_AREA_HEIGHT, XML_TYPE_RECTANGLE_HEIGHT|MID_FLAG_MERGE_PROPERTY|MID_FLAG_MULTI_PROPERTY|MID_FLAG_NO_PROPERTY_IMPORT, CTF_SD_OLE_VIS_AREA_EXPORT_HEIGHT ), 284 285 GMAP( "Aspect", XML_NAMESPACE_DRAW, XML_DRAW_ASPECT, XML_TYPE_TEXT_DRAW_ASPECT|MID_FLAG_MULTI_PROPERTY, CTF_SD_OLE_ASPECT ), 286 287 // caption properties 288 GMAP( "CaptionType", XML_NAMESPACE_DRAW, XML_CAPTION_TYPE, XML_SD_TYPE_CAPTION_TYPE, 0 ), 289 GMAP( "CaptionIsFixedAngle", XML_NAMESPACE_DRAW, XML_CAPTION_ANGLE_TYPE, XML_SD_TYPE_CAPTION_ANGLE_TYPE, 0 ), 290 GMAP( "CaptionAngle", XML_NAMESPACE_DRAW, XML_CAPTION_ANGLE, XML_TYPE_NUMBER, 0 ), 291 GMAP( "CaptionGap", XML_NAMESPACE_DRAW, XML_CAPTION_GAP, XML_TYPE_MEASURE, 0 ), 292 GMAP( "CaptionEscapeDirection", XML_NAMESPACE_DRAW, XML_CAPTION_ESCAPE_DIRECTION, XML_SD_TYPE_CAPTION_ESC_DIR, 0 ), 293 GMAP( "CaptionIsEscapeRelative", XML_NAMESPACE_DRAW, XML_CAPTION_ESCAPE, XML_SD_TYPE_CAPTION_IS_ESC_REL|MID_FLAG_MULTI_PROPERTY, CTF_CAPTION_ISESCREL ), 294 GMAP( "CaptionEscapeRelative", XML_NAMESPACE_DRAW, XML_CAPTION_ESCAPE, XML_SD_TYPE_CAPTION_ESC_REL|MID_FLAG_MULTI_PROPERTY, CTF_CAPTION_ESCREL ), 295 GMAP( "CaptionEscapeAbsolute", XML_NAMESPACE_DRAW, XML_CAPTION_ESCAPE, XML_SD_TYPE_CAPTION_ESC_ABS|MID_FLAG_MULTI_PROPERTY, CTF_CAPTION_ESCABS ), 296 GMAP( "CaptionLineLength", XML_NAMESPACE_DRAW, XML_CAPTION_LINE_LENGTH, XML_TYPE_MEASURE, 0 ), 297 GMAP( "CaptionIsFitLineLength", XML_NAMESPACE_DRAW, XML_CAPTION_FIT_LINE_LENGTH, XML_TYPE_BOOL, 0 ), 298 299 // misc object properties 300 GMAP( "MoveProtect", XML_NAMESPACE_STYLE, XML_PROTECT, XML_SD_TYPE_MOVE_PROTECT|MID_FLAG_MULTI_PROPERTY|MID_FLAG_MERGE_ATTRIBUTE, CTF_SD_MOVE_PROTECT ), 301 GMAP( "SizeProtect", XML_NAMESPACE_STYLE, XML_PROTECT, XML_SD_TYPE_SIZE_PROTECT|MID_FLAG_MULTI_PROPERTY|MID_FLAG_MERGE_ATTRIBUTE, CTF_SD_SIZE_PROTECT ), 302 MAP_END() 303 }; 304 305 ////////////////////////////////////////////////////////////////////////////// 306 // entry list for presentation page properties 307 308 const XMLPropertyMapEntry aXMLSDPresPageProps[] = 309 { 310 DPMAP( "UserDefinedAttributes", XML_NAMESPACE_TEXT, XML_XMLNS, XML_TYPE_ATTRIBUTE_CONTAINER | MID_FLAG_SPECIAL_ITEM, 0 ), 311 312 DPMAP( "Change", XML_NAMESPACE_PRESENTATION, XML_TRANSITION_TYPE, XML_SD_TYPE_PRESPAGE_TYPE, CTF_PAGE_TRANS_TYPE ), 313 DPMAP( "Effect", XML_NAMESPACE_PRESENTATION, XML_TRANSITION_STYLE, XML_SD_TYPE_PRESPAGE_STYLE, CTF_PAGE_TRANS_STYLE ), 314 DPMAP( "Speed", XML_NAMESPACE_PRESENTATION, XML_TRANSITION_SPEED, XML_SD_TYPE_PRESPAGE_SPEED, CTF_PAGE_TRANS_SPEED ), 315 DPMAP( "Duration", XML_NAMESPACE_PRESENTATION, XML_DURATION, XML_SD_TYPE_PRESPAGE_DURATION, CTF_PAGE_TRANS_DURATION ), 316 DPMAP( "Visible", XML_NAMESPACE_PRESENTATION, XML_VISIBILITY, XML_SD_TYPE_PRESPAGE_VISIBILITY, CTF_PAGE_VISIBLE ), 317 DPMAP( "Sound", XML_NAMESPACE_PRESENTATION, XML_SOUND, XML_TYPE_STRING|MID_FLAG_ELEMENT_ITEM, CTF_PAGE_SOUND_URL ), 318 DPMAP( "BackgroundFullSize", XML_NAMESPACE_DRAW, XML_BACKGROUND_SIZE, XML_SD_TYPE_PRESPAGE_BACKSIZE, CTF_PAGE_BACKSIZE ), 319 320 DPMAP( "IsBackgroundVisible", XML_NAMESPACE_PRESENTATION, XML_BACKGROUND_VISIBLE, XML_TYPE_BOOL, 0 ), 321 DPMAP( "IsBackgroundObjectsVisible", XML_NAMESPACE_PRESENTATION, XML_BACKGROUND_OBJECTS_VISIBLE, XML_TYPE_BOOL, 0 ), 322 323 DPMAP( "FillStyle", XML_NAMESPACE_DRAW, XML_FILL, XML_SD_TYPE_FILLSTYLE, 0 ), 324 DPMAP( "FillColor", XML_NAMESPACE_DRAW, XML_FILL_COLOR, XML_TYPE_COLOR, 0 ), 325 DPMAP( "FillGradientName", XML_NAMESPACE_DRAW, XML_FILL_GRADIENT_NAME, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_FILLGRADIENTNAME ), 326 DPMAP( "FillGradientStepCount", XML_NAMESPACE_DRAW, XML_GRADIENT_STEP_COUNT, XML_TYPE_NUMBER, 0 ), 327 DPMAP( "FillHatchName", XML_NAMESPACE_DRAW, XML_FILL_HATCH_NAME, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_FILLHATCHNAME ), 328 GMAP( "FillBackground", XML_NAMESPACE_DRAW, XML_FILL_HATCH_SOLID, XML_TYPE_BOOL, 0 ), 329 DPMAP( "FillBitmapName", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_NAME, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_FILLBITMAPNAME ), 330 DPMAP( "FillTransparenceGradientName", XML_NAMESPACE_DRAW, XML_OPACITY_NAME, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_FILLTRANSNAME ), 331 DPMAP( "FillBitmapSizeX", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_WIDTH, XML_SD_TYPE_FILLBITMAPSIZE|MID_FLAG_MULTI_PROPERTY, 0 ), 332 DPMAP( "FillBitmapLogicalSize", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_WIDTH, XML_SD_TYPE_LOGICAL_SIZE|MID_FLAG_MULTI_PROPERTY, 0 ), 333 DPMAP( "FillBitmapSizeY", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_HEIGHT, XML_SD_TYPE_FILLBITMAPSIZE|MID_FLAG_MULTI_PROPERTY, 0 ), 334 DPMAP( "FillBitmapLogicalSize", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_HEIGHT, XML_SD_TYPE_LOGICAL_SIZE|MID_FLAG_MULTI_PROPERTY, 0 ), 335 DPMAP( "FillBitmapMode", XML_NAMESPACE_STYLE,XML_REPEAT, XML_SD_TYPE_BITMAP_MODE, 0 ), 336 DPMAP( "FillBitmapPositionOffsetX", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT_X, XML_TYPE_PERCENT, 0 ), 337 DPMAP( "FillBitmapPositionOffsetY", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT_Y, XML_TYPE_PERCENT, 0 ), 338 DPMAP( "FillBitmapRectanglePoint", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT, XML_SD_TYPE_BITMAP_REFPOINT, 0 ), 339 DPMAP( "FillBitmapOffsetX", XML_NAMESPACE_DRAW, XML_TILE_REPEAT_OFFSET, XML_SD_TYPE_BITMAPREPOFFSETX|MID_FLAG_MULTI_PROPERTY, CTF_REPEAT_OFFSET_X ), 340 DPMAP( "FillBitmapOffsetY", XML_NAMESPACE_DRAW, XML_TILE_REPEAT_OFFSET, XML_SD_TYPE_BITMAPREPOFFSETY|MID_FLAG_MULTI_PROPERTY, CTF_REPEAT_OFFSET_Y ), 341 342 DPMAP( "IsHeaderVisible", XML_NAMESPACE_PRESENTATION, XML_DISPLAY_HEADER, XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE, CTF_HEADER_VISIBLE ), 343 DPMAP( "IsFooterVisible", XML_NAMESPACE_PRESENTATION, XML_DISPLAY_FOOTER, XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE, CTF_FOOTER_VISIBLE ), 344 DPMAP( "IsPageNumberVisible", XML_NAMESPACE_PRESENTATION, XML_DISPLAY_PAGE_NUMBER, XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE, CTF_PAGE_NUMBER_VISIBLE ), 345 DPMAP( "IsDateTimeVisible", XML_NAMESPACE_PRESENTATION, XML_DISPLAY_DATE_TIME, XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE, CTF_DATE_TIME_VISIBLE ), 346 347 DPMAP( "TransitionType", XML_NAMESPACE_SMIL, XML_TYPE, XML_SD_TYPE_TRANSITION_TYPE, CTF_PAGE_TRANSITION_TYPE ), 348 DPMAP( "TransitionSubtype", XML_NAMESPACE_SMIL, XML_SUBTYPE, XML_SD_TYPE_TRANSTIION_SUBTYPE, CTF_PAGE_TRANSITION_SUBTYPE ), 349 DPMAP( "TransitionDirection", XML_NAMESPACE_SMIL, XML_DIRECTION, XML_SD_TYPE_TRANSTIION_DIRECTION, CTF_PAGE_TRANSITION_DIRECTION ), 350 DPMAP( "TransitionFadeColor", XML_NAMESPACE_SMIL, XML_FADECOLOR, XML_TYPE_COLOR, CTF_PAGE_TRANSITION_FADECOLOR ), 351 MAP_END() 352 }; 353 354 const XMLPropertyMapEntry aXMLSDPresPageProps_onlyHeadersFooter[] = 355 { 356 DPMAP( "IsHeaderVisible", XML_NAMESPACE_PRESENTATION, XML_DISPLAY_HEADER, XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE, CTF_HEADER_VISIBLE ), 357 DPMAP( "IsFooterVisible", XML_NAMESPACE_PRESENTATION, XML_DISPLAY_FOOTER, XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE, CTF_FOOTER_VISIBLE ), 358 DPMAP( "IsPageNumberVisible", XML_NAMESPACE_PRESENTATION, XML_DISPLAY_PAGE_NUMBER, XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE, CTF_PAGE_NUMBER_VISIBLE ), 359 DPMAP( "IsDateTimeVisible", XML_NAMESPACE_PRESENTATION, XML_DISPLAY_DATE_TIME, XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE, CTF_DATE_TIME_VISIBLE ), 360 361 MAP_END() 362 }; 363 364 /** contains the attribute to property mapping for a drawing layer table 365 WARNING: if attributes are added, SdXMLTableShapeContext::processAttribute needs to be updated! 366 */ 367 const XMLPropertyMapEntry aXMLTableShapeAttributes[] = 368 { 369 _MAP( "UseFirstRowStyle", XML_NAMESPACE_TABLE, XML_USE_FIRST_ROW_STYLES, XML_TYPE_BOOL, 0 ), 370 _MAP( "UseLastRowStyle", XML_NAMESPACE_TABLE, XML_USE_LAST_ROW_STYLES, XML_TYPE_BOOL, 0 ), 371 _MAP( "UseFirstColumnStyle", XML_NAMESPACE_TABLE, XML_USE_FIRST_COLUMN_STYLES, XML_TYPE_BOOL, 0 ), 372 _MAP( "UseLastColumnStyle", XML_NAMESPACE_TABLE, XML_USE_LAST_COLUMN_STYLES, XML_TYPE_BOOL, 0 ), 373 _MAP( "UseBandingRowStyle", XML_NAMESPACE_TABLE, XML_USE_BANDING_ROWS_STYLES, XML_TYPE_BOOL, 0 ), 374 _MAP( "UseBandingColumnStyle", XML_NAMESPACE_TABLE, XML_USE_BANDING_COLUMNS_STYLES, XML_TYPE_BOOL, 0 ), 375 MAP_END() 376 }; 377 378 ////////////////////////////////////////////////////////////////////////////// 379 // implementation of factory for own graphic properties 380 381 SvXMLEnumMapEntry aXML_LineStyle_EnumMap[] = 382 { 383 { XML_NONE, drawing::LineStyle_NONE }, 384 { XML_SOLID, drawing::LineStyle_SOLID }, 385 { XML_DASH, drawing::LineStyle_DASH }, 386 { XML_TOKEN_INVALID, 0 } 387 }; 388 389 SvXMLEnumMapEntry aXML_LineJoint_EnumMap[] = 390 { 391 { XML_NONE, drawing::LineJoint_NONE }, 392 { XML_MITER, drawing::LineJoint_MITER }, 393 { XML_ROUND, drawing::LineJoint_ROUND }, 394 { XML_BEVEL, drawing::LineJoint_BEVEL }, 395 { XML_MIDDLE, drawing::LineJoint_MIDDLE }, 396 { XML_TOKEN_INVALID, 0 } 397 }; 398 399 SvXMLEnumMapEntry aXML_FillStyle_EnumMap[] = 400 { 401 { XML_NONE, drawing::FillStyle_NONE }, 402 { XML_SOLID, drawing::FillStyle_SOLID }, 403 { XML_BITMAP, drawing::FillStyle_BITMAP }, 404 { XML_GRADIENT, drawing::FillStyle_GRADIENT }, 405 { XML_HATCH, drawing::FillStyle_HATCH }, 406 { XML_TOKEN_INVALID, 0 } 407 }; 408 409 SvXMLEnumMapEntry aXML_PresChange_EnumMap[] = 410 { 411 { XML_MANUAL, 0 }, 412 { XML_AUTOMATIC, 1 }, 413 { XML_SEMI_AUTOMATIC, 2 }, 414 { XML_TOKEN_INVALID, 0 } 415 }; 416 417 SvXMLEnumMapEntry aXML_TransSpeed_EnumMap[] = 418 { 419 { XML_FAST, presentation::AnimationSpeed_FAST }, 420 { XML_MEDIUM, presentation::AnimationSpeed_MEDIUM }, 421 { XML_SLOW, presentation::AnimationSpeed_SLOW }, 422 { XML_TOKEN_INVALID, 0 } 423 }; 424 425 SvXMLEnumMapEntry aXML_FadeEffect_EnumMap[] = 426 { 427 { XML_NONE, presentation::FadeEffect_NONE }, 428 { XML_FADE_FROM_LEFT, presentation::FadeEffect_FADE_FROM_LEFT }, 429 { XML_FADE_FROM_TOP, presentation::FadeEffect_FADE_FROM_TOP }, 430 { XML_FADE_FROM_RIGHT, presentation::FadeEffect_FADE_FROM_RIGHT }, 431 { XML_FADE_FROM_BOTTOM, presentation::FadeEffect_FADE_FROM_BOTTOM }, 432 { XML_FADE_TO_CENTER, presentation::FadeEffect_FADE_TO_CENTER }, 433 { XML_FADE_FROM_CENTER, presentation::FadeEffect_FADE_FROM_CENTER }, 434 { XML_MOVE_FROM_LEFT, presentation::FadeEffect_MOVE_FROM_LEFT }, 435 { XML_MOVE_FROM_TOP, presentation::FadeEffect_MOVE_FROM_TOP }, 436 { XML_MOVE_FROM_RIGHT, presentation::FadeEffect_MOVE_FROM_RIGHT }, 437 { XML_MOVE_FROM_BOTTOM, presentation::FadeEffect_MOVE_FROM_BOTTOM }, 438 { XML_ROLL_FROM_TOP, presentation::FadeEffect_ROLL_FROM_TOP }, 439 { XML_ROLL_FROM_LEFT, presentation::FadeEffect_ROLL_FROM_LEFT }, 440 { XML_ROLL_FROM_RIGHT, presentation::FadeEffect_ROLL_FROM_RIGHT }, 441 { XML_ROLL_FROM_BOTTOM, presentation::FadeEffect_ROLL_FROM_BOTTOM }, 442 { XML_VERTICAL_STRIPES, presentation::FadeEffect_VERTICAL_STRIPES }, 443 { XML_HORIZONTAL_STRIPES, presentation::FadeEffect_HORIZONTAL_STRIPES }, 444 { XML_CLOCKWISE, presentation::FadeEffect_CLOCKWISE }, 445 { XML_COUNTERCLOCKWISE, presentation::FadeEffect_COUNTERCLOCKWISE }, 446 { XML_FADE_FROM_UPPERLEFT, presentation::FadeEffect_FADE_FROM_UPPERLEFT }, 447 { XML_FADE_FROM_UPPERRIGHT, presentation::FadeEffect_FADE_FROM_UPPERRIGHT }, 448 { XML_FADE_FROM_LOWERLEFT, presentation::FadeEffect_FADE_FROM_LOWERLEFT }, 449 { XML_FADE_FROM_LOWERRIGHT, presentation::FadeEffect_FADE_FROM_LOWERRIGHT }, 450 { XML_CLOSE_VERTICAL, presentation::FadeEffect_CLOSE_VERTICAL }, 451 { XML_CLOSE_HORIZONTAL, presentation::FadeEffect_CLOSE_HORIZONTAL }, 452 { XML_OPEN_VERTICAL, presentation::FadeEffect_OPEN_VERTICAL }, 453 { XML_OPEN_HORIZONTAL, presentation::FadeEffect_OPEN_HORIZONTAL }, 454 { XML_SPIRALIN_LEFT, presentation::FadeEffect_SPIRALIN_LEFT }, 455 { XML_SPIRALIN_RIGHT, presentation::FadeEffect_SPIRALIN_RIGHT }, 456 { XML_SPIRALOUT_LEFT, presentation::FadeEffect_SPIRALOUT_LEFT }, 457 { XML_SPIRALOUT_RIGHT, presentation::FadeEffect_SPIRALOUT_RIGHT }, 458 { XML_DISSOLVE, presentation::FadeEffect_DISSOLVE }, 459 { XML_WAVYLINE_FROM_LEFT, presentation::FadeEffect_WAVYLINE_FROM_LEFT }, 460 { XML_WAVYLINE_FROM_TOP, presentation::FadeEffect_WAVYLINE_FROM_TOP }, 461 { XML_WAVYLINE_FROM_RIGHT, presentation::FadeEffect_WAVYLINE_FROM_RIGHT }, 462 { XML_WAVYLINE_FROM_BOTTOM, presentation::FadeEffect_WAVYLINE_FROM_BOTTOM }, 463 { XML_RANDOM, presentation::FadeEffect_RANDOM }, 464 { XML_STRETCH_FROM_LEFT, presentation::FadeEffect_STRETCH_FROM_LEFT }, 465 { XML_STRETCH_FROM_TOP, presentation::FadeEffect_STRETCH_FROM_TOP }, 466 { XML_STRETCH_FROM_RIGHT, presentation::FadeEffect_STRETCH_FROM_RIGHT }, 467 { XML_STRETCH_FROM_BOTTOM, presentation::FadeEffect_STRETCH_FROM_BOTTOM }, 468 { XML_VERTICAL_LINES, presentation::FadeEffect_VERTICAL_LINES }, 469 { XML_HORIZONTAL_LINES, presentation::FadeEffect_HORIZONTAL_LINES }, 470 { XML_MOVE_FROM_UPPERLEFT, presentation::FadeEffect_MOVE_FROM_UPPERLEFT }, 471 { XML_MOVE_FROM_UPPERRIGHT, presentation::FadeEffect_MOVE_FROM_UPPERRIGHT }, 472 { XML_MOVE_FROM_LOWERRIGHT, presentation::FadeEffect_MOVE_FROM_LOWERRIGHT }, 473 { XML_MOVE_FROM_LOWERLEFT, presentation::FadeEffect_MOVE_FROM_LOWERLEFT }, 474 { XML_UNCOVER_TO_LEFT, presentation::FadeEffect_UNCOVER_TO_LEFT }, 475 { XML_UNCOVER_TO_UPPERLEFT, presentation::FadeEffect_UNCOVER_TO_UPPERLEFT }, 476 { XML_UNCOVER_TO_TOP, presentation::FadeEffect_UNCOVER_TO_TOP }, 477 { XML_UNCOVER_TO_UPPERRIGHT,presentation::FadeEffect_UNCOVER_TO_UPPERRIGHT }, 478 { XML_UNCOVER_TO_RIGHT, presentation::FadeEffect_UNCOVER_TO_RIGHT }, 479 { XML_UNCOVER_TO_LOWERRIGHT,presentation::FadeEffect_UNCOVER_TO_LOWERRIGHT }, 480 { XML_UNCOVER_TO_BOTTOM, presentation::FadeEffect_UNCOVER_TO_BOTTOM }, 481 { XML_UNCOVER_TO_LOWERLEFT, presentation::FadeEffect_UNCOVER_TO_LOWERLEFT }, 482 { XML_VERTICAL_CHECKERBOARD,presentation::FadeEffect_VERTICAL_CHECKERBOARD }, 483 { XML_HORIZONTAL_CHECKERBOARD,presentation::FadeEffect_HORIZONTAL_CHECKERBOARD }, 484 { XML_TOKEN_INVALID, 0 } 485 }; 486 487 SvXMLEnumMapEntry aXML_ConnectionKind_EnumMap[] = 488 { 489 { XML_STANDARD, drawing::ConnectorType_STANDARD }, 490 { XML_CURVE, drawing::ConnectorType_CURVE }, 491 { XML_LINE, drawing::ConnectorType_LINE }, 492 { XML_LINES, drawing::ConnectorType_LINES }, 493 { XML_TOKEN_INVALID, 0 } 494 }; 495 496 SvXMLEnumMapEntry aXML_BitmapMode_EnumMap[] = 497 { 498 { XML_REPEAT, drawing::BitmapMode_REPEAT }, 499 { XML_STRETCH, drawing::BitmapMode_STRETCH }, 500 { XML_BACKGROUND_NO_REPEAT, drawing::BitmapMode_NO_REPEAT }, 501 { XML_TOKEN_INVALID, 0 } 502 }; 503 504 ////////////////////////////////////////////////////////////////////////////// 505 // 3D EnumMaps 506 507 SvXMLEnumMapEntry aXML_NormalsKind_EnumMap[] = 508 { 509 { XML_OBJECT, drawing::NormalsKind_SPECIFIC }, 510 { XML_FLAT, drawing::NormalsKind_FLAT }, 511 { XML_SPHERE, drawing::NormalsKind_SPHERE }, 512 { XML_TOKEN_INVALID, 0 } 513 }; 514 515 SvXMLEnumMapEntry aXML_TexGenerationX_EnumMap[] = 516 { 517 { XML_OBJECT, drawing::TextureProjectionMode_OBJECTSPECIFIC }, 518 { XML_PARALLEL, drawing::TextureProjectionMode_PARALLEL }, 519 { XML_SPHERE, drawing::TextureProjectionMode_SPHERE }, 520 { XML_TOKEN_INVALID, 0 } 521 }; 522 523 SvXMLEnumMapEntry aXML_TexGenerationY_EnumMap[] = 524 { 525 { XML_OBJECT, drawing::TextureProjectionMode_OBJECTSPECIFIC }, 526 { XML_PARALLEL, drawing::TextureProjectionMode_PARALLEL }, 527 { XML_SPHERE, drawing::TextureProjectionMode_SPHERE }, 528 { XML_TOKEN_INVALID, 0 } 529 }; 530 531 SvXMLEnumMapEntry aXML_TexKind_EnumMap[] = 532 { 533 { XML_LUMINANCE, drawing::TextureKind_LUMINANCE }, 534 // { XML_INTENSITY, drawing::TextureKind_INTENSITY }, 535 { XML_COLOR, drawing::TextureKind_COLOR }, 536 { XML_TOKEN_INVALID, 0 } 537 }; 538 539 SvXMLEnumMapEntry aXML_TexMode_EnumMap[] = 540 { 541 { XML_REPLACE, drawing::TextureMode_REPLACE }, 542 { XML_MODULATE, drawing::TextureMode_MODULATE }, 543 { XML_BLEND, drawing::TextureMode_BLEND }, 544 { XML_TOKEN_INVALID, 0 } 545 }; 546 547 SvXMLEnumMapEntry aXML_RefPoint_EnumMap[] = 548 { 549 { XML_TOP_LEFT, drawing::RectanglePoint_LEFT_TOP }, 550 { XML_TOP, drawing::RectanglePoint_MIDDLE_TOP }, 551 { XML_TOP_RIGHT, drawing::RectanglePoint_RIGHT_TOP }, 552 { XML_LEFT, drawing::RectanglePoint_LEFT_MIDDLE }, 553 { XML_CENTER, drawing::RectanglePoint_MIDDLE_MIDDLE }, 554 { XML_RIGHT, drawing::RectanglePoint_RIGHT_MIDDLE }, 555 { XML_BOTTOM_LEFT, drawing::RectanglePoint_LEFT_BOTTOM }, 556 { XML_BOTTOM, drawing::RectanglePoint_MIDDLE_BOTTOM }, 557 { XML_BOTTOM_RIGHT, drawing::RectanglePoint_RIGHT_BOTTOM }, 558 { XML_TOKEN_INVALID, 0 } 559 }; 560 561 SvXMLEnumMapEntry aXML_CircleKind_EnumMap[] = 562 { 563 { XML_FULL, drawing::CircleKind_FULL }, 564 { XML_SECTION, drawing::CircleKind_SECTION }, 565 { XML_CUT, drawing::CircleKind_CUT }, 566 { XML_ARC, drawing::CircleKind_ARC }, 567 { XML_TOKEN_INVALID, 0 } 568 }; 569 570 SvXMLEnumMapEntry aXML_WritingMode_EnumMap[] = 571 { 572 { XML_TB_RL, text::WritingMode_TB_RL }, 573 { XML_LR_TB, text::WritingMode_LR_TB }, 574 { XML_TOKEN_INVALID, 0 } 575 }; 576 577 SvXMLEnumMapEntry __READONLY_DATA pXML_TextAnimation_Enum[] = 578 { 579 { XML_NONE, drawing::TextAnimationKind_NONE }, 580 { XML_BLINKING, drawing::TextAnimationKind_BLINK }, // will be filtered 581 { XML_SCROLL, drawing::TextAnimationKind_SCROLL }, 582 { XML_ALTERNATE, drawing::TextAnimationKind_ALTERNATE }, 583 { XML_SLIDE, drawing::TextAnimationKind_SLIDE }, 584 { XML_TOKEN_INVALID, 0 } 585 }; 586 587 SvXMLEnumMapEntry __READONLY_DATA pXML_TextAnimation_Blinking_Enum[] = 588 { 589 { XML_FALSE, drawing::TextAnimationKind_NONE }, 590 { XML_TRUE, drawing::TextAnimationKind_BLINK }, 591 { XML_FALSE, drawing::TextAnimationKind_SCROLL }, 592 { XML_FALSE, drawing::TextAnimationKind_ALTERNATE }, 593 { XML_FALSE, drawing::TextAnimationKind_SLIDE }, 594 { XML_TOKEN_INVALID, 0 } 595 }; 596 597 SvXMLEnumMapEntry __READONLY_DATA pXML_TextAnimationDirection_Enum[] = 598 { 599 { XML_LEFT, drawing::TextAnimationDirection_LEFT }, 600 { XML_RIGHT, drawing::TextAnimationDirection_RIGHT }, // will be filtered 601 { XML_UP, drawing::TextAnimationDirection_UP }, 602 { XML_DOWN, drawing::TextAnimationDirection_DOWN }, 603 { XML_TOKEN_INVALID, 0 } 604 }; 605 606 SvXMLEnumMapEntry __READONLY_DATA pXML_TextAlign_Enum[] = 607 { 608 { XML_LEFT, drawing::TextHorizontalAdjust_LEFT }, 609 { XML_CENTER, drawing::TextHorizontalAdjust_CENTER }, 610 { XML_RIGHT, drawing::TextHorizontalAdjust_RIGHT }, 611 { XML_JUSTIFY, drawing::TextHorizontalAdjust_BLOCK }, 612 { XML_TOKEN_INVALID, 0 } 613 }; 614 615 SvXMLEnumMapEntry __READONLY_DATA pXML_VerticalAlign_Enum[] = 616 { 617 { XML_TOP, drawing::TextVerticalAdjust_TOP }, 618 { XML_MIDDLE, drawing::TextVerticalAdjust_CENTER }, 619 { XML_BOTTOM, drawing::TextVerticalAdjust_BOTTOM }, 620 { XML_JUSTIFY, drawing::TextVerticalAdjust_BLOCK }, 621 { XML_TOKEN_INVALID, 0 } 622 }; 623 624 SvXMLEnumMapEntry __READONLY_DATA pXML_FitToSize_Enum[] = 625 { 626 { XML_FALSE, drawing::TextFitToSizeType_NONE }, 627 { XML_TRUE, drawing::TextFitToSizeType_PROPORTIONAL }, 628 { XML_TRUE, drawing::TextFitToSizeType_ALLLINES }, 629 { XML_TRUE, drawing::TextFitToSizeType_RESIZEATTR }, 630 { XML_TOKEN_INVALID, 0 } 631 }; 632 633 SvXMLEnumMapEntry __READONLY_DATA pXML_MeasureUnit_Enum[] = 634 { 635 { XML_AUTOMATIC, 0 }, 636 { XML_UNIT_MM, 1 }, 637 { XML_UNIT_CM, 2 }, 638 { XML_UNIT_M, 3 }, 639 { XML_UNIT_KM, 4 }, 640 { XML_UNIT_PT, 6 }, 641 { XML_UNIT_PC, 7 }, 642 { XML_UNIT_INCH, 8 }, 643 { XML_UNIT_FOOT, 9 }, 644 { XML_UNIT_MILES, 10 }, 645 { XML_TOKEN_INVALID,0 } 646 }; 647 648 SvXMLEnumMapEntry __READONLY_DATA pXML_Measure_HAlign_Enum[] = 649 { 650 { XML_AUTOMATIC, drawing::MeasureTextHorzPos_AUTO }, 651 { XML_LEFT_OUTSIDE, drawing::MeasureTextHorzPos_LEFTOUTSIDE }, 652 { XML_INSIDE, drawing::MeasureTextHorzPos_INSIDE }, 653 { XML_RIGHT_OUTSIDE, drawing::MeasureTextHorzPos_RIGHTOUTSIDE}, 654 { XML_TOKEN_INVALID,0 } 655 }; 656 657 SvXMLEnumMapEntry __READONLY_DATA pXML_Measure_VAlign_Enum[] = 658 { 659 { XML_AUTOMATIC, drawing::MeasureTextVertPos_AUTO }, 660 { XML_ABOVE, drawing::MeasureTextVertPos_EAST }, 661 { XML_BELOW, drawing::MeasureTextVertPos_WEST }, 662 { XML_CENTER, drawing::MeasureTextVertPos_CENTERED }, 663 { XML_TOKEN_INVALID,0 } 664 }; 665 666 // #FontWork# 667 SvXMLEnumMapEntry __READONLY_DATA pXML_Fontwork_Style_Enum[] = 668 { 669 { XML_ROTATE, 0 }, //XFT_ROTATE, 670 { XML_UPRIGHT, 1 }, //XFT_UPRIGHT, 671 { XML_SLANT_X, 2 }, //XFT_SLANTX, 672 { XML_SLANT_Y, 3 }, //XFT_SLANTY, 673 { XML_NONE, 4 }, //XFT_NONE 674 { XML_TOKEN_INVALID,0 } 675 }; 676 677 SvXMLEnumMapEntry __READONLY_DATA pXML_Fontwork_Adjust_Enum[] = 678 { 679 { XML_LEFT, 0 }, //XFT_LEFT, 680 { XML_RIGHT, 1 }, //XFT_RIGHT, 681 { XML_AUTOSIZE, 2 }, //XFT_AUTOSIZE, 682 { XML_CENTER, 3 }, //XFT_CENTER 683 { XML_TOKEN_INVALID,0 } 684 }; 685 686 SvXMLEnumMapEntry __READONLY_DATA pXML_Fontwork_Shadow_Enum[] = 687 { 688 { XML_NORMAL, 0 }, //XFTSHADOW_NORMAL, 689 { XML_SLANT, 1 }, //XFTSHADOW_SLANT, 690 { XML_NONE, 2 }, //XFTSHADOW_NONE 691 { XML_TOKEN_INVALID,0 } 692 }; 693 694 SvXMLEnumMapEntry __READONLY_DATA pXML_Fontwork_Form_Enum[] = 695 { 696 { XML_NONE, 0 }, //XFTFORM_NONE, 697 { XML_TOPCIRCLE, 1 }, //XFTFORM_TOPCIRC, 698 { XML_BOTTOMCIRCLE, 2 }, //XFTFORM_BOTCIRC, 699 { XML_LEFTCIRCLE, 3 }, //XFTFORM_LFTCIRC, 700 { XML_RIGHTCIRCLE, 4 }, //XFTFORM_RGTCIRC, 701 { XML_TOPARC, 5 }, //XFTFORM_TOPARC, 702 { XML_BOTTOMARC, 6 }, //XFTFORM_BOTARC, 703 { XML_LEFTARC, 7 }, //XFTFORM_LFTARC, 704 { XML_RIGHTARC, 8 }, //XFTFORM_RGTARC, 705 { XML_BUTTON1, 9 }, //XFTFORM_BUTTON1, 706 { XML_BUTTON2, 10 }, //XFTFORM_BUTTON2, 707 { XML_BUTTON3, 11 }, //XFTFORM_BUTTON3, 708 { XML_BUTTON4, 12 }, //XFTFORM_BUTTON4 709 { XML_TOKEN_INVALID,0 } 710 }; 711 712 SvXMLEnumMapEntry __READONLY_DATA pXML_Caption_Esc_Dir_Enum[] = 713 { 714 { XML_HORIZONTAL, 0 }, //SDRCAPT_ESCHORIZONTAL, 715 { XML_VERTICAL, 1 }, //SDRCAPT_ESCVERTICAL, 716 { XML_AUTO, 2 }, //SDRCAPT_ESCBESTFIT, 717 { XML_TOKEN_INVALID,0 } 718 }; 719 720 SvXMLEnumMapEntry __READONLY_DATA pXML_Caption_Type_Enum[] = 721 { 722 { XML_STRAIGHT_LINE, 0 }, //SDRCAPT_TYPE1, 723 { XML_ANGLED_LINE, 1 }, //SDRCAPT_TYPE2, 724 { XML_ANGLED_CONNECTOR_LINE, 2 }, //SDRCAPT_TYPE3, 725 { XML_TOKEN_INVALID,0 } 726 }; 727 728 ////////////////////////////////////////////////////////////////////////////// 729 730 class XMLCaptionEscapeRelative : public XMLPropertyHandler 731 { 732 public: 733 virtual sal_Bool importXML( 734 const ::rtl::OUString& rStrImpValue, 735 ::com::sun::star::uno::Any& rValue, 736 const SvXMLUnitConverter& rUnitConverter ) const; 737 virtual sal_Bool exportXML( 738 ::rtl::OUString& rStrExpValue, 739 const ::com::sun::star::uno::Any& rValue, 740 const SvXMLUnitConverter& rUnitConverter ) const; 741 }; 742 743 sal_Bool XMLCaptionEscapeRelative::importXML( const OUString& rStrImpValue, Any& rValue, const SvXMLUnitConverter& ) const 744 { 745 sal_Int32 nValue; 746 747 if( !SvXMLUnitConverter::convertPercent( nValue, rStrImpValue ) ) 748 return sal_False; 749 750 nValue *= 100; 751 rValue <<= nValue; 752 return sal_True; 753 } 754 755 sal_Bool XMLCaptionEscapeRelative::exportXML( OUString& rStrExpValue, const Any& rValue, const SvXMLUnitConverter& ) const 756 { 757 sal_Int32 nValue = 0; 758 if( !(rValue >>= nValue ) ) 759 return sal_False; 760 761 nValue /= 100; 762 OUStringBuffer aOut; 763 SvXMLUnitConverter::convertPercent( aOut, nValue ); 764 rStrExpValue = aOut.makeStringAndClear(); 765 return sal_True; 766 } 767 768 ////////////////////////////////////////////////////////////////////////////// 769 770 class XMLMoveSizeProtectHdl : public XMLPropertyHandler 771 { 772 public: 773 XMLMoveSizeProtectHdl( sal_Int32 nType ) : mnType( nType ) {} 774 775 virtual sal_Bool importXML( 776 const ::rtl::OUString& rStrImpValue, 777 ::com::sun::star::uno::Any& rValue, 778 const SvXMLUnitConverter& rUnitConverter ) const; 779 virtual sal_Bool exportXML( 780 ::rtl::OUString& rStrExpValue, 781 const ::com::sun::star::uno::Any& rValue, 782 const SvXMLUnitConverter& rUnitConverter ) const; 783 private: 784 const sal_Int32 mnType; 785 }; 786 787 sal_Bool XMLMoveSizeProtectHdl::importXML( const OUString& rStrImpValue, Any& rValue, const SvXMLUnitConverter& ) const 788 { 789 const sal_Bool bValue = rStrImpValue.indexOf( GetXMLToken( mnType == XML_SD_TYPE_MOVE_PROTECT ? XML_POSITION : XML_SIZE ) ) != -1; 790 rValue <<= bValue; 791 return sal_True; 792 } 793 794 sal_Bool XMLMoveSizeProtectHdl::exportXML( OUString& rStrExpValue, const Any& rValue, const SvXMLUnitConverter& ) const 795 { 796 sal_Bool bValue = sal_Bool(); 797 if( !(rValue >>= bValue ) ) 798 return sal_False; 799 800 if( bValue ) 801 { 802 if( rStrExpValue.getLength() ) 803 rStrExpValue += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " " ) ); 804 805 rStrExpValue += GetXMLToken( mnType == XML_SD_TYPE_MOVE_PROTECT ? XML_POSITION : XML_SIZE ); 806 } 807 808 return sal_True; 809 } 810 811 812 ////////////////////////////////////////////////////////////////////////////// 813 814 class XMLSdHeaderFooterVisibilityTypeHdl : public XMLPropertyHandler 815 { 816 public: 817 virtual ~XMLSdHeaderFooterVisibilityTypeHdl(); 818 819 virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const; 820 virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const; 821 }; 822 823 XMLSdHeaderFooterVisibilityTypeHdl::~XMLSdHeaderFooterVisibilityTypeHdl() 824 { 825 } 826 827 sal_Bool XMLSdHeaderFooterVisibilityTypeHdl::importXML( 828 const ::rtl::OUString& rStrImpValue, 829 ::com::sun::star::uno::Any& rValue, 830 const SvXMLUnitConverter& ) const 831 { 832 // #i38644# 833 // attributes with this type where saved with VISIBLE|HIDDEN prior 834 // to src680m67. So we have to import that correctly 835 const sal_Bool bBool = IsXMLToken(rStrImpValue, XML_TRUE) || IsXMLToken(rStrImpValue, XML_VISIBLE); 836 rValue <<= bBool; 837 return bBool || IsXMLToken(rStrImpValue, XML_FALSE) || IsXMLToken(rStrImpValue, XML_HIDDEN); 838 } 839 840 sal_Bool XMLSdHeaderFooterVisibilityTypeHdl::exportXML( 841 OUString& rStrExpValue, 842 const Any& rValue, 843 const SvXMLUnitConverter& ) const 844 { 845 sal_Bool bRet = sal_False; 846 OUStringBuffer aOut; 847 sal_Bool bValue = sal_Bool(); 848 849 if (rValue >>= bValue) 850 { 851 SvXMLUnitConverter::convertBool( aOut, bValue ); 852 rStrExpValue = aOut.makeStringAndClear(); 853 854 bRet = sal_True; 855 } 856 857 return bRet; 858 } 859 860 861 ////////////////////////////////////////////////////////////////////////////// 862 863 XMLSdPropHdlFactory::XMLSdPropHdlFactory( uno::Reference< frame::XModel > xModel, SvXMLImport& rImport ) 864 : mxModel( xModel ), mpExport(0), mpImport( &rImport ) 865 { 866 } 867 868 XMLSdPropHdlFactory::XMLSdPropHdlFactory( uno::Reference< frame::XModel > xModel, SvXMLExport& rExport ) 869 : mxModel( xModel ), mpExport( &rExport ), mpImport(0) 870 { 871 } 872 873 XMLSdPropHdlFactory::~XMLSdPropHdlFactory() 874 { 875 } 876 877 const XMLPropertyHandler* XMLSdPropHdlFactory::GetPropertyHandler( sal_Int32 nType ) const 878 { 879 const XMLPropertyHandler* pHdl = XMLPropertyHandlerFactory::GetPropertyHandler( nType ); 880 if(!pHdl) 881 { 882 switch(nType) 883 { 884 case XML_SD_TYPE_STROKE : 885 { 886 pHdl = new XMLEnumPropertyHdl( aXML_LineStyle_EnumMap, ::getCppuType((const drawing::LineStyle*)0) ); 887 break; 888 } 889 case XML_SD_TYPE_LINEJOIN : 890 { 891 pHdl = new XMLEnumPropertyHdl( aXML_LineJoint_EnumMap, ::getCppuType((const drawing::LineJoint*)0) ); 892 break; 893 } 894 case XML_SD_TYPE_FILLSTYLE : 895 { 896 pHdl = new XMLEnumPropertyHdl( aXML_FillStyle_EnumMap, ::getCppuType((const drawing::FillStyle*)0) ); 897 break; 898 } 899 case XML_SD_TYPE_PRESPAGE_TYPE : 900 { 901 pHdl = new XMLEnumPropertyHdl( aXML_PresChange_EnumMap, ::getCppuType((const sal_Int32*)0) ); 902 break; 903 } 904 case XML_SD_TYPE_SHADOW : 905 { 906 pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken(XML_VISIBLE), GetXMLToken(XML_HIDDEN) ); 907 break; 908 } 909 case XML_TYPE_SD_MIRROR: 910 { 911 pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken(XML_HORIZONTAL), GetXMLToken(XML_NONE) ); 912 break; 913 } 914 case XML_SD_TYPE_PRESPAGE_STYLE : 915 { 916 pHdl = new XMLEnumPropertyHdl( aXML_FadeEffect_EnumMap, ::getCppuType((const presentation::FadeEffect*)0) ); 917 break; 918 } 919 case XML_SD_TYPE_PRESPAGE_SPEED : 920 { 921 pHdl = new XMLEnumPropertyHdl( aXML_TransSpeed_EnumMap, ::getCppuType((const presentation::AnimationSpeed*)0) ); 922 break; 923 } 924 case XML_SD_TYPE_PRESPAGE_DURATION : 925 { 926 pHdl = new XMLDurationPropertyHdl(); 927 break; 928 } 929 case XML_SD_TYPE_TEXT_CROSSEDOUT : 930 { 931 pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken(XML_SOLID), GetXMLToken(XML_NONE) ); 932 break; 933 } 934 case XML_SD_TYPE_OPACITY : 935 { 936 pHdl = new XMLOpacityPropertyHdl(mpImport); 937 break; 938 } 939 case XML_SD_TYPE_WRITINGMODE : 940 { 941 pHdl = new XMLEnumPropertyHdl( aXML_WritingMode_EnumMap, ::getCppuType((const text::WritingMode*)0) ); 942 break; 943 } 944 case XML_SD_TYPE_PRESPAGE_VISIBILITY : 945 { 946 pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken(XML_VISIBLE), GetXMLToken(XML_HIDDEN) ); 947 break; 948 } 949 case XML_SD_TYPE_PRESPAGE_BACKSIZE: 950 { 951 pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken(XML_FULL), GetXMLToken(XML_BORDER) ); 952 break; 953 } 954 955 ////////////////////////////////////////////////////////////////// 956 // 3D Properties 957 958 case XML_SD_TYPE_BACKFACE_CULLING: 959 { 960 // #87922# DoubleSided -> BackfaceCulling 961 // This sal_Bool needs to be flipped, DoubleSided sal_True -> NO Backface culling 962 // and vice versa. 963 pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken(XML_DISABLED), GetXMLToken(XML_ENABLED) ); 964 break; 965 } 966 967 case XML_SD_TYPE_NORMALS_KIND: 968 { 969 pHdl = new XMLEnumPropertyHdl( aXML_NormalsKind_EnumMap, ::getCppuType((const drawing::NormalsKind*)0) ); 970 break; 971 } 972 case XML_SD_TYPE_NORMALS_DIRECTION: 973 { 974 pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken(XML_NORMAL), GetXMLToken(XML_INVERSE) ); 975 break; 976 } 977 case XML_SD_TYPE_TEX_GENERATION_MODE_X: 978 { 979 pHdl = new XMLEnumPropertyHdl( aXML_TexGenerationX_EnumMap, ::getCppuType((const drawing::TextureProjectionMode*)0) ); 980 break; 981 } 982 case XML_SD_TYPE_TEX_GENERATION_MODE_Y: 983 { 984 pHdl = new XMLEnumPropertyHdl( aXML_TexGenerationY_EnumMap, ::getCppuType((const drawing::TextureProjectionMode*)0) ); 985 break; 986 } 987 case XML_SD_TYPE_TEX_KIND: 988 { 989 pHdl = new XMLEnumPropertyHdl( aXML_TexKind_EnumMap, ::getCppuType((const drawing::TextureKind*)0) ); 990 break; 991 } 992 case XML_SD_TYPE_TEX_MODE: 993 { 994 pHdl = new XMLEnumPropertyHdl( aXML_TexMode_EnumMap, ::getCppuType((const drawing::TextureMode*)0) ); 995 break; 996 } 997 case XML_SD_TYPE_NUMBULLET: 998 { 999 uno::Reference<ucb::XAnyCompareFactory> xCompareFac( mxModel, uno::UNO_QUERY ); 1000 uno::Reference<ucb::XAnyCompare> xCompare; 1001 if( xCompareFac.is() ) 1002 xCompare = xCompareFac->createAnyCompareByName( OUString( RTL_CONSTASCII_USTRINGPARAM( "NumberingRules" ) ) ); 1003 1004 pHdl = new XMLNumRulePropHdl( xCompare ); 1005 break; 1006 } 1007 case XML_SD_TYPE_BITMAP_MODE: 1008 { 1009 pHdl = new XMLEnumPropertyHdl( aXML_BitmapMode_EnumMap, getCppuType((const drawing::BitmapMode*)0) ); 1010 break; 1011 } 1012 case XML_SD_TYPE_BITMAPREPOFFSETX: 1013 case XML_SD_TYPE_BITMAPREPOFFSETY: 1014 { 1015 pHdl = new XMLBitmapRepeatOffsetPropertyHandler( nType == XML_SD_TYPE_BITMAPREPOFFSETX ); 1016 break; 1017 } 1018 case XML_SD_TYPE_FILLBITMAPSIZE: 1019 { 1020 pHdl = new XMLFillBitmapSizePropertyHandler(); 1021 break; 1022 } 1023 case XML_SD_TYPE_LOGICAL_SIZE: 1024 { 1025 pHdl = new XMLBitmapLogicalSizePropertyHandler(); 1026 break; 1027 } 1028 case XML_SD_TYPE_BITMAP_REFPOINT: 1029 { 1030 pHdl = new XMLEnumPropertyHdl( aXML_RefPoint_EnumMap, getCppuType((const ::com::sun::star::drawing::RectanglePoint*)0) ); 1031 break; 1032 } 1033 case XML_TYPE_TEXT_ANIMATION: 1034 pHdl = new XMLEnumPropertyHdl( pXML_TextAnimation_Enum, ::getCppuType((const com::sun::star::drawing::TextAnimationKind*)0) ); 1035 break; 1036 case XML_TYPE_TEXT_ANIMATION_BLINKING: 1037 pHdl = new XMLEnumPropertyHdl( pXML_TextAnimation_Blinking_Enum, ::getCppuType((const com::sun::star::drawing::TextAnimationKind*)0) ); 1038 break; 1039 case XML_TYPE_TEXT_ANIMATION_DIRECTION: 1040 pHdl = new XMLEnumPropertyHdl( pXML_TextAnimationDirection_Enum, ::getCppuType((const com::sun::star::drawing::TextAnimationDirection*)0) ); 1041 break; 1042 case XML_TYPE_TEXT_ANIMATION_STEPS: 1043 pHdl = new XMLTextAnimationStepPropertyHdl; 1044 break; 1045 case XML_SD_TYPE_TEXT_ALIGN: 1046 pHdl = new XMLEnumPropertyHdl( pXML_TextAlign_Enum, ::getCppuType((const com::sun::star::drawing::TextHorizontalAdjust*)0) ); 1047 break; 1048 case XML_SD_TYPE_VERTICAL_ALIGN: 1049 pHdl = new XMLEnumPropertyHdl( pXML_VerticalAlign_Enum, ::getCppuType((const com::sun::star::drawing::TextVerticalAdjust*)0) ); 1050 break; 1051 case XML_SD_TYPE_FITTOSIZE: 1052 pHdl = new XMLEnumPropertyHdl( pXML_FitToSize_Enum, ::getCppuType((const com::sun::star::drawing::TextFitToSizeType*)0) ); 1053 break; 1054 case XML_SD_TYPE_MEASURE_UNIT: 1055 pHdl = new XMLEnumPropertyHdl( pXML_MeasureUnit_Enum, ::getCppuType((const sal_Int32*)0) ); 1056 break; 1057 case XML_SD_TYPE_MEASURE_HALIGN: 1058 pHdl = new XMLEnumPropertyHdl( pXML_Measure_HAlign_Enum, ::getCppuType((const com::sun::star::drawing::MeasureTextHorzPos*)0) ); 1059 break; 1060 case XML_SD_TYPE_MEASURE_VALIGN: 1061 pHdl = new XMLEnumPropertyHdl( pXML_Measure_VAlign_Enum, ::getCppuType((const com::sun::star::drawing::MeasureTextVertPos*)0) ); 1062 break; 1063 case XML_SD_TYPE_MEASURE_PLACING: 1064 { 1065 pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken(XML_BELOW), GetXMLToken(XML_ABOVE) ); 1066 } 1067 break; 1068 case XML_TYPE_TEXT_CLIP11: 1069 pHdl = new XMLClipPropertyHandler( sal_True ); 1070 break; 1071 case XML_TYPE_TEXT_CLIP: 1072 pHdl = new XMLClipPropertyHandler( sal_False ); 1073 break; 1074 1075 // #FontWork# 1076 case XML_SD_TYPE_FONTWORK_STYLE : 1077 pHdl = new XMLEnumPropertyHdl( pXML_Fontwork_Style_Enum , ::getCppuType((const sal_Int32*)0)); 1078 break; 1079 case XML_SD_TYPE_FONTWORK_ADJUST : 1080 pHdl = new XMLEnumPropertyHdl( pXML_Fontwork_Adjust_Enum , ::getCppuType((const sal_Int32*)0)); 1081 break; 1082 case XML_SD_TYPE_FONTWORK_SHADOW : 1083 pHdl = new XMLEnumPropertyHdl( pXML_Fontwork_Shadow_Enum , ::getCppuType((const sal_Int32*)0)); 1084 break; 1085 case XML_SD_TYPE_FONTWORK_FORM : 1086 pHdl = new XMLEnumPropertyHdl( pXML_Fontwork_Form_Enum , ::getCppuType((const sal_Int32*)0)); 1087 break; 1088 1089 case XML_SD_TYPE_CONTROL_BORDER: 1090 pHdl = new ::xmloff::OControlBorderHandler( ::xmloff::OControlBorderHandler::STYLE ); 1091 break; 1092 case XML_SD_TYPE_CONTROL_BORDER_COLOR: 1093 pHdl = new ::xmloff::OControlBorderHandler( ::xmloff::OControlBorderHandler::COLOR ); 1094 break; 1095 case XML_SD_TYPE_IMAGE_SCALE_MODE: 1096 pHdl = new ::xmloff::ImageScaleModeHandler; 1097 break; 1098 case XML_TYPE_CONTROL_TEXT_EMPHASIZE: 1099 pHdl = new ::xmloff::OControlTextEmphasisHandler; 1100 break; 1101 1102 case XML_SD_TYPE_CAPTION_ANGLE_TYPE: 1103 { 1104 pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken(XML_FIXED), GetXMLToken(XML_FREE) ); 1105 break; 1106 } 1107 case XML_SD_TYPE_CAPTION_IS_ESC_REL: 1108 pHdl = new XMLIsPercentagePropertyHandler(); 1109 break; 1110 case XML_SD_TYPE_CAPTION_ESC_REL: 1111 pHdl = new XMLCaptionEscapeRelative(); 1112 break; 1113 case XML_SD_TYPE_CAPTION_ESC_ABS: 1114 pHdl = new XMLPercentOrMeasurePropertyHandler( sal_False ); 1115 break; 1116 case XML_SD_TYPE_CAPTION_ESC_DIR: 1117 pHdl = new XMLEnumPropertyHdl( pXML_Caption_Esc_Dir_Enum , ::getCppuType((const sal_Int32*)0)); 1118 break; 1119 case XML_SD_TYPE_CAPTION_TYPE: 1120 pHdl = new XMLEnumPropertyHdl( pXML_Caption_Type_Enum , ::getCppuType((const sal_Int32*)0)); 1121 break; 1122 case XML_SD_TYPE_DATETIMEUPDATE: 1123 pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken(XML_FIXED), GetXMLToken(XML_VARIABLE) ); 1124 break; 1125 case XML_SD_TYPE_DATETIME_FORMAT: 1126 pHdl = new XMLDateTimeFormatHdl( mpExport ); 1127 break; 1128 case XML_SD_TYPE_TRANSITION_TYPE: 1129 pHdl = new XMLEnumPropertyHdl( xmloff::getAnimationsEnumMap(xmloff::Animations_EnumMap_TransitionType) , ::getCppuType((const sal_Int16*)0)); 1130 break; 1131 case XML_SD_TYPE_TRANSTIION_SUBTYPE: 1132 pHdl = new XMLEnumPropertyHdl( xmloff::getAnimationsEnumMap(xmloff::Animations_EnumMap_TransitionSubType) , ::getCppuType((const sal_Int16*)0)); 1133 break; 1134 case XML_SD_TYPE_TRANSTIION_DIRECTION: 1135 pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken(XML_FORWARD), GetXMLToken(XML_REVERSE) ); 1136 break; 1137 case XML_TYPE_WRAP_OPTION: 1138 pHdl = new XMLWordWrapPropertyHdl( mpImport ); 1139 break; 1140 1141 case XML_SD_TYPE_MOVE_PROTECT: 1142 case XML_SD_TYPE_SIZE_PROTECT: 1143 pHdl = new XMLMoveSizeProtectHdl( nType ); 1144 break; 1145 case XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE: 1146 pHdl = new XMLSdHeaderFooterVisibilityTypeHdl(); 1147 break; 1148 } 1149 1150 if(pHdl) 1151 PutHdlCache(nType, pHdl); 1152 } 1153 1154 return pHdl; 1155 } 1156 1157 ////////////////////////////////////////////////////////////////////////////// 1158 1159 XMLShapePropertySetMapper::XMLShapePropertySetMapper(const UniReference< XMLPropertyHandlerFactory >& rFactoryRef) 1160 : XMLPropertySetMapper( aXMLSDProperties, rFactoryRef ) 1161 { 1162 } 1163 1164 XMLShapePropertySetMapper::XMLShapePropertySetMapper(const UniReference< XMLPropertyHandlerFactory >& rFactoryRef, sal_uInt16 nOffset) 1165 : XMLPropertySetMapper( &aXMLSDProperties[nOffset], rFactoryRef ) 1166 { 1167 } 1168 1169 XMLShapePropertySetMapper::~XMLShapePropertySetMapper() 1170 { 1171 } 1172 1173 // ---------------------------------------- 1174 1175 XMLShapeExportPropertyMapper::XMLShapeExportPropertyMapper( const UniReference< XMLPropertySetMapper >& rMapper, XMLTextListAutoStylePool *pListAutoPool, SvXMLExport& rExport ) 1176 : SvXMLExportPropertyMapper( rMapper ) 1177 , mpListAutoPool( pListAutoPool ) 1178 , mrExport( rExport ) 1179 , maNumRuleExp( rExport ) 1180 , mbIsInAutoStyles( sal_True ) 1181 , msCDATA( GetXMLToken(XML_CDATA)) 1182 , msTrue( GetXMLToken(XML_TRUE)) 1183 , msFalse( GetXMLToken(XML_FALSE)) 1184 { 1185 } 1186 1187 XMLShapeExportPropertyMapper::~XMLShapeExportPropertyMapper() 1188 { 1189 } 1190 1191 void XMLShapeExportPropertyMapper::ContextFilter( 1192 std::vector< XMLPropertyState >& rProperties, 1193 uno::Reference< beans::XPropertySet > rPropSet ) const 1194 { 1195 XMLPropertyState* pRepeatOffsetX = NULL; 1196 XMLPropertyState* pRepeatOffsetY = NULL; 1197 XMLPropertyState* pTextAnimationBlinking = NULL; 1198 XMLPropertyState* pTextAnimationKind = NULL; 1199 1200 // #FontWork# 1201 XMLPropertyState* pFontWorkStyle = NULL; 1202 XMLPropertyState* pFontWorkAdjust = NULL; 1203 XMLPropertyState* pFontWorkDistance = NULL; 1204 XMLPropertyState* pFontWorkStart = NULL; 1205 XMLPropertyState* pFontWorkMirror = NULL; 1206 XMLPropertyState* pFontWorkOutline = NULL; 1207 XMLPropertyState* pFontWorkShadow = NULL; 1208 XMLPropertyState* pFontWorkShadowColor = NULL; 1209 XMLPropertyState* pFontWorkShadowOffsetx = NULL; 1210 XMLPropertyState* pFontWorkShadowOffsety = NULL; 1211 XMLPropertyState* pFontWorkForm = NULL; 1212 XMLPropertyState* pFontWorkHideform = NULL; 1213 XMLPropertyState* pFontWorkShadowTransparence = NULL; 1214 1215 // OLE 1216 XMLPropertyState* pOLEVisAreaLeft = NULL; 1217 XMLPropertyState* pOLEVisAreaTop = NULL; 1218 XMLPropertyState* pOLEVisAreaWidth = NULL; 1219 XMLPropertyState* pOLEVisAreaHeight = NULL; 1220 XMLPropertyState* pOLEIsInternal = NULL; 1221 1222 // caption 1223 XMLPropertyState* pCaptionIsEscRel = NULL; 1224 XMLPropertyState* pCaptionEscRel = NULL; 1225 XMLPropertyState* pCaptionEscAbs = NULL; 1226 1227 // filter fo:clip 1228 XMLPropertyState* pClip11State = NULL; 1229 XMLPropertyState* pClipState = NULL; 1230 1231 XMLPropertyState* pShapeWritingMode = NULL; 1232 XMLPropertyState* pTextWritingMode = NULL; 1233 XMLPropertyState* pControlWritingMode = NULL; 1234 1235 // filter properties 1236 for( std::vector< XMLPropertyState >::iterator aIter = rProperties.begin(); 1237 aIter != rProperties.end(); 1238 ++aIter ) 1239 { 1240 XMLPropertyState *property = &(*aIter); 1241 if( property->mnIndex == -1 ) 1242 continue; 1243 1244 // find properties with context 1245 // to prevent writing this property set mnIndex member to -1 1246 switch( getPropertySetMapper()->GetEntryContextId( property->mnIndex )) 1247 { 1248 case CTF_NUMBERINGRULES: 1249 { 1250 if( mbIsInAutoStyles ) 1251 property->mnIndex = -1; 1252 } 1253 break; 1254 case CTF_SD_NUMBERINGRULES_NAME: 1255 { 1256 // this property is not exported in the style:properties element 1257 // because its an XIndexAccess and not a string. 1258 // This will be handled in SvXMLAutoStylePoolP::exportStyleAttributes 1259 // This is suboptimal 1260 if( !mbIsInAutoStyles ) 1261 property->mnIndex = -1; 1262 } 1263 break; 1264 case CTF_WRITINGMODE: 1265 { 1266 pShapeWritingMode = property; 1267 text::WritingMode eWritingMode; 1268 if( property->maValue >>= eWritingMode ) 1269 { 1270 if( text::WritingMode_LR_TB == eWritingMode ) 1271 { 1272 property->mnIndex = -1; 1273 pShapeWritingMode = 0; 1274 } 1275 } 1276 } 1277 break; 1278 case CTF_CONTROLWRITINGMODE: 1279 pControlWritingMode = property; 1280 break; 1281 case CTF_TEXTWRITINGMODE: 1282 pTextWritingMode = property; 1283 break; 1284 case CTF_REPEAT_OFFSET_X: 1285 pRepeatOffsetX = property; 1286 break; 1287 1288 case CTF_REPEAT_OFFSET_Y: 1289 pRepeatOffsetY = property; 1290 break; 1291 1292 case CTF_DASHNAME: 1293 case CTF_FILLGRADIENTNAME: 1294 case CTF_FILLHATCHNAME: 1295 case CTF_FILLBITMAPNAME: 1296 { 1297 OUString aStr; 1298 if( (property->maValue >>= aStr) && 0 == aStr.getLength() ) 1299 property->mnIndex = -1; 1300 } 1301 break; 1302 case CTF_TEXTANIMATION_BLINKING: 1303 pTextAnimationBlinking = property; 1304 break; 1305 case CTF_TEXTANIMATION_KIND: 1306 pTextAnimationKind = property; 1307 break; 1308 1309 // #FontWork# 1310 case CTF_FONTWORK_STYLE: pFontWorkStyle = property; break; 1311 case CTF_FONTWORK_ADJUST: pFontWorkAdjust = property; break; 1312 case CTF_FONTWORK_DISTANCE: pFontWorkDistance = property; break; 1313 case CTF_FONTWORK_START: pFontWorkStart = property; break; 1314 case CTF_FONTWORK_MIRROR: pFontWorkMirror = property; break; 1315 case CTF_FONTWORK_OUTLINE: pFontWorkOutline = property; break; 1316 case CTF_FONTWORK_SHADOW: pFontWorkShadow = property; break; 1317 case CTF_FONTWORK_SHADOWCOLOR: pFontWorkShadowColor = property; break; 1318 case CTF_FONTWORK_SHADOWOFFSETX: pFontWorkShadowOffsetx = property; break; 1319 case CTF_FONTWORK_SHADOWOFFSETY: pFontWorkShadowOffsety = property; break; 1320 case CTF_FONTWORK_FORM: pFontWorkForm = property; break; 1321 case CTF_FONTWORK_HIDEFORM: pFontWorkHideform = property; break; 1322 case CTF_FONTWORK_SHADOWTRANSPARENCE: pFontWorkShadowTransparence = property; break; 1323 1324 // OLE 1325 case CTF_SD_OLE_VIS_AREA_EXPORT_LEFT: pOLEVisAreaLeft = property; break; 1326 case CTF_SD_OLE_VIS_AREA_EXPORT_TOP: pOLEVisAreaTop = property; break; 1327 case CTF_SD_OLE_VIS_AREA_EXPORT_WIDTH: pOLEVisAreaWidth = property; break; 1328 case CTF_SD_OLE_VIS_AREA_EXPORT_HEIGHT: pOLEVisAreaHeight = property; break; 1329 case CTF_SD_OLE_ISINTERNAL: pOLEIsInternal = property; break; 1330 1331 case CTF_FRAME_DISPLAY_SCROLLBAR: 1332 { 1333 if( !property->maValue.hasValue() ) 1334 property->mnIndex = -1; 1335 } 1336 break; 1337 case CTF_FRAME_MARGIN_HORI: 1338 case CTF_FRAME_MARGIN_VERT: 1339 { 1340 sal_Int32 nValue = 0; 1341 if( (property->maValue >>= nValue) && (nValue < 0) ) 1342 property->mnIndex = -1; 1343 } 1344 break; 1345 1346 case CTF_SD_MOVE_PROTECT: 1347 { 1348 sal_Bool bProtected = sal_Bool(); 1349 if( (property->maValue >>= bProtected) && !bProtected ) 1350 property->mnIndex = -1; 1351 } 1352 break; 1353 case CTF_SD_SIZE_PROTECT: 1354 { 1355 sal_Bool bProtected = sal_Bool(); 1356 if( (property->maValue >>= bProtected) && !bProtected ) 1357 property->mnIndex = -1; 1358 } 1359 break; 1360 case CTF_CAPTION_ISESCREL: pCaptionIsEscRel = property; break; 1361 case CTF_CAPTION_ESCREL: pCaptionEscRel = property; break; 1362 case CTF_CAPTION_ESCABS: pCaptionEscAbs = property; break; 1363 case CTF_TEXT_CLIP11: pClip11State = property; break; 1364 case CTF_TEXT_CLIP: pClipState = property; break; 1365 } 1366 } 1367 1368 // check for duplicate writing mode 1369 if( pShapeWritingMode && (pTextWritingMode || pControlWritingMode) ) 1370 { 1371 if( pTextWritingMode ) 1372 pTextWritingMode->mnIndex = -1; 1373 if( pControlWritingMode ) 1374 pControlWritingMode->mnIndex = -1; 1375 } 1376 else if( pTextWritingMode && pControlWritingMode ) 1377 { 1378 pControlWritingMode->mnIndex = -1; 1379 } 1380 1381 // do not export visual area for internal ole objects 1382 if( pOLEIsInternal ) 1383 { 1384 sal_Bool bInternal = sal_Bool(); 1385 if( (pOLEIsInternal->maValue >>= bInternal) && !bInternal ) 1386 { 1387 try 1388 { 1389 const OUString sVisibleArea( RTL_CONSTASCII_USTRINGPARAM("VisibleArea") ); 1390 awt::Rectangle aRect; 1391 if( rPropSet->getPropertyValue( sVisibleArea ) >>= aRect ) 1392 { 1393 if( pOLEVisAreaLeft ) 1394 { 1395 pOLEVisAreaLeft->mnIndex = getPropertySetMapper()->FindEntryIndex( CTF_SD_OLE_VIS_AREA_IMPORT_LEFT ); 1396 pOLEVisAreaLeft->maValue <<= aRect; 1397 } 1398 if( pOLEVisAreaTop ) 1399 { 1400 pOLEVisAreaTop->mnIndex = getPropertySetMapper()->FindEntryIndex( CTF_SD_OLE_VIS_AREA_IMPORT_TOP ); 1401 pOLEVisAreaTop->maValue <<= aRect; 1402 } 1403 if( pOLEVisAreaWidth ) 1404 { 1405 pOLEVisAreaWidth->mnIndex = getPropertySetMapper()->FindEntryIndex( CTF_SD_OLE_VIS_AREA_IMPORT_WIDTH ); 1406 pOLEVisAreaWidth->maValue <<= aRect; 1407 } 1408 if( pOLEVisAreaHeight ) 1409 { 1410 pOLEVisAreaHeight->mnIndex = getPropertySetMapper()->FindEntryIndex( CTF_SD_OLE_VIS_AREA_IMPORT_HEIGHT ); 1411 pOLEVisAreaHeight->maValue <<= aRect; 1412 } 1413 } 1414 } 1415 catch( uno::Exception& ) 1416 { 1417 } 1418 } 1419 else 1420 { 1421 if( pOLEVisAreaLeft ) pOLEVisAreaLeft->mnIndex = -1; 1422 if( pOLEVisAreaTop ) pOLEVisAreaTop->mnIndex = -1; 1423 if( pOLEVisAreaWidth ) pOLEVisAreaWidth->mnIndex = -1; 1424 if( pOLEVisAreaHeight ) pOLEVisAreaHeight->mnIndex = -1; 1425 } 1426 1427 pOLEIsInternal->mnIndex = -1; 1428 } 1429 1430 if( pTextAnimationBlinking && pTextAnimationKind ) 1431 { 1432 drawing::TextAnimationKind eKind; 1433 if( (pTextAnimationKind->maValue >>= eKind) && eKind != drawing::TextAnimationKind_BLINK ) 1434 { 1435 pTextAnimationBlinking->mnIndex = -1; 1436 } 1437 else 1438 { 1439 pTextAnimationKind->mnIndex = -1; 1440 } 1441 } 1442 1443 if( pRepeatOffsetX && pRepeatOffsetY ) 1444 { 1445 sal_Int32 nOffset = 0; 1446 if( ( pRepeatOffsetX->maValue >>= nOffset ) && ( nOffset == 0 ) ) 1447 pRepeatOffsetX->mnIndex = -1; 1448 else 1449 pRepeatOffsetY->mnIndex = -1; 1450 } 1451 1452 if(pFontWorkStyle) 1453 { 1454 // #FontWork# 1455 sal_Int32 nStyle = 0; 1456 1457 if(pFontWorkStyle->maValue >>= nStyle) 1458 { 1459 if(/*XFT_NONE*/4 == nStyle) 1460 { 1461 pFontWorkStyle->mnIndex = -1; 1462 if(pFontWorkAdjust) 1463 pFontWorkAdjust->mnIndex = -1; 1464 if(pFontWorkDistance) 1465 pFontWorkDistance->mnIndex = -1; 1466 if(pFontWorkStart) 1467 pFontWorkStart->mnIndex = -1; 1468 if(pFontWorkMirror) 1469 pFontWorkMirror->mnIndex = -1; 1470 if(pFontWorkOutline) 1471 pFontWorkOutline->mnIndex = -1; 1472 if(pFontWorkShadow) 1473 pFontWorkShadow->mnIndex = -1; 1474 if(pFontWorkShadowColor) 1475 pFontWorkShadowColor->mnIndex = -1; 1476 if(pFontWorkShadowOffsetx) 1477 pFontWorkShadowOffsetx->mnIndex = -1; 1478 if(pFontWorkShadowOffsety) 1479 pFontWorkShadowOffsety->mnIndex = -1; 1480 if(pFontWorkForm) 1481 pFontWorkForm->mnIndex = -1; 1482 if(pFontWorkHideform) 1483 pFontWorkHideform->mnIndex = -1; 1484 if(pFontWorkShadowTransparence) 1485 pFontWorkShadowTransparence->mnIndex = -1; 1486 } 1487 } 1488 } 1489 1490 if( pCaptionIsEscRel ) 1491 { 1492 sal_Bool bIsRel = false; 1493 pCaptionIsEscRel->maValue >>= bIsRel; 1494 1495 if( bIsRel ) 1496 { 1497 if( pCaptionEscAbs ) 1498 pCaptionEscAbs->mnIndex = -1; 1499 } 1500 else 1501 { 1502 if( pCaptionEscRel ) 1503 pCaptionEscRel->mnIndex = -1; 1504 } 1505 1506 pCaptionIsEscRel->mnIndex = -1; 1507 } 1508 1509 if( pClipState != NULL && pClip11State != NULL ) 1510 pClip11State->mnIndex = -1; 1511 1512 SvXMLExportPropertyMapper::ContextFilter(rProperties, rPropSet); 1513 } 1514 1515 void XMLShapeExportPropertyMapper::handleSpecialItem( 1516 SvXMLAttributeList& rAttrList, 1517 const XMLPropertyState& rProperty, 1518 const SvXMLUnitConverter& rUnitConverter, 1519 const SvXMLNamespaceMap& rNamespaceMap, 1520 const ::std::vector< XMLPropertyState > *pProperties, 1521 sal_uInt32 nIdx ) const 1522 { 1523 switch( getPropertySetMapper()->GetEntryContextId( rProperty.mnIndex ) ) 1524 { 1525 case CTF_SD_CONTROL_SHAPE_DATA_STYLE: 1526 // not to be handled by the base class 1527 break; 1528 1529 default: 1530 SvXMLExportPropertyMapper::handleSpecialItem( rAttrList, rProperty, rUnitConverter, rNamespaceMap, pProperties, nIdx ); 1531 break; 1532 } 1533 } 1534 1535 void XMLShapeExportPropertyMapper::handleElementItem( 1536 SvXMLExport& rExport, 1537 const XMLPropertyState& rProperty, 1538 sal_uInt16 nFlags, 1539 const ::std::vector< XMLPropertyState > *pProperties, 1540 sal_uInt32 nIdx) const 1541 { 1542 switch( getPropertySetMapper()->GetEntryContextId( rProperty.mnIndex ) ) 1543 { 1544 case CTF_NUMBERINGRULES: 1545 { 1546 // only export list-styles as elements in styles section 1547 if( !mbIsInAutoStyles ) 1548 { 1549 uno::Reference< container::XIndexReplace > xNumRule( rProperty.maValue, uno::UNO_QUERY ); 1550 if( xNumRule.is() ) 1551 const_cast<XMLShapeExportPropertyMapper*>(this)->maNumRuleExp.exportNumberingRule( maStyleName, xNumRule ); 1552 } 1553 } 1554 break; 1555 default: 1556 SvXMLExportPropertyMapper::handleElementItem( rExport, rProperty, nFlags, pProperties, nIdx ); 1557 break; 1558 } 1559 } 1560 1561 ////////////////////////////////////////////////////////////////////////////// 1562 1563 XMLPagePropertySetMapper::XMLPagePropertySetMapper(const UniReference< XMLPropertyHandlerFactory >& rFactoryRef) 1564 : XMLPropertySetMapper( aXMLSDPresPageProps, rFactoryRef ) 1565 { 1566 } 1567 1568 XMLPagePropertySetMapper::~XMLPagePropertySetMapper() 1569 { 1570 } 1571 1572 // ---------------------------------------- 1573 1574 XMLPageExportPropertyMapper::XMLPageExportPropertyMapper( const UniReference< XMLPropertySetMapper >& rMapper, SvXMLExport& rExport ) : 1575 SvXMLExportPropertyMapper( rMapper ), 1576 mrExport( rExport ), 1577 msCDATA( GetXMLToken(XML_CDATA)) 1578 { 1579 } 1580 1581 XMLPageExportPropertyMapper::~XMLPageExportPropertyMapper() 1582 { 1583 } 1584 1585 void XMLPageExportPropertyMapper::ContextFilter( 1586 std::vector< XMLPropertyState >& rProperties, 1587 uno::Reference< beans::XPropertySet > rPropSet ) const 1588 { 1589 XMLPropertyState* pRepeatOffsetX = NULL; 1590 XMLPropertyState* pRepeatOffsetY = NULL; 1591 XMLPropertyState* pTransType = NULL; 1592 XMLPropertyState* pTransDuration = NULL; 1593 XMLPropertyState* pDateTimeUpdate = NULL; 1594 XMLPropertyState* pDateTimeFormat = NULL; 1595 XMLPropertyState* pTransitionFadeColor = NULL; 1596 1597 sal_Int16 nTransitionType = 0; 1598 1599 // filter properties 1600 for( std::vector< XMLPropertyState >::iterator aIter = rProperties.begin(); 1601 aIter != rProperties.end(); 1602 ++aIter ) 1603 { 1604 XMLPropertyState *property = &(*aIter); 1605 if( property->mnIndex == -1 ) 1606 continue; 1607 1608 // find properties with context 1609 // to prevent writing this property set mnIndex member to -1 1610 switch( getPropertySetMapper()->GetEntryContextId( property->mnIndex )) 1611 { 1612 1613 case CTF_REPEAT_OFFSET_X: 1614 pRepeatOffsetX = property; 1615 break; 1616 1617 case CTF_REPEAT_OFFSET_Y: 1618 pRepeatOffsetY = property; 1619 break; 1620 case CTF_PAGE_TRANS_TYPE: 1621 pTransType = property; 1622 break; 1623 case CTF_PAGE_TRANS_STYLE: 1624 if( mrExport.getExportFlags() & EXPORT_OASIS ) 1625 (*property).mnIndex = -1; 1626 break; 1627 case CTF_PAGE_TRANSITION_TYPE: 1628 { 1629 if( ((mrExport.getExportFlags() & EXPORT_OASIS) == 0) || 1630 (((*property).maValue >>= nTransitionType) && (nTransitionType == 0)) ) 1631 (*property).mnIndex = -1; 1632 } 1633 break; 1634 case CTF_PAGE_TRANSITION_SUBTYPE: 1635 { 1636 sal_Int16 nTransitionSubtype = sal_Int16(); 1637 if( ((mrExport.getExportFlags() & EXPORT_OASIS) == 0) || 1638 (((*property).maValue >>= nTransitionSubtype) && (nTransitionSubtype == 0)) ) 1639 (*property).mnIndex = -1; 1640 1641 } 1642 break; 1643 case CTF_PAGE_TRANSITION_DIRECTION: 1644 { 1645 sal_Bool bDirection = sal_Bool(); 1646 if( ((mrExport.getExportFlags() & EXPORT_OASIS) == 0) || 1647 (((*property).maValue >>= bDirection) && bDirection) ) 1648 (*property).mnIndex = -1; 1649 } 1650 break; 1651 case CTF_PAGE_TRANSITION_FADECOLOR: 1652 if( ((mrExport.getExportFlags() & EXPORT_OASIS) == 0) ) 1653 (*property).mnIndex = -1; 1654 else 1655 pTransitionFadeColor = property; 1656 break; 1657 case CTF_PAGE_TRANS_SPEED: 1658 { 1659 presentation::AnimationSpeed aEnum; 1660 if( ((*property).maValue >>= aEnum) && aEnum == presentation::AnimationSpeed_MEDIUM ) 1661 (*property).mnIndex = -1; 1662 } 1663 break; 1664 case CTF_PAGE_VISIBLE: 1665 // case CTF_HEADER_VISIBLE: 1666 // case CTF_FOOTER_VISIBLE: 1667 // case CTF_PAGE_NUMBER_VISIBLE: 1668 // case CTF_DATE_TIME_VISIBLE: 1669 { 1670 sal_Bool bVisible = false; 1671 (*property).maValue >>= bVisible; 1672 if( bVisible ) 1673 (*property).mnIndex = -1; 1674 } 1675 break; 1676 case CTF_PAGE_TRANS_DURATION: 1677 pTransDuration = property; 1678 break; 1679 case CTF_HEADER_TEXT: 1680 case CTF_FOOTER_TEXT: 1681 case CTF_DATE_TIME_TEXT: 1682 { 1683 OUString aValue; 1684 (*property).maValue >>= aValue; 1685 if( aValue.getLength() == 0 ) 1686 (*property).mnIndex = -1; 1687 } 1688 break; 1689 1690 case CTF_DATE_TIME_UPDATE: 1691 pDateTimeUpdate = property; 1692 break; 1693 1694 case CTF_DATE_TIME_FORMAT: 1695 pDateTimeFormat = property; 1696 break; 1697 } 1698 } 1699 1700 if( pTransitionFadeColor && nTransitionType != ::com::sun::star::animations::TransitionType::FADE ) 1701 pTransitionFadeColor->mnIndex = -1; 1702 1703 if( pDateTimeFormat && pDateTimeUpdate ) 1704 { 1705 sal_Bool bIsFixed = false; 1706 pDateTimeUpdate->maValue >>= bIsFixed; 1707 if( bIsFixed ) 1708 pDateTimeFormat->mnIndex = -1; 1709 } 1710 1711 if( pRepeatOffsetX && pRepeatOffsetY ) 1712 { 1713 sal_Int32 nOffset = 0; 1714 if( ( pRepeatOffsetX->maValue >>= nOffset ) && ( nOffset == 0 ) ) 1715 pRepeatOffsetX->mnIndex = -1; 1716 else 1717 pRepeatOffsetY->mnIndex = -1; 1718 } 1719 1720 if( pTransType && pTransDuration ) 1721 { 1722 sal_Int32 nChange = 0; 1723 pTransType->maValue >>= nChange; 1724 1725 // only export duration for automatic 1726 if( nChange != 1 ) 1727 pTransDuration->mnIndex = -1; 1728 1729 // do not export default transition change 1730 if( nChange == 0 ) 1731 pTransType->mnIndex = -1; 1732 } 1733 1734 SvXMLExportPropertyMapper::ContextFilter(rProperties, rPropSet); 1735 } 1736 1737 void XMLPageExportPropertyMapper::handleElementItem( 1738 SvXMLExport& rExport, 1739 const XMLPropertyState& rProperty, 1740 sal_uInt16 nFlags, 1741 const ::std::vector< XMLPropertyState > *pProperties, 1742 sal_uInt32 nIdx) const 1743 { 1744 switch( getPropertySetMapper()->GetEntryContextId( rProperty.mnIndex ) ) 1745 { 1746 case CTF_PAGE_SOUND_URL: 1747 { 1748 OUString aSoundURL; 1749 if( (rProperty.maValue >>= aSoundURL) && aSoundURL.getLength() != 0 ) 1750 { 1751 mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, mrExport.GetRelativeReference(aSoundURL) ); 1752 mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE ); 1753 mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_SHOW, XML_NEW ); 1754 mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONREQUEST ); 1755 SvXMLElementExport aElem( mrExport, XML_NAMESPACE_PRESENTATION, XML_SOUND, sal_True, sal_True ); 1756 } 1757 } 1758 break; 1759 default: 1760 SvXMLExportPropertyMapper::handleElementItem( rExport, rProperty, nFlags, pProperties, nIdx ); 1761 break; 1762 } 1763 } 1764 1765