1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: sdpropls.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_xmloff.hxx"
33 #include <com/sun/star/animations/TransitionType.hpp>
34 #include <com/sun/star/ucb/XAnyCompareFactory.hpp>
35 #include <com/sun/star/container/XIndexReplace.hpp>
36 #include <com/sun/star/drawing/LineStyle.hpp>
37 #include <com/sun/star/drawing/LineJoint.hpp>
38 #include <com/sun/star/drawing/FillStyle.hpp>
39 #include <com/sun/star/presentation/AnimationSpeed.hpp>
40 #include <com/sun/star/presentation/FadeEffect.hpp>
41 #include <com/sun/star/drawing/ConnectorType.hpp>
42 #include <com/sun/star/drawing/RectanglePoint.hpp>
43 #include <com/sun/star/drawing/CircleKind.hpp>
45 #ifndef _COM_SUN_STAR_DRAWING_BitmapMode_HPP_
46 #include <com/sun/star/drawing/BitmapMode.hpp>
48 #include <com/sun/star/text/WritingMode.hpp>
49 #include <xmloff/EnumPropertyHdl.hxx>
50 #include <xmloff/NamedBoolPropertyHdl.hxx>
51 #include <xmloff/WordWrapPropertyHdl.hxx>
52 #include "numithdl.hxx"
53 #include "XMLBitmapRepeatOffsetPropertyHandler.hxx"
54 #include "XMLFillBitmapSizePropertyHandler.hxx"
55 #include "XMLBitmapLogicalSizePropertyHandler.hxx"
56 #include <com/sun/star/drawing/TextAnimationKind.hpp>
57 #include <com/sun/star/drawing/TextAnimationDirection.hpp>
58 #include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
59 #include <com/sun/star/drawing/TextVerticalAdjust.hpp>
60 #include <com/sun/star/drawing/TextFitToSizeType.hpp>
61 #include <com/sun/star/drawing/MeasureTextHorzPos.hpp>
62 #include <com/sun/star/drawing/MeasureTextVertPos.hpp>
63 #include <xmloff/controlpropertyhdl.hxx>
64 #include <xmloff/xmltoken.hxx>
65 #include "sdpropls.hxx"
66 #include "propimp0.hxx"
67 #include <xmloff/xmlexp.hxx>
68 #include <xmlnmspe.hxx>
69 #include <com/sun/star/drawing/NormalsKind.hpp>
70 #include <com/sun/star/drawing/TextureProjectionMode.hpp>
71 #include <com/sun/star/drawing/TextureKind.hpp>
72 #include <com/sun/star/drawing/TextureMode.hpp>
73 #include <xmloff/txtprmap.hxx>
74 #include "XMLClipPropertyHandler.hxx"
75 #include "XMLIsPercentagePropertyHandler.hxx"
76 #include "XMLPercentOrMeasurePropertyHandler.hxx"
77 #include "animations.hxx"
78 #include <xmloff/xmluconv.hxx>
80 #include "sdxmlexp_impl.hxx"
82 using ::com::sun::star::uno::Any
;
83 using ::com::sun::star::uno::Reference
;
85 using ::rtl::OUString
;
86 using ::rtl::OUStringBuffer
;
88 using namespace ::com::sun::star
;
89 using namespace ::xmloff::token
;
91 #define _MAP(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFVER_010 }
92 #define _MAPV(name,prefix,token,type,context,version) { name, sizeof(name)-1, prefix, token, type, context, version }
93 #define GMAP(name,prefix,token,type,context) _MAP(name,prefix,token,type|XML_TYPE_PROP_GRAPHIC,context)
94 #define GMAPV(name,prefix,token,type,context,version) _MAPV(name,prefix,token,type|XML_TYPE_PROP_GRAPHIC,context,version)
95 #define DPMAP(name,prefix,token,type,context) _MAP(name,prefix,token,type|XML_TYPE_PROP_DRAWING_PAGE,context)
96 #define TMAP(name,prefix,token,type,context) _MAP(name,prefix,token,type|XML_TYPE_PROP_TEXT,context)
97 #define PMAP(name,prefix,token,type,context) _MAP(name,prefix,token,type|XML_TYPE_PROP_PARAGRAPH,context)
98 #define MAP_END() { 0L, 0, 0, XML_EMPTY, 0 ,0, SvtSaveOptions::ODFVER_010}
100 //////////////////////////////////////////////////////////////////////////////
101 // entry list for graphic properties
103 const XMLPropertyMapEntry aXMLSDProperties
[] =
105 // this entry must be first! this is needed for XMLShapeImportHelper::CreateExternalShapePropMapper
106 GMAP( "UserDefinedAttributes", XML_NAMESPACE_TEXT
, XML_XMLNS
, XML_TYPE_ATTRIBUTE_CONTAINER
| MID_FLAG_SPECIAL_ITEM
, 0 ),
109 GMAP( "LineStyle", XML_NAMESPACE_DRAW
, XML_STROKE
, XML_SD_TYPE_STROKE
, 0 ),
110 GMAP( "LineDashName", XML_NAMESPACE_DRAW
, XML_STROKE_DASH
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_DASHNAME
),
111 GMAP( "LineWidth", XML_NAMESPACE_SVG
, XML_STROKE_WIDTH
, XML_TYPE_MEASURE
, 0 ),
112 GMAP( "LineColor", XML_NAMESPACE_SVG
, XML_STROKE_COLOR
, XML_TYPE_COLOR
, 0 ),
113 GMAP( "LineStartName", XML_NAMESPACE_DRAW
, XML_MARKER_START
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_LINESTARTNAME
),
114 GMAP( "LineStartWidth", XML_NAMESPACE_DRAW
, XML_MARKER_START_WIDTH
, XML_TYPE_MEASURE
, 0 ),
115 GMAP( "LineStartCenter", XML_NAMESPACE_DRAW
, XML_MARKER_START_CENTER
, XML_TYPE_BOOL
, 0 ),
116 GMAP( "LineEndName", XML_NAMESPACE_DRAW
, XML_MARKER_END
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_LINEENDNAME
),
117 GMAP( "LineEndWidth", XML_NAMESPACE_DRAW
, XML_MARKER_END_WIDTH
, XML_TYPE_MEASURE
, 0 ),
118 GMAP( "LineEndCenter", XML_NAMESPACE_DRAW
, XML_MARKER_END_CENTER
, XML_TYPE_BOOL
, 0 ),
119 GMAP( "LineTransparence", XML_NAMESPACE_SVG
, XML_STROKE_OPACITY
, XML_SD_TYPE_OPACITY
, 0 ),
120 GMAP( "LineJoint", XML_NAMESPACE_DRAW
, XML_STROKE_LINEJOIN
, XML_SD_TYPE_LINEJOIN
, 0 ),
123 GMAP( "FillStyle", XML_NAMESPACE_DRAW
, XML_FILL
, XML_SD_TYPE_FILLSTYLE
, 0 ),
124 GMAP( "FillColor", XML_NAMESPACE_DRAW
, XML_FILL_COLOR
, XML_TYPE_COLOR
, 0 ),
125 GMAP( "FillColor2", XML_NAMESPACE_DRAW
, XML_SECONDARY_FILL_COLOR
, XML_TYPE_COLOR
, 0 ),
126 GMAP( "FillGradientName", XML_NAMESPACE_DRAW
, XML_FILL_GRADIENT_NAME
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_FILLGRADIENTNAME
),
127 GMAP( "FillGradientStepCount", XML_NAMESPACE_DRAW
, XML_GRADIENT_STEP_COUNT
, XML_TYPE_NUMBER16
, 0 ),
128 GMAP( "FillHatchName", XML_NAMESPACE_DRAW
, XML_FILL_HATCH_NAME
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_FILLHATCHNAME
),
129 GMAP( "FillBackground", XML_NAMESPACE_DRAW
, XML_FILL_HATCH_SOLID
, XML_TYPE_BOOL
, 0 ),
130 GMAP( "FillBitmapName", XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_NAME
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_FILLBITMAPNAME
),
131 GMAP( "FillTransparence", XML_NAMESPACE_DRAW
, XML_OPACITY
, XML_TYPE_NEG_PERCENT16
|MID_FLAG_MULTI_PROPERTY
, 0 ), // exists in SW, too
132 GMAP( "FillTransparenceGradientName", XML_NAMESPACE_DRAW
, XML_OPACITY_NAME
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_FILLTRANSNAME
),
134 GMAP( "FillBitmapSizeX", XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_WIDTH
, XML_SD_TYPE_FILLBITMAPSIZE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
135 GMAP( "FillBitmapLogicalSize", XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_WIDTH
, XML_SD_TYPE_LOGICAL_SIZE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
136 GMAP( "FillBitmapSizeY", XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_HEIGHT
, XML_SD_TYPE_FILLBITMAPSIZE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
137 GMAP( "FillBitmapLogicalSize", XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_HEIGHT
, XML_SD_TYPE_LOGICAL_SIZE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
138 GMAP( "FillBitmapMode", XML_NAMESPACE_STYLE
,XML_REPEAT
, XML_SD_TYPE_BITMAP_MODE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
139 GMAP( "FillBitmapPositionOffsetX", XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_REF_POINT_X
, XML_TYPE_PERCENT
, 0 ),
140 GMAP( "FillBitmapPositionOffsetY", XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_REF_POINT_Y
, XML_TYPE_PERCENT
, 0 ),
141 GMAP( "FillBitmapRectanglePoint", XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_REF_POINT
, XML_SD_TYPE_BITMAP_REFPOINT
, 0 ),
142 GMAP( "FillBitmapOffsetX", XML_NAMESPACE_DRAW
, XML_TILE_REPEAT_OFFSET
, XML_SD_TYPE_BITMAPREPOFFSETX
|MID_FLAG_MULTI_PROPERTY
, CTF_REPEAT_OFFSET_X
),
143 GMAP( "FillBitmapOffsetY", XML_NAMESPACE_DRAW
, XML_TILE_REPEAT_OFFSET
, XML_SD_TYPE_BITMAPREPOFFSETY
|MID_FLAG_MULTI_PROPERTY
, CTF_REPEAT_OFFSET_Y
),
145 // text frame attributes
146 GMAP( "TextHorizontalAdjust", XML_NAMESPACE_DRAW
, XML_TEXTAREA_HORIZONTAL_ALIGN
, XML_SD_TYPE_TEXT_ALIGN
, 0 ),
147 GMAP( "TextVerticalAdjust", XML_NAMESPACE_DRAW
, XML_TEXTAREA_VERTICAL_ALIGN
, XML_SD_TYPE_VERTICAL_ALIGN
, 0 ),
148 GMAP( "TextAutoGrowHeight", XML_NAMESPACE_DRAW
, XML_AUTO_GROW_HEIGHT
, XML_TYPE_BOOL
, 0 ),
149 GMAP( "TextAutoGrowWidth", XML_NAMESPACE_DRAW
, XML_AUTO_GROW_WIDTH
, XML_TYPE_BOOL
, 0 ),
150 GMAP( "TextFitToSize", XML_NAMESPACE_DRAW
, XML_FIT_TO_SIZE
, XML_SD_TYPE_FITTOSIZE
, 0 ),
151 GMAP( "TextContourFrame", XML_NAMESPACE_DRAW
, XML_FIT_TO_CONTOUR
, XML_TYPE_BOOL
, 0 ),
152 GMAP( "TextMaximumFrameHeight", XML_NAMESPACE_FO
, XML_MAX_HEIGHT
, XML_TYPE_MEASURE
, 0 ),
153 GMAP( "TextMaximumFrameWidth", XML_NAMESPACE_FO
, XML_MAX_WIDTH
, XML_TYPE_MEASURE
, 0 ),
154 GMAP( "TextMinimumFrameHeight", XML_NAMESPACE_FO
, XML_MIN_HEIGHT
, XML_TYPE_MEASURE
|MID_FLAG_MULTI_PROPERTY
, 0 ), // exists in SW, too
155 GMAP( "TextMinimumFrameWidth", XML_NAMESPACE_FO
, XML_MIN_WIDTH
, XML_TYPE_MEASURE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
156 GMAP( "TextUpperDistance", XML_NAMESPACE_FO
, XML_PADDING_TOP
, XML_TYPE_MEASURE
|MID_FLAG_MULTI_PROPERTY
, 0 ), // exists in SW, too
157 GMAP( "TextLowerDistance", XML_NAMESPACE_FO
, XML_PADDING_BOTTOM
, XML_TYPE_MEASURE
|MID_FLAG_MULTI_PROPERTY
, 0 ), // exists in SW, too
158 GMAP( "TextLeftDistance", XML_NAMESPACE_FO
, XML_PADDING_LEFT
, XML_TYPE_MEASURE
|MID_FLAG_MULTI_PROPERTY
, 0 ), // exists in SW, too
159 GMAP( "TextRightDistance", XML_NAMESPACE_FO
, XML_PADDING_RIGHT
, XML_TYPE_MEASURE
|MID_FLAG_MULTI_PROPERTY
, 0 ), // exists in SW, too
160 PMAP( "TextWritingMode", XML_NAMESPACE_STYLE
,XML_WRITING_MODE
, XML_SD_TYPE_WRITINGMODE
|MID_FLAG_MULTI_PROPERTY
, CTF_WRITINGMODE
),
161 GMAP( "NumberingRules", XML_NAMESPACE_TEXT
, XML_LIST_STYLE
, XML_SD_TYPE_NUMBULLET
|MID_FLAG_ELEMENT_ITEM
, CTF_NUMBERINGRULES
),
162 GMAP( "NumberingRules", XML_NAMESPACE_TEXT
, XML_LIST_STYLE_NAME
, XML_TYPE_STRING
, CTF_SD_NUMBERINGRULES_NAME
),
163 GMAP( "TextWordWrap", XML_NAMESPACE_FO
, XML_WRAP_OPTION
, XML_TYPE_WRAP_OPTION
, 0 ),
166 GMAP( "Shadow", XML_NAMESPACE_DRAW
, XML_SHADOW
, XML_SD_TYPE_SHADOW
, 0 ),
167 GMAP( "ShadowXDistance", XML_NAMESPACE_DRAW
, XML_SHADOW_OFFSET_X
, XML_TYPE_MEASURE
, 0 ),
168 GMAP( "ShadowYDistance", XML_NAMESPACE_DRAW
, XML_SHADOW_OFFSET_Y
, XML_TYPE_MEASURE
, 0 ),
169 GMAP( "ShadowColor", XML_NAMESPACE_DRAW
, XML_SHADOW_COLOR
, XML_TYPE_COLOR
, 0 ),
170 GMAP( "ShadowTransparence", XML_NAMESPACE_DRAW
, XML_SHADOW_OPACITY
, XML_TYPE_NEG_PERCENT
, 0 ),
172 // graphic attributes
173 GMAP( "GraphicColorMode", XML_NAMESPACE_DRAW
, XML_COLOR_MODE
, XML_TYPE_COLOR_MODE
, 0 ), // exists in SW, too, with same property name
174 GMAP( "AdjustLuminance", XML_NAMESPACE_DRAW
, XML_LUMINANCE
, XML_TYPE_PERCENT16
, 0 ), // signed? exists in SW, too, with same property name
175 GMAP( "AdjustContrast", XML_NAMESPACE_DRAW
, XML_CONTRAST
, XML_TYPE_PERCENT16
, 0 ), // signed? exists in SW, too, with same property name
176 GMAP( "Gamma", XML_NAMESPACE_DRAW
, XML_GAMMA
, XML_TYPE_DOUBLE_PERCENT
, 0 ), // signed? exists in SW, too, with same property name
177 GMAP( "AdjustRed", XML_NAMESPACE_DRAW
, XML_RED
, XML_TYPE_PERCENT16
, 0 ), // signed? exists in SW, too, with same property name
178 GMAP( "AdjustGreen", XML_NAMESPACE_DRAW
, XML_GREEN
, XML_TYPE_PERCENT16
, 0 ), // signed? exists in SW, too, with same property name
179 GMAP( "AdjustBlue", XML_NAMESPACE_DRAW
, XML_BLUE
, XML_TYPE_PERCENT16
, 0 ), // signed? exists in SW, too, with same property name
180 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
181 GMAP( "GraphicCrop", XML_NAMESPACE_FO
, XML_CLIP
, XML_TYPE_TEXT_CLIP11
, CTF_TEXT_CLIP11
), // exists in SW, too, with same property name
182 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#
183 GMAP( "IsMirrored", XML_NAMESPACE_STYLE
, XML_MIRROR
, XML_TYPE_SD_MIRROR
|MID_FLAG_MULTI_PROPERTY
, 0 ), // exists in SW, too // #i40214#
185 // animation text attributes
186 TMAP( "TextAnimationKind", XML_NAMESPACE_STYLE
,XML_TEXT_BLINKING
, XML_TYPE_TEXT_ANIMATION_BLINKING
, CTF_TEXTANIMATION_BLINKING
),
187 GMAP( "TextAnimationKind", XML_NAMESPACE_TEXT
, XML_ANIMATION
, XML_TYPE_TEXT_ANIMATION
, CTF_TEXTANIMATION_KIND
),
188 GMAP( "TextAnimationDirection", XML_NAMESPACE_TEXT
, XML_ANIMATION_DIRECTION
, XML_TYPE_TEXT_ANIMATION_DIRECTION
, 0 ),
189 GMAP( "TextAnimationStartInside", XML_NAMESPACE_TEXT
, XML_ANIMATION_START_INSIDE
, XML_TYPE_BOOL
, 0 ),
190 GMAP( "TextAnimationStopInside", XML_NAMESPACE_TEXT
, XML_ANIMATION_STOP_INSIDE
, XML_TYPE_BOOL
, 0 ),
191 GMAP( "TextAnimationCount", XML_NAMESPACE_TEXT
, XML_ANIMATION_REPEAT
, XML_TYPE_NUMBER16
, 0 ),
192 GMAP( "TextAnimationDelay", XML_NAMESPACE_TEXT
, XML_ANIMATION_DELAY
, XML_TYPE_DURATION16_MS
, 0 ),
193 GMAP( "TextAnimationAmount", XML_NAMESPACE_TEXT
, XML_ANIMATION_STEPS
, XML_TYPE_TEXT_ANIMATION_STEPS
, 0 ),
195 // connector attributes
196 GMAP( "EdgeNode1HorzDist", XML_NAMESPACE_DRAW
, XML_START_LINE_SPACING_HORIZONTAL
, XML_TYPE_MEASURE
, 0 ),
197 GMAP( "EdgeNode1VertDist", XML_NAMESPACE_DRAW
, XML_START_LINE_SPACING_VERTICAL
, XML_TYPE_MEASURE
, 0 ),
198 GMAP( "EdgeNode2HorzDist", XML_NAMESPACE_DRAW
, XML_END_LINE_SPACING_HORIZONTAL
, XML_TYPE_MEASURE
, 0 ),
199 GMAP( "EdgeNode2VertDist", XML_NAMESPACE_DRAW
, XML_END_LINE_SPACING_VERTICAL
, XML_TYPE_MEASURE
, 0 ),
201 // measure attributes
202 GMAP( "MeasureLineDistance", XML_NAMESPACE_DRAW
, XML_LINE_DISTANCE
, XML_TYPE_MEASURE
, 0 ),
203 GMAP( "MeasureHelpLineOverhang", XML_NAMESPACE_DRAW
, XML_GUIDE_OVERHANG
, XML_TYPE_MEASURE
, 0 ),
204 GMAP( "MeasureHelpLineDistance", XML_NAMESPACE_DRAW
, XML_GUIDE_DISTANCE
, XML_TYPE_MEASURE
, 0 ),
205 GMAP( "MeasureHelpLine1Length", XML_NAMESPACE_DRAW
, XML_START_GUIDE
, XML_TYPE_MEASURE
, 0 ),
206 GMAP( "MeasureHelpLine2Length", XML_NAMESPACE_DRAW
, XML_END_GUIDE
, XML_TYPE_MEASURE
, 0 ),
207 GMAP( "MeasureTextHorizontalPosition", XML_NAMESPACE_DRAW
, XML_MEASURE_ALIGN
, XML_SD_TYPE_MEASURE_HALIGN
, 0 ),
208 GMAP( "MeasureTextVerticalPosition", XML_NAMESPACE_DRAW
, XML_MEASURE_VERTICAL_ALIGN
, XML_SD_TYPE_MEASURE_VALIGN
, 0 ),
209 GMAP( "MeasureUnit", XML_NAMESPACE_DRAW
, XML_UNIT
, XML_SD_TYPE_MEASURE_UNIT
, 0 ),
210 GMAP( "MeasureShowUnit", XML_NAMESPACE_DRAW
, XML_SHOW_UNIT
, XML_TYPE_BOOL
, 0 ),
211 GMAP( "MeasureBelowReferenceEdge", XML_NAMESPACE_DRAW
, XML_PLACING
, XML_SD_TYPE_MEASURE_PLACING
, 0 ),
212 GMAP( "MeasureTextRotate90", XML_NAMESPACE_DRAW
, XML_PARALLEL
, XML_TYPE_BOOL
, 0 ),
213 GMAP( "MeasureDecimalPlaces", XML_NAMESPACE_DRAW
, XML_DECIMAL_PLACES
, XML_TYPE_NUMBER16
, 0 ),
215 // 3D geometry attributes
216 GMAP( "D3DHorizontalSegments", XML_NAMESPACE_DR3D
, XML_HORIZONTAL_SEGMENTS
, XML_TYPE_NUMBER
, 0 ),
217 GMAP( "D3DVerticalSegments", XML_NAMESPACE_DR3D
, XML_VERTICAL_SEGMENTS
, XML_TYPE_NUMBER
, 0 ),
218 GMAP( "D3DPercentDiagonal", XML_NAMESPACE_DR3D
, XML_EDGE_ROUNDING
, XML_TYPE_PERCENT
, 0 ),
219 GMAP( "D3DBackscale", XML_NAMESPACE_DR3D
, XML_BACK_SCALE
, XML_TYPE_PERCENT
, 0 ),
220 GMAP( "D3DEndAngle", XML_NAMESPACE_DR3D
, XML_END_ANGLE
, XML_TYPE_NUMBER
, 0 ),
221 GMAP( "D3DDepth", XML_NAMESPACE_DR3D
, XML_DEPTH
, XML_TYPE_MEASURE
, 0 ),
222 GMAP( "D3DDoubleSided", XML_NAMESPACE_DR3D
, XML_BACKFACE_CULLING
, XML_SD_TYPE_BACKFACE_CULLING
, 0 ),
224 // #107245# New 3D properties which are possible for lathe and extrude 3d objects
225 GMAP( "D3DCloseFront", XML_NAMESPACE_DR3D
, XML_CLOSE_FRONT
, XML_TYPE_BOOL
, 0 ),
226 GMAP( "D3DCloseBack", XML_NAMESPACE_DR3D
, XML_CLOSE_BACK
, XML_TYPE_BOOL
, 0 ),
228 // 3D lighting attributes
229 GMAP( "D3DNormalsKind", XML_NAMESPACE_DR3D
, XML_NORMALS_KIND
, XML_SD_TYPE_NORMALS_KIND
, 0 ),
230 GMAP( "D3DNormalsInvert", XML_NAMESPACE_DR3D
, XML_NORMALS_DIRECTION
, XML_SD_TYPE_NORMALS_DIRECTION
, 0 ),
232 // 3D texture attributes
233 GMAP( "D3DTextureProjectionX", XML_NAMESPACE_DR3D
, XML_TEX_GENERATION_MODE_X
, XML_SD_TYPE_TEX_GENERATION_MODE_X
, 0 ),
234 GMAP( "D3DTextureProjectionY", XML_NAMESPACE_DR3D
, XML_TEX_GENERATION_MODE_Y
, XML_SD_TYPE_TEX_GENERATION_MODE_Y
, 0 ),
235 GMAP( "D3DTextureKind", XML_NAMESPACE_DR3D
, XML_TEX_KIND
, XML_SD_TYPE_TEX_KIND
, 0 ),
236 GMAP( "D3DTextureMode", XML_NAMESPACE_DR3D
, XML_TEX_MODE
, XML_SD_TYPE_TEX_MODE
, 0 ),
237 GMAP( "D3DTextureFilter", XML_NAMESPACE_DR3D
, XML_TEX_FILTER
, XML_SD_TYPE_BACKFACE_CULLING
, 0 ),
239 // 3D material attributes
240 GMAP( "D3DMaterialColor", XML_NAMESPACE_DR3D
, XML_DIFFUSE_COLOR
, XML_TYPE_COLOR
, 0 ),
241 GMAP( "D3DMaterialEmission", XML_NAMESPACE_DR3D
, XML_EMISSIVE_COLOR
, XML_TYPE_COLOR
, 0 ),
242 GMAP( "D3DMaterialSpecular", XML_NAMESPACE_DR3D
, XML_SPECULAR_COLOR
, XML_TYPE_COLOR
, 0 ),
243 GMAP( "D3DMaterialSpecularIntensity", XML_NAMESPACE_DR3D
, XML_SHININESS
, XML_TYPE_PERCENT
, 0 ),
245 // 3D shadow attributes
246 GMAP( "D3DShadow3D", XML_NAMESPACE_DR3D
, XML_SHADOW
, XML_SD_TYPE_SHADOW
, 0 ),
248 // #FontWork# attributes
249 GMAP( "FontWorkStyle", XML_NAMESPACE_DRAW
, XML_FONTWORK_STYLE
, XML_SD_TYPE_FONTWORK_STYLE
, CTF_FONTWORK_STYLE
),
250 GMAP( "FontWorkAdjust", XML_NAMESPACE_DRAW
, XML_FONTWORK_ADJUST
, XML_SD_TYPE_FONTWORK_ADJUST
,CTF_FONTWORK_ADJUST
),
251 GMAP( "FontWorkDistance", XML_NAMESPACE_DRAW
, XML_FONTWORK_DISTANCE
, XML_TYPE_MEASURE
, CTF_FONTWORK_DISTANCE
),
252 GMAP( "FontWorkStart", XML_NAMESPACE_DRAW
, XML_FONTWORK_START
, XML_TYPE_MEASURE
, CTF_FONTWORK_START
),
253 GMAP( "FontWorkMirror", XML_NAMESPACE_DRAW
, XML_FONTWORK_MIRROR
, XML_TYPE_BOOL
, CTF_FONTWORK_MIRROR
),
254 GMAP( "FontWorkOutline", XML_NAMESPACE_DRAW
, XML_FONTWORK_OUTLINE
, XML_TYPE_BOOL
, CTF_FONTWORK_OUTLINE
),
255 GMAP( "FontWorkShadow", XML_NAMESPACE_DRAW
, XML_FONTWORK_SHADOW
, XML_SD_TYPE_FONTWORK_SHADOW
,CTF_FONTWORK_SHADOW
),
256 GMAP( "FontWorkShadowColor", XML_NAMESPACE_DRAW
, XML_FONTWORK_SHADOW_COLOR
, XML_TYPE_COLOR
, CTF_FONTWORK_SHADOWCOLOR
),
257 GMAP( "FontWorkShadowOffsetX", XML_NAMESPACE_DRAW
, XML_FONTWORK_SHADOW_OFFSET_X
, XML_TYPE_MEASURE
, CTF_FONTWORK_SHADOWOFFSETX
),
258 GMAP( "FontWorkShadowOffsetY", XML_NAMESPACE_DRAW
, XML_FONTWORK_SHADOW_OFFSET_Y
, XML_TYPE_MEASURE
, CTF_FONTWORK_SHADOWOFFSETY
),
259 GMAP( "FontWorkForm", XML_NAMESPACE_DRAW
, XML_FONTWORK_FORM
, XML_SD_TYPE_FONTWORK_FORM
, CTF_FONTWORK_FORM
),
260 GMAP( "FontWorkHideForm", XML_NAMESPACE_DRAW
, XML_FONTWORK_HIDE_FORM
, XML_TYPE_BOOL
, CTF_FONTWORK_HIDEFORM
),
261 GMAP( "FontWorkShadowTransparence", XML_NAMESPACE_DRAW
, XML_FONTWORK_SHADOW_TRANSPARENCE
, XML_TYPE_PERCENT
, CTF_FONTWORK_SHADOWTRANSPARENCE
),
263 // control attributes (border exists one mor time for the text additions of shapes)
264 GMAP( "ControlSymbolColor", XML_NAMESPACE_DRAW
, XML_SYMBOL_COLOR
, XML_TYPE_COLOR
, 0 ),
265 GMAP( "ControlBackground", XML_NAMESPACE_FO
, XML_BACKGROUND_COLOR
, XML_TYPE_COLOR
|MID_FLAG_MULTI_PROPERTY
, 0 ),
266 GMAP( "ControlBorder", XML_NAMESPACE_FO
, XML_BORDER
, XML_SD_TYPE_CONTROL_BORDER
|MID_FLAG_MULTI_PROPERTY
|MID_FLAG_MERGE_ATTRIBUTE
, 0 ),
267 GMAP( "ControlBorderColor", XML_NAMESPACE_FO
, XML_BORDER
, XML_SD_TYPE_CONTROL_BORDER_COLOR
|MID_FLAG_MULTI_PROPERTY
|MID_FLAG_MERGE_ATTRIBUTE
, 0 ),
268 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
),
269 GMAP( "ControlTextEmphasis", XML_NAMESPACE_STYLE
,XML_TEXT_EMPHASIZE
, XML_TYPE_CONTROL_TEXT_EMPHASIZE
, 0 ),
270 GMAP( "ImageScaleMode", XML_NAMESPACE_STYLE
,XML_REPEAT
, XML_SD_TYPE_IMAGE_SCALE_MODE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
271 GMAP( "ControlWritingMode", XML_NAMESPACE_STYLE
,XML_WRITING_MODE
, XML_TYPE_TEXT_WRITING_MODE_WITH_DEFAULT
|MID_FLAG_MULTI_PROPERTY
, CTF_CONTROLWRITINGMODE
),
273 // special entries for floating frames
274 GMAP( "FrameIsAutoScroll", XML_NAMESPACE_DRAW
, XML_FRAME_DISPLAY_SCROLLBAR
, XML_TYPE_BOOL
|MID_FLAG_MULTI_PROPERTY
, CTF_FRAME_DISPLAY_SCROLLBAR
),
275 GMAP( "FrameIsBorder", XML_NAMESPACE_DRAW
, XML_FRAME_DISPLAY_BORDER
, XML_TYPE_BOOL
|MID_FLAG_MULTI_PROPERTY
, CTF_FRAME_DISPLAY_BORDER
),
276 GMAP( "FrameMarginWidth", XML_NAMESPACE_DRAW
, XML_FRAME_MARGIN_HORIZONTAL
, XML_TYPE_MEASURE_PX
|MID_FLAG_MULTI_PROPERTY
, CTF_FRAME_MARGIN_HORI
),
277 GMAP( "FrameMarginHeight", XML_NAMESPACE_DRAW
, XML_FRAME_MARGIN_VERTICAL
, XML_TYPE_MEASURE_PX
|MID_FLAG_MULTI_PROPERTY
, CTF_FRAME_MARGIN_VERT
),
278 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
),
279 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
),
280 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
),
281 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
),
282 GMAP( "IsInternal", XML_NAMESPACE_DRAW
, XML__EMPTY
, XML_TYPE_BUILDIN_CMP_ONLY
, CTF_SD_OLE_ISINTERNAL
),
283 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
),
284 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
),
285 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
),
286 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
),
288 GMAP( "Aspect", XML_NAMESPACE_DRAW
, XML_DRAW_ASPECT
, XML_TYPE_TEXT_DRAW_ASPECT
|MID_FLAG_MULTI_PROPERTY
, CTF_SD_OLE_ASPECT
),
290 // caption properties
291 GMAP( "CaptionType", XML_NAMESPACE_DRAW
, XML_CAPTION_TYPE
, XML_SD_TYPE_CAPTION_TYPE
, 0 ),
292 GMAP( "CaptionIsFixedAngle", XML_NAMESPACE_DRAW
, XML_CAPTION_ANGLE_TYPE
, XML_SD_TYPE_CAPTION_ANGLE_TYPE
, 0 ),
293 GMAP( "CaptionAngle", XML_NAMESPACE_DRAW
, XML_CAPTION_ANGLE
, XML_TYPE_NUMBER
, 0 ),
294 GMAP( "CaptionGap", XML_NAMESPACE_DRAW
, XML_CAPTION_GAP
, XML_TYPE_MEASURE
, 0 ),
295 GMAP( "CaptionEscapeDirection", XML_NAMESPACE_DRAW
, XML_CAPTION_ESCAPE_DIRECTION
, XML_SD_TYPE_CAPTION_ESC_DIR
, 0 ),
296 GMAP( "CaptionIsEscapeRelative", XML_NAMESPACE_DRAW
, XML_CAPTION_ESCAPE
, XML_SD_TYPE_CAPTION_IS_ESC_REL
|MID_FLAG_MULTI_PROPERTY
, CTF_CAPTION_ISESCREL
),
297 GMAP( "CaptionEscapeRelative", XML_NAMESPACE_DRAW
, XML_CAPTION_ESCAPE
, XML_SD_TYPE_CAPTION_ESC_REL
|MID_FLAG_MULTI_PROPERTY
, CTF_CAPTION_ESCREL
),
298 GMAP( "CaptionEscapeAbsolute", XML_NAMESPACE_DRAW
, XML_CAPTION_ESCAPE
, XML_SD_TYPE_CAPTION_ESC_ABS
|MID_FLAG_MULTI_PROPERTY
, CTF_CAPTION_ESCABS
),
299 GMAP( "CaptionLineLength", XML_NAMESPACE_DRAW
, XML_CAPTION_LINE_LENGTH
, XML_TYPE_MEASURE
, 0 ),
300 GMAP( "CaptionIsFitLineLength", XML_NAMESPACE_DRAW
, XML_CAPTION_FIT_LINE_LENGTH
, XML_TYPE_BOOL
, 0 ),
302 // misc object properties
303 GMAP( "MoveProtect", XML_NAMESPACE_STYLE
, XML_PROTECT
, XML_SD_TYPE_MOVE_PROTECT
|MID_FLAG_MULTI_PROPERTY
|MID_FLAG_MERGE_ATTRIBUTE
, CTF_SD_MOVE_PROTECT
),
304 GMAP( "SizeProtect", XML_NAMESPACE_STYLE
, XML_PROTECT
, XML_SD_TYPE_SIZE_PROTECT
|MID_FLAG_MULTI_PROPERTY
|MID_FLAG_MERGE_ATTRIBUTE
, CTF_SD_SIZE_PROTECT
),
308 //////////////////////////////////////////////////////////////////////////////
309 // entry list for presentation page properties
311 const XMLPropertyMapEntry aXMLSDPresPageProps
[] =
313 DPMAP( "UserDefinedAttributes", XML_NAMESPACE_TEXT
, XML_XMLNS
, XML_TYPE_ATTRIBUTE_CONTAINER
| MID_FLAG_SPECIAL_ITEM
, 0 ),
315 DPMAP( "Change", XML_NAMESPACE_PRESENTATION
, XML_TRANSITION_TYPE
, XML_SD_TYPE_PRESPAGE_TYPE
, CTF_PAGE_TRANS_TYPE
),
316 DPMAP( "Effect", XML_NAMESPACE_PRESENTATION
, XML_TRANSITION_STYLE
, XML_SD_TYPE_PRESPAGE_STYLE
, CTF_PAGE_TRANS_STYLE
),
317 DPMAP( "Speed", XML_NAMESPACE_PRESENTATION
, XML_TRANSITION_SPEED
, XML_SD_TYPE_PRESPAGE_SPEED
, CTF_PAGE_TRANS_SPEED
),
318 DPMAP( "Duration", XML_NAMESPACE_PRESENTATION
, XML_DURATION
, XML_SD_TYPE_PRESPAGE_DURATION
, CTF_PAGE_TRANS_DURATION
),
319 DPMAP( "Visible", XML_NAMESPACE_PRESENTATION
, XML_VISIBILITY
, XML_SD_TYPE_PRESPAGE_VISIBILITY
, CTF_PAGE_VISIBLE
),
320 DPMAP( "Sound", XML_NAMESPACE_PRESENTATION
, XML_SOUND
, XML_TYPE_STRING
|MID_FLAG_ELEMENT_ITEM
, CTF_PAGE_SOUND_URL
),
321 DPMAP( "BackgroundFullSize", XML_NAMESPACE_DRAW
, XML_BACKGROUND_SIZE
, XML_SD_TYPE_PRESPAGE_BACKSIZE
, CTF_PAGE_BACKSIZE
),
323 DPMAP( "IsBackgroundVisible", XML_NAMESPACE_PRESENTATION
, XML_BACKGROUND_VISIBLE
, XML_TYPE_BOOL
, 0 ),
324 DPMAP( "IsBackgroundObjectsVisible", XML_NAMESPACE_PRESENTATION
, XML_BACKGROUND_OBJECTS_VISIBLE
, XML_TYPE_BOOL
, 0 ),
326 DPMAP( "FillStyle", XML_NAMESPACE_DRAW
, XML_FILL
, XML_SD_TYPE_FILLSTYLE
, 0 ),
327 DPMAP( "FillColor", XML_NAMESPACE_DRAW
, XML_FILL_COLOR
, XML_TYPE_COLOR
, 0 ),
328 DPMAP( "FillGradientName", XML_NAMESPACE_DRAW
, XML_FILL_GRADIENT_NAME
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_FILLGRADIENTNAME
),
329 DPMAP( "FillGradientStepCount", XML_NAMESPACE_DRAW
, XML_GRADIENT_STEP_COUNT
, XML_TYPE_NUMBER16
, 0 ),
330 DPMAP( "FillHatchName", XML_NAMESPACE_DRAW
, XML_FILL_HATCH_NAME
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_FILLHATCHNAME
),
331 DPMAP( "FillBitmapName", XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_NAME
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_FILLBITMAPNAME
),
332 DPMAP( "FillTransparenceGradientName", XML_NAMESPACE_DRAW
, XML_OPACITY_NAME
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_FILLTRANSNAME
),
333 DPMAP( "FillBitmapSizeX", XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_WIDTH
, XML_SD_TYPE_FILLBITMAPSIZE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
334 DPMAP( "FillBitmapLogicalSize", XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_WIDTH
, XML_SD_TYPE_LOGICAL_SIZE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
335 DPMAP( "FillBitmapSizeY", XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_HEIGHT
, XML_SD_TYPE_FILLBITMAPSIZE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
336 DPMAP( "FillBitmapLogicalSize", XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_HEIGHT
, XML_SD_TYPE_LOGICAL_SIZE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
337 DPMAP( "FillBitmapMode", XML_NAMESPACE_STYLE
,XML_REPEAT
, XML_SD_TYPE_BITMAP_MODE
, 0 ),
338 DPMAP( "FillBitmapPositionOffsetX", XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_REF_POINT_X
, XML_TYPE_PERCENT
, 0 ),
339 DPMAP( "FillBitmapPositionOffsetY", XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_REF_POINT_Y
, XML_TYPE_PERCENT
, 0 ),
340 DPMAP( "FillBitmapRectanglePoint", XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_REF_POINT
, XML_SD_TYPE_BITMAP_REFPOINT
, 0 ),
341 DPMAP( "FillBitmapOffsetX", XML_NAMESPACE_DRAW
, XML_TILE_REPEAT_OFFSET
, XML_SD_TYPE_BITMAPREPOFFSETX
|MID_FLAG_MULTI_PROPERTY
, CTF_REPEAT_OFFSET_X
),
342 DPMAP( "FillBitmapOffsetY", XML_NAMESPACE_DRAW
, XML_TILE_REPEAT_OFFSET
, XML_SD_TYPE_BITMAPREPOFFSETY
|MID_FLAG_MULTI_PROPERTY
, CTF_REPEAT_OFFSET_Y
),
344 DPMAP( "IsHeaderVisible", XML_NAMESPACE_PRESENTATION
, XML_DISPLAY_HEADER
, XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE
, CTF_HEADER_VISIBLE
),
345 DPMAP( "IsFooterVisible", XML_NAMESPACE_PRESENTATION
, XML_DISPLAY_FOOTER
, XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE
, CTF_FOOTER_VISIBLE
),
346 DPMAP( "IsPageNumberVisible", XML_NAMESPACE_PRESENTATION
, XML_DISPLAY_PAGE_NUMBER
, XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE
, CTF_PAGE_NUMBER_VISIBLE
),
347 DPMAP( "IsDateTimeVisible", XML_NAMESPACE_PRESENTATION
, XML_DISPLAY_DATE_TIME
, XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE
, CTF_DATE_TIME_VISIBLE
),
349 DPMAP( "TransitionType", XML_NAMESPACE_SMIL
, XML_TYPE
, XML_SD_TYPE_TRANSITION_TYPE
, CTF_PAGE_TRANSITION_TYPE
),
350 DPMAP( "TransitionSubtype", XML_NAMESPACE_SMIL
, XML_SUBTYPE
, XML_SD_TYPE_TRANSTIION_SUBTYPE
, CTF_PAGE_TRANSITION_SUBTYPE
),
351 DPMAP( "TransitionDirection", XML_NAMESPACE_SMIL
, XML_DIRECTION
, XML_SD_TYPE_TRANSTIION_DIRECTION
, CTF_PAGE_TRANSITION_DIRECTION
),
352 DPMAP( "TransitionFadeColor", XML_NAMESPACE_SMIL
, XML_FADECOLOR
, XML_TYPE_COLOR
, CTF_PAGE_TRANSITION_FADECOLOR
),
356 const XMLPropertyMapEntry aXMLSDPresPageProps_onlyHeadersFooter
[] =
358 DPMAP( "IsHeaderVisible", XML_NAMESPACE_PRESENTATION
, XML_DISPLAY_HEADER
, XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE
, CTF_HEADER_VISIBLE
),
359 DPMAP( "IsFooterVisible", XML_NAMESPACE_PRESENTATION
, XML_DISPLAY_FOOTER
, XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE
, CTF_FOOTER_VISIBLE
),
360 DPMAP( "IsPageNumberVisible", XML_NAMESPACE_PRESENTATION
, XML_DISPLAY_PAGE_NUMBER
, XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE
, CTF_PAGE_NUMBER_VISIBLE
),
361 DPMAP( "IsDateTimeVisible", XML_NAMESPACE_PRESENTATION
, XML_DISPLAY_DATE_TIME
, XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE
, CTF_DATE_TIME_VISIBLE
),
366 /** contains the attribute to property mapping for a drawing layer table
367 WARNING: if attributes are added, SdXMLTableShapeContext::processAttribute needs to be updated!
369 const XMLPropertyMapEntry aXMLTableShapeAttributes
[] =
371 _MAP( "UseFirstRowStyle", XML_NAMESPACE_TABLE
, XML_USE_FIRST_ROW_STYLES
, XML_TYPE_BOOL
, 0 ),
372 _MAP( "UseLastRowStyle", XML_NAMESPACE_TABLE
, XML_USE_LAST_ROW_STYLES
, XML_TYPE_BOOL
, 0 ),
373 _MAP( "UseFirstColumnStyle", XML_NAMESPACE_TABLE
, XML_USE_FIRST_COLUMN_STYLES
, XML_TYPE_BOOL
, 0 ),
374 _MAP( "UseLastColumnStyle", XML_NAMESPACE_TABLE
, XML_USE_LAST_COLUMN_STYLES
, XML_TYPE_BOOL
, 0 ),
375 _MAP( "UseBandingRowStyle", XML_NAMESPACE_TABLE
, XML_USE_BANDING_ROWS_STYLES
, XML_TYPE_BOOL
, 0 ),
376 _MAP( "UseBandingColumnStyle", XML_NAMESPACE_TABLE
, XML_USE_BANDING_COLUMNS_STYLES
, XML_TYPE_BOOL
, 0 ),
380 //////////////////////////////////////////////////////////////////////////////
381 // implementation of factory for own graphic properties
383 SvXMLEnumMapEntry aXML_LineStyle_EnumMap
[] =
385 { XML_NONE
, drawing::LineStyle_NONE
},
386 { XML_SOLID
, drawing::LineStyle_SOLID
},
387 { XML_DASH
, drawing::LineStyle_DASH
},
388 { XML_TOKEN_INVALID
, 0 }
391 SvXMLEnumMapEntry aXML_LineJoint_EnumMap
[] =
393 { XML_NONE
, drawing::LineJoint_NONE
},
394 { XML_MITER
, drawing::LineJoint_MITER
},
395 { XML_ROUND
, drawing::LineJoint_ROUND
},
396 { XML_BEVEL
, drawing::LineJoint_BEVEL
},
397 { XML_MIDDLE
, drawing::LineJoint_MIDDLE
},
398 { XML_TOKEN_INVALID
, 0 }
401 SvXMLEnumMapEntry aXML_FillStyle_EnumMap
[] =
403 { XML_NONE
, drawing::FillStyle_NONE
},
404 { XML_SOLID
, drawing::FillStyle_SOLID
},
405 { XML_BITMAP
, drawing::FillStyle_BITMAP
},
406 { XML_GRADIENT
, drawing::FillStyle_GRADIENT
},
407 { XML_HATCH
, drawing::FillStyle_HATCH
},
408 { XML_TOKEN_INVALID
, 0 }
411 SvXMLEnumMapEntry aXML_PresChange_EnumMap
[] =
414 { XML_AUTOMATIC
, 1 },
415 { XML_SEMI_AUTOMATIC
, 2 },
416 { XML_TOKEN_INVALID
, 0 }
419 SvXMLEnumMapEntry aXML_TransSpeed_EnumMap
[] =
421 { XML_FAST
, presentation::AnimationSpeed_FAST
},
422 { XML_MEDIUM
, presentation::AnimationSpeed_MEDIUM
},
423 { XML_SLOW
, presentation::AnimationSpeed_SLOW
},
424 { XML_TOKEN_INVALID
, 0 }
427 SvXMLEnumMapEntry aXML_FadeEffect_EnumMap
[] =
429 { XML_NONE
, presentation::FadeEffect_NONE
},
430 { XML_FADE_FROM_LEFT
, presentation::FadeEffect_FADE_FROM_LEFT
},
431 { XML_FADE_FROM_TOP
, presentation::FadeEffect_FADE_FROM_TOP
},
432 { XML_FADE_FROM_RIGHT
, presentation::FadeEffect_FADE_FROM_RIGHT
},
433 { XML_FADE_FROM_BOTTOM
, presentation::FadeEffect_FADE_FROM_BOTTOM
},
434 { XML_FADE_TO_CENTER
, presentation::FadeEffect_FADE_TO_CENTER
},
435 { XML_FADE_FROM_CENTER
, presentation::FadeEffect_FADE_FROM_CENTER
},
436 { XML_MOVE_FROM_LEFT
, presentation::FadeEffect_MOVE_FROM_LEFT
},
437 { XML_MOVE_FROM_TOP
, presentation::FadeEffect_MOVE_FROM_TOP
},
438 { XML_MOVE_FROM_RIGHT
, presentation::FadeEffect_MOVE_FROM_RIGHT
},
439 { XML_MOVE_FROM_BOTTOM
, presentation::FadeEffect_MOVE_FROM_BOTTOM
},
440 { XML_ROLL_FROM_TOP
, presentation::FadeEffect_ROLL_FROM_TOP
},
441 { XML_ROLL_FROM_LEFT
, presentation::FadeEffect_ROLL_FROM_LEFT
},
442 { XML_ROLL_FROM_RIGHT
, presentation::FadeEffect_ROLL_FROM_RIGHT
},
443 { XML_ROLL_FROM_BOTTOM
, presentation::FadeEffect_ROLL_FROM_BOTTOM
},
444 { XML_VERTICAL_STRIPES
, presentation::FadeEffect_VERTICAL_STRIPES
},
445 { XML_HORIZONTAL_STRIPES
, presentation::FadeEffect_HORIZONTAL_STRIPES
},
446 { XML_CLOCKWISE
, presentation::FadeEffect_CLOCKWISE
},
447 { XML_COUNTERCLOCKWISE
, presentation::FadeEffect_COUNTERCLOCKWISE
},
448 { XML_FADE_FROM_UPPERLEFT
, presentation::FadeEffect_FADE_FROM_UPPERLEFT
},
449 { XML_FADE_FROM_UPPERRIGHT
, presentation::FadeEffect_FADE_FROM_UPPERRIGHT
},
450 { XML_FADE_FROM_LOWERLEFT
, presentation::FadeEffect_FADE_FROM_LOWERLEFT
},
451 { XML_FADE_FROM_LOWERRIGHT
, presentation::FadeEffect_FADE_FROM_LOWERRIGHT
},
452 { XML_CLOSE_VERTICAL
, presentation::FadeEffect_CLOSE_VERTICAL
},
453 { XML_CLOSE_HORIZONTAL
, presentation::FadeEffect_CLOSE_HORIZONTAL
},
454 { XML_OPEN_VERTICAL
, presentation::FadeEffect_OPEN_VERTICAL
},
455 { XML_OPEN_HORIZONTAL
, presentation::FadeEffect_OPEN_HORIZONTAL
},
456 { XML_SPIRALIN_LEFT
, presentation::FadeEffect_SPIRALIN_LEFT
},
457 { XML_SPIRALIN_RIGHT
, presentation::FadeEffect_SPIRALIN_RIGHT
},
458 { XML_SPIRALOUT_LEFT
, presentation::FadeEffect_SPIRALOUT_LEFT
},
459 { XML_SPIRALOUT_RIGHT
, presentation::FadeEffect_SPIRALOUT_RIGHT
},
460 { XML_DISSOLVE
, presentation::FadeEffect_DISSOLVE
},
461 { XML_WAVYLINE_FROM_LEFT
, presentation::FadeEffect_WAVYLINE_FROM_LEFT
},
462 { XML_WAVYLINE_FROM_TOP
, presentation::FadeEffect_WAVYLINE_FROM_TOP
},
463 { XML_WAVYLINE_FROM_RIGHT
, presentation::FadeEffect_WAVYLINE_FROM_RIGHT
},
464 { XML_WAVYLINE_FROM_BOTTOM
, presentation::FadeEffect_WAVYLINE_FROM_BOTTOM
},
465 { XML_RANDOM
, presentation::FadeEffect_RANDOM
},
466 { XML_STRETCH_FROM_LEFT
, presentation::FadeEffect_STRETCH_FROM_LEFT
},
467 { XML_STRETCH_FROM_TOP
, presentation::FadeEffect_STRETCH_FROM_TOP
},
468 { XML_STRETCH_FROM_RIGHT
, presentation::FadeEffect_STRETCH_FROM_RIGHT
},
469 { XML_STRETCH_FROM_BOTTOM
, presentation::FadeEffect_STRETCH_FROM_BOTTOM
},
470 { XML_VERTICAL_LINES
, presentation::FadeEffect_VERTICAL_LINES
},
471 { XML_HORIZONTAL_LINES
, presentation::FadeEffect_HORIZONTAL_LINES
},
472 { XML_MOVE_FROM_UPPERLEFT
, presentation::FadeEffect_MOVE_FROM_UPPERLEFT
},
473 { XML_MOVE_FROM_UPPERRIGHT
, presentation::FadeEffect_MOVE_FROM_UPPERRIGHT
},
474 { XML_MOVE_FROM_LOWERRIGHT
, presentation::FadeEffect_MOVE_FROM_LOWERRIGHT
},
475 { XML_MOVE_FROM_LOWERLEFT
, presentation::FadeEffect_MOVE_FROM_LOWERLEFT
},
476 { XML_UNCOVER_TO_LEFT
, presentation::FadeEffect_UNCOVER_TO_LEFT
},
477 { XML_UNCOVER_TO_UPPERLEFT
, presentation::FadeEffect_UNCOVER_TO_UPPERLEFT
},
478 { XML_UNCOVER_TO_TOP
, presentation::FadeEffect_UNCOVER_TO_TOP
},
479 { XML_UNCOVER_TO_UPPERRIGHT
,presentation::FadeEffect_UNCOVER_TO_UPPERRIGHT
},
480 { XML_UNCOVER_TO_RIGHT
, presentation::FadeEffect_UNCOVER_TO_RIGHT
},
481 { XML_UNCOVER_TO_LOWERRIGHT
,presentation::FadeEffect_UNCOVER_TO_LOWERRIGHT
},
482 { XML_UNCOVER_TO_BOTTOM
, presentation::FadeEffect_UNCOVER_TO_BOTTOM
},
483 { XML_UNCOVER_TO_LOWERLEFT
, presentation::FadeEffect_UNCOVER_TO_LOWERLEFT
},
484 { XML_VERTICAL_CHECKERBOARD
,presentation::FadeEffect_VERTICAL_CHECKERBOARD
},
485 { XML_HORIZONTAL_CHECKERBOARD
,presentation::FadeEffect_HORIZONTAL_CHECKERBOARD
},
486 { XML_TOKEN_INVALID
, 0 }
489 SvXMLEnumMapEntry aXML_ConnectionKind_EnumMap
[] =
491 { XML_STANDARD
, drawing::ConnectorType_STANDARD
},
492 { XML_CURVE
, drawing::ConnectorType_CURVE
},
493 { XML_LINE
, drawing::ConnectorType_LINE
},
494 { XML_LINES
, drawing::ConnectorType_LINES
},
495 { XML_TOKEN_INVALID
, 0 }
498 SvXMLEnumMapEntry aXML_BitmapMode_EnumMap
[] =
500 { XML_REPEAT
, drawing::BitmapMode_REPEAT
},
501 { XML_STRETCH
, drawing::BitmapMode_STRETCH
},
502 { XML_BACKGROUND_NO_REPEAT
, drawing::BitmapMode_NO_REPEAT
},
503 { XML_TOKEN_INVALID
, 0 }
506 //////////////////////////////////////////////////////////////////////////////
509 SvXMLEnumMapEntry aXML_NormalsKind_EnumMap
[] =
511 { XML_OBJECT
, drawing::NormalsKind_SPECIFIC
},
512 { XML_FLAT
, drawing::NormalsKind_FLAT
},
513 { XML_SPHERE
, drawing::NormalsKind_SPHERE
},
514 { XML_TOKEN_INVALID
, 0 }
517 SvXMLEnumMapEntry aXML_TexGenerationX_EnumMap
[] =
519 { XML_OBJECT
, drawing::TextureProjectionMode_OBJECTSPECIFIC
},
520 { XML_PARALLEL
, drawing::TextureProjectionMode_PARALLEL
},
521 { XML_SPHERE
, drawing::TextureProjectionMode_SPHERE
},
522 { XML_TOKEN_INVALID
, 0 }
525 SvXMLEnumMapEntry aXML_TexGenerationY_EnumMap
[] =
527 { XML_OBJECT
, drawing::TextureProjectionMode_OBJECTSPECIFIC
},
528 { XML_PARALLEL
, drawing::TextureProjectionMode_PARALLEL
},
529 { XML_SPHERE
, drawing::TextureProjectionMode_SPHERE
},
530 { XML_TOKEN_INVALID
, 0 }
533 SvXMLEnumMapEntry aXML_TexKind_EnumMap
[] =
535 { XML_LUMINANCE
, drawing::TextureKind_LUMINANCE
},
536 // { XML_INTENSITY, drawing::TextureKind_INTENSITY },
537 { XML_COLOR
, drawing::TextureKind_COLOR
},
538 { XML_TOKEN_INVALID
, 0 }
541 SvXMLEnumMapEntry aXML_TexMode_EnumMap
[] =
543 { XML_REPLACE
, drawing::TextureMode_REPLACE
},
544 { XML_MODULATE
, drawing::TextureMode_MODULATE
},
545 { XML_BLEND
, drawing::TextureMode_BLEND
},
546 { XML_TOKEN_INVALID
, 0 }
549 SvXMLEnumMapEntry aXML_RefPoint_EnumMap
[] =
551 { XML_TOP_LEFT
, drawing::RectanglePoint_LEFT_TOP
},
552 { XML_TOP
, drawing::RectanglePoint_MIDDLE_TOP
},
553 { XML_TOP_RIGHT
, drawing::RectanglePoint_RIGHT_TOP
},
554 { XML_LEFT
, drawing::RectanglePoint_LEFT_MIDDLE
},
555 { XML_CENTER
, drawing::RectanglePoint_MIDDLE_MIDDLE
},
556 { XML_RIGHT
, drawing::RectanglePoint_RIGHT_MIDDLE
},
557 { XML_BOTTOM_LEFT
, drawing::RectanglePoint_LEFT_BOTTOM
},
558 { XML_BOTTOM
, drawing::RectanglePoint_MIDDLE_BOTTOM
},
559 { XML_BOTTOM_RIGHT
, drawing::RectanglePoint_RIGHT_BOTTOM
},
560 { XML_TOKEN_INVALID
, 0 }
563 SvXMLEnumMapEntry aXML_CircleKind_EnumMap
[] =
565 { XML_FULL
, drawing::CircleKind_FULL
},
566 { XML_SECTION
, drawing::CircleKind_SECTION
},
567 { XML_CUT
, drawing::CircleKind_CUT
},
568 { XML_ARC
, drawing::CircleKind_ARC
},
569 { XML_TOKEN_INVALID
, 0 }
572 SvXMLEnumMapEntry aXML_WritingMode_EnumMap
[] =
574 { XML_TB_RL
, text::WritingMode_TB_RL
},
575 { XML_LR_TB
, text::WritingMode_LR_TB
},
576 { XML_TOKEN_INVALID
, 0 }
579 SvXMLEnumMapEntry __READONLY_DATA pXML_TextAnimation_Enum
[] =
581 { XML_NONE
, drawing::TextAnimationKind_NONE
},
582 { XML_BLINKING
, drawing::TextAnimationKind_BLINK
}, // will be filtered
583 { XML_SCROLL
, drawing::TextAnimationKind_SCROLL
},
584 { XML_ALTERNATE
, drawing::TextAnimationKind_ALTERNATE
},
585 { XML_SLIDE
, drawing::TextAnimationKind_SLIDE
},
586 { XML_TOKEN_INVALID
, 0 }
589 SvXMLEnumMapEntry __READONLY_DATA pXML_TextAnimation_Blinking_Enum
[] =
591 { XML_FALSE
, drawing::TextAnimationKind_NONE
},
592 { XML_TRUE
, drawing::TextAnimationKind_BLINK
},
593 { XML_FALSE
, drawing::TextAnimationKind_SCROLL
},
594 { XML_FALSE
, drawing::TextAnimationKind_ALTERNATE
},
595 { XML_FALSE
, drawing::TextAnimationKind_SLIDE
},
596 { XML_TOKEN_INVALID
, 0 }
599 SvXMLEnumMapEntry __READONLY_DATA pXML_TextAnimationDirection_Enum
[] =
601 { XML_LEFT
, drawing::TextAnimationDirection_LEFT
},
602 { XML_RIGHT
, drawing::TextAnimationDirection_RIGHT
}, // will be filtered
603 { XML_UP
, drawing::TextAnimationDirection_UP
},
604 { XML_DOWN
, drawing::TextAnimationDirection_DOWN
},
605 { XML_TOKEN_INVALID
, 0 }
608 SvXMLEnumMapEntry __READONLY_DATA pXML_TextAlign_Enum
[] =
610 { XML_LEFT
, drawing::TextHorizontalAdjust_LEFT
},
611 { XML_CENTER
, drawing::TextHorizontalAdjust_CENTER
},
612 { XML_RIGHT
, drawing::TextHorizontalAdjust_RIGHT
},
613 { XML_JUSTIFY
, drawing::TextHorizontalAdjust_BLOCK
},
614 { XML_TOKEN_INVALID
, 0 }
617 SvXMLEnumMapEntry __READONLY_DATA pXML_VerticalAlign_Enum
[] =
619 { XML_TOP
, drawing::TextVerticalAdjust_TOP
},
620 { XML_MIDDLE
, drawing::TextVerticalAdjust_CENTER
},
621 { XML_BOTTOM
, drawing::TextVerticalAdjust_BOTTOM
},
622 { XML_JUSTIFY
, drawing::TextVerticalAdjust_BLOCK
},
623 { XML_TOKEN_INVALID
, 0 }
626 SvXMLEnumMapEntry __READONLY_DATA pXML_FitToSize_Enum
[] =
628 { XML_FALSE
, drawing::TextFitToSizeType_NONE
},
629 { XML_TRUE
, drawing::TextFitToSizeType_PROPORTIONAL
},
630 { XML_ALL
, drawing::TextFitToSizeType_ALLLINES
},
631 { XML_SHRINK_TO_FIT
,drawing::TextFitToSizeType_AUTOFIT
},
632 { XML_TOKEN_INVALID
, 0 }
635 SvXMLEnumMapEntry __READONLY_DATA pXML_MeasureUnit_Enum
[] =
637 { XML_AUTOMATIC
, 0 },
644 { XML_UNIT_INCH
, 8 },
645 { XML_UNIT_FOOT
, 9 },
646 { XML_UNIT_MILES
, 10 },
647 { XML_TOKEN_INVALID
,0 }
650 SvXMLEnumMapEntry __READONLY_DATA pXML_Measure_HAlign_Enum
[] =
652 { XML_AUTOMATIC
, drawing::MeasureTextHorzPos_AUTO
},
653 { XML_LEFT_OUTSIDE
, drawing::MeasureTextHorzPos_LEFTOUTSIDE
},
654 { XML_INSIDE
, drawing::MeasureTextHorzPos_INSIDE
},
655 { XML_RIGHT_OUTSIDE
, drawing::MeasureTextHorzPos_RIGHTOUTSIDE
},
656 { XML_TOKEN_INVALID
,0 }
659 SvXMLEnumMapEntry __READONLY_DATA pXML_Measure_VAlign_Enum
[] =
661 { XML_AUTOMATIC
, drawing::MeasureTextVertPos_AUTO
},
662 { XML_ABOVE
, drawing::MeasureTextVertPos_EAST
},
663 { XML_BELOW
, drawing::MeasureTextVertPos_WEST
},
664 { XML_CENTER
, drawing::MeasureTextVertPos_CENTERED
},
665 { XML_TOKEN_INVALID
,0 }
669 SvXMLEnumMapEntry __READONLY_DATA pXML_Fontwork_Style_Enum
[] =
671 { XML_ROTATE
, 0 }, //XFT_ROTATE,
672 { XML_UPRIGHT
, 1 }, //XFT_UPRIGHT,
673 { XML_SLANT_X
, 2 }, //XFT_SLANTX,
674 { XML_SLANT_Y
, 3 }, //XFT_SLANTY,
675 { XML_NONE
, 4 }, //XFT_NONE
676 { XML_TOKEN_INVALID
,0 }
679 SvXMLEnumMapEntry __READONLY_DATA pXML_Fontwork_Adjust_Enum
[] =
681 { XML_LEFT
, 0 }, //XFT_LEFT,
682 { XML_RIGHT
, 1 }, //XFT_RIGHT,
683 { XML_AUTOSIZE
, 2 }, //XFT_AUTOSIZE,
684 { XML_CENTER
, 3 }, //XFT_CENTER
685 { XML_TOKEN_INVALID
,0 }
688 SvXMLEnumMapEntry __READONLY_DATA pXML_Fontwork_Shadow_Enum
[] =
690 { XML_NORMAL
, 0 }, //XFTSHADOW_NORMAL,
691 { XML_SLANT
, 1 }, //XFTSHADOW_SLANT,
692 { XML_NONE
, 2 }, //XFTSHADOW_NONE
693 { XML_TOKEN_INVALID
,0 }
696 SvXMLEnumMapEntry __READONLY_DATA pXML_Fontwork_Form_Enum
[] =
698 { XML_NONE
, 0 }, //XFTFORM_NONE,
699 { XML_TOPCIRCLE
, 1 }, //XFTFORM_TOPCIRC,
700 { XML_BOTTOMCIRCLE
, 2 }, //XFTFORM_BOTCIRC,
701 { XML_LEFTCIRCLE
, 3 }, //XFTFORM_LFTCIRC,
702 { XML_RIGHTCIRCLE
, 4 }, //XFTFORM_RGTCIRC,
703 { XML_TOPARC
, 5 }, //XFTFORM_TOPARC,
704 { XML_BOTTOMARC
, 6 }, //XFTFORM_BOTARC,
705 { XML_LEFTARC
, 7 }, //XFTFORM_LFTARC,
706 { XML_RIGHTARC
, 8 }, //XFTFORM_RGTARC,
707 { XML_BUTTON1
, 9 }, //XFTFORM_BUTTON1,
708 { XML_BUTTON2
, 10 }, //XFTFORM_BUTTON2,
709 { XML_BUTTON3
, 11 }, //XFTFORM_BUTTON3,
710 { XML_BUTTON4
, 12 }, //XFTFORM_BUTTON4
711 { XML_TOKEN_INVALID
,0 }
714 SvXMLEnumMapEntry __READONLY_DATA pXML_Caption_Esc_Dir_Enum
[] =
716 { XML_HORIZONTAL
, 0 }, //SDRCAPT_ESCHORIZONTAL,
717 { XML_VERTICAL
, 1 }, //SDRCAPT_ESCVERTICAL,
718 { XML_AUTO
, 2 }, //SDRCAPT_ESCBESTFIT,
719 { XML_TOKEN_INVALID
,0 }
722 SvXMLEnumMapEntry __READONLY_DATA pXML_Caption_Type_Enum
[] =
724 { XML_STRAIGHT_LINE
, 0 }, //SDRCAPT_TYPE1,
725 { XML_ANGLED_LINE
, 1 }, //SDRCAPT_TYPE2,
726 { XML_ANGLED_CONNECTOR_LINE
, 2 }, //SDRCAPT_TYPE3,
727 { XML_TOKEN_INVALID
,0 }
730 //////////////////////////////////////////////////////////////////////////////
732 class XMLCaptionEscapeRelative
: public XMLPropertyHandler
735 virtual sal_Bool
importXML(
736 const ::rtl::OUString
& rStrImpValue
,
737 ::com::sun::star::uno::Any
& rValue
,
738 const SvXMLUnitConverter
& rUnitConverter
) const;
739 virtual sal_Bool
exportXML(
740 ::rtl::OUString
& rStrExpValue
,
741 const ::com::sun::star::uno::Any
& rValue
,
742 const SvXMLUnitConverter
& rUnitConverter
) const;
745 sal_Bool
XMLCaptionEscapeRelative::importXML( const OUString
& rStrImpValue
, Any
& rValue
, const SvXMLUnitConverter
& ) const
749 if( !SvXMLUnitConverter::convertPercent( nValue
, rStrImpValue
) )
757 sal_Bool
XMLCaptionEscapeRelative::exportXML( OUString
& rStrExpValue
, const Any
& rValue
, const SvXMLUnitConverter
& ) const
759 sal_Int32 nValue
= 0;
760 if( !(rValue
>>= nValue
) )
765 SvXMLUnitConverter::convertPercent( aOut
, nValue
);
766 rStrExpValue
= aOut
.makeStringAndClear();
770 //////////////////////////////////////////////////////////////////////////////
772 class XMLMoveSizeProtectHdl
: public XMLPropertyHandler
775 XMLMoveSizeProtectHdl( sal_Int32 nType
) : mnType( nType
) {}
777 virtual sal_Bool
importXML(
778 const ::rtl::OUString
& rStrImpValue
,
779 ::com::sun::star::uno::Any
& rValue
,
780 const SvXMLUnitConverter
& rUnitConverter
) const;
781 virtual sal_Bool
exportXML(
782 ::rtl::OUString
& rStrExpValue
,
783 const ::com::sun::star::uno::Any
& rValue
,
784 const SvXMLUnitConverter
& rUnitConverter
) const;
786 const sal_Int32 mnType
;
789 sal_Bool
XMLMoveSizeProtectHdl::importXML( const OUString
& rStrImpValue
, Any
& rValue
, const SvXMLUnitConverter
& ) const
791 const sal_Bool bValue
= rStrImpValue
.indexOf( GetXMLToken( mnType
== XML_SD_TYPE_MOVE_PROTECT
? XML_POSITION
: XML_SIZE
) ) != -1;
796 sal_Bool
XMLMoveSizeProtectHdl::exportXML( OUString
& rStrExpValue
, const Any
& rValue
, const SvXMLUnitConverter
& ) const
798 sal_Bool bValue
= sal_Bool();
799 if( !(rValue
>>= bValue
) )
804 if( rStrExpValue
.getLength() )
805 rStrExpValue
+= ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " " ) );
807 rStrExpValue
+= GetXMLToken( mnType
== XML_SD_TYPE_MOVE_PROTECT
? XML_POSITION
: XML_SIZE
);
814 //////////////////////////////////////////////////////////////////////////////
816 class XMLSdHeaderFooterVisibilityTypeHdl
: public XMLPropertyHandler
819 virtual ~XMLSdHeaderFooterVisibilityTypeHdl();
821 virtual sal_Bool
importXML( const ::rtl::OUString
& rStrImpValue
, ::com::sun::star::uno::Any
& rValue
, const SvXMLUnitConverter
& rUnitConverter
) const;
822 virtual sal_Bool
exportXML( ::rtl::OUString
& rStrExpValue
, const ::com::sun::star::uno::Any
& rValue
, const SvXMLUnitConverter
& rUnitConverter
) const;
825 XMLSdHeaderFooterVisibilityTypeHdl::~XMLSdHeaderFooterVisibilityTypeHdl()
829 sal_Bool
XMLSdHeaderFooterVisibilityTypeHdl::importXML(
830 const ::rtl::OUString
& rStrImpValue
,
831 ::com::sun::star::uno::Any
& rValue
,
832 const SvXMLUnitConverter
& ) const
835 // attributes with this type where saved with VISIBLE|HIDDEN prior
836 // to src680m67. So we have to import that correctly
837 const sal_Bool bBool
= IsXMLToken(rStrImpValue
, XML_TRUE
) || IsXMLToken(rStrImpValue
, XML_VISIBLE
);
839 return bBool
|| IsXMLToken(rStrImpValue
, XML_FALSE
) || IsXMLToken(rStrImpValue
, XML_HIDDEN
);
842 sal_Bool
XMLSdHeaderFooterVisibilityTypeHdl::exportXML(
843 OUString
& rStrExpValue
,
845 const SvXMLUnitConverter
& ) const
847 sal_Bool bRet
= sal_False
;
849 sal_Bool bValue
= sal_Bool();
851 if (rValue
>>= bValue
)
853 SvXMLUnitConverter::convertBool( aOut
, bValue
);
854 rStrExpValue
= aOut
.makeStringAndClear();
863 //////////////////////////////////////////////////////////////////////////////
865 XMLSdPropHdlFactory::XMLSdPropHdlFactory( uno::Reference
< frame::XModel
> xModel
, SvXMLImport
& rImport
)
866 : mxModel( xModel
), mpExport(0), mpImport( &rImport
)
870 XMLSdPropHdlFactory::XMLSdPropHdlFactory( uno::Reference
< frame::XModel
> xModel
, SvXMLExport
& rExport
)
871 : mxModel( xModel
), mpExport( &rExport
), mpImport(0)
875 XMLSdPropHdlFactory::~XMLSdPropHdlFactory()
879 const XMLPropertyHandler
* XMLSdPropHdlFactory::GetPropertyHandler( sal_Int32 nType
) const
881 const XMLPropertyHandler
* pHdl
= XMLPropertyHandlerFactory::GetPropertyHandler( nType
);
886 case XML_SD_TYPE_STROKE
:
888 pHdl
= new XMLEnumPropertyHdl( aXML_LineStyle_EnumMap
, ::getCppuType((const drawing::LineStyle
*)0) );
891 case XML_SD_TYPE_LINEJOIN
:
893 pHdl
= new XMLEnumPropertyHdl( aXML_LineJoint_EnumMap
, ::getCppuType((const drawing::LineJoint
*)0) );
896 case XML_SD_TYPE_FILLSTYLE
:
898 pHdl
= new XMLEnumPropertyHdl( aXML_FillStyle_EnumMap
, ::getCppuType((const drawing::FillStyle
*)0) );
901 case XML_SD_TYPE_PRESPAGE_TYPE
:
903 pHdl
= new XMLEnumPropertyHdl( aXML_PresChange_EnumMap
, ::getCppuType((const sal_Int32
*)0) );
906 case XML_SD_TYPE_SHADOW
:
908 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_VISIBLE
), GetXMLToken(XML_HIDDEN
) );
911 case XML_TYPE_SD_MIRROR
:
913 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_HORIZONTAL
), GetXMLToken(XML_NONE
) );
916 case XML_SD_TYPE_PRESPAGE_STYLE
:
918 pHdl
= new XMLEnumPropertyHdl( aXML_FadeEffect_EnumMap
, ::getCppuType((const presentation::FadeEffect
*)0) );
921 case XML_SD_TYPE_PRESPAGE_SPEED
:
923 pHdl
= new XMLEnumPropertyHdl( aXML_TransSpeed_EnumMap
, ::getCppuType((const presentation::AnimationSpeed
*)0) );
926 case XML_SD_TYPE_PRESPAGE_DURATION
:
928 pHdl
= new XMLDurationPropertyHdl();
931 case XML_SD_TYPE_TEXT_CROSSEDOUT
:
933 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_SOLID
), GetXMLToken(XML_NONE
) );
936 case XML_SD_TYPE_OPACITY
:
938 pHdl
= new XMLOpacityPropertyHdl(mpImport
);
941 case XML_SD_TYPE_WRITINGMODE
:
943 pHdl
= new XMLEnumPropertyHdl( aXML_WritingMode_EnumMap
, ::getCppuType((const text::WritingMode
*)0) );
946 case XML_SD_TYPE_PRESPAGE_VISIBILITY
:
948 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_VISIBLE
), GetXMLToken(XML_HIDDEN
) );
951 case XML_SD_TYPE_PRESPAGE_BACKSIZE
:
953 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_FULL
), GetXMLToken(XML_BORDER
) );
957 //////////////////////////////////////////////////////////////////
960 case XML_SD_TYPE_BACKFACE_CULLING
:
962 // #87922# DoubleSided -> BackfaceCulling
963 // This BOOL needs to be flipped, DoubleSided TRUE -> NO Backface culling
965 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_DISABLED
), GetXMLToken(XML_ENABLED
) );
969 case XML_SD_TYPE_NORMALS_KIND
:
971 pHdl
= new XMLEnumPropertyHdl( aXML_NormalsKind_EnumMap
, ::getCppuType((const drawing::NormalsKind
*)0) );
974 case XML_SD_TYPE_NORMALS_DIRECTION
:
976 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_NORMAL
), GetXMLToken(XML_INVERSE
) );
979 case XML_SD_TYPE_TEX_GENERATION_MODE_X
:
981 pHdl
= new XMLEnumPropertyHdl( aXML_TexGenerationX_EnumMap
, ::getCppuType((const drawing::TextureProjectionMode
*)0) );
984 case XML_SD_TYPE_TEX_GENERATION_MODE_Y
:
986 pHdl
= new XMLEnumPropertyHdl( aXML_TexGenerationY_EnumMap
, ::getCppuType((const drawing::TextureProjectionMode
*)0) );
989 case XML_SD_TYPE_TEX_KIND
:
991 pHdl
= new XMLEnumPropertyHdl( aXML_TexKind_EnumMap
, ::getCppuType((const drawing::TextureKind
*)0) );
994 case XML_SD_TYPE_TEX_MODE
:
996 pHdl
= new XMLEnumPropertyHdl( aXML_TexMode_EnumMap
, ::getCppuType((const drawing::TextureMode
*)0) );
999 case XML_SD_TYPE_NUMBULLET
:
1001 uno::Reference
<ucb::XAnyCompareFactory
> xCompareFac( mxModel
, uno::UNO_QUERY
);
1002 uno::Reference
<ucb::XAnyCompare
> xCompare
;
1003 if( xCompareFac
.is() )
1004 xCompare
= xCompareFac
->createAnyCompareByName( OUString( RTL_CONSTASCII_USTRINGPARAM( "NumberingRules" ) ) );
1006 pHdl
= new XMLNumRulePropHdl( xCompare
);
1009 case XML_SD_TYPE_BITMAP_MODE
:
1011 pHdl
= new XMLEnumPropertyHdl( aXML_BitmapMode_EnumMap
, getCppuType((const drawing::BitmapMode
*)0) );
1014 case XML_SD_TYPE_BITMAPREPOFFSETX
:
1015 case XML_SD_TYPE_BITMAPREPOFFSETY
:
1017 pHdl
= new XMLBitmapRepeatOffsetPropertyHandler( nType
== XML_SD_TYPE_BITMAPREPOFFSETX
);
1020 case XML_SD_TYPE_FILLBITMAPSIZE
:
1022 pHdl
= new XMLFillBitmapSizePropertyHandler();
1025 case XML_SD_TYPE_LOGICAL_SIZE
:
1027 pHdl
= new XMLBitmapLogicalSizePropertyHandler();
1030 case XML_SD_TYPE_BITMAP_REFPOINT
:
1032 pHdl
= new XMLEnumPropertyHdl( aXML_RefPoint_EnumMap
, getCppuType((const ::com::sun::star::drawing::RectanglePoint
*)0) );
1035 case XML_TYPE_TEXT_ANIMATION
:
1036 pHdl
= new XMLEnumPropertyHdl( pXML_TextAnimation_Enum
, ::getCppuType((const com::sun::star::drawing::TextAnimationKind
*)0) );
1038 case XML_TYPE_TEXT_ANIMATION_BLINKING
:
1039 pHdl
= new XMLEnumPropertyHdl( pXML_TextAnimation_Blinking_Enum
, ::getCppuType((const com::sun::star::drawing::TextAnimationKind
*)0) );
1041 case XML_TYPE_TEXT_ANIMATION_DIRECTION
:
1042 pHdl
= new XMLEnumPropertyHdl( pXML_TextAnimationDirection_Enum
, ::getCppuType((const com::sun::star::drawing::TextAnimationDirection
*)0) );
1044 case XML_TYPE_TEXT_ANIMATION_STEPS
:
1045 pHdl
= new XMLTextAnimationStepPropertyHdl
;
1047 case XML_SD_TYPE_TEXT_ALIGN
:
1048 pHdl
= new XMLEnumPropertyHdl( pXML_TextAlign_Enum
, ::getCppuType((const com::sun::star::drawing::TextHorizontalAdjust
*)0) );
1050 case XML_SD_TYPE_VERTICAL_ALIGN
:
1051 pHdl
= new XMLEnumPropertyHdl( pXML_VerticalAlign_Enum
, ::getCppuType((const com::sun::star::drawing::TextVerticalAdjust
*)0) );
1053 case XML_SD_TYPE_FITTOSIZE
:
1054 pHdl
= new XMLEnumPropertyHdl( pXML_FitToSize_Enum
, ::getCppuType((const com::sun::star::drawing::TextFitToSizeType
*)0) );
1056 case XML_SD_TYPE_MEASURE_UNIT
:
1057 pHdl
= new XMLEnumPropertyHdl( pXML_MeasureUnit_Enum
, ::getCppuType((const sal_Int32
*)0) );
1059 case XML_SD_TYPE_MEASURE_HALIGN
:
1060 pHdl
= new XMLEnumPropertyHdl( pXML_Measure_HAlign_Enum
, ::getCppuType((const com::sun::star::drawing::MeasureTextHorzPos
*)0) );
1062 case XML_SD_TYPE_MEASURE_VALIGN
:
1063 pHdl
= new XMLEnumPropertyHdl( pXML_Measure_VAlign_Enum
, ::getCppuType((const com::sun::star::drawing::MeasureTextVertPos
*)0) );
1065 case XML_SD_TYPE_MEASURE_PLACING
:
1067 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_BELOW
), GetXMLToken(XML_ABOVE
) );
1070 case XML_TYPE_TEXT_CLIP11
:
1071 pHdl
= new XMLClipPropertyHandler( sal_True
);
1073 case XML_TYPE_TEXT_CLIP
:
1074 pHdl
= new XMLClipPropertyHandler( sal_False
);
1078 case XML_SD_TYPE_FONTWORK_STYLE
:
1079 pHdl
= new XMLEnumPropertyHdl( pXML_Fontwork_Style_Enum
, ::getCppuType((const sal_Int32
*)0));
1081 case XML_SD_TYPE_FONTWORK_ADJUST
:
1082 pHdl
= new XMLEnumPropertyHdl( pXML_Fontwork_Adjust_Enum
, ::getCppuType((const sal_Int32
*)0));
1084 case XML_SD_TYPE_FONTWORK_SHADOW
:
1085 pHdl
= new XMLEnumPropertyHdl( pXML_Fontwork_Shadow_Enum
, ::getCppuType((const sal_Int32
*)0));
1087 case XML_SD_TYPE_FONTWORK_FORM
:
1088 pHdl
= new XMLEnumPropertyHdl( pXML_Fontwork_Form_Enum
, ::getCppuType((const sal_Int32
*)0));
1091 case XML_SD_TYPE_CONTROL_BORDER
:
1092 pHdl
= new ::xmloff::OControlBorderHandler( ::xmloff::OControlBorderHandler::STYLE
);
1094 case XML_SD_TYPE_CONTROL_BORDER_COLOR
:
1095 pHdl
= new ::xmloff::OControlBorderHandler( ::xmloff::OControlBorderHandler::COLOR
);
1097 case XML_SD_TYPE_IMAGE_SCALE_MODE
:
1098 pHdl
= new ::xmloff::ImageScaleModeHandler
;
1100 case XML_TYPE_CONTROL_TEXT_EMPHASIZE
:
1101 pHdl
= new ::xmloff::OControlTextEmphasisHandler
;
1104 case XML_SD_TYPE_CAPTION_ANGLE_TYPE
:
1106 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_FIXED
), GetXMLToken(XML_FREE
) );
1109 case XML_SD_TYPE_CAPTION_IS_ESC_REL
:
1110 pHdl
= new XMLIsPercentagePropertyHandler();
1112 case XML_SD_TYPE_CAPTION_ESC_REL
:
1113 pHdl
= new XMLCaptionEscapeRelative();
1115 case XML_SD_TYPE_CAPTION_ESC_ABS
:
1116 pHdl
= new XMLPercentOrMeasurePropertyHandler( sal_False
);
1118 case XML_SD_TYPE_CAPTION_ESC_DIR
:
1119 pHdl
= new XMLEnumPropertyHdl( pXML_Caption_Esc_Dir_Enum
, ::getCppuType((const sal_Int32
*)0));
1121 case XML_SD_TYPE_CAPTION_TYPE
:
1122 pHdl
= new XMLEnumPropertyHdl( pXML_Caption_Type_Enum
, ::getCppuType((const sal_Int32
*)0));
1124 case XML_SD_TYPE_DATETIMEUPDATE
:
1125 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_FIXED
), GetXMLToken(XML_VARIABLE
) );
1127 case XML_SD_TYPE_DATETIME_FORMAT
:
1128 pHdl
= new XMLDateTimeFormatHdl( mpExport
);
1130 case XML_SD_TYPE_TRANSITION_TYPE
:
1131 pHdl
= new XMLEnumPropertyHdl( xmloff::getAnimationsEnumMap(xmloff::Animations_EnumMap_TransitionType
) , ::getCppuType((const sal_Int16
*)0));
1133 case XML_SD_TYPE_TRANSTIION_SUBTYPE
:
1134 pHdl
= new XMLEnumPropertyHdl( xmloff::getAnimationsEnumMap(xmloff::Animations_EnumMap_TransitionSubType
) , ::getCppuType((const sal_Int16
*)0));
1136 case XML_SD_TYPE_TRANSTIION_DIRECTION
:
1137 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_FORWARD
), GetXMLToken(XML_REVERSE
) );
1139 case XML_TYPE_WRAP_OPTION
:
1140 pHdl
= new XMLWordWrapPropertyHdl( mpImport
);
1143 case XML_SD_TYPE_MOVE_PROTECT
:
1144 case XML_SD_TYPE_SIZE_PROTECT
:
1145 pHdl
= new XMLMoveSizeProtectHdl( nType
);
1147 case XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE
:
1148 pHdl
= new XMLSdHeaderFooterVisibilityTypeHdl();
1153 PutHdlCache(nType
, pHdl
);
1159 //////////////////////////////////////////////////////////////////////////////
1161 XMLShapePropertySetMapper::XMLShapePropertySetMapper(const UniReference
< XMLPropertyHandlerFactory
>& rFactoryRef
)
1162 : XMLPropertySetMapper( aXMLSDProperties
, rFactoryRef
)
1166 XMLShapePropertySetMapper::XMLShapePropertySetMapper(const UniReference
< XMLPropertyHandlerFactory
>& rFactoryRef
, sal_uInt16 nOffset
)
1167 : XMLPropertySetMapper( &aXMLSDProperties
[nOffset
], rFactoryRef
)
1171 XMLShapePropertySetMapper::~XMLShapePropertySetMapper()
1175 // ----------------------------------------
1177 XMLShapeExportPropertyMapper::XMLShapeExportPropertyMapper( const UniReference
< XMLPropertySetMapper
>& rMapper
, XMLTextListAutoStylePool
*pListAutoPool
, SvXMLExport
& rExport
)
1178 : SvXMLExportPropertyMapper( rMapper
)
1179 , mpListAutoPool( pListAutoPool
)
1180 , mrExport( rExport
)
1181 , maNumRuleExp( rExport
)
1182 , mbIsInAutoStyles( sal_True
)
1183 , msCDATA( GetXMLToken(XML_CDATA
))
1184 , msTrue( GetXMLToken(XML_TRUE
))
1185 , msFalse( GetXMLToken(XML_FALSE
))
1189 XMLShapeExportPropertyMapper::~XMLShapeExportPropertyMapper()
1193 void XMLShapeExportPropertyMapper::ContextFilter(
1194 std::vector
< XMLPropertyState
>& rProperties
,
1195 uno::Reference
< beans::XPropertySet
> rPropSet
) const
1197 XMLPropertyState
* pRepeatOffsetX
= NULL
;
1198 XMLPropertyState
* pRepeatOffsetY
= NULL
;
1199 XMLPropertyState
* pTextAnimationBlinking
= NULL
;
1200 XMLPropertyState
* pTextAnimationKind
= NULL
;
1203 XMLPropertyState
* pFontWorkStyle
= NULL
;
1204 XMLPropertyState
* pFontWorkAdjust
= NULL
;
1205 XMLPropertyState
* pFontWorkDistance
= NULL
;
1206 XMLPropertyState
* pFontWorkStart
= NULL
;
1207 XMLPropertyState
* pFontWorkMirror
= NULL
;
1208 XMLPropertyState
* pFontWorkOutline
= NULL
;
1209 XMLPropertyState
* pFontWorkShadow
= NULL
;
1210 XMLPropertyState
* pFontWorkShadowColor
= NULL
;
1211 XMLPropertyState
* pFontWorkShadowOffsetx
= NULL
;
1212 XMLPropertyState
* pFontWorkShadowOffsety
= NULL
;
1213 XMLPropertyState
* pFontWorkForm
= NULL
;
1214 XMLPropertyState
* pFontWorkHideform
= NULL
;
1215 XMLPropertyState
* pFontWorkShadowTransparence
= NULL
;
1218 XMLPropertyState
* pOLEVisAreaLeft
= NULL
;
1219 XMLPropertyState
* pOLEVisAreaTop
= NULL
;
1220 XMLPropertyState
* pOLEVisAreaWidth
= NULL
;
1221 XMLPropertyState
* pOLEVisAreaHeight
= NULL
;
1222 XMLPropertyState
* pOLEIsInternal
= NULL
;
1225 XMLPropertyState
* pCaptionIsEscRel
= NULL
;
1226 XMLPropertyState
* pCaptionEscRel
= NULL
;
1227 XMLPropertyState
* pCaptionEscAbs
= NULL
;
1230 XMLPropertyState
* pClip11State
= NULL
;
1231 XMLPropertyState
* pClipState
= NULL
;
1233 XMLPropertyState
* pShapeWritingMode
= NULL
;
1234 XMLPropertyState
* pTextWritingMode
= NULL
;
1235 XMLPropertyState
* pControlWritingMode
= NULL
;
1237 // filter properties
1238 for( std::vector
< XMLPropertyState
>::iterator aIter
= rProperties
.begin();
1239 aIter
!= rProperties
.end();
1242 XMLPropertyState
*property
= &(*aIter
);
1243 if( property
->mnIndex
== -1 )
1246 // find properties with context
1247 // to prevent writing this property set mnIndex member to -1
1248 switch( getPropertySetMapper()->GetEntryContextId( property
->mnIndex
))
1250 case CTF_NUMBERINGRULES
:
1252 if( mbIsInAutoStyles
)
1253 property
->mnIndex
= -1;
1256 case CTF_SD_NUMBERINGRULES_NAME
:
1258 // this property is not exported in the style:properties element
1259 // because its an XIndexAccess and not a string.
1260 // This will be handled in SvXMLAutoStylePoolP::exportStyleAttributes
1261 // This is suboptimal
1262 if( !mbIsInAutoStyles
)
1263 property
->mnIndex
= -1;
1266 case CTF_WRITINGMODE
:
1268 pShapeWritingMode
= property
;
1269 text::WritingMode eWritingMode
;
1270 if( property
->maValue
>>= eWritingMode
)
1272 if( text::WritingMode_LR_TB
== eWritingMode
)
1274 property
->mnIndex
= -1;
1275 pShapeWritingMode
= 0;
1280 case CTF_CONTROLWRITINGMODE
:
1281 pControlWritingMode
= property
;
1283 case CTF_TEXTWRITINGMODE
:
1284 pTextWritingMode
= property
;
1286 case CTF_REPEAT_OFFSET_X
:
1287 pRepeatOffsetX
= property
;
1290 case CTF_REPEAT_OFFSET_Y
:
1291 pRepeatOffsetY
= property
;
1295 case CTF_FILLGRADIENTNAME
:
1296 case CTF_FILLHATCHNAME
:
1297 case CTF_FILLBITMAPNAME
:
1300 if( (property
->maValue
>>= aStr
) && 0 == aStr
.getLength() )
1301 property
->mnIndex
= -1;
1304 case CTF_TEXTANIMATION_BLINKING
:
1305 pTextAnimationBlinking
= property
;
1307 case CTF_TEXTANIMATION_KIND
:
1308 pTextAnimationKind
= property
;
1312 case CTF_FONTWORK_STYLE
: pFontWorkStyle
= property
; break;
1313 case CTF_FONTWORK_ADJUST
: pFontWorkAdjust
= property
; break;
1314 case CTF_FONTWORK_DISTANCE
: pFontWorkDistance
= property
; break;
1315 case CTF_FONTWORK_START
: pFontWorkStart
= property
; break;
1316 case CTF_FONTWORK_MIRROR
: pFontWorkMirror
= property
; break;
1317 case CTF_FONTWORK_OUTLINE
: pFontWorkOutline
= property
; break;
1318 case CTF_FONTWORK_SHADOW
: pFontWorkShadow
= property
; break;
1319 case CTF_FONTWORK_SHADOWCOLOR
: pFontWorkShadowColor
= property
; break;
1320 case CTF_FONTWORK_SHADOWOFFSETX
: pFontWorkShadowOffsetx
= property
; break;
1321 case CTF_FONTWORK_SHADOWOFFSETY
: pFontWorkShadowOffsety
= property
; break;
1322 case CTF_FONTWORK_FORM
: pFontWorkForm
= property
; break;
1323 case CTF_FONTWORK_HIDEFORM
: pFontWorkHideform
= property
; break;
1324 case CTF_FONTWORK_SHADOWTRANSPARENCE
: pFontWorkShadowTransparence
= property
; break;
1327 case CTF_SD_OLE_VIS_AREA_EXPORT_LEFT
: pOLEVisAreaLeft
= property
; break;
1328 case CTF_SD_OLE_VIS_AREA_EXPORT_TOP
: pOLEVisAreaTop
= property
; break;
1329 case CTF_SD_OLE_VIS_AREA_EXPORT_WIDTH
: pOLEVisAreaWidth
= property
; break;
1330 case CTF_SD_OLE_VIS_AREA_EXPORT_HEIGHT
: pOLEVisAreaHeight
= property
; break;
1331 case CTF_SD_OLE_ISINTERNAL
: pOLEIsInternal
= property
; break;
1333 case CTF_FRAME_DISPLAY_SCROLLBAR
:
1335 if( !property
->maValue
.hasValue() )
1336 property
->mnIndex
= -1;
1339 case CTF_FRAME_MARGIN_HORI
:
1340 case CTF_FRAME_MARGIN_VERT
:
1342 sal_Int32 nValue
= 0;
1343 if( (property
->maValue
>>= nValue
) && (nValue
< 0) )
1344 property
->mnIndex
= -1;
1348 case CTF_SD_MOVE_PROTECT
:
1350 sal_Bool bProtected
= sal_Bool();
1351 if( (property
->maValue
>>= bProtected
) && !bProtected
)
1352 property
->mnIndex
= -1;
1355 case CTF_SD_SIZE_PROTECT
:
1357 sal_Bool bProtected
= sal_Bool();
1358 if( (property
->maValue
>>= bProtected
) && !bProtected
)
1359 property
->mnIndex
= -1;
1362 case CTF_CAPTION_ISESCREL
: pCaptionIsEscRel
= property
; break;
1363 case CTF_CAPTION_ESCREL
: pCaptionEscRel
= property
; break;
1364 case CTF_CAPTION_ESCABS
: pCaptionEscAbs
= property
; break;
1365 case CTF_TEXT_CLIP11
: pClip11State
= property
; break;
1366 case CTF_TEXT_CLIP
: pClipState
= property
; break;
1370 // check for duplicate writing mode
1371 if( pShapeWritingMode
&& (pTextWritingMode
|| pControlWritingMode
) )
1373 if( pTextWritingMode
)
1374 pTextWritingMode
->mnIndex
= -1;
1375 if( pControlWritingMode
)
1376 pControlWritingMode
->mnIndex
= -1;
1378 else if( pTextWritingMode
&& pControlWritingMode
)
1380 pControlWritingMode
->mnIndex
= -1;
1383 // do not export visual area for internal ole objects
1384 if( pOLEIsInternal
)
1386 sal_Bool bInternal
= sal_Bool();
1387 if( (pOLEIsInternal
->maValue
>>= bInternal
) && !bInternal
)
1391 const OUString
sVisibleArea( RTL_CONSTASCII_USTRINGPARAM("VisibleArea") );
1392 awt::Rectangle aRect
;
1393 if( rPropSet
->getPropertyValue( sVisibleArea
) >>= aRect
)
1395 if( pOLEVisAreaLeft
)
1397 pOLEVisAreaLeft
->mnIndex
= getPropertySetMapper()->FindEntryIndex( CTF_SD_OLE_VIS_AREA_IMPORT_LEFT
);
1398 pOLEVisAreaLeft
->maValue
<<= aRect
;
1400 if( pOLEVisAreaTop
)
1402 pOLEVisAreaTop
->mnIndex
= getPropertySetMapper()->FindEntryIndex( CTF_SD_OLE_VIS_AREA_IMPORT_TOP
);
1403 pOLEVisAreaTop
->maValue
<<= aRect
;
1405 if( pOLEVisAreaWidth
)
1407 pOLEVisAreaWidth
->mnIndex
= getPropertySetMapper()->FindEntryIndex( CTF_SD_OLE_VIS_AREA_IMPORT_WIDTH
);
1408 pOLEVisAreaWidth
->maValue
<<= aRect
;
1410 if( pOLEVisAreaHeight
)
1412 pOLEVisAreaHeight
->mnIndex
= getPropertySetMapper()->FindEntryIndex( CTF_SD_OLE_VIS_AREA_IMPORT_HEIGHT
);
1413 pOLEVisAreaHeight
->maValue
<<= aRect
;
1417 catch( uno::Exception
& )
1423 if( pOLEVisAreaLeft
) pOLEVisAreaLeft
->mnIndex
= -1;
1424 if( pOLEVisAreaTop
) pOLEVisAreaTop
->mnIndex
= -1;
1425 if( pOLEVisAreaWidth
) pOLEVisAreaWidth
->mnIndex
= -1;
1426 if( pOLEVisAreaHeight
) pOLEVisAreaHeight
->mnIndex
= -1;
1429 pOLEIsInternal
->mnIndex
= -1;
1432 if( pTextAnimationBlinking
&& pTextAnimationKind
)
1434 drawing::TextAnimationKind eKind
;
1435 if( (pTextAnimationKind
->maValue
>>= eKind
) && eKind
!= drawing::TextAnimationKind_BLINK
)
1437 pTextAnimationBlinking
->mnIndex
= -1;
1441 pTextAnimationKind
->mnIndex
= -1;
1445 if( pRepeatOffsetX
&& pRepeatOffsetY
)
1447 sal_Int32 nOffset
= 0;
1448 if( ( pRepeatOffsetX
->maValue
>>= nOffset
) && ( nOffset
== 0 ) )
1449 pRepeatOffsetX
->mnIndex
= -1;
1451 pRepeatOffsetY
->mnIndex
= -1;
1457 sal_Int32 nStyle
= 0;
1459 if(pFontWorkStyle
->maValue
>>= nStyle
)
1461 if(/*XFT_NONE*/4 == nStyle
)
1463 pFontWorkStyle
->mnIndex
= -1;
1465 pFontWorkAdjust
->mnIndex
= -1;
1466 if(pFontWorkDistance
)
1467 pFontWorkDistance
->mnIndex
= -1;
1469 pFontWorkStart
->mnIndex
= -1;
1471 pFontWorkMirror
->mnIndex
= -1;
1472 if(pFontWorkOutline
)
1473 pFontWorkOutline
->mnIndex
= -1;
1475 pFontWorkShadow
->mnIndex
= -1;
1476 if(pFontWorkShadowColor
)
1477 pFontWorkShadowColor
->mnIndex
= -1;
1478 if(pFontWorkShadowOffsetx
)
1479 pFontWorkShadowOffsetx
->mnIndex
= -1;
1480 if(pFontWorkShadowOffsety
)
1481 pFontWorkShadowOffsety
->mnIndex
= -1;
1483 pFontWorkForm
->mnIndex
= -1;
1484 if(pFontWorkHideform
)
1485 pFontWorkHideform
->mnIndex
= -1;
1486 if(pFontWorkShadowTransparence
)
1487 pFontWorkShadowTransparence
->mnIndex
= -1;
1492 if( pCaptionIsEscRel
)
1494 sal_Bool bIsRel
= false;
1495 pCaptionIsEscRel
->maValue
>>= bIsRel
;
1499 if( pCaptionEscAbs
)
1500 pCaptionEscAbs
->mnIndex
= -1;
1504 if( pCaptionEscRel
)
1505 pCaptionEscRel
->mnIndex
= -1;
1508 pCaptionIsEscRel
->mnIndex
= -1;
1511 if( pClipState
!= NULL
&& pClip11State
!= NULL
)
1512 pClip11State
->mnIndex
= -1;
1514 SvXMLExportPropertyMapper::ContextFilter(rProperties
, rPropSet
);
1517 void XMLShapeExportPropertyMapper::handleSpecialItem(
1518 SvXMLAttributeList
& rAttrList
,
1519 const XMLPropertyState
& rProperty
,
1520 const SvXMLUnitConverter
& rUnitConverter
,
1521 const SvXMLNamespaceMap
& rNamespaceMap
,
1522 const ::std::vector
< XMLPropertyState
> *pProperties
,
1523 sal_uInt32 nIdx
) const
1525 switch( getPropertySetMapper()->GetEntryContextId( rProperty
.mnIndex
) )
1527 case CTF_SD_CONTROL_SHAPE_DATA_STYLE
:
1528 // not to be handled by the base class
1532 SvXMLExportPropertyMapper::handleSpecialItem( rAttrList
, rProperty
, rUnitConverter
, rNamespaceMap
, pProperties
, nIdx
);
1537 void XMLShapeExportPropertyMapper::handleElementItem(
1538 SvXMLExport
& rExport
,
1539 const XMLPropertyState
& rProperty
,
1541 const ::std::vector
< XMLPropertyState
> *pProperties
,
1542 sal_uInt32 nIdx
) const
1544 switch( getPropertySetMapper()->GetEntryContextId( rProperty
.mnIndex
) )
1546 case CTF_NUMBERINGRULES
:
1548 // only export list-styles as elements in styles section
1549 if( !mbIsInAutoStyles
)
1551 uno::Reference
< container::XIndexReplace
> xNumRule( rProperty
.maValue
, uno::UNO_QUERY
);
1553 const_cast<XMLShapeExportPropertyMapper
*>(this)->maNumRuleExp
.exportNumberingRule( maStyleName
, xNumRule
);
1558 SvXMLExportPropertyMapper::handleElementItem( rExport
, rProperty
, nFlags
, pProperties
, nIdx
);
1563 //////////////////////////////////////////////////////////////////////////////
1565 XMLPagePropertySetMapper::XMLPagePropertySetMapper(const UniReference
< XMLPropertyHandlerFactory
>& rFactoryRef
)
1566 : XMLPropertySetMapper( aXMLSDPresPageProps
, rFactoryRef
)
1570 XMLPagePropertySetMapper::~XMLPagePropertySetMapper()
1574 // ----------------------------------------
1576 XMLPageExportPropertyMapper::XMLPageExportPropertyMapper( const UniReference
< XMLPropertySetMapper
>& rMapper
, SvXMLExport
& rExport
) :
1577 SvXMLExportPropertyMapper( rMapper
),
1578 mrExport( rExport
),
1579 msCDATA( GetXMLToken(XML_CDATA
))
1583 XMLPageExportPropertyMapper::~XMLPageExportPropertyMapper()
1587 void XMLPageExportPropertyMapper::ContextFilter(
1588 std::vector
< XMLPropertyState
>& rProperties
,
1589 uno::Reference
< beans::XPropertySet
> rPropSet
) const
1591 XMLPropertyState
* pRepeatOffsetX
= NULL
;
1592 XMLPropertyState
* pRepeatOffsetY
= NULL
;
1593 XMLPropertyState
* pTransType
= NULL
;
1594 XMLPropertyState
* pTransDuration
= NULL
;
1595 XMLPropertyState
* pDateTimeUpdate
= NULL
;
1596 XMLPropertyState
* pDateTimeFormat
= NULL
;
1597 XMLPropertyState
* pTransitionFadeColor
= NULL
;
1599 sal_Int16 nTransitionType
= 0;
1601 // filter properties
1602 for( std::vector
< XMLPropertyState
>::iterator aIter
= rProperties
.begin();
1603 aIter
!= rProperties
.end();
1606 XMLPropertyState
*property
= &(*aIter
);
1607 if( property
->mnIndex
== -1 )
1610 // find properties with context
1611 // to prevent writing this property set mnIndex member to -1
1612 switch( getPropertySetMapper()->GetEntryContextId( property
->mnIndex
))
1615 case CTF_REPEAT_OFFSET_X
:
1616 pRepeatOffsetX
= property
;
1619 case CTF_REPEAT_OFFSET_Y
:
1620 pRepeatOffsetY
= property
;
1622 case CTF_PAGE_TRANS_TYPE
:
1623 pTransType
= property
;
1625 case CTF_PAGE_TRANS_STYLE
:
1626 if( mrExport
.getExportFlags() & EXPORT_OASIS
)
1627 (*property
).mnIndex
= -1;
1629 case CTF_PAGE_TRANSITION_TYPE
:
1631 if( ((mrExport
.getExportFlags() & EXPORT_OASIS
) == 0) ||
1632 (((*property
).maValue
>>= nTransitionType
) && (nTransitionType
== 0)) )
1633 (*property
).mnIndex
= -1;
1636 case CTF_PAGE_TRANSITION_SUBTYPE
:
1638 sal_Int16 nTransitionSubtype
= sal_Int16();
1639 if( ((mrExport
.getExportFlags() & EXPORT_OASIS
) == 0) ||
1640 (((*property
).maValue
>>= nTransitionSubtype
) && (nTransitionSubtype
== 0)) )
1641 (*property
).mnIndex
= -1;
1645 case CTF_PAGE_TRANSITION_DIRECTION
:
1647 sal_Bool bDirection
= sal_Bool();
1648 if( ((mrExport
.getExportFlags() & EXPORT_OASIS
) == 0) ||
1649 (((*property
).maValue
>>= bDirection
) && bDirection
) )
1650 (*property
).mnIndex
= -1;
1653 case CTF_PAGE_TRANSITION_FADECOLOR
:
1654 if( ((mrExport
.getExportFlags() & EXPORT_OASIS
) == 0) )
1655 (*property
).mnIndex
= -1;
1657 pTransitionFadeColor
= property
;
1659 case CTF_PAGE_TRANS_SPEED
:
1661 presentation::AnimationSpeed aEnum
;
1662 if( ((*property
).maValue
>>= aEnum
) && aEnum
== presentation::AnimationSpeed_MEDIUM
)
1663 (*property
).mnIndex
= -1;
1666 case CTF_PAGE_VISIBLE
:
1667 // case CTF_HEADER_VISIBLE:
1668 // case CTF_FOOTER_VISIBLE:
1669 // case CTF_PAGE_NUMBER_VISIBLE:
1670 // case CTF_DATE_TIME_VISIBLE:
1672 sal_Bool bVisible
= false;
1673 (*property
).maValue
>>= bVisible
;
1675 (*property
).mnIndex
= -1;
1678 case CTF_PAGE_TRANS_DURATION
:
1679 pTransDuration
= property
;
1681 case CTF_HEADER_TEXT
:
1682 case CTF_FOOTER_TEXT
:
1683 case CTF_DATE_TIME_TEXT
:
1686 (*property
).maValue
>>= aValue
;
1687 if( aValue
.getLength() == 0 )
1688 (*property
).mnIndex
= -1;
1692 case CTF_DATE_TIME_UPDATE
:
1693 pDateTimeUpdate
= property
;
1696 case CTF_DATE_TIME_FORMAT
:
1697 pDateTimeFormat
= property
;
1702 if( pTransitionFadeColor
&& nTransitionType
!= ::com::sun::star::animations::TransitionType::FADE
)
1703 pTransitionFadeColor
->mnIndex
= -1;
1705 if( pDateTimeFormat
&& pDateTimeUpdate
)
1707 sal_Bool bIsFixed
= false;
1708 pDateTimeUpdate
->maValue
>>= bIsFixed
;
1710 pDateTimeFormat
->mnIndex
= -1;
1713 if( pRepeatOffsetX
&& pRepeatOffsetY
)
1715 sal_Int32 nOffset
= 0;
1716 if( ( pRepeatOffsetX
->maValue
>>= nOffset
) && ( nOffset
== 0 ) )
1717 pRepeatOffsetX
->mnIndex
= -1;
1719 pRepeatOffsetY
->mnIndex
= -1;
1722 if( pTransType
&& pTransDuration
)
1724 sal_Int32 nChange
= 0;
1725 pTransType
->maValue
>>= nChange
;
1727 // only export duration for automatic
1729 pTransDuration
->mnIndex
= -1;
1731 // do not export default transition change
1733 pTransType
->mnIndex
= -1;
1736 SvXMLExportPropertyMapper::ContextFilter(rProperties
, rPropSet
);
1739 void XMLPageExportPropertyMapper::handleElementItem(
1740 SvXMLExport
& rExport
,
1741 const XMLPropertyState
& rProperty
,
1743 const ::std::vector
< XMLPropertyState
> *pProperties
,
1744 sal_uInt32 nIdx
) const
1746 switch( getPropertySetMapper()->GetEntryContextId( rProperty
.mnIndex
) )
1748 case CTF_PAGE_SOUND_URL
:
1751 if( (rProperty
.maValue
>>= aSoundURL
) && aSoundURL
.getLength() != 0 )
1753 mrExport
.AddAttribute(XML_NAMESPACE_XLINK
, XML_HREF
, mrExport
.GetRelativeReference(aSoundURL
) );
1754 mrExport
.AddAttribute( XML_NAMESPACE_XLINK
, XML_TYPE
, XML_SIMPLE
);
1755 mrExport
.AddAttribute( XML_NAMESPACE_XLINK
, XML_SHOW
, XML_NEW
);
1756 mrExport
.AddAttribute( XML_NAMESPACE_XLINK
, XML_ACTUATE
, XML_ONREQUEST
);
1757 SvXMLElementExport
aElem( mrExport
, XML_NAMESPACE_PRESENTATION
, XML_SOUND
, sal_True
, sal_True
);
1762 SvXMLExportPropertyMapper::handleElementItem( rExport
, rProperty
, nFlags
, pProperties
, nIdx
);