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