1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <com/sun/star/animations/TransitionType.hpp>
21 #include <com/sun/star/ucb/XAnyCompareFactory.hpp>
22 #include <com/sun/star/container/XIndexReplace.hpp>
23 #include <com/sun/star/drawing/LineStyle.hpp>
24 #include <com/sun/star/drawing/LineJoint.hpp>
25 #include <com/sun/star/drawing/LineCap.hpp>
26 #include <com/sun/star/drawing/FillStyle.hpp>
27 #include <com/sun/star/presentation/AnimationSpeed.hpp>
28 #include <com/sun/star/presentation/FadeEffect.hpp>
29 #include <com/sun/star/drawing/ConnectorType.hpp>
30 #include <com/sun/star/drawing/RectanglePoint.hpp>
31 #include <com/sun/star/drawing/CircleKind.hpp>
33 #include <com/sun/star/drawing/BitmapMode.hpp>
34 #include <com/sun/star/text/WritingMode.hpp>
35 #include <xmloff/EnumPropertyHdl.hxx>
36 #include <xmloff/NamedBoolPropertyHdl.hxx>
37 #include <xmloff/WordWrapPropertyHdl.hxx>
38 #include "numithdl.hxx"
39 #include "XMLBitmapRepeatOffsetPropertyHandler.hxx"
40 #include "XMLFillBitmapSizePropertyHandler.hxx"
41 #include "XMLBitmapLogicalSizePropertyHandler.hxx"
42 #include <com/sun/star/drawing/TextAnimationKind.hpp>
43 #include <com/sun/star/drawing/TextAnimationDirection.hpp>
44 #include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
45 #include <com/sun/star/drawing/TextVerticalAdjust.hpp>
46 #include <com/sun/star/drawing/TextFitToSizeType.hpp>
47 #include <com/sun/star/drawing/MeasureTextHorzPos.hpp>
48 #include <com/sun/star/drawing/MeasureTextVertPos.hpp>
49 #include <xmloff/controlpropertyhdl.hxx>
50 #include <xmloff/xmltoken.hxx>
51 #include "sdpropls.hxx"
52 #include "propimp0.hxx"
53 #include <xmloff/xmlexp.hxx>
54 #include <xmloff/xmlnmspe.hxx>
55 #include <com/sun/star/drawing/NormalsKind.hpp>
56 #include <com/sun/star/drawing/TextureProjectionMode.hpp>
57 #include <com/sun/star/drawing/TextureKind.hpp>
58 #include <com/sun/star/drawing/TextureMode.hpp>
59 #include <xmloff/txtprmap.hxx>
60 #include "XMLClipPropertyHandler.hxx"
61 #include "XMLIsPercentagePropertyHandler.hxx"
62 #include "XMLPercentOrMeasurePropertyHandler.hxx"
63 #include "animations.hxx"
64 #include <sax/tools/converter.hxx>
66 #include "sdxmlexp_impl.hxx"
68 using ::com::sun::star::uno::Any
;
69 using ::com::sun::star::uno::Reference
;
71 using namespace ::com::sun::star
;
72 using namespace ::xmloff::token
;
74 #define _MAP(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFVER_010, false }
75 #define _MAPV(name,prefix,token,type,context,version) { name, sizeof(name)-1, prefix, token, type, context, version, false }
76 #define GMAP(name,prefix,token,type,context) _MAP(name,prefix,token,type|XML_TYPE_PROP_GRAPHIC,context)
77 #define GMAP_D(name,prefix,token,type,context) _MAP(name,prefix,token,type|XML_TYPE_PROP_GRAPHIC|MID_FLAG_DEFAULT_ITEM_EXPORT,context)
78 #define GMAPV(name,prefix,token,type,context,version) _MAPV(name,prefix,token,type|XML_TYPE_PROP_GRAPHIC,context,version)
79 #define DPMAP(name,prefix,token,type,context) _MAP(name,prefix,token,type|XML_TYPE_PROP_DRAWING_PAGE,context)
80 #define TMAP(name,prefix,token,type,context) _MAP(name,prefix,token,type|XML_TYPE_PROP_TEXT,context)
81 #define PMAP(name,prefix,token,type,context) _MAP(name,prefix,token,type|XML_TYPE_PROP_PARAGRAPH,context)
82 #define MAP_END() { 0L, 0, 0, XML_EMPTY, 0 ,0, SvtSaveOptions::ODFVER_010, false }
84 // entry list for graphic properties
86 const XMLPropertyMapEntry aXMLSDProperties
[] =
88 // this entry must be first! this is needed for XMLShapeImportHelper::CreateExternalShapePropMapper
90 // ^^^though CreateExternalShapePropMapper is gone now, hmm^^^
91 GMAP( "UserDefinedAttributes", XML_NAMESPACE_TEXT
, XML_XMLNS
, XML_TYPE_ATTRIBUTE_CONTAINER
| MID_FLAG_SPECIAL_ITEM
, 0 ),
94 GMAP( "LineStyle", XML_NAMESPACE_DRAW
, XML_STROKE
, XML_SD_TYPE_STROKE
, 0 ),
95 GMAP( "LineDashName", XML_NAMESPACE_DRAW
, XML_STROKE_DASH
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_DASHNAME
),
96 GMAP( "LineWidth", XML_NAMESPACE_SVG
, XML_STROKE_WIDTH
, XML_TYPE_MEASURE
, 0 ),
97 GMAP_D("LineColor", XML_NAMESPACE_SVG
, XML_STROKE_COLOR
, XML_TYPE_COLOR
, 0),
98 GMAP( "LineStartName", XML_NAMESPACE_DRAW
, XML_MARKER_START
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_LINESTARTNAME
),
99 GMAP( "LineStartWidth", XML_NAMESPACE_DRAW
, XML_MARKER_START_WIDTH
, XML_TYPE_MEASURE
, 0 ),
100 GMAP( "LineStartCenter", XML_NAMESPACE_DRAW
, XML_MARKER_START_CENTER
, XML_TYPE_BOOL
, 0 ),
101 GMAP( "LineEndName", XML_NAMESPACE_DRAW
, XML_MARKER_END
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_LINEENDNAME
),
102 GMAP( "LineEndWidth", XML_NAMESPACE_DRAW
, XML_MARKER_END_WIDTH
, XML_TYPE_MEASURE
, 0 ),
103 GMAP( "LineEndCenter", XML_NAMESPACE_DRAW
, XML_MARKER_END_CENTER
, XML_TYPE_BOOL
, 0 ),
104 GMAP( "LineTransparence", XML_NAMESPACE_SVG
, XML_STROKE_OPACITY
, XML_SD_TYPE_OPACITY
, 0 ),
105 GMAP( "LineJoint", XML_NAMESPACE_DRAW
, XML_STROKE_LINEJOIN
, XML_SD_TYPE_LINEJOIN
, 0 ),
106 GMAP( "LineCap", XML_NAMESPACE_SVG
, XML_STROKE_LINECAP
, XML_SD_TYPE_LINECAP
, 0 ),
109 GMAP( "FillStyle", XML_NAMESPACE_DRAW
, XML_FILL
, XML_SD_TYPE_FILLSTYLE
, CTF_FILLSTYLE
),
110 GMAP_D("FillColor", XML_NAMESPACE_DRAW
, XML_FILL_COLOR
, XML_TYPE_COLOR
, CTF_FILLCOLOR
),
111 GMAP_D("FillColor2", XML_NAMESPACE_DRAW
, XML_SECONDARY_FILL_COLOR
, XML_TYPE_COLOR
, 0),
112 GMAP( "FillGradientName", XML_NAMESPACE_DRAW
, XML_FILL_GRADIENT_NAME
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_FILLGRADIENTNAME
),
113 GMAP( "FillGradientStepCount", XML_NAMESPACE_DRAW
, XML_GRADIENT_STEP_COUNT
, XML_TYPE_NUMBER16
, 0 ),
114 GMAP( "FillHatchName", XML_NAMESPACE_DRAW
, XML_FILL_HATCH_NAME
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_FILLHATCHNAME
),
115 GMAP( "FillBackground", XML_NAMESPACE_DRAW
, XML_FILL_HATCH_SOLID
, XML_TYPE_BOOL
, 0 ),
116 GMAP( "FillBitmapName", XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_NAME
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_FILLBITMAPNAME
),
117 GMAP( "FillTransparence", XML_NAMESPACE_DRAW
, XML_OPACITY
, XML_TYPE_NEG_PERCENT16
|MID_FLAG_MULTI_PROPERTY
, 0 ), // exists in SW, too
118 GMAP( "FillTransparenceGradientName", XML_NAMESPACE_DRAW
, XML_OPACITY_NAME
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_FILLTRANSNAME
),
119 GMAP( "FillBitmapSizeX", XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_WIDTH
, XML_SD_TYPE_FILLBITMAPSIZE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
120 GMAP( "FillBitmapLogicalSize", XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_WIDTH
, XML_SD_TYPE_LOGICAL_SIZE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
121 GMAP( "FillBitmapSizeY", XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_HEIGHT
, XML_SD_TYPE_FILLBITMAPSIZE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
122 GMAP( "FillBitmapLogicalSize", XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_HEIGHT
, XML_SD_TYPE_LOGICAL_SIZE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
123 GMAP( "FillBitmapMode", XML_NAMESPACE_STYLE
,XML_REPEAT
, XML_SD_TYPE_BITMAP_MODE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
124 GMAP( "FillBitmapPositionOffsetX", XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_REF_POINT_X
, XML_TYPE_PERCENT
, 0 ),
125 GMAP( "FillBitmapPositionOffsetY", XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_REF_POINT_Y
, XML_TYPE_PERCENT
, 0 ),
126 GMAP( "FillBitmapRectanglePoint", XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_REF_POINT
, XML_SD_TYPE_BITMAP_REFPOINT
, 0 ),
127 GMAP( "FillBitmapOffsetX", XML_NAMESPACE_DRAW
, XML_TILE_REPEAT_OFFSET
, XML_SD_TYPE_BITMAPREPOFFSETX
|MID_FLAG_MULTI_PROPERTY
, CTF_REPEAT_OFFSET_X
),
128 GMAP( "FillBitmapOffsetY", XML_NAMESPACE_DRAW
, XML_TILE_REPEAT_OFFSET
, XML_SD_TYPE_BITMAPREPOFFSETY
|MID_FLAG_MULTI_PROPERTY
, CTF_REPEAT_OFFSET_Y
),
130 // text frame attributes
131 GMAP( "TextHorizontalAdjust", XML_NAMESPACE_DRAW
, XML_TEXTAREA_HORIZONTAL_ALIGN
, XML_SD_TYPE_TEXT_ALIGN
, 0 ),
132 GMAP( "TextVerticalAdjust", XML_NAMESPACE_DRAW
, XML_TEXTAREA_VERTICAL_ALIGN
, XML_SD_TYPE_VERTICAL_ALIGN
, 0 ),
133 GMAP( "TextAutoGrowHeight", XML_NAMESPACE_DRAW
, XML_AUTO_GROW_HEIGHT
, XML_TYPE_BOOL
, 0 ),
134 GMAP( "TextAutoGrowWidth", XML_NAMESPACE_DRAW
, XML_AUTO_GROW_WIDTH
, XML_TYPE_BOOL
, 0 ),
135 GMAP( "TextFitToSize", XML_NAMESPACE_DRAW
, XML_FIT_TO_SIZE
, XML_SD_TYPE_FITTOSIZE
, 0 ),
136 GMAP( "TextContourFrame", XML_NAMESPACE_DRAW
, XML_FIT_TO_CONTOUR
, XML_TYPE_BOOL
, 0 ),
137 GMAP( "TextMaximumFrameHeight", XML_NAMESPACE_FO
, XML_MAX_HEIGHT
, XML_TYPE_MEASURE
, 0 ),
138 GMAP( "TextMaximumFrameWidth", XML_NAMESPACE_FO
, XML_MAX_WIDTH
, XML_TYPE_MEASURE
, 0 ),
139 GMAP( "TextMinimumFrameHeight", XML_NAMESPACE_FO
, XML_MIN_HEIGHT
, XML_TYPE_MEASURE
|MID_FLAG_MULTI_PROPERTY
, 0 ), // exists in SW, too
140 GMAP( "TextMinimumFrameWidth", XML_NAMESPACE_FO
, XML_MIN_WIDTH
, XML_TYPE_MEASURE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
141 GMAP( "TextUpperDistance", XML_NAMESPACE_FO
, XML_PADDING_TOP
, XML_TYPE_MEASURE
|MID_FLAG_MULTI_PROPERTY
, 0 ), // exists in SW, too
142 GMAP( "TextLowerDistance", XML_NAMESPACE_FO
, XML_PADDING_BOTTOM
, XML_TYPE_MEASURE
|MID_FLAG_MULTI_PROPERTY
, 0 ), // exists in SW, too
143 GMAP( "TextLeftDistance", XML_NAMESPACE_FO
, XML_PADDING_LEFT
, XML_TYPE_MEASURE
|MID_FLAG_MULTI_PROPERTY
, 0 ), // exists in SW, too
144 GMAP( "TextRightDistance", XML_NAMESPACE_FO
, XML_PADDING_RIGHT
, XML_TYPE_MEASURE
|MID_FLAG_MULTI_PROPERTY
, 0 ), // exists in SW, too
145 PMAP( "TextWritingMode", XML_NAMESPACE_STYLE
,XML_WRITING_MODE
, XML_SD_TYPE_WRITINGMODE
|MID_FLAG_MULTI_PROPERTY
, CTF_WRITINGMODE
),
146 GMAP( "NumberingRules", XML_NAMESPACE_TEXT
, XML_LIST_STYLE
, XML_SD_TYPE_NUMBULLET
|MID_FLAG_ELEMENT_ITEM
, CTF_NUMBERINGRULES
),
147 GMAP( "NumberingRules", XML_NAMESPACE_TEXT
, XML_LIST_STYLE_NAME
, XML_TYPE_STRING
, CTF_SD_NUMBERINGRULES_NAME
),
148 GMAP( "TextWordWrap", XML_NAMESPACE_FO
, XML_WRAP_OPTION
, XML_TYPE_WRAP_OPTION
, 0 ),
151 GMAP( "Shadow", XML_NAMESPACE_DRAW
, XML_SHADOW
, XML_SD_TYPE_SHADOW
, 0 ),
152 GMAP( "ShadowXDistance", XML_NAMESPACE_DRAW
, XML_SHADOW_OFFSET_X
, XML_TYPE_MEASURE
, 0 ),
153 GMAP( "ShadowYDistance", XML_NAMESPACE_DRAW
, XML_SHADOW_OFFSET_Y
, XML_TYPE_MEASURE
, 0 ),
154 GMAP( "ShadowColor", XML_NAMESPACE_DRAW
, XML_SHADOW_COLOR
, XML_TYPE_COLOR
, 0 ),
155 GMAP( "ShadowTransparence", XML_NAMESPACE_DRAW
, XML_SHADOW_OPACITY
, XML_TYPE_NEG_PERCENT
, 0 ),
157 // graphic attributes
158 GMAP( "GraphicColorMode", XML_NAMESPACE_DRAW
, XML_COLOR_MODE
, XML_TYPE_COLOR_MODE
, 0 ), // exists in SW, too, with same property name
159 GMAP( "AdjustLuminance", XML_NAMESPACE_DRAW
, XML_LUMINANCE
, XML_TYPE_PERCENT16
, 0 ), // signed? exists in SW, too, with same property name
160 GMAP( "AdjustContrast", XML_NAMESPACE_DRAW
, XML_CONTRAST
, XML_TYPE_PERCENT16
, 0 ), // signed? exists in SW, too, with same property name
161 GMAP( "Gamma", XML_NAMESPACE_DRAW
, XML_GAMMA
, XML_TYPE_DOUBLE_PERCENT
, 0 ), // signed? exists in SW, too, with same property name
162 GMAP( "AdjustRed", XML_NAMESPACE_DRAW
, XML_RED
, XML_TYPE_PERCENT16
, 0 ), // signed? exists in SW, too, with same property name
163 GMAP( "AdjustGreen", XML_NAMESPACE_DRAW
, XML_GREEN
, XML_TYPE_PERCENT16
, 0 ), // signed? exists in SW, too, with same property name
164 GMAP( "AdjustBlue", XML_NAMESPACE_DRAW
, XML_BLUE
, XML_TYPE_PERCENT16
, 0 ), // signed? exists in SW, too, with same property name
165 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
166 GMAP( "GraphicCrop", XML_NAMESPACE_FO
, XML_CLIP
, XML_TYPE_TEXT_CLIP11
, CTF_TEXT_CLIP11
), // exists in SW, too, with same property name
167 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#
168 GMAP( "IsMirrored", XML_NAMESPACE_STYLE
, XML_MIRROR
, XML_TYPE_SD_MIRROR
|MID_FLAG_MULTI_PROPERTY
, 0 ), // exists in SW, too // #i40214#
170 // animation text attributes
171 TMAP( "TextAnimationKind", XML_NAMESPACE_STYLE
,XML_TEXT_BLINKING
, XML_TYPE_TEXT_ANIMATION_BLINKING
, CTF_TEXTANIMATION_BLINKING
),
172 GMAP( "TextAnimationKind", XML_NAMESPACE_TEXT
, XML_ANIMATION
, XML_TYPE_TEXT_ANIMATION
, CTF_TEXTANIMATION_KIND
),
173 GMAP( "TextAnimationDirection", XML_NAMESPACE_TEXT
, XML_ANIMATION_DIRECTION
, XML_TYPE_TEXT_ANIMATION_DIRECTION
, 0 ),
174 GMAP( "TextAnimationStartInside", XML_NAMESPACE_TEXT
, XML_ANIMATION_START_INSIDE
, XML_TYPE_BOOL
, 0 ),
175 GMAP( "TextAnimationStopInside", XML_NAMESPACE_TEXT
, XML_ANIMATION_STOP_INSIDE
, XML_TYPE_BOOL
, 0 ),
176 GMAP( "TextAnimationCount", XML_NAMESPACE_TEXT
, XML_ANIMATION_REPEAT
, XML_TYPE_NUMBER16
, 0 ),
177 GMAP( "TextAnimationDelay", XML_NAMESPACE_TEXT
, XML_ANIMATION_DELAY
, XML_TYPE_DURATION16_MS
, 0 ),
178 GMAP( "TextAnimationAmount", XML_NAMESPACE_TEXT
, XML_ANIMATION_STEPS
, XML_TYPE_TEXT_ANIMATION_STEPS
, 0 ),
180 // connector attributes
181 GMAP( "EdgeNode1HorzDist", XML_NAMESPACE_DRAW
, XML_START_LINE_SPACING_HORIZONTAL
, XML_TYPE_MEASURE
, 0 ),
182 GMAP( "EdgeNode1VertDist", XML_NAMESPACE_DRAW
, XML_START_LINE_SPACING_VERTICAL
, XML_TYPE_MEASURE
, 0 ),
183 GMAP( "EdgeNode2HorzDist", XML_NAMESPACE_DRAW
, XML_END_LINE_SPACING_HORIZONTAL
, XML_TYPE_MEASURE
, 0 ),
184 GMAP( "EdgeNode2VertDist", XML_NAMESPACE_DRAW
, XML_END_LINE_SPACING_VERTICAL
, XML_TYPE_MEASURE
, 0 ),
186 // measure attributes
187 GMAP( "MeasureLineDistance", XML_NAMESPACE_DRAW
, XML_LINE_DISTANCE
, XML_TYPE_MEASURE
, 0 ),
188 GMAP( "MeasureHelpLineOverhang", XML_NAMESPACE_DRAW
, XML_GUIDE_OVERHANG
, XML_TYPE_MEASURE
, 0 ),
189 GMAP( "MeasureHelpLineDistance", XML_NAMESPACE_DRAW
, XML_GUIDE_DISTANCE
, XML_TYPE_MEASURE
, 0 ),
190 GMAP( "MeasureHelpLine1Length", XML_NAMESPACE_DRAW
, XML_START_GUIDE
, XML_TYPE_MEASURE
, 0 ),
191 GMAP( "MeasureHelpLine2Length", XML_NAMESPACE_DRAW
, XML_END_GUIDE
, XML_TYPE_MEASURE
, 0 ),
192 GMAP( "MeasureTextHorizontalPosition", XML_NAMESPACE_DRAW
, XML_MEASURE_ALIGN
, XML_SD_TYPE_MEASURE_HALIGN
, 0 ),
193 GMAP( "MeasureTextVerticalPosition", XML_NAMESPACE_DRAW
, XML_MEASURE_VERTICAL_ALIGN
, XML_SD_TYPE_MEASURE_VALIGN
, 0 ),
194 GMAP( "MeasureUnit", XML_NAMESPACE_DRAW
, XML_UNIT
, XML_SD_TYPE_MEASURE_UNIT
, 0 ),
195 GMAP( "MeasureShowUnit", XML_NAMESPACE_DRAW
, XML_SHOW_UNIT
, XML_TYPE_BOOL
, 0 ),
196 GMAP( "MeasureBelowReferenceEdge", XML_NAMESPACE_DRAW
, XML_PLACING
, XML_SD_TYPE_MEASURE_PLACING
, 0 ),
197 GMAP( "MeasureTextRotate90", XML_NAMESPACE_DRAW
, XML_PARALLEL
, XML_TYPE_BOOL
, 0 ),
198 GMAP( "MeasureDecimalPlaces", XML_NAMESPACE_DRAW
, XML_DECIMAL_PLACES
, XML_TYPE_NUMBER16
, 0 ),
200 // 3D geometry attributes
201 GMAP( "D3DHorizontalSegments", XML_NAMESPACE_DR3D
, XML_HORIZONTAL_SEGMENTS
, XML_TYPE_NUMBER
, 0 ),
202 GMAP( "D3DVerticalSegments", XML_NAMESPACE_DR3D
, XML_VERTICAL_SEGMENTS
, XML_TYPE_NUMBER
, 0 ),
203 GMAP( "D3DPercentDiagonal", XML_NAMESPACE_DR3D
, XML_EDGE_ROUNDING
, XML_TYPE_PERCENT
, 0 ),
204 GMAP( "D3DBackscale", XML_NAMESPACE_DR3D
, XML_BACK_SCALE
, XML_TYPE_PERCENT
, 0 ),
205 GMAP( "D3DEndAngle", XML_NAMESPACE_DR3D
, XML_END_ANGLE
, XML_TYPE_NUMBER
, 0 ),
206 GMAP( "D3DDepth", XML_NAMESPACE_DR3D
, XML_DEPTH
, XML_TYPE_MEASURE
, 0 ),
207 GMAP( "D3DDoubleSided", XML_NAMESPACE_DR3D
, XML_BACKFACE_CULLING
, XML_SD_TYPE_BACKFACE_CULLING
, 0 ),
209 // #107245# New 3D properties which are possible for lathe and extrude 3d objects
210 GMAP( "D3DCloseFront", XML_NAMESPACE_DR3D
, XML_CLOSE_FRONT
, XML_TYPE_BOOL
, 0 ),
211 GMAP( "D3DCloseBack", XML_NAMESPACE_DR3D
, XML_CLOSE_BACK
, XML_TYPE_BOOL
, 0 ),
213 // 3D lighting attributes
214 GMAP( "D3DNormalsKind", XML_NAMESPACE_DR3D
, XML_NORMALS_KIND
, XML_SD_TYPE_NORMALS_KIND
, 0 ),
215 GMAP( "D3DNormalsInvert", XML_NAMESPACE_DR3D
, XML_NORMALS_DIRECTION
, XML_SD_TYPE_NORMALS_DIRECTION
, 0 ),
217 // 3D texture attributes
218 GMAP( "D3DTextureProjectionX", XML_NAMESPACE_DR3D
, XML_TEX_GENERATION_MODE_X
, XML_SD_TYPE_TEX_GENERATION_MODE_X
, 0 ),
219 GMAP( "D3DTextureProjectionY", XML_NAMESPACE_DR3D
, XML_TEX_GENERATION_MODE_Y
, XML_SD_TYPE_TEX_GENERATION_MODE_Y
, 0 ),
220 GMAP( "D3DTextureKind", XML_NAMESPACE_DR3D
, XML_TEX_KIND
, XML_SD_TYPE_TEX_KIND
, 0 ),
221 GMAP( "D3DTextureMode", XML_NAMESPACE_DR3D
, XML_TEX_MODE
, XML_SD_TYPE_TEX_MODE
, 0 ),
222 GMAP( "D3DTextureFilter", XML_NAMESPACE_DR3D
, XML_TEX_FILTER
, XML_SD_TYPE_BACKFACE_CULLING
, 0 ),
224 // 3D material attributes
225 GMAP( "D3DMaterialColor", XML_NAMESPACE_DR3D
, XML_DIFFUSE_COLOR
, XML_TYPE_COLOR
, 0 ),
226 GMAP( "D3DMaterialEmission", XML_NAMESPACE_DR3D
, XML_EMISSIVE_COLOR
, XML_TYPE_COLOR
, 0 ),
227 GMAP( "D3DMaterialSpecular", XML_NAMESPACE_DR3D
, XML_SPECULAR_COLOR
, XML_TYPE_COLOR
, 0 ),
228 GMAP( "D3DMaterialSpecularIntensity", XML_NAMESPACE_DR3D
, XML_SHININESS
, XML_TYPE_PERCENT
, 0 ),
230 // 3D shadow attributes
231 GMAP( "D3DShadow3D", XML_NAMESPACE_DR3D
, XML_SHADOW
, XML_SD_TYPE_SHADOW
, 0 ),
233 // #FontWork# attributes
234 GMAP( "FontWorkStyle", XML_NAMESPACE_DRAW
, XML_FONTWORK_STYLE
, XML_SD_TYPE_FONTWORK_STYLE
, CTF_FONTWORK_STYLE
),
235 GMAP( "FontWorkAdjust", XML_NAMESPACE_DRAW
, XML_FONTWORK_ADJUST
, XML_SD_TYPE_FONTWORK_ADJUST
,CTF_FONTWORK_ADJUST
),
236 GMAP( "FontWorkDistance", XML_NAMESPACE_DRAW
, XML_FONTWORK_DISTANCE
, XML_TYPE_MEASURE
, CTF_FONTWORK_DISTANCE
),
237 GMAP( "FontWorkStart", XML_NAMESPACE_DRAW
, XML_FONTWORK_START
, XML_TYPE_MEASURE
, CTF_FONTWORK_START
),
238 GMAP( "FontWorkMirror", XML_NAMESPACE_DRAW
, XML_FONTWORK_MIRROR
, XML_TYPE_BOOL
, CTF_FONTWORK_MIRROR
),
239 GMAP( "FontWorkOutline", XML_NAMESPACE_DRAW
, XML_FONTWORK_OUTLINE
, XML_TYPE_BOOL
, CTF_FONTWORK_OUTLINE
),
240 GMAP( "FontWorkShadow", XML_NAMESPACE_DRAW
, XML_FONTWORK_SHADOW
, XML_SD_TYPE_FONTWORK_SHADOW
,CTF_FONTWORK_SHADOW
),
241 GMAP( "FontWorkShadowColor", XML_NAMESPACE_DRAW
, XML_FONTWORK_SHADOW_COLOR
, XML_TYPE_COLOR
, CTF_FONTWORK_SHADOWCOLOR
),
242 GMAP( "FontWorkShadowOffsetX", XML_NAMESPACE_DRAW
, XML_FONTWORK_SHADOW_OFFSET_X
, XML_TYPE_MEASURE
, CTF_FONTWORK_SHADOWOFFSETX
),
243 GMAP( "FontWorkShadowOffsetY", XML_NAMESPACE_DRAW
, XML_FONTWORK_SHADOW_OFFSET_Y
, XML_TYPE_MEASURE
, CTF_FONTWORK_SHADOWOFFSETY
),
244 GMAP( "FontWorkForm", XML_NAMESPACE_DRAW
, XML_FONTWORK_FORM
, XML_SD_TYPE_FONTWORK_FORM
, CTF_FONTWORK_FORM
),
245 GMAP( "FontWorkHideForm", XML_NAMESPACE_DRAW
, XML_FONTWORK_HIDE_FORM
, XML_TYPE_BOOL
, CTF_FONTWORK_HIDEFORM
),
246 GMAP( "FontWorkShadowTransparence", XML_NAMESPACE_DRAW
, XML_FONTWORK_SHADOW_TRANSPARENCE
, XML_TYPE_PERCENT
, CTF_FONTWORK_SHADOWTRANSPARENCE
),
248 // control attributes (border exists one mor time for the text additions of shapes)
249 GMAP( "ControlSymbolColor", XML_NAMESPACE_DRAW
, XML_SYMBOL_COLOR
, XML_TYPE_COLOR
, 0 ),
250 GMAP( "ControlBackground", XML_NAMESPACE_FO
, XML_BACKGROUND_COLOR
, XML_TYPE_COLOR
|MID_FLAG_MULTI_PROPERTY
, 0 ),
251 GMAP( "ControlBorder", XML_NAMESPACE_FO
, XML_BORDER
, XML_SD_TYPE_CONTROL_BORDER
|MID_FLAG_MULTI_PROPERTY
|MID_FLAG_MERGE_ATTRIBUTE
, 0 ),
252 GMAP( "ControlBorderColor", XML_NAMESPACE_FO
, XML_BORDER
, XML_SD_TYPE_CONTROL_BORDER_COLOR
|MID_FLAG_MULTI_PROPERTY
|MID_FLAG_MERGE_ATTRIBUTE
, 0 ),
253 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
),
254 GMAP( "ControlTextEmphasis", XML_NAMESPACE_STYLE
,XML_TEXT_EMPHASIZE
, XML_TYPE_CONTROL_TEXT_EMPHASIZE
, 0 ),
255 GMAP( "ImageScaleMode", XML_NAMESPACE_STYLE
,XML_REPEAT
, XML_SD_TYPE_IMAGE_SCALE_MODE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
256 GMAP( "ControlWritingMode", XML_NAMESPACE_STYLE
,XML_WRITING_MODE
, XML_TYPE_TEXT_WRITING_MODE_WITH_DEFAULT
|MID_FLAG_MULTI_PROPERTY
, CTF_CONTROLWRITINGMODE
),
258 // special entries for floating frames
259 GMAP( "FrameIsAutoScroll", XML_NAMESPACE_DRAW
, XML_FRAME_DISPLAY_SCROLLBAR
, XML_TYPE_BOOL
|MID_FLAG_MULTI_PROPERTY
, CTF_FRAME_DISPLAY_SCROLLBAR
),
260 GMAP( "FrameIsBorder", XML_NAMESPACE_DRAW
, XML_FRAME_DISPLAY_BORDER
, XML_TYPE_BOOL
|MID_FLAG_MULTI_PROPERTY
, CTF_FRAME_DISPLAY_BORDER
),
261 GMAP( "FrameMarginWidth", XML_NAMESPACE_DRAW
, XML_FRAME_MARGIN_HORIZONTAL
, XML_TYPE_MEASURE_PX
|MID_FLAG_MULTI_PROPERTY
, CTF_FRAME_MARGIN_HORI
),
262 GMAP( "FrameMarginHeight", XML_NAMESPACE_DRAW
, XML_FRAME_MARGIN_VERTICAL
, XML_TYPE_MEASURE_PX
|MID_FLAG_MULTI_PROPERTY
, CTF_FRAME_MARGIN_VERT
),
263 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
),
264 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
),
265 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
),
266 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
),
267 GMAP( "IsInternal", XML_NAMESPACE_DRAW
, XML__EMPTY
, XML_TYPE_BUILDIN_CMP_ONLY
, CTF_SD_OLE_ISINTERNAL
),
268 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
),
269 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
),
270 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
),
271 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
),
273 GMAP( "Aspect", XML_NAMESPACE_DRAW
, XML_DRAW_ASPECT
, XML_TYPE_TEXT_DRAW_ASPECT
|MID_FLAG_MULTI_PROPERTY
, CTF_SD_OLE_ASPECT
),
275 // caption properties
276 GMAP( "CaptionType", XML_NAMESPACE_DRAW
, XML_CAPTION_TYPE
, XML_SD_TYPE_CAPTION_TYPE
, 0 ),
277 GMAP( "CaptionIsFixedAngle", XML_NAMESPACE_DRAW
, XML_CAPTION_ANGLE_TYPE
, XML_SD_TYPE_CAPTION_ANGLE_TYPE
, 0 ),
278 GMAP( "CaptionAngle", XML_NAMESPACE_DRAW
, XML_CAPTION_ANGLE
, XML_TYPE_NUMBER
, 0 ),
279 GMAP( "CaptionGap", XML_NAMESPACE_DRAW
, XML_CAPTION_GAP
, XML_TYPE_MEASURE
, 0 ),
280 GMAP( "CaptionEscapeDirection", XML_NAMESPACE_DRAW
, XML_CAPTION_ESCAPE_DIRECTION
, XML_SD_TYPE_CAPTION_ESC_DIR
, 0 ),
281 GMAP( "CaptionIsEscapeRelative", XML_NAMESPACE_DRAW
, XML_CAPTION_ESCAPE
, XML_SD_TYPE_CAPTION_IS_ESC_REL
|MID_FLAG_MULTI_PROPERTY
, CTF_CAPTION_ISESCREL
),
282 GMAP( "CaptionEscapeRelative", XML_NAMESPACE_DRAW
, XML_CAPTION_ESCAPE
, XML_SD_TYPE_CAPTION_ESC_REL
|MID_FLAG_MULTI_PROPERTY
, CTF_CAPTION_ESCREL
),
283 GMAP( "CaptionEscapeAbsolute", XML_NAMESPACE_DRAW
, XML_CAPTION_ESCAPE
, XML_SD_TYPE_CAPTION_ESC_ABS
|MID_FLAG_MULTI_PROPERTY
, CTF_CAPTION_ESCABS
),
284 GMAP( "CaptionLineLength", XML_NAMESPACE_DRAW
, XML_CAPTION_LINE_LENGTH
, XML_TYPE_MEASURE
, 0 ),
285 GMAP( "CaptionIsFitLineLength", XML_NAMESPACE_DRAW
, XML_CAPTION_FIT_LINE_LENGTH
, XML_TYPE_BOOL
, 0 ),
287 // misc object properties
288 GMAP( "MoveProtect", XML_NAMESPACE_STYLE
, XML_PROTECT
, XML_SD_TYPE_MOVE_PROTECT
|MID_FLAG_MULTI_PROPERTY
|MID_FLAG_MERGE_ATTRIBUTE
, CTF_SD_MOVE_PROTECT
),
289 GMAP( "SizeProtect", XML_NAMESPACE_STYLE
, XML_PROTECT
, XML_SD_TYPE_SIZE_PROTECT
|MID_FLAG_MULTI_PROPERTY
|MID_FLAG_MERGE_ATTRIBUTE
, CTF_SD_SIZE_PROTECT
),
294 // entry list for presentation page properties
296 const XMLPropertyMapEntry aXMLSDPresPageProps
[] =
298 DPMAP( "UserDefinedAttributes", XML_NAMESPACE_TEXT
, XML_XMLNS
, XML_TYPE_ATTRIBUTE_CONTAINER
| MID_FLAG_SPECIAL_ITEM
, 0 ),
300 DPMAP( "Change", XML_NAMESPACE_PRESENTATION
, XML_TRANSITION_TYPE
, XML_SD_TYPE_PRESPAGE_TYPE
, CTF_PAGE_TRANS_TYPE
),
301 DPMAP( "Effect", XML_NAMESPACE_PRESENTATION
, XML_TRANSITION_STYLE
, XML_SD_TYPE_PRESPAGE_STYLE
, CTF_PAGE_TRANS_STYLE
),
302 DPMAP( "Speed", XML_NAMESPACE_PRESENTATION
, XML_TRANSITION_SPEED
, XML_SD_TYPE_PRESPAGE_SPEED
, CTF_PAGE_TRANS_SPEED
),
303 DPMAP( "HighResDuration", XML_NAMESPACE_PRESENTATION
, XML_DURATION
, XML_SD_TYPE_PRESPAGE_DURATION
, CTF_PAGE_TRANS_DURATION
),
304 DPMAP( "Visible", XML_NAMESPACE_PRESENTATION
, XML_VISIBILITY
, XML_SD_TYPE_PRESPAGE_VISIBILITY
, CTF_PAGE_VISIBLE
),
305 DPMAP( "Sound", XML_NAMESPACE_PRESENTATION
, XML_SOUND
, XML_TYPE_STRING
|MID_FLAG_ELEMENT_ITEM
, CTF_PAGE_SOUND_URL
),
306 DPMAP( "BackgroundFullSize", XML_NAMESPACE_DRAW
, XML_BACKGROUND_SIZE
, XML_SD_TYPE_PRESPAGE_BACKSIZE
, CTF_PAGE_BACKSIZE
),
308 DPMAP( "IsBackgroundVisible", XML_NAMESPACE_PRESENTATION
, XML_BACKGROUND_VISIBLE
, XML_TYPE_BOOL
, 0 ),
309 DPMAP( "IsBackgroundObjectsVisible", XML_NAMESPACE_PRESENTATION
, XML_BACKGROUND_OBJECTS_VISIBLE
, XML_TYPE_BOOL
, 0 ),
311 DPMAP( "FillStyle", XML_NAMESPACE_DRAW
, XML_FILL
, XML_SD_TYPE_FILLSTYLE
, 0 ),
312 DPMAP( "FillColor", XML_NAMESPACE_DRAW
, XML_FILL_COLOR
, XML_TYPE_COLOR
, 0 ),
313 DPMAP( "FillGradientName", XML_NAMESPACE_DRAW
, XML_FILL_GRADIENT_NAME
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_FILLGRADIENTNAME
),
314 DPMAP( "FillGradientStepCount", XML_NAMESPACE_DRAW
, XML_GRADIENT_STEP_COUNT
, XML_TYPE_NUMBER
, 0 ),
315 DPMAP( "FillHatchName", XML_NAMESPACE_DRAW
, XML_FILL_HATCH_NAME
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_FILLHATCHNAME
),
316 GMAP( "FillBackground", XML_NAMESPACE_DRAW
, XML_FILL_HATCH_SOLID
, XML_TYPE_BOOL
, 0 ),
317 DPMAP( "FillBitmapName", XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_NAME
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_FILLBITMAPNAME
),
318 DPMAP( "FillTransparenceGradientName", XML_NAMESPACE_DRAW
, XML_OPACITY_NAME
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_FILLTRANSNAME
),
319 DPMAP( "FillBitmapSizeX", XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_WIDTH
, XML_SD_TYPE_FILLBITMAPSIZE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
320 DPMAP( "FillBitmapLogicalSize", XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_WIDTH
, XML_SD_TYPE_LOGICAL_SIZE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
321 DPMAP( "FillBitmapSizeY", XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_HEIGHT
, XML_SD_TYPE_FILLBITMAPSIZE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
322 DPMAP( "FillBitmapLogicalSize", XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_HEIGHT
, XML_SD_TYPE_LOGICAL_SIZE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
323 DPMAP( "FillBitmapMode", XML_NAMESPACE_STYLE
,XML_REPEAT
, XML_SD_TYPE_BITMAP_MODE
, 0 ),
324 DPMAP( "FillBitmapPositionOffsetX", XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_REF_POINT_X
, XML_TYPE_PERCENT
, 0 ),
325 DPMAP( "FillBitmapPositionOffsetY", XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_REF_POINT_Y
, XML_TYPE_PERCENT
, 0 ),
326 DPMAP( "FillBitmapRectanglePoint", XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_REF_POINT
, XML_SD_TYPE_BITMAP_REFPOINT
, 0 ),
327 DPMAP( "FillBitmapOffsetX", XML_NAMESPACE_DRAW
, XML_TILE_REPEAT_OFFSET
, XML_SD_TYPE_BITMAPREPOFFSETX
|MID_FLAG_MULTI_PROPERTY
, CTF_REPEAT_OFFSET_X
),
328 DPMAP( "FillBitmapOffsetY", XML_NAMESPACE_DRAW
, XML_TILE_REPEAT_OFFSET
, XML_SD_TYPE_BITMAPREPOFFSETY
|MID_FLAG_MULTI_PROPERTY
, CTF_REPEAT_OFFSET_Y
),
330 DPMAP( "IsHeaderVisible", XML_NAMESPACE_PRESENTATION
, XML_DISPLAY_HEADER
, XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE
, CTF_HEADER_VISIBLE
),
331 DPMAP( "IsFooterVisible", XML_NAMESPACE_PRESENTATION
, XML_DISPLAY_FOOTER
, XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE
, CTF_FOOTER_VISIBLE
),
332 DPMAP( "IsPageNumberVisible", XML_NAMESPACE_PRESENTATION
, XML_DISPLAY_PAGE_NUMBER
, XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE
, CTF_PAGE_NUMBER_VISIBLE
),
333 DPMAP( "IsDateTimeVisible", XML_NAMESPACE_PRESENTATION
, XML_DISPLAY_DATE_TIME
, XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE
, CTF_DATE_TIME_VISIBLE
),
335 DPMAP( "TransitionType", XML_NAMESPACE_SMIL
, XML_TYPE
, XML_SD_TYPE_TRANSITION_TYPE
, CTF_PAGE_TRANSITION_TYPE
),
336 DPMAP( "TransitionSubtype", XML_NAMESPACE_SMIL
, XML_SUBTYPE
, XML_SD_TYPE_TRANSTIION_SUBTYPE
, CTF_PAGE_TRANSITION_SUBTYPE
),
337 DPMAP( "TransitionDirection", XML_NAMESPACE_SMIL
, XML_DIRECTION
, XML_SD_TYPE_TRANSTIION_DIRECTION
, CTF_PAGE_TRANSITION_DIRECTION
),
338 DPMAP( "TransitionFadeColor", XML_NAMESPACE_SMIL
, XML_FADECOLOR
, XML_TYPE_COLOR
, CTF_PAGE_TRANSITION_FADECOLOR
),
342 const XMLPropertyMapEntry aXMLSDPresPageProps_onlyHeadersFooter
[] =
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
),
352 /** contains the attribute to property mapping for a drawing layer table
353 WARNING: if attributes are added, SdXMLTableShapeContext::processAttribute needs to be updated!
355 const XMLPropertyMapEntry aXMLTableShapeAttributes
[] =
357 _MAP( "UseFirstRowStyle", XML_NAMESPACE_TABLE
, XML_USE_FIRST_ROW_STYLES
, XML_TYPE_BOOL
, 0 ),
358 _MAP( "UseLastRowStyle", XML_NAMESPACE_TABLE
, XML_USE_LAST_ROW_STYLES
, XML_TYPE_BOOL
, 0 ),
359 _MAP( "UseFirstColumnStyle", XML_NAMESPACE_TABLE
, XML_USE_FIRST_COLUMN_STYLES
, XML_TYPE_BOOL
, 0 ),
360 _MAP( "UseLastColumnStyle", XML_NAMESPACE_TABLE
, XML_USE_LAST_COLUMN_STYLES
, XML_TYPE_BOOL
, 0 ),
361 _MAP( "UseBandingRowStyle", XML_NAMESPACE_TABLE
, XML_USE_BANDING_ROWS_STYLES
, XML_TYPE_BOOL
, 0 ),
362 _MAP( "UseBandingColumnStyle", XML_NAMESPACE_TABLE
, XML_USE_BANDING_COLUMNS_STYLES
, XML_TYPE_BOOL
, 0 ),
366 // implementation of factory for own graphic properties
368 static SvXMLEnumMapEntry
const aXML_LineStyle_EnumMap
[] =
370 { XML_NONE
, drawing::LineStyle_NONE
},
371 { XML_SOLID
, drawing::LineStyle_SOLID
},
372 { XML_DASH
, drawing::LineStyle_DASH
},
373 { XML_TOKEN_INVALID
, 0 }
376 static SvXMLEnumMapEntry
const aXML_LineJoint_EnumMap
[] =
378 { XML_NONE
, drawing::LineJoint_NONE
},
379 { XML_MITER
, drawing::LineJoint_MITER
},
380 { XML_ROUND
, drawing::LineJoint_ROUND
},
381 { XML_BEVEL
, drawing::LineJoint_BEVEL
},
382 { XML_MIDDLE
, drawing::LineJoint_MIDDLE
},
383 { XML_TOKEN_INVALID
, 0 }
386 static SvXMLEnumMapEntry
const aXML_LineCap_EnumMap
[] =
388 { XML_BUTT
, drawing::LineCap_BUTT
},
389 { XML_ROUND
, drawing::LineCap_ROUND
},
390 // use XML_GRADIENTSTYLE_SQUARE as XML_SQUARE, is defined as "square" already
391 { XML_GRADIENTSTYLE_SQUARE
, drawing::LineCap_SQUARE
},
392 { XML_TOKEN_INVALID
, 0 }
395 SvXMLEnumMapEntry aXML_FillStyle_EnumMap
[] =
397 { XML_NONE
, drawing::FillStyle_NONE
},
398 { XML_SOLID
, drawing::FillStyle_SOLID
},
399 { XML_BITMAP
, drawing::FillStyle_BITMAP
},
400 { XML_GRADIENT
, drawing::FillStyle_GRADIENT
},
401 { XML_HATCH
, drawing::FillStyle_HATCH
},
402 { XML_TOKEN_INVALID
, 0 }
405 static SvXMLEnumMapEntry
const aXML_PresChange_EnumMap
[] =
408 { XML_AUTOMATIC
, 1 },
409 { XML_SEMI_AUTOMATIC
, 2 },
410 { XML_TOKEN_INVALID
, 0 }
413 static SvXMLEnumMapEntry
const aXML_TransSpeed_EnumMap
[] =
415 { XML_FAST
, presentation::AnimationSpeed_FAST
},
416 { XML_MEDIUM
, presentation::AnimationSpeed_MEDIUM
},
417 { XML_SLOW
, presentation::AnimationSpeed_SLOW
},
418 { XML_TOKEN_INVALID
, 0 }
421 static SvXMLEnumMapEntry
const aXML_FadeEffect_EnumMap
[] =
423 { XML_NONE
, presentation::FadeEffect_NONE
},
424 { XML_FADE_FROM_LEFT
, presentation::FadeEffect_FADE_FROM_LEFT
},
425 { XML_FADE_FROM_TOP
, presentation::FadeEffect_FADE_FROM_TOP
},
426 { XML_FADE_FROM_RIGHT
, presentation::FadeEffect_FADE_FROM_RIGHT
},
427 { XML_FADE_FROM_BOTTOM
, presentation::FadeEffect_FADE_FROM_BOTTOM
},
428 { XML_FADE_TO_CENTER
, presentation::FadeEffect_FADE_TO_CENTER
},
429 { XML_FADE_FROM_CENTER
, presentation::FadeEffect_FADE_FROM_CENTER
},
430 { XML_MOVE_FROM_LEFT
, presentation::FadeEffect_MOVE_FROM_LEFT
},
431 { XML_MOVE_FROM_TOP
, presentation::FadeEffect_MOVE_FROM_TOP
},
432 { XML_MOVE_FROM_RIGHT
, presentation::FadeEffect_MOVE_FROM_RIGHT
},
433 { XML_MOVE_FROM_BOTTOM
, presentation::FadeEffect_MOVE_FROM_BOTTOM
},
434 { XML_ROLL_FROM_TOP
, presentation::FadeEffect_ROLL_FROM_TOP
},
435 { XML_ROLL_FROM_LEFT
, presentation::FadeEffect_ROLL_FROM_LEFT
},
436 { XML_ROLL_FROM_RIGHT
, presentation::FadeEffect_ROLL_FROM_RIGHT
},
437 { XML_ROLL_FROM_BOTTOM
, presentation::FadeEffect_ROLL_FROM_BOTTOM
},
438 { XML_VERTICAL_STRIPES
, presentation::FadeEffect_VERTICAL_STRIPES
},
439 { XML_HORIZONTAL_STRIPES
, presentation::FadeEffect_HORIZONTAL_STRIPES
},
440 { XML_CLOCKWISE
, presentation::FadeEffect_CLOCKWISE
},
441 { XML_COUNTERCLOCKWISE
, presentation::FadeEffect_COUNTERCLOCKWISE
},
442 { XML_FADE_FROM_UPPERLEFT
, presentation::FadeEffect_FADE_FROM_UPPERLEFT
},
443 { XML_FADE_FROM_UPPERRIGHT
, presentation::FadeEffect_FADE_FROM_UPPERRIGHT
},
444 { XML_FADE_FROM_LOWERLEFT
, presentation::FadeEffect_FADE_FROM_LOWERLEFT
},
445 { XML_FADE_FROM_LOWERRIGHT
, presentation::FadeEffect_FADE_FROM_LOWERRIGHT
},
446 { XML_CLOSE_VERTICAL
, presentation::FadeEffect_CLOSE_VERTICAL
},
447 { XML_CLOSE_HORIZONTAL
, presentation::FadeEffect_CLOSE_HORIZONTAL
},
448 { XML_OPEN_VERTICAL
, presentation::FadeEffect_OPEN_VERTICAL
},
449 { XML_OPEN_HORIZONTAL
, presentation::FadeEffect_OPEN_HORIZONTAL
},
450 { XML_SPIRALIN_LEFT
, presentation::FadeEffect_SPIRALIN_LEFT
},
451 { XML_SPIRALIN_RIGHT
, presentation::FadeEffect_SPIRALIN_RIGHT
},
452 { XML_SPIRALOUT_LEFT
, presentation::FadeEffect_SPIRALOUT_LEFT
},
453 { XML_SPIRALOUT_RIGHT
, presentation::FadeEffect_SPIRALOUT_RIGHT
},
454 { XML_DISSOLVE
, presentation::FadeEffect_DISSOLVE
},
455 { XML_WAVYLINE_FROM_LEFT
, presentation::FadeEffect_WAVYLINE_FROM_LEFT
},
456 { XML_WAVYLINE_FROM_TOP
, presentation::FadeEffect_WAVYLINE_FROM_TOP
},
457 { XML_WAVYLINE_FROM_RIGHT
, presentation::FadeEffect_WAVYLINE_FROM_RIGHT
},
458 { XML_WAVYLINE_FROM_BOTTOM
, presentation::FadeEffect_WAVYLINE_FROM_BOTTOM
},
459 { XML_RANDOM
, presentation::FadeEffect_RANDOM
},
460 { XML_STRETCH_FROM_LEFT
, presentation::FadeEffect_STRETCH_FROM_LEFT
},
461 { XML_STRETCH_FROM_TOP
, presentation::FadeEffect_STRETCH_FROM_TOP
},
462 { XML_STRETCH_FROM_RIGHT
, presentation::FadeEffect_STRETCH_FROM_RIGHT
},
463 { XML_STRETCH_FROM_BOTTOM
, presentation::FadeEffect_STRETCH_FROM_BOTTOM
},
464 { XML_VERTICAL_LINES
, presentation::FadeEffect_VERTICAL_LINES
},
465 { XML_HORIZONTAL_LINES
, presentation::FadeEffect_HORIZONTAL_LINES
},
466 { XML_MOVE_FROM_UPPERLEFT
, presentation::FadeEffect_MOVE_FROM_UPPERLEFT
},
467 { XML_MOVE_FROM_UPPERRIGHT
, presentation::FadeEffect_MOVE_FROM_UPPERRIGHT
},
468 { XML_MOVE_FROM_LOWERRIGHT
, presentation::FadeEffect_MOVE_FROM_LOWERRIGHT
},
469 { XML_MOVE_FROM_LOWERLEFT
, presentation::FadeEffect_MOVE_FROM_LOWERLEFT
},
470 { XML_UNCOVER_TO_LEFT
, presentation::FadeEffect_UNCOVER_TO_LEFT
},
471 { XML_UNCOVER_TO_UPPERLEFT
, presentation::FadeEffect_UNCOVER_TO_UPPERLEFT
},
472 { XML_UNCOVER_TO_TOP
, presentation::FadeEffect_UNCOVER_TO_TOP
},
473 { XML_UNCOVER_TO_UPPERRIGHT
,presentation::FadeEffect_UNCOVER_TO_UPPERRIGHT
},
474 { XML_UNCOVER_TO_RIGHT
, presentation::FadeEffect_UNCOVER_TO_RIGHT
},
475 { XML_UNCOVER_TO_LOWERRIGHT
,presentation::FadeEffect_UNCOVER_TO_LOWERRIGHT
},
476 { XML_UNCOVER_TO_BOTTOM
, presentation::FadeEffect_UNCOVER_TO_BOTTOM
},
477 { XML_UNCOVER_TO_LOWERLEFT
, presentation::FadeEffect_UNCOVER_TO_LOWERLEFT
},
478 { XML_VERTICAL_CHECKERBOARD
,presentation::FadeEffect_VERTICAL_CHECKERBOARD
},
479 { XML_HORIZONTAL_CHECKERBOARD
,presentation::FadeEffect_HORIZONTAL_CHECKERBOARD
},
480 { XML_TOKEN_INVALID
, 0 }
483 SvXMLEnumMapEntry
const aXML_ConnectionKind_EnumMap
[] =
485 { XML_STANDARD
, drawing::ConnectorType_STANDARD
},
486 { XML_CURVE
, drawing::ConnectorType_CURVE
},
487 { XML_LINE
, drawing::ConnectorType_LINE
},
488 { XML_LINES
, drawing::ConnectorType_LINES
},
489 { XML_TOKEN_INVALID
, 0 }
492 SvXMLEnumMapEntry aXML_BitmapMode_EnumMap
[] =
494 { XML_REPEAT
, drawing::BitmapMode_REPEAT
},
495 { XML_STRETCH
, drawing::BitmapMode_STRETCH
},
496 { XML_BACKGROUND_NO_REPEAT
, drawing::BitmapMode_NO_REPEAT
},
497 { XML_TOKEN_INVALID
, 0 }
502 static SvXMLEnumMapEntry
const aXML_NormalsKind_EnumMap
[] =
504 { XML_OBJECT
, drawing::NormalsKind_SPECIFIC
},
505 { XML_FLAT
, drawing::NormalsKind_FLAT
},
506 { XML_SPHERE
, drawing::NormalsKind_SPHERE
},
507 { XML_TOKEN_INVALID
, 0 }
510 static SvXMLEnumMapEntry
const aXML_TexGenerationX_EnumMap
[] =
512 { XML_OBJECT
, drawing::TextureProjectionMode_OBJECTSPECIFIC
},
513 { XML_PARALLEL
, drawing::TextureProjectionMode_PARALLEL
},
514 { XML_SPHERE
, drawing::TextureProjectionMode_SPHERE
},
515 { XML_TOKEN_INVALID
, 0 }
518 static SvXMLEnumMapEntry
const aXML_TexGenerationY_EnumMap
[] =
520 { XML_OBJECT
, drawing::TextureProjectionMode_OBJECTSPECIFIC
},
521 { XML_PARALLEL
, drawing::TextureProjectionMode_PARALLEL
},
522 { XML_SPHERE
, drawing::TextureProjectionMode_SPHERE
},
523 { XML_TOKEN_INVALID
, 0 }
526 static SvXMLEnumMapEntry
const aXML_TexKind_EnumMap
[] =
528 { XML_LUMINANCE
, drawing::TextureKind_LUMINANCE
},
529 { XML_COLOR
, drawing::TextureKind_COLOR
},
530 { XML_TOKEN_INVALID
, 0 }
533 static SvXMLEnumMapEntry
const aXML_TexMode_EnumMap
[] =
535 { XML_REPLACE
, drawing::TextureMode_REPLACE
},
536 { XML_MODULATE
, drawing::TextureMode_MODULATE
},
537 { XML_BLEND
, drawing::TextureMode_BLEND
},
538 { XML_TOKEN_INVALID
, 0 }
541 SvXMLEnumMapEntry aXML_RefPoint_EnumMap
[] =
543 { XML_TOP_LEFT
, drawing::RectanglePoint_LEFT_TOP
},
544 { XML_TOP
, drawing::RectanglePoint_MIDDLE_TOP
},
545 { XML_TOP_RIGHT
, drawing::RectanglePoint_RIGHT_TOP
},
546 { XML_LEFT
, drawing::RectanglePoint_LEFT_MIDDLE
},
547 { XML_CENTER
, drawing::RectanglePoint_MIDDLE_MIDDLE
},
548 { XML_RIGHT
, drawing::RectanglePoint_RIGHT_MIDDLE
},
549 { XML_BOTTOM_LEFT
, drawing::RectanglePoint_LEFT_BOTTOM
},
550 { XML_BOTTOM
, drawing::RectanglePoint_MIDDLE_BOTTOM
},
551 { XML_BOTTOM_RIGHT
, drawing::RectanglePoint_RIGHT_BOTTOM
},
552 { XML_TOKEN_INVALID
, 0 }
555 SvXMLEnumMapEntry
const aXML_CircleKind_EnumMap
[] =
557 { XML_FULL
, drawing::CircleKind_FULL
},
558 { XML_SECTION
, drawing::CircleKind_SECTION
},
559 { XML_CUT
, drawing::CircleKind_CUT
},
560 { XML_ARC
, drawing::CircleKind_ARC
},
561 { XML_TOKEN_INVALID
, 0 }
564 static SvXMLEnumMapEntry
const aXML_WritingMode_EnumMap
[] =
566 { XML_TB_RL
, text::WritingMode_TB_RL
},
567 { XML_LR_TB
, text::WritingMode_LR_TB
},
568 { XML_TOKEN_INVALID
, 0 }
571 static SvXMLEnumMapEntry
const pXML_TextAnimation_Enum
[] =
573 { XML_NONE
, drawing::TextAnimationKind_NONE
},
574 { XML_BLINKING
, drawing::TextAnimationKind_BLINK
}, // will be filtered
575 { XML_SCROLL
, drawing::TextAnimationKind_SCROLL
},
576 { XML_ALTERNATE
, drawing::TextAnimationKind_ALTERNATE
},
577 { XML_SLIDE
, drawing::TextAnimationKind_SLIDE
},
578 { XML_TOKEN_INVALID
, 0 }
581 static SvXMLEnumMapEntry
const pXML_TextAnimation_Blinking_Enum
[] =
583 { XML_FALSE
, drawing::TextAnimationKind_NONE
},
584 { XML_TRUE
, drawing::TextAnimationKind_BLINK
},
585 { XML_FALSE
, drawing::TextAnimationKind_SCROLL
},
586 { XML_FALSE
, drawing::TextAnimationKind_ALTERNATE
},
587 { XML_FALSE
, drawing::TextAnimationKind_SLIDE
},
588 { XML_TOKEN_INVALID
, 0 }
591 static SvXMLEnumMapEntry
const pXML_TextAnimationDirection_Enum
[] =
593 { XML_LEFT
, drawing::TextAnimationDirection_LEFT
},
594 { XML_RIGHT
, drawing::TextAnimationDirection_RIGHT
}, // will be filtered
595 { XML_UP
, drawing::TextAnimationDirection_UP
},
596 { XML_DOWN
, drawing::TextAnimationDirection_DOWN
},
597 { XML_TOKEN_INVALID
, 0 }
600 static SvXMLEnumMapEntry
const pXML_TextAlign_Enum
[] =
602 { XML_LEFT
, drawing::TextHorizontalAdjust_LEFT
},
603 { XML_CENTER
, drawing::TextHorizontalAdjust_CENTER
},
604 { XML_RIGHT
, drawing::TextHorizontalAdjust_RIGHT
},
605 { XML_JUSTIFY
, drawing::TextHorizontalAdjust_BLOCK
},
606 { XML_TOKEN_INVALID
, 0 }
609 static SvXMLEnumMapEntry
const pXML_VerticalAlign_Enum
[] =
611 { XML_TOP
, drawing::TextVerticalAdjust_TOP
},
612 { XML_MIDDLE
, drawing::TextVerticalAdjust_CENTER
},
613 { XML_BOTTOM
, drawing::TextVerticalAdjust_BOTTOM
},
614 { XML_JUSTIFY
, drawing::TextVerticalAdjust_BLOCK
},
615 { XML_TOKEN_INVALID
, 0 }
618 static SvXMLEnumMapEntry
const pXML_FitToSize_Enum_Odf12
[] =
620 { XML_FALSE
, drawing::TextFitToSizeType_NONE
},
621 { XML_TRUE
, drawing::TextFitToSizeType_PROPORTIONAL
},
622 { XML_TRUE
, drawing::TextFitToSizeType_ALLLINES
},
623 { XML_TRUE
, drawing::TextFitToSizeType_AUTOFIT
},
624 { XML_TOKEN_INVALID
, 0 }
627 static SvXMLEnumMapEntry
const pXML_FitToSize_Enum
[] =
629 { XML_FALSE
, drawing::TextFitToSizeType_NONE
},
630 { XML_TRUE
, drawing::TextFitToSizeType_PROPORTIONAL
},
631 { XML_ALL
, drawing::TextFitToSizeType_ALLLINES
},
632 { XML_SHRINK_TO_FIT
,drawing::TextFitToSizeType_AUTOFIT
},
633 { XML_TOKEN_INVALID
, 0 }
636 static SvXMLEnumMapEntry
const pXML_MeasureUnit_Enum
[] =
638 { XML_AUTOMATIC
, 0 },
645 { XML_UNIT_INCH
, 8 },
646 { XML_UNIT_FOOT
, 9 },
647 { XML_UNIT_MILES
, 10 },
648 { XML_TOKEN_INVALID
,0 }
651 static SvXMLEnumMapEntry
const pXML_Measure_HAlign_Enum
[] =
653 { XML_AUTOMATIC
, drawing::MeasureTextHorzPos_AUTO
},
654 { XML_LEFT_OUTSIDE
, drawing::MeasureTextHorzPos_LEFTOUTSIDE
},
655 { XML_INSIDE
, drawing::MeasureTextHorzPos_INSIDE
},
656 { XML_RIGHT_OUTSIDE
, drawing::MeasureTextHorzPos_RIGHTOUTSIDE
},
657 { XML_TOKEN_INVALID
,0 }
660 static SvXMLEnumMapEntry
const pXML_Measure_VAlign_Enum
[] =
662 { XML_AUTOMATIC
, drawing::MeasureTextVertPos_AUTO
},
663 { XML_ABOVE
, drawing::MeasureTextVertPos_EAST
},
664 { XML_BELOW
, drawing::MeasureTextVertPos_WEST
},
665 { XML_CENTER
, drawing::MeasureTextVertPos_CENTERED
},
666 { XML_TOKEN_INVALID
,0 }
670 static SvXMLEnumMapEntry
const pXML_Fontwork_Style_Enum
[] =
672 { XML_ROTATE
, 0 }, //XFT_ROTATE,
673 { XML_UPRIGHT
, 1 }, //XFT_UPRIGHT,
674 { XML_SLANT_X
, 2 }, //XFT_SLANTX,
675 { XML_SLANT_Y
, 3 }, //XFT_SLANTY,
676 { XML_NONE
, 4 }, //XFT_NONE
677 { XML_TOKEN_INVALID
,0 }
680 static SvXMLEnumMapEntry
const pXML_Fontwork_Adjust_Enum
[] =
682 { XML_LEFT
, 0 }, //XFT_LEFT,
683 { XML_RIGHT
, 1 }, //XFT_RIGHT,
684 { XML_AUTOSIZE
, 2 }, //XFT_AUTOSIZE,
685 { XML_CENTER
, 3 }, //XFT_CENTER
686 { XML_TOKEN_INVALID
,0 }
689 static SvXMLEnumMapEntry
const pXML_Fontwork_Shadow_Enum
[] =
691 { XML_NORMAL
, 0 }, //XFTSHADOW_NORMAL,
692 { XML_SLANT
, 1 }, //XFTSHADOW_SLANT,
693 { XML_NONE
, 2 }, //XFTSHADOW_NONE
694 { XML_TOKEN_INVALID
,0 }
697 static SvXMLEnumMapEntry
const pXML_Fontwork_Form_Enum
[] =
699 { XML_NONE
, 0 }, //XFTFORM_NONE,
700 { XML_TOPCIRCLE
, 1 }, //XFTFORM_TOPCIRC,
701 { XML_BOTTOMCIRCLE
, 2 }, //XFTFORM_BOTCIRC,
702 { XML_LEFTCIRCLE
, 3 }, //XFTFORM_LFTCIRC,
703 { XML_RIGHTCIRCLE
, 4 }, //XFTFORM_RGTCIRC,
704 { XML_TOPARC
, 5 }, //XFTFORM_TOPARC,
705 { XML_BOTTOMARC
, 6 }, //XFTFORM_BOTARC,
706 { XML_LEFTARC
, 7 }, //XFTFORM_LFTARC,
707 { XML_RIGHTARC
, 8 }, //XFTFORM_RGTARC,
708 { XML_BUTTON1
, 9 }, //XFTFORM_BUTTON1,
709 { XML_BUTTON2
, 10 }, //XFTFORM_BUTTON2,
710 { XML_BUTTON3
, 11 }, //XFTFORM_BUTTON3,
711 { XML_BUTTON4
, 12 }, //XFTFORM_BUTTON4
712 { XML_TOKEN_INVALID
,0 }
715 static SvXMLEnumMapEntry
const pXML_Caption_Esc_Dir_Enum
[] =
717 { XML_HORIZONTAL
, 0 }, //SDRCAPT_ESCHORIZONTAL,
718 { XML_VERTICAL
, 1 }, //SDRCAPT_ESCVERTICAL,
719 { XML_AUTO
, 2 }, //SDRCAPT_ESCBESTFIT,
720 { XML_TOKEN_INVALID
,0 }
723 static SvXMLEnumMapEntry
const pXML_Caption_Type_Enum
[] =
725 { XML_STRAIGHT_LINE
, 0 }, //SDRCAPT_TYPE1,
726 { XML_ANGLED_LINE
, 1 }, //SDRCAPT_TYPE2,
727 { XML_ANGLED_CONNECTOR_LINE
, 2 }, //SDRCAPT_TYPE3,
728 { XML_TOKEN_INVALID
,0 }
731 class XMLCaptionEscapeRelative
: public XMLPropertyHandler
734 virtual bool importXML(
735 const OUString
& rStrImpValue
,
736 ::com::sun::star::uno::Any
& rValue
,
737 const SvXMLUnitConverter
& rUnitConverter
) const SAL_OVERRIDE
;
738 virtual bool exportXML(
739 OUString
& rStrExpValue
,
740 const ::com::sun::star::uno::Any
& rValue
,
741 const SvXMLUnitConverter
& rUnitConverter
) const SAL_OVERRIDE
;
744 bool XMLCaptionEscapeRelative::importXML( const OUString
& rStrImpValue
, Any
& rValue
, const SvXMLUnitConverter
& ) const
748 if (!::sax::Converter::convertPercent( nValue
, rStrImpValue
))
756 bool XMLCaptionEscapeRelative::exportXML( OUString
& rStrExpValue
, const Any
& rValue
, const SvXMLUnitConverter
& ) const
758 sal_Int32 nValue
= 0;
759 if( !(rValue
>>= nValue
) )
764 ::sax::Converter::convertPercent( aOut
, nValue
);
765 rStrExpValue
= aOut
.makeStringAndClear();
769 class XMLMoveSizeProtectHdl
: public XMLPropertyHandler
772 XMLMoveSizeProtectHdl( sal_Int32 nType
) : mnType( nType
) {}
774 virtual bool importXML(
775 const OUString
& rStrImpValue
,
776 ::com::sun::star::uno::Any
& rValue
,
777 const SvXMLUnitConverter
& rUnitConverter
) const SAL_OVERRIDE
;
778 virtual bool exportXML(
779 OUString
& rStrExpValue
,
780 const ::com::sun::star::uno::Any
& rValue
,
781 const SvXMLUnitConverter
& rUnitConverter
) const SAL_OVERRIDE
;
783 const sal_Int32 mnType
;
786 bool XMLMoveSizeProtectHdl::importXML( const OUString
& rStrImpValue
, Any
& rValue
, const SvXMLUnitConverter
& ) const
788 const bool bValue
= rStrImpValue
.indexOf( GetXMLToken( mnType
== XML_SD_TYPE_MOVE_PROTECT
? XML_POSITION
: XML_SIZE
) ) != -1;
793 bool XMLMoveSizeProtectHdl::exportXML( OUString
& rStrExpValue
, const Any
& rValue
, const SvXMLUnitConverter
& ) const
796 if( !(rValue
>>= bValue
) )
801 if( !rStrExpValue
.isEmpty() )
804 rStrExpValue
+= GetXMLToken( mnType
== XML_SD_TYPE_MOVE_PROTECT
? XML_POSITION
: XML_SIZE
);
810 class XMLSdHeaderFooterVisibilityTypeHdl
: public XMLPropertyHandler
813 virtual ~XMLSdHeaderFooterVisibilityTypeHdl();
815 virtual bool importXML( const OUString
& rStrImpValue
, ::com::sun::star::uno::Any
& rValue
, const SvXMLUnitConverter
& rUnitConverter
) const SAL_OVERRIDE
;
816 virtual bool exportXML( OUString
& rStrExpValue
, const ::com::sun::star::uno::Any
& rValue
, const SvXMLUnitConverter
& rUnitConverter
) const SAL_OVERRIDE
;
819 XMLSdHeaderFooterVisibilityTypeHdl::~XMLSdHeaderFooterVisibilityTypeHdl()
823 bool XMLSdHeaderFooterVisibilityTypeHdl::importXML(
824 const OUString
& rStrImpValue
,
825 ::com::sun::star::uno::Any
& rValue
,
826 const SvXMLUnitConverter
& ) const
829 // attributes with this type where saved with VISIBLE|HIDDEN prior
830 // to src680m67. So we have to import that correctly
831 const bool bBool
= IsXMLToken(rStrImpValue
, XML_TRUE
) || IsXMLToken(rStrImpValue
, XML_VISIBLE
);
833 return bBool
|| IsXMLToken(rStrImpValue
, XML_FALSE
) || IsXMLToken(rStrImpValue
, XML_HIDDEN
);
836 bool XMLSdHeaderFooterVisibilityTypeHdl::exportXML(
837 OUString
& rStrExpValue
,
839 const SvXMLUnitConverter
& ) const
845 if (rValue
>>= bValue
)
847 ::sax::Converter::convertBool( aOut
, bValue
);
848 rStrExpValue
= aOut
.makeStringAndClear();
856 XMLSdPropHdlFactory::XMLSdPropHdlFactory( uno::Reference
< frame::XModel
> xModel
, SvXMLImport
& rImport
)
857 : mxModel( xModel
), mpExport(0), mpImport( &rImport
)
861 XMLSdPropHdlFactory::XMLSdPropHdlFactory( uno::Reference
< frame::XModel
> xModel
, SvXMLExport
& rExport
)
862 : mxModel( xModel
), mpExport( &rExport
), mpImport(0)
866 XMLSdPropHdlFactory::~XMLSdPropHdlFactory()
870 const XMLPropertyHandler
* XMLSdPropHdlFactory::GetPropertyHandler( sal_Int32 nType
) const
872 const XMLPropertyHandler
* pHdl
= XMLPropertyHandlerFactory::GetPropertyHandler( nType
);
877 case XML_SD_TYPE_STROKE
:
879 pHdl
= new XMLEnumPropertyHdl( aXML_LineStyle_EnumMap
, cppu::UnoType
<drawing::LineStyle
>::get());
882 case XML_SD_TYPE_LINEJOIN
:
884 pHdl
= new XMLEnumPropertyHdl( aXML_LineJoint_EnumMap
, cppu::UnoType
<drawing::LineJoint
>::get());
887 case XML_SD_TYPE_LINECAP
:
889 pHdl
= new XMLEnumPropertyHdl( aXML_LineCap_EnumMap
, ::cppu::UnoType
<drawing::LineCap
>::get() );
892 case XML_SD_TYPE_FILLSTYLE
:
894 pHdl
= new XMLEnumPropertyHdl( aXML_FillStyle_EnumMap
, cppu::UnoType
<drawing::FillStyle
>::get());
897 case XML_SD_TYPE_PRESPAGE_TYPE
:
899 pHdl
= new XMLEnumPropertyHdl( aXML_PresChange_EnumMap
, ::cppu::UnoType
<sal_Int32
>::get() );
902 case XML_SD_TYPE_SHADOW
:
904 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_VISIBLE
), GetXMLToken(XML_HIDDEN
) );
907 case XML_TYPE_SD_MIRROR
:
909 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_HORIZONTAL
), GetXMLToken(XML_NONE
) );
912 case XML_SD_TYPE_PRESPAGE_STYLE
:
914 pHdl
= new XMLEnumPropertyHdl( aXML_FadeEffect_EnumMap
, ::cppu::UnoType
<presentation::FadeEffect
>::get() );
917 case XML_SD_TYPE_PRESPAGE_SPEED
:
919 pHdl
= new XMLEnumPropertyHdl( aXML_TransSpeed_EnumMap
, cppu::UnoType
<presentation::AnimationSpeed
>::get());
922 case XML_SD_TYPE_PRESPAGE_DURATION
:
924 pHdl
= new XMLDurationPropertyHdl();
927 case XML_SD_TYPE_TEXT_CROSSEDOUT
:
929 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_SOLID
), GetXMLToken(XML_NONE
) );
932 case XML_SD_TYPE_OPACITY
:
934 pHdl
= new XMLOpacityPropertyHdl(mpImport
);
937 case XML_SD_TYPE_WRITINGMODE
:
939 pHdl
= new XMLEnumPropertyHdl( aXML_WritingMode_EnumMap
, cppu::UnoType
<text::WritingMode
>::get());
942 case XML_SD_TYPE_PRESPAGE_VISIBILITY
:
944 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_VISIBLE
), GetXMLToken(XML_HIDDEN
) );
947 case XML_SD_TYPE_PRESPAGE_BACKSIZE
:
949 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_FULL
), GetXMLToken(XML_BORDER
) );
955 case XML_SD_TYPE_BACKFACE_CULLING
:
957 // #87922# DoubleSided -> BackfaceCulling
958 // This sal_Bool needs to be flipped, DoubleSided sal_True -> NO Backface culling
960 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_DISABLED
), GetXMLToken(XML_ENABLED
) );
964 case XML_SD_TYPE_NORMALS_KIND
:
966 pHdl
= new XMLEnumPropertyHdl( aXML_NormalsKind_EnumMap
, cppu::UnoType
<drawing::NormalsKind
>::get());
969 case XML_SD_TYPE_NORMALS_DIRECTION
:
971 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_NORMAL
), GetXMLToken(XML_INVERSE
) );
974 case XML_SD_TYPE_TEX_GENERATION_MODE_X
:
976 pHdl
= new XMLEnumPropertyHdl( aXML_TexGenerationX_EnumMap
, cppu::UnoType
<drawing::TextureProjectionMode
>::get());
979 case XML_SD_TYPE_TEX_GENERATION_MODE_Y
:
981 pHdl
= new XMLEnumPropertyHdl( aXML_TexGenerationY_EnumMap
, cppu::UnoType
<drawing::TextureProjectionMode
>::get());
984 case XML_SD_TYPE_TEX_KIND
:
986 pHdl
= new XMLEnumPropertyHdl( aXML_TexKind_EnumMap
, cppu::UnoType
<drawing::TextureKind
>::get());
989 case XML_SD_TYPE_TEX_MODE
:
991 pHdl
= new XMLEnumPropertyHdl( aXML_TexMode_EnumMap
, cppu::UnoType
<drawing::TextureMode
>::get());
994 case XML_SD_TYPE_NUMBULLET
:
996 uno::Reference
<ucb::XAnyCompareFactory
> xCompareFac( mxModel
, uno::UNO_QUERY
);
997 uno::Reference
<ucb::XAnyCompare
> xCompare
;
998 if( xCompareFac
.is() )
999 xCompare
= xCompareFac
->createAnyCompareByName( OUString( "NumberingRules" ) );
1001 pHdl
= new XMLNumRulePropHdl( xCompare
);
1004 case XML_SD_TYPE_BITMAP_MODE
:
1006 pHdl
= new XMLEnumPropertyHdl( aXML_BitmapMode_EnumMap
, cppu::UnoType
<drawing::BitmapMode
>::get());
1009 case XML_SD_TYPE_BITMAPREPOFFSETX
:
1010 case XML_SD_TYPE_BITMAPREPOFFSETY
:
1012 pHdl
= new XMLBitmapRepeatOffsetPropertyHandler( nType
== XML_SD_TYPE_BITMAPREPOFFSETX
);
1015 case XML_SD_TYPE_FILLBITMAPSIZE
:
1017 pHdl
= new XMLFillBitmapSizePropertyHandler();
1020 case XML_SD_TYPE_LOGICAL_SIZE
:
1022 pHdl
= new XMLBitmapLogicalSizePropertyHandler();
1025 case XML_SD_TYPE_BITMAP_REFPOINT
:
1027 pHdl
= new XMLEnumPropertyHdl( aXML_RefPoint_EnumMap
, cppu::UnoType
<com::sun::star::drawing::RectanglePoint
>::get());
1030 case XML_TYPE_TEXT_ANIMATION
:
1031 pHdl
= new XMLEnumPropertyHdl( pXML_TextAnimation_Enum
, cppu::UnoType
<com::sun::star::drawing::TextAnimationKind
>::get());
1033 case XML_TYPE_TEXT_ANIMATION_BLINKING
:
1034 pHdl
= new XMLEnumPropertyHdl( pXML_TextAnimation_Blinking_Enum
, cppu::UnoType
<com::sun::star::drawing::TextAnimationKind
>::get());
1036 case XML_TYPE_TEXT_ANIMATION_DIRECTION
:
1037 pHdl
= new XMLEnumPropertyHdl( pXML_TextAnimationDirection_Enum
, cppu::UnoType
<com::sun::star::drawing::TextAnimationDirection
>::get());
1039 case XML_TYPE_TEXT_ANIMATION_STEPS
:
1040 pHdl
= new XMLTextAnimationStepPropertyHdl
;
1042 case XML_SD_TYPE_TEXT_ALIGN
:
1043 pHdl
= new XMLEnumPropertyHdl( pXML_TextAlign_Enum
, cppu::UnoType
<com::sun::star::drawing::TextHorizontalAdjust
>::get());
1045 case XML_SD_TYPE_VERTICAL_ALIGN
:
1046 pHdl
= new XMLEnumPropertyHdl( pXML_VerticalAlign_Enum
, cppu::UnoType
<com::sun::star::drawing::TextVerticalAdjust
>::get());
1048 case XML_SD_TYPE_FITTOSIZE
:
1050 if (mpExport
&& (mpExport
->getDefaultVersion()
1051 <= SvtSaveOptions::ODFVER_012
))
1053 pHdl
= new XMLEnumPropertyHdl(pXML_FitToSize_Enum_Odf12
,
1054 cppu::UnoType
<com::sun::star::drawing::TextFitToSizeType
>::get());
1058 pHdl
= new XMLEnumPropertyHdl(pXML_FitToSize_Enum
,
1059 cppu::UnoType
<com::sun::star::drawing::TextFitToSizeType
>::get());
1063 case XML_SD_TYPE_MEASURE_UNIT
:
1064 pHdl
= new XMLEnumPropertyHdl( pXML_MeasureUnit_Enum
, ::cppu::UnoType
<sal_Int32
>::get() );
1066 case XML_SD_TYPE_MEASURE_HALIGN
:
1067 pHdl
= new XMLEnumPropertyHdl( pXML_Measure_HAlign_Enum
, cppu::UnoType
<com::sun::star::drawing::MeasureTextHorzPos
>::get());
1069 case XML_SD_TYPE_MEASURE_VALIGN
:
1070 pHdl
= new XMLEnumPropertyHdl( pXML_Measure_VAlign_Enum
, cppu::UnoType
<com::sun::star::drawing::MeasureTextVertPos
>::get());
1072 case XML_SD_TYPE_MEASURE_PLACING
:
1074 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_BELOW
), GetXMLToken(XML_ABOVE
) );
1077 case XML_TYPE_TEXT_CLIP11
:
1078 pHdl
= new XMLClipPropertyHandler( true );
1080 case XML_TYPE_TEXT_CLIP
:
1081 pHdl
= new XMLClipPropertyHandler( false );
1085 case XML_SD_TYPE_FONTWORK_STYLE
:
1086 pHdl
= new XMLEnumPropertyHdl( pXML_Fontwork_Style_Enum
, ::cppu::UnoType
<sal_Int32
>::get());
1088 case XML_SD_TYPE_FONTWORK_ADJUST
:
1089 pHdl
= new XMLEnumPropertyHdl( pXML_Fontwork_Adjust_Enum
, ::cppu::UnoType
<sal_Int32
>::get());
1091 case XML_SD_TYPE_FONTWORK_SHADOW
:
1092 pHdl
= new XMLEnumPropertyHdl( pXML_Fontwork_Shadow_Enum
, ::cppu::UnoType
<sal_Int32
>::get());
1094 case XML_SD_TYPE_FONTWORK_FORM
:
1095 pHdl
= new XMLEnumPropertyHdl( pXML_Fontwork_Form_Enum
, ::cppu::UnoType
<sal_Int32
>::get());
1098 case XML_SD_TYPE_CONTROL_BORDER
:
1099 pHdl
= new ::xmloff::OControlBorderHandler( ::xmloff::OControlBorderHandler::STYLE
);
1101 case XML_SD_TYPE_CONTROL_BORDER_COLOR
:
1102 pHdl
= new ::xmloff::OControlBorderHandler( ::xmloff::OControlBorderHandler::COLOR
);
1104 case XML_SD_TYPE_IMAGE_SCALE_MODE
:
1105 pHdl
= new ::xmloff::ImageScaleModeHandler
;
1107 case XML_TYPE_CONTROL_TEXT_EMPHASIZE
:
1108 pHdl
= new ::xmloff::OControlTextEmphasisHandler
;
1111 case XML_SD_TYPE_CAPTION_ANGLE_TYPE
:
1113 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_FIXED
), GetXMLToken(XML_FREE
) );
1116 case XML_SD_TYPE_CAPTION_IS_ESC_REL
:
1117 pHdl
= new XMLIsPercentagePropertyHandler();
1119 case XML_SD_TYPE_CAPTION_ESC_REL
:
1120 pHdl
= new XMLCaptionEscapeRelative();
1122 case XML_SD_TYPE_CAPTION_ESC_ABS
:
1123 pHdl
= new XMLPercentOrMeasurePropertyHandler( false );
1125 case XML_SD_TYPE_CAPTION_ESC_DIR
:
1126 pHdl
= new XMLEnumPropertyHdl( pXML_Caption_Esc_Dir_Enum
, ::cppu::UnoType
<sal_Int32
>::get());
1128 case XML_SD_TYPE_CAPTION_TYPE
:
1129 pHdl
= new XMLEnumPropertyHdl( pXML_Caption_Type_Enum
, ::cppu::UnoType
<sal_Int32
>::get());
1131 case XML_SD_TYPE_DATETIMEUPDATE
:
1132 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_FIXED
), GetXMLToken(XML_VARIABLE
) );
1134 case XML_SD_TYPE_DATETIME_FORMAT
:
1135 pHdl
= new XMLDateTimeFormatHdl( mpExport
);
1137 case XML_SD_TYPE_TRANSITION_TYPE
:
1138 pHdl
= new XMLEnumPropertyHdl( xmloff::getAnimationsEnumMap(xmloff::Animations_EnumMap_TransitionType
) , ::cppu::UnoType
<sal_Int16
>::get());
1140 case XML_SD_TYPE_TRANSTIION_SUBTYPE
:
1141 pHdl
= new XMLEnumPropertyHdl( xmloff::getAnimationsEnumMap(xmloff::Animations_EnumMap_TransitionSubType
) , ::cppu::UnoType
<sal_Int16
>::get());
1143 case XML_SD_TYPE_TRANSTIION_DIRECTION
:
1144 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_FORWARD
), GetXMLToken(XML_REVERSE
) );
1146 case XML_TYPE_WRAP_OPTION
:
1147 pHdl
= new XMLWordWrapPropertyHdl( mpImport
);
1150 case XML_SD_TYPE_MOVE_PROTECT
:
1151 case XML_SD_TYPE_SIZE_PROTECT
:
1152 pHdl
= new XMLMoveSizeProtectHdl( nType
);
1154 case XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE
:
1155 pHdl
= new XMLSdHeaderFooterVisibilityTypeHdl();
1160 PutHdlCache(nType
, pHdl
);
1166 XMLShapePropertySetMapper::XMLShapePropertySetMapper(const rtl::Reference
< XMLPropertyHandlerFactory
>& rFactoryRef
,
1168 : XMLPropertySetMapper( aXMLSDProperties
, rFactoryRef
, bForExport
)
1172 XMLShapePropertySetMapper::~XMLShapePropertySetMapper()
1176 XMLShapeExportPropertyMapper::XMLShapeExportPropertyMapper( const rtl::Reference
< XMLPropertySetMapper
>& rMapper
, SvXMLExport
& rExport
)
1177 : SvXMLExportPropertyMapper( rMapper
)
1178 , maNumRuleExp( rExport
)
1179 , mbIsInAutoStyles( true )
1183 XMLShapeExportPropertyMapper::~XMLShapeExportPropertyMapper()
1187 void XMLShapeExportPropertyMapper::ContextFilter(
1188 bool bEnableFoFontFamily
,
1189 std::vector
< XMLPropertyState
>& rProperties
,
1190 uno::Reference
< beans::XPropertySet
> rPropSet
) const
1192 XMLPropertyState
* pRepeatOffsetX
= NULL
;
1193 XMLPropertyState
* pRepeatOffsetY
= NULL
;
1194 XMLPropertyState
* pTextAnimationBlinking
= NULL
;
1195 XMLPropertyState
* pTextAnimationKind
= NULL
;
1198 XMLPropertyState
* pFontWorkStyle
= NULL
;
1199 XMLPropertyState
* pFontWorkAdjust
= NULL
;
1200 XMLPropertyState
* pFontWorkDistance
= NULL
;
1201 XMLPropertyState
* pFontWorkStart
= NULL
;
1202 XMLPropertyState
* pFontWorkMirror
= NULL
;
1203 XMLPropertyState
* pFontWorkOutline
= NULL
;
1204 XMLPropertyState
* pFontWorkShadow
= NULL
;
1205 XMLPropertyState
* pFontWorkShadowColor
= NULL
;
1206 XMLPropertyState
* pFontWorkShadowOffsetx
= NULL
;
1207 XMLPropertyState
* pFontWorkShadowOffsety
= NULL
;
1208 XMLPropertyState
* pFontWorkForm
= NULL
;
1209 XMLPropertyState
* pFontWorkHideform
= NULL
;
1210 XMLPropertyState
* pFontWorkShadowTransparence
= NULL
;
1213 XMLPropertyState
* pOLEVisAreaLeft
= NULL
;
1214 XMLPropertyState
* pOLEVisAreaTop
= NULL
;
1215 XMLPropertyState
* pOLEVisAreaWidth
= NULL
;
1216 XMLPropertyState
* pOLEVisAreaHeight
= NULL
;
1217 XMLPropertyState
* pOLEIsInternal
= NULL
;
1220 XMLPropertyState
* pCaptionIsEscRel
= NULL
;
1221 XMLPropertyState
* pCaptionEscRel
= NULL
;
1222 XMLPropertyState
* pCaptionEscAbs
= NULL
;
1225 XMLPropertyState
* pClip11State
= NULL
;
1226 XMLPropertyState
* pClipState
= NULL
;
1228 XMLPropertyState
* pShapeWritingMode
= NULL
;
1229 XMLPropertyState
* pTextWritingMode
= NULL
;
1230 XMLPropertyState
* pControlWritingMode
= NULL
;
1232 // filter properties
1233 for( std::vector
< XMLPropertyState
>::iterator aIter
= rProperties
.begin();
1234 aIter
!= rProperties
.end();
1237 XMLPropertyState
*property
= &(*aIter
);
1238 if( property
->mnIndex
== -1 )
1241 // find properties with context
1242 // to prevent writing this property set mnIndex member to -1
1243 switch( getPropertySetMapper()->GetEntryContextId( property
->mnIndex
))
1245 case CTF_NUMBERINGRULES
:
1247 if( mbIsInAutoStyles
)
1248 property
->mnIndex
= -1;
1251 case CTF_SD_NUMBERINGRULES_NAME
:
1253 // this property is not exported in the style:properties element
1254 // because its an XIndexAccess and not a string.
1255 // This will be handled in SvXMLAutoStylePoolP::exportStyleAttributes
1256 // This is suboptimal
1257 if( !mbIsInAutoStyles
)
1258 property
->mnIndex
= -1;
1261 case CTF_WRITINGMODE
:
1263 pShapeWritingMode
= property
;
1264 text::WritingMode eWritingMode
;
1265 if( property
->maValue
>>= eWritingMode
)
1267 if( text::WritingMode_LR_TB
== eWritingMode
)
1269 property
->mnIndex
= -1;
1270 pShapeWritingMode
= 0;
1275 case CTF_CONTROLWRITINGMODE
:
1276 pControlWritingMode
= property
;
1278 case CTF_TEXTWRITINGMODE
:
1279 pTextWritingMode
= property
;
1281 case CTF_REPEAT_OFFSET_X
:
1282 pRepeatOffsetX
= property
;
1285 case CTF_REPEAT_OFFSET_Y
:
1286 pRepeatOffsetY
= property
;
1290 case CTF_FILLGRADIENTNAME
:
1291 case CTF_FILLHATCHNAME
:
1292 case CTF_FILLBITMAPNAME
:
1295 if( (property
->maValue
>>= aStr
) && aStr
.isEmpty() )
1296 property
->mnIndex
= -1;
1299 case CTF_TEXTANIMATION_BLINKING
:
1300 pTextAnimationBlinking
= property
;
1302 case CTF_TEXTANIMATION_KIND
:
1303 pTextAnimationKind
= property
;
1307 case CTF_FONTWORK_STYLE
: pFontWorkStyle
= property
; break;
1308 case CTF_FONTWORK_ADJUST
: pFontWorkAdjust
= property
; break;
1309 case CTF_FONTWORK_DISTANCE
: pFontWorkDistance
= property
; break;
1310 case CTF_FONTWORK_START
: pFontWorkStart
= property
; break;
1311 case CTF_FONTWORK_MIRROR
: pFontWorkMirror
= property
; break;
1312 case CTF_FONTWORK_OUTLINE
: pFontWorkOutline
= property
; break;
1313 case CTF_FONTWORK_SHADOW
: pFontWorkShadow
= property
; break;
1314 case CTF_FONTWORK_SHADOWCOLOR
: pFontWorkShadowColor
= property
; break;
1315 case CTF_FONTWORK_SHADOWOFFSETX
: pFontWorkShadowOffsetx
= property
; break;
1316 case CTF_FONTWORK_SHADOWOFFSETY
: pFontWorkShadowOffsety
= property
; break;
1317 case CTF_FONTWORK_FORM
: pFontWorkForm
= property
; break;
1318 case CTF_FONTWORK_HIDEFORM
: pFontWorkHideform
= property
; break;
1319 case CTF_FONTWORK_SHADOWTRANSPARENCE
: pFontWorkShadowTransparence
= property
; break;
1322 case CTF_SD_OLE_VIS_AREA_EXPORT_LEFT
: pOLEVisAreaLeft
= property
; break;
1323 case CTF_SD_OLE_VIS_AREA_EXPORT_TOP
: pOLEVisAreaTop
= property
; break;
1324 case CTF_SD_OLE_VIS_AREA_EXPORT_WIDTH
: pOLEVisAreaWidth
= property
; break;
1325 case CTF_SD_OLE_VIS_AREA_EXPORT_HEIGHT
: pOLEVisAreaHeight
= property
; break;
1326 case CTF_SD_OLE_ISINTERNAL
: pOLEIsInternal
= property
; break;
1328 case CTF_FRAME_DISPLAY_SCROLLBAR
:
1330 if( !property
->maValue
.hasValue() )
1331 property
->mnIndex
= -1;
1334 case CTF_FRAME_MARGIN_HORI
:
1335 case CTF_FRAME_MARGIN_VERT
:
1337 sal_Int32 nValue
= 0;
1338 if( (property
->maValue
>>= nValue
) && (nValue
< 0) )
1339 property
->mnIndex
= -1;
1343 case CTF_SD_MOVE_PROTECT
:
1346 if( (property
->maValue
>>= bProtected
) && !bProtected
)
1347 property
->mnIndex
= -1;
1350 case CTF_SD_SIZE_PROTECT
:
1353 if( (property
->maValue
>>= bProtected
) && !bProtected
)
1354 property
->mnIndex
= -1;
1357 case CTF_CAPTION_ISESCREL
: pCaptionIsEscRel
= property
; break;
1358 case CTF_CAPTION_ESCREL
: pCaptionEscRel
= property
; break;
1359 case CTF_CAPTION_ESCABS
: pCaptionEscAbs
= property
; break;
1360 case CTF_TEXT_CLIP11
: pClip11State
= property
; break;
1361 case CTF_TEXT_CLIP
: pClipState
= property
; break;
1365 // check for duplicate writing mode
1366 if( pShapeWritingMode
&& (pTextWritingMode
|| pControlWritingMode
) )
1368 if( pTextWritingMode
)
1369 pTextWritingMode
->mnIndex
= -1;
1370 if( pControlWritingMode
)
1371 pControlWritingMode
->mnIndex
= -1;
1373 else if( pTextWritingMode
&& pControlWritingMode
)
1375 pControlWritingMode
->mnIndex
= -1;
1378 // do not export visual area for internal ole objects
1379 if( pOLEIsInternal
)
1382 if( (pOLEIsInternal
->maValue
>>= bInternal
) && !bInternal
)
1386 const OUString
sVisibleArea( "VisibleArea" );
1387 awt::Rectangle aRect
;
1388 if( rPropSet
->getPropertyValue( sVisibleArea
) >>= aRect
)
1390 if( pOLEVisAreaLeft
)
1392 pOLEVisAreaLeft
->mnIndex
= getPropertySetMapper()->FindEntryIndex( CTF_SD_OLE_VIS_AREA_IMPORT_LEFT
);
1393 pOLEVisAreaLeft
->maValue
<<= aRect
;
1395 if( pOLEVisAreaTop
)
1397 pOLEVisAreaTop
->mnIndex
= getPropertySetMapper()->FindEntryIndex( CTF_SD_OLE_VIS_AREA_IMPORT_TOP
);
1398 pOLEVisAreaTop
->maValue
<<= aRect
;
1400 if( pOLEVisAreaWidth
)
1402 pOLEVisAreaWidth
->mnIndex
= getPropertySetMapper()->FindEntryIndex( CTF_SD_OLE_VIS_AREA_IMPORT_WIDTH
);
1403 pOLEVisAreaWidth
->maValue
<<= aRect
;
1405 if( pOLEVisAreaHeight
)
1407 pOLEVisAreaHeight
->mnIndex
= getPropertySetMapper()->FindEntryIndex( CTF_SD_OLE_VIS_AREA_IMPORT_HEIGHT
);
1408 pOLEVisAreaHeight
->maValue
<<= aRect
;
1412 catch( uno::Exception
& )
1418 if( pOLEVisAreaLeft
) pOLEVisAreaLeft
->mnIndex
= -1;
1419 if( pOLEVisAreaTop
) pOLEVisAreaTop
->mnIndex
= -1;
1420 if( pOLEVisAreaWidth
) pOLEVisAreaWidth
->mnIndex
= -1;
1421 if( pOLEVisAreaHeight
) pOLEVisAreaHeight
->mnIndex
= -1;
1424 pOLEIsInternal
->mnIndex
= -1;
1427 if( pTextAnimationBlinking
&& pTextAnimationKind
)
1429 drawing::TextAnimationKind eKind
;
1430 if( (pTextAnimationKind
->maValue
>>= eKind
) && eKind
!= drawing::TextAnimationKind_BLINK
)
1432 pTextAnimationBlinking
->mnIndex
= -1;
1436 pTextAnimationKind
->mnIndex
= -1;
1440 if( pRepeatOffsetX
&& pRepeatOffsetY
)
1442 sal_Int32 nOffset
= 0;
1443 if( ( pRepeatOffsetX
->maValue
>>= nOffset
) && ( nOffset
== 0 ) )
1444 pRepeatOffsetX
->mnIndex
= -1;
1446 pRepeatOffsetY
->mnIndex
= -1;
1452 sal_Int32 nStyle
= 0;
1454 if(pFontWorkStyle
->maValue
>>= nStyle
)
1456 if(/*XFT_NONE*/4 == nStyle
)
1458 pFontWorkStyle
->mnIndex
= -1;
1460 pFontWorkAdjust
->mnIndex
= -1;
1461 if(pFontWorkDistance
)
1462 pFontWorkDistance
->mnIndex
= -1;
1464 pFontWorkStart
->mnIndex
= -1;
1466 pFontWorkMirror
->mnIndex
= -1;
1467 if(pFontWorkOutline
)
1468 pFontWorkOutline
->mnIndex
= -1;
1470 pFontWorkShadow
->mnIndex
= -1;
1471 if(pFontWorkShadowColor
)
1472 pFontWorkShadowColor
->mnIndex
= -1;
1473 if(pFontWorkShadowOffsetx
)
1474 pFontWorkShadowOffsetx
->mnIndex
= -1;
1475 if(pFontWorkShadowOffsety
)
1476 pFontWorkShadowOffsety
->mnIndex
= -1;
1478 pFontWorkForm
->mnIndex
= -1;
1479 if(pFontWorkHideform
)
1480 pFontWorkHideform
->mnIndex
= -1;
1481 if(pFontWorkShadowTransparence
)
1482 pFontWorkShadowTransparence
->mnIndex
= -1;
1487 if( pCaptionIsEscRel
)
1489 bool bIsRel
= false;
1490 pCaptionIsEscRel
->maValue
>>= bIsRel
;
1494 if( pCaptionEscAbs
)
1495 pCaptionEscAbs
->mnIndex
= -1;
1499 if( pCaptionEscRel
)
1500 pCaptionEscRel
->mnIndex
= -1;
1503 pCaptionIsEscRel
->mnIndex
= -1;
1506 if( pClipState
!= NULL
&& pClip11State
!= NULL
)
1507 pClip11State
->mnIndex
= -1;
1509 SvXMLExportPropertyMapper::ContextFilter(bEnableFoFontFamily
, rProperties
, rPropSet
);
1512 void XMLShapeExportPropertyMapper::handleSpecialItem(
1513 SvXMLAttributeList
& rAttrList
,
1514 const XMLPropertyState
& rProperty
,
1515 const SvXMLUnitConverter
& rUnitConverter
,
1516 const SvXMLNamespaceMap
& rNamespaceMap
,
1517 const ::std::vector
< XMLPropertyState
> *pProperties
,
1518 sal_uInt32 nIdx
) const
1520 switch( getPropertySetMapper()->GetEntryContextId( rProperty
.mnIndex
) )
1522 case CTF_SD_CONTROL_SHAPE_DATA_STYLE
:
1523 // not to be handled by the base class
1527 SvXMLExportPropertyMapper::handleSpecialItem( rAttrList
, rProperty
, rUnitConverter
, rNamespaceMap
, pProperties
, nIdx
);
1532 void XMLShapeExportPropertyMapper::handleElementItem(
1533 SvXMLExport
& rExport
,
1534 const XMLPropertyState
& rProperty
,
1535 SvXmlExportFlags nFlags
,
1536 const ::std::vector
< XMLPropertyState
> *pProperties
,
1537 sal_uInt32 nIdx
) const
1539 switch( getPropertySetMapper()->GetEntryContextId( rProperty
.mnIndex
) )
1541 case CTF_NUMBERINGRULES
:
1543 // only export list-styles as elements in styles section
1544 if( !mbIsInAutoStyles
)
1546 uno::Reference
< container::XIndexReplace
> xNumRule( rProperty
.maValue
, uno::UNO_QUERY
);
1548 const_cast<XMLShapeExportPropertyMapper
*>(this)->maNumRuleExp
.exportNumberingRule(GetStyleName(), false, xNumRule
);
1553 SvXMLExportPropertyMapper::handleElementItem( rExport
, rProperty
, nFlags
, pProperties
, nIdx
);
1558 XMLPageExportPropertyMapper::XMLPageExportPropertyMapper( const rtl::Reference
< XMLPropertySetMapper
>& rMapper
, SvXMLExport
& rExport
) :
1559 SvXMLExportPropertyMapper( rMapper
),
1564 XMLPageExportPropertyMapper::~XMLPageExportPropertyMapper()
1568 void XMLPageExportPropertyMapper::ContextFilter(
1569 bool bEnableFoFontFamily
,
1570 std::vector
< XMLPropertyState
>& rProperties
,
1571 uno::Reference
< beans::XPropertySet
> rPropSet
) const
1573 XMLPropertyState
* pRepeatOffsetX
= NULL
;
1574 XMLPropertyState
* pRepeatOffsetY
= NULL
;
1575 XMLPropertyState
* pTransType
= NULL
;
1576 XMLPropertyState
* pTransDuration
= NULL
;
1577 XMLPropertyState
* pDateTimeUpdate
= NULL
;
1578 XMLPropertyState
* pDateTimeFormat
= NULL
;
1579 XMLPropertyState
* pTransitionFadeColor
= NULL
;
1581 sal_Int16 nTransitionType
= 0;
1583 // filter properties
1584 for( std::vector
< XMLPropertyState
>::iterator aIter
= rProperties
.begin();
1585 aIter
!= rProperties
.end();
1588 XMLPropertyState
*property
= &(*aIter
);
1589 if( property
->mnIndex
== -1 )
1592 // find properties with context
1593 // to prevent writing this property set mnIndex member to -1
1594 switch( getPropertySetMapper()->GetEntryContextId( property
->mnIndex
))
1597 case CTF_REPEAT_OFFSET_X
:
1598 pRepeatOffsetX
= property
;
1601 case CTF_REPEAT_OFFSET_Y
:
1602 pRepeatOffsetY
= property
;
1604 case CTF_PAGE_TRANS_TYPE
:
1605 pTransType
= property
;
1607 case CTF_PAGE_TRANS_STYLE
:
1608 if( mrExport
.getExportFlags() & SvXMLExportFlags::OASIS
)
1609 (*property
).mnIndex
= -1;
1611 case CTF_PAGE_TRANSITION_TYPE
:
1613 if( (!(mrExport
.getExportFlags() & SvXMLExportFlags::OASIS
)) ||
1614 (((*property
).maValue
>>= nTransitionType
) && (nTransitionType
== 0)) )
1615 (*property
).mnIndex
= -1;
1618 case CTF_PAGE_TRANSITION_SUBTYPE
:
1620 sal_Int16 nTransitionSubtype
= sal_Int16();
1621 if( (!(mrExport
.getExportFlags() & SvXMLExportFlags::OASIS
)) ||
1622 (((*property
).maValue
>>= nTransitionSubtype
) && (nTransitionSubtype
== 0)) )
1623 (*property
).mnIndex
= -1;
1627 case CTF_PAGE_TRANSITION_DIRECTION
:
1630 if( (!(mrExport
.getExportFlags() & SvXMLExportFlags::OASIS
)) ||
1631 (((*property
).maValue
>>= bDirection
) && bDirection
) )
1632 (*property
).mnIndex
= -1;
1635 case CTF_PAGE_TRANSITION_FADECOLOR
:
1636 if( (!(mrExport
.getExportFlags() & SvXMLExportFlags::OASIS
)) )
1637 (*property
).mnIndex
= -1;
1639 pTransitionFadeColor
= property
;
1641 case CTF_PAGE_TRANS_SPEED
:
1643 presentation::AnimationSpeed aEnum
;
1644 if( ((*property
).maValue
>>= aEnum
) && aEnum
== presentation::AnimationSpeed_MEDIUM
)
1645 (*property
).mnIndex
= -1;
1648 case CTF_PAGE_VISIBLE
:
1650 bool bVisible
= false;
1651 (*property
).maValue
>>= bVisible
;
1653 (*property
).mnIndex
= -1;
1656 case CTF_PAGE_TRANS_DURATION
:
1657 pTransDuration
= property
;
1659 case CTF_HEADER_TEXT
:
1660 case CTF_FOOTER_TEXT
:
1661 case CTF_DATE_TIME_TEXT
:
1664 (*property
).maValue
>>= aValue
;
1665 if( aValue
.isEmpty() )
1666 (*property
).mnIndex
= -1;
1670 case CTF_DATE_TIME_UPDATE
:
1671 pDateTimeUpdate
= property
;
1674 case CTF_DATE_TIME_FORMAT
:
1675 pDateTimeFormat
= property
;
1680 if( pTransitionFadeColor
&& nTransitionType
!= ::com::sun::star::animations::TransitionType::FADE
)
1681 pTransitionFadeColor
->mnIndex
= -1;
1683 if( pDateTimeFormat
&& pDateTimeUpdate
)
1685 bool bIsFixed
= false;
1686 pDateTimeUpdate
->maValue
>>= bIsFixed
;
1688 pDateTimeFormat
->mnIndex
= -1;
1691 if( pRepeatOffsetX
&& pRepeatOffsetY
)
1693 sal_Int32 nOffset
= 0;
1694 if( ( pRepeatOffsetX
->maValue
>>= nOffset
) && ( nOffset
== 0 ) )
1695 pRepeatOffsetX
->mnIndex
= -1;
1697 pRepeatOffsetY
->mnIndex
= -1;
1700 if( pTransType
&& pTransDuration
)
1702 sal_Int32 nChange
= 0;
1703 pTransType
->maValue
>>= nChange
;
1705 // only export duration for automatic
1707 pTransDuration
->mnIndex
= -1;
1709 // do not export default transition change
1711 pTransType
->mnIndex
= -1;
1714 SvXMLExportPropertyMapper::ContextFilter(bEnableFoFontFamily
, rProperties
, rPropSet
);
1717 void XMLPageExportPropertyMapper::handleElementItem(
1718 SvXMLExport
& rExport
,
1719 const XMLPropertyState
& rProperty
,
1720 SvXmlExportFlags nFlags
,
1721 const ::std::vector
< XMLPropertyState
> *pProperties
,
1722 sal_uInt32 nIdx
) const
1724 switch( getPropertySetMapper()->GetEntryContextId( rProperty
.mnIndex
) )
1726 case CTF_PAGE_SOUND_URL
:
1729 if( (rProperty
.maValue
>>= aSoundURL
) && !aSoundURL
.isEmpty() )
1731 mrExport
.AddAttribute(XML_NAMESPACE_XLINK
, XML_HREF
, mrExport
.GetRelativeReference(aSoundURL
) );
1732 mrExport
.AddAttribute( XML_NAMESPACE_XLINK
, XML_TYPE
, XML_SIMPLE
);
1733 mrExport
.AddAttribute( XML_NAMESPACE_XLINK
, XML_SHOW
, XML_NEW
);
1734 mrExport
.AddAttribute( XML_NAMESPACE_XLINK
, XML_ACTUATE
, XML_ONREQUEST
);
1735 SvXMLElementExport
aElem( mrExport
, XML_NAMESPACE_PRESENTATION
, XML_SOUND
, true, true );
1740 SvXMLExportPropertyMapper::handleElementItem( rExport
, rProperty
, nFlags
, pProperties
, nIdx
);
1745 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */