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/presentation/AnimationSpeed.hpp>
27 #include <com/sun/star/presentation/FadeEffect.hpp>
29 #include <com/sun/star/text/WritingMode.hpp>
30 #include <com/sun/star/text/WritingMode2.hpp>
32 #include <xmloff/EnumPropertyHdl.hxx>
33 #include <xmloff/NamedBoolPropertyHdl.hxx>
34 #include <WordWrapPropertyHdl.hxx>
35 #include <enummaps.hxx>
36 #include "numithdl.hxx"
37 #include <XMLBitmapRepeatOffsetPropertyHandler.hxx>
38 #include <XMLFillBitmapSizePropertyHandler.hxx>
39 #include <XMLBitmapLogicalSizePropertyHandler.hxx>
40 #include <com/sun/star/drawing/TextAnimationKind.hpp>
41 #include <com/sun/star/drawing/TextAnimationDirection.hpp>
42 #include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
43 #include <com/sun/star/drawing/TextVerticalAdjust.hpp>
44 #include <com/sun/star/drawing/TextFitToSizeType.hpp>
45 #include <com/sun/star/drawing/MeasureTextHorzPos.hpp>
46 #include <com/sun/star/drawing/MeasureTextVertPos.hpp>
47 #include <xmloff/controlpropertyhdl.hxx>
48 #include <xmloff/xmltoken.hxx>
49 #include "sdpropls.hxx"
50 #include <propimp0.hxx>
51 #include <xmloff/xmlexp.hxx>
52 #include <xmloff/xmlnamespace.hxx>
53 #include <com/sun/star/drawing/NormalsKind.hpp>
54 #include <com/sun/star/drawing/TextureProjectionMode.hpp>
55 #include <com/sun/star/drawing/TextureKind2.hpp>
56 #include <com/sun/star/drawing/TextureMode.hpp>
57 #include <com/sun/star/beans/XPropertySet.hpp>
58 #include <xmloff/txtprmap.hxx>
59 #include <XMLClipPropertyHandler.hxx>
60 #include <XMLIsPercentagePropertyHandler.hxx>
61 #include <XMLPercentOrMeasurePropertyHandler.hxx>
62 #include <XMLTextColumnsPropertyHandler.hxx>
63 #include <xmloff/XMLComplexColorHandler.hxx>
64 #include <animations.hxx>
65 #include <sax/tools/converter.hxx>
66 #include <xmlsdtypes.hxx>
67 #include <xmlprop.hxx>
68 #include <xmlbahdl.hxx>
72 using ::com::sun::star::uno::Any
;
74 using namespace ::com::sun::star
;
75 using namespace ::xmloff::token
;
77 #define MAP_(name,prefix,token,type,context) { name, prefix, token, type, context, SvtSaveOptions::ODFSVER_010, false }
78 #define MAPV_(name,prefix,token,type,context,version) { name, prefix, token, type, context, version, false }
79 #define GMAP(name,prefix,token,type,context) MAP_(name,prefix,token,type|XML_TYPE_PROP_GRAPHIC,context)
80 #define GMAP_D(name,prefix,token,type,context) MAP_(name,prefix,token,type|XML_TYPE_PROP_GRAPHIC|MID_FLAG_DEFAULT_ITEM_EXPORT,context)
81 #define GMAPV(name,prefix,token,type,context,version) MAPV_(name,prefix,token,type|XML_TYPE_PROP_GRAPHIC,context,version)
82 #define DPMAP(name,prefix,token,type,context) MAP_(name,prefix,token,type|XML_TYPE_PROP_DRAWING_PAGE,context)
83 #define TMAP(name,prefix,token,type,context) MAP_(name,prefix,token,type|XML_TYPE_PROP_TEXT,context)
84 #define TMAPV(name,prefix,token,type,context,version) MAPV_(name,prefix,token,type|XML_TYPE_PROP_TEXT,context,version)
85 #define PMAP(name,prefix,token,type,context) MAP_(name,prefix,token,type|XML_TYPE_PROP_PARAGRAPH,context)
86 #define MAP_END() { nullptr }
88 // entry list for graphic properties
90 const XMLPropertyMapEntry aXMLSDProperties
[] =
92 // this entry must be first! this is needed for XMLShapeImportHelper::CreateExternalShapePropMapper
94 // ^^^though CreateExternalShapePropMapper is gone now, hmm^^^
95 GMAP( PROP_UserDefinedAttributes
, XML_NAMESPACE_TEXT
, XML_XMLNS
, XML_TYPE_ATTRIBUTE_CONTAINER
| MID_FLAG_SPECIAL_ITEM
, 0 ),
98 GMAP( PROP_LineStyle
, XML_NAMESPACE_DRAW
, XML_STROKE
, XML_SD_TYPE_STROKE
, 0 ),
99 GMAP( PROP_LineDashName
, XML_NAMESPACE_DRAW
, XML_STROKE_DASH
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_DASHNAME
),
100 GMAP( PROP_LineWidth
, XML_NAMESPACE_SVG
, XML_STROKE_WIDTH
, XML_TYPE_MEASURE
, 0 ),
101 GMAP_D( PROP_LineColor
, XML_NAMESPACE_SVG
, XML_STROKE_COLOR
, XML_TYPE_COLOR
, 0),
102 GMAPV( PROP_LineComplexColor
, XML_NAMESPACE_LO_EXT
, XML_STROKE_COMPLEX_COLOR
, XML_TYPE_COMPLEX_COLOR
|MID_FLAG_ELEMENT_ITEM
, CTF_COMPLEX_COLOR
, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
103 GMAP( PROP_LineStartName
, XML_NAMESPACE_DRAW
, XML_MARKER_START
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_LINESTARTNAME
),
104 GMAP( PROP_LineStartWidth
, XML_NAMESPACE_DRAW
, XML_MARKER_START_WIDTH
, XML_TYPE_MEASURE
, 0 ),
105 GMAP( PROP_LineStartCenter
, XML_NAMESPACE_DRAW
, XML_MARKER_START_CENTER
, XML_TYPE_BOOL
, 0 ),
106 GMAP( PROP_LineEndName
, XML_NAMESPACE_DRAW
, XML_MARKER_END
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_LINEENDNAME
),
107 GMAP( PROP_LineEndWidth
, XML_NAMESPACE_DRAW
, XML_MARKER_END_WIDTH
, XML_TYPE_MEASURE
, 0 ),
108 GMAP( PROP_LineEndCenter
, XML_NAMESPACE_DRAW
, XML_MARKER_END_CENTER
, XML_TYPE_BOOL
, 0 ),
109 GMAP( PROP_LineTransparence
, XML_NAMESPACE_SVG
, XML_STROKE_OPACITY
, XML_SD_TYPE_OPACITY
, 0 ),
110 GMAP( PROP_LineJoint
, XML_NAMESPACE_DRAW
, XML_STROKE_LINEJOIN
, XML_SD_TYPE_LINEJOIN
, 0 ),
111 GMAP( PROP_LineCap
, XML_NAMESPACE_SVG
, XML_STROKE_LINECAP
, XML_SD_TYPE_LINECAP
, 0 ),
114 GMAP( PROP_FillStyle
, XML_NAMESPACE_DRAW
, XML_FILL
, XML_SD_TYPE_FILLSTYLE
, CTF_FILLSTYLE
),
115 GMAP_D(PROP_FillColor
, XML_NAMESPACE_DRAW
, XML_FILL_COLOR
, XML_TYPE_COLOR
, CTF_FILLCOLOR
),
116 GMAP_D(PROP_FillColor2
, XML_NAMESPACE_DRAW
, XML_SECONDARY_FILL_COLOR
, XML_TYPE_COLOR
, 0),
117 GMAPV( PROP_FillComplexColor
, XML_NAMESPACE_LO_EXT
, XML_FILL_COMPLEX_COLOR
, XML_TYPE_COMPLEX_COLOR
|MID_FLAG_ELEMENT_ITEM
, CTF_COMPLEX_COLOR
, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
118 GMAP( PROP_FillGradientName
, XML_NAMESPACE_DRAW
, XML_FILL_GRADIENT_NAME
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_FILLGRADIENTNAME
),
119 GMAP( PROP_FillGradientStepCount
, XML_NAMESPACE_DRAW
, XML_GRADIENT_STEP_COUNT
, XML_TYPE_NUMBER16
, 0 ),
120 GMAP( PROP_FillHatchName
, XML_NAMESPACE_DRAW
, XML_FILL_HATCH_NAME
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_FILLHATCHNAME
),
121 GMAP( PROP_FillBackground
, XML_NAMESPACE_DRAW
, XML_FILL_HATCH_SOLID
, XML_TYPE_BOOL
, 0 ),
122 GMAPV( PROP_FillUseSlideBackground
, XML_NAMESPACE_LO_EXT
, XML_FILL_USE_SLIDE_BACKGROUND
, XML_TYPE_BOOL
, 0, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
123 GMAP( PROP_FillBitmapName
, XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_NAME
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_FILLBITMAPNAME
),
124 GMAP( PROP_FillTransparence
, XML_NAMESPACE_DRAW
, XML_OPACITY
, XML_TYPE_NEG_PERCENT16
|MID_FLAG_MULTI_PROPERTY
, 0 ), // exists in SW, too
125 GMAP( PROP_FillTransparenceGradientName
, XML_NAMESPACE_DRAW
, XML_OPACITY_NAME
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_FILLTRANSNAME
),
126 GMAP( PROP_FillBitmapSizeX
, XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_WIDTH
, XML_SD_TYPE_FILLBITMAPSIZE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
127 GMAP( PROP_FillBitmapLogicalSize
, XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_WIDTH
, XML_SD_TYPE_LOGICAL_SIZE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
128 GMAP( PROP_FillBitmapSizeY
, XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_HEIGHT
, XML_SD_TYPE_FILLBITMAPSIZE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
129 GMAP( PROP_FillBitmapLogicalSize
, XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_HEIGHT
, XML_SD_TYPE_LOGICAL_SIZE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
130 GMAP( PROP_FillBitmapMode
, XML_NAMESPACE_STYLE
,XML_REPEAT
, XML_SD_TYPE_BITMAP_MODE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
131 GMAP( PROP_FillBitmapPositionOffsetX
, XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_REF_POINT_X
, XML_TYPE_PERCENT
, 0 ),
132 GMAP( PROP_FillBitmapPositionOffsetY
, XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_REF_POINT_Y
, XML_TYPE_PERCENT
, 0 ),
133 GMAP( PROP_FillBitmapRectanglePoint
, XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_REF_POINT
, XML_SD_TYPE_BITMAP_REFPOINT
, 0 ),
134 GMAP( PROP_FillBitmapOffsetX
, XML_NAMESPACE_DRAW
, XML_TILE_REPEAT_OFFSET
, XML_SD_TYPE_BITMAPREPOFFSETX
|MID_FLAG_MULTI_PROPERTY
, CTF_REPEAT_OFFSET_X
),
135 GMAP( PROP_FillBitmapOffsetY
, XML_NAMESPACE_DRAW
, XML_TILE_REPEAT_OFFSET
, XML_SD_TYPE_BITMAPREPOFFSETY
|MID_FLAG_MULTI_PROPERTY
, CTF_REPEAT_OFFSET_Y
),
137 // text frame attributes
138 GMAP( PROP_TextHorizontalAdjust
, XML_NAMESPACE_DRAW
, XML_TEXTAREA_HORIZONTAL_ALIGN
, XML_SD_TYPE_TEXT_ALIGN
, 0 ),
139 GMAP( PROP_TextVerticalAdjust
, XML_NAMESPACE_DRAW
, XML_TEXTAREA_VERTICAL_ALIGN
, XML_SD_TYPE_VERTICAL_ALIGN
, 0 ),
140 GMAP( PROP_TextAutoGrowHeight
, XML_NAMESPACE_DRAW
, XML_AUTO_GROW_HEIGHT
, XML_TYPE_BOOL
, 0 ),
141 GMAP( PROP_TextAutoGrowWidth
, XML_NAMESPACE_DRAW
, XML_AUTO_GROW_WIDTH
, XML_TYPE_BOOL
, 0 ),
142 GMAP( PROP_TextFitToSize
, XML_NAMESPACE_DRAW
, XML_FIT_TO_SIZE
, XML_SD_TYPE_FITTOSIZE
|MID_FLAG_MERGE_PROPERTY
, 0),
143 GMAPV( PROP_TextFitToSize
, XML_NAMESPACE_STYLE
, XML_SHRINK_TO_FIT
, XML_SD_TYPE_FITTOSIZE_AUTOFIT
|MID_FLAG_MERGE_PROPERTY
, 0, SvtSaveOptions::ODFSVER_012
),
144 GMAP( PROP_TextContourFrame
, XML_NAMESPACE_DRAW
, XML_FIT_TO_CONTOUR
, XML_TYPE_BOOL
, 0 ),
145 GMAP( PROP_TextMaximumFrameHeight
, XML_NAMESPACE_FO
, XML_MAX_HEIGHT
, XML_TYPE_MEASURE
, 0 ),
146 GMAP( PROP_TextMaximumFrameWidth
, XML_NAMESPACE_FO
, XML_MAX_WIDTH
, XML_TYPE_MEASURE
, 0 ),
147 GMAP( PROP_TextMinimumFrameHeight
, XML_NAMESPACE_FO
, XML_MIN_HEIGHT
, XML_TYPE_MEASURE
|MID_FLAG_MULTI_PROPERTY
, 0 ), // exists in SW, too
148 GMAP( PROP_TextMinimumFrameWidth
, XML_NAMESPACE_FO
, XML_MIN_WIDTH
, XML_TYPE_MEASURE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
149 GMAP( PROP_TextUpperDistance
, XML_NAMESPACE_FO
, XML_PADDING_TOP
, XML_TYPE_MEASURE
|MID_FLAG_MULTI_PROPERTY
, 0 ), // exists in SW, too
150 GMAP( PROP_TextLowerDistance
, XML_NAMESPACE_FO
, XML_PADDING_BOTTOM
, XML_TYPE_MEASURE
|MID_FLAG_MULTI_PROPERTY
, 0 ), // exists in SW, too
151 GMAP( PROP_TextLeftDistance
, XML_NAMESPACE_FO
, XML_PADDING_LEFT
, XML_TYPE_MEASURE
|MID_FLAG_MULTI_PROPERTY
, 0 ), // exists in SW, too
152 GMAP( PROP_TextRightDistance
, XML_NAMESPACE_FO
, XML_PADDING_RIGHT
, XML_TYPE_MEASURE
|MID_FLAG_MULTI_PROPERTY
, 0 ), // exists in SW, too
153 PMAP( PROP_TextWritingMode
, XML_NAMESPACE_STYLE
,XML_WRITING_MODE
, XML_SD_TYPE_WRITINGMODE
|MID_FLAG_MULTI_PROPERTY
, CTF_WRITINGMODE
),
154 GMAP( PROP_NumberingRules
, XML_NAMESPACE_TEXT
, XML_LIST_STYLE
, XML_SD_TYPE_NUMBULLET
|MID_FLAG_ELEMENT_ITEM
, CTF_NUMBERINGRULES
),
155 GMAP( PROP_NumberingRules
, XML_NAMESPACE_TEXT
, XML_LIST_STYLE_NAME
, XML_TYPE_STRING
, CTF_SD_NUMBERINGRULES_NAME
),
156 GMAP( PROP_TextWordWrap
, XML_NAMESPACE_FO
, XML_WRAP_OPTION
, XML_TYPE_WRAP_OPTION
, 0 ),
157 GMAP( PROP_TextChainNextName
, XML_NAMESPACE_DRAW
, XML_CHAIN_NEXT_NAME
, XML_TYPE_STRING
, 0 ),
158 GMAP( PROP_TextClipVerticalOverflow
, XML_NAMESPACE_STYLE
, XML_OVERFLOW_BEHAVIOR
, XML_TYPE_TEXT_OVERFLOW_BEHAVIOR
, 0 ),
160 GMAP( PROP_TextColumns
, XML_NAMESPACE_STYLE
, XML_COLUMNS
, XML_TYPE_TEXT_COLUMNS
|MID_FLAG_ELEMENT_ITEM
, CTF_TEXTCOLUMNS
),
163 GMAP( PROP_Shadow
, XML_NAMESPACE_DRAW
, XML_SHADOW
, XML_SD_TYPE_VISIBLE_HIDDEN
, 0 ),
164 GMAP( PROP_ShadowXDistance
, XML_NAMESPACE_DRAW
, XML_SHADOW_OFFSET_X
, XML_TYPE_MEASURE
, 0 ),
165 GMAP( PROP_ShadowYDistance
, XML_NAMESPACE_DRAW
, XML_SHADOW_OFFSET_Y
, XML_TYPE_MEASURE
, 0 ),
166 GMAP( PROP_ShadowColor
, XML_NAMESPACE_DRAW
, XML_SHADOW_COLOR
, XML_TYPE_COLOR
, 0 ),
167 GMAP( PROP_ShadowTransparence
, XML_NAMESPACE_DRAW
, XML_SHADOW_OPACITY
, XML_TYPE_NEG_PERCENT
, 0 ),
168 GMAPV( PROP_ShadowBlur
, XML_NAMESPACE_LO_EXT
, XML_SHADOW_BLUR
, XML_TYPE_MEASURE
, 0, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
171 GMAPV( PROP_GlowEffectRadius
, XML_NAMESPACE_LO_EXT
, XML_GLOW_RADIUS
, XML_TYPE_MEASURE
, 0, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
172 GMAPV( PROP_GlowEffectColor
, XML_NAMESPACE_LO_EXT
, XML_GLOW_COLOR
, XML_TYPE_COLOR
, 0, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
173 GMAPV( PROP_GlowEffectTransparency
, XML_NAMESPACE_LO_EXT
, XML_GLOW_TRANSPARENCY
, XML_TYPE_PERCENT16
, 0, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
175 // soft edge attributes
176 GMAPV( PROP_SoftEdgeRadius
, XML_NAMESPACE_LO_EXT
, XML_SOFTEDGE_RADIUS
, XML_TYPE_MEASURE
, 0, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
178 // glow text attributes
179 TMAPV( PROP_GlowTextEffectRadius
, XML_NAMESPACE_LO_EXT
, XML_GLOW_TEXT_RADIUS
, XML_TYPE_MEASURE
, 0, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
180 TMAPV( PROP_GlowTextEffectColor
, XML_NAMESPACE_LO_EXT
, XML_GLOW_TEXT_COLOR
, XML_TYPE_COLOR
, 0, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
181 TMAPV( PROP_GlowTextEffectTransparency
, XML_NAMESPACE_LO_EXT
, XML_GLOW_TEXT_TRANSPARENCY
, XML_TYPE_PERCENT16
, 0, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
183 // graphic attributes
184 GMAP( PROP_GraphicColorMode
, XML_NAMESPACE_DRAW
, XML_COLOR_MODE
, XML_TYPE_COLOR_MODE
, 0 ), // exists in SW, too, with same property name
185 GMAP( PROP_AdjustLuminance
, XML_NAMESPACE_DRAW
, XML_LUMINANCE
, XML_TYPE_PERCENT16
, 0 ), // signed? exists in SW, too, with same property name
186 GMAP( PROP_AdjustContrast
, XML_NAMESPACE_DRAW
, XML_CONTRAST
, XML_TYPE_PERCENT16
, 0 ), // signed? exists in SW, too, with same property name
187 GMAP( PROP_Gamma
, XML_NAMESPACE_DRAW
, XML_GAMMA
, XML_TYPE_DOUBLE_PERCENT
, 0 ), // signed? exists in SW, too, with same property name
188 GMAP( PROP_AdjustRed
, XML_NAMESPACE_DRAW
, XML_RED
, XML_TYPE_PERCENT16
, 0 ), // signed? exists in SW, too, with same property name
189 GMAP( PROP_AdjustGreen
, XML_NAMESPACE_DRAW
, XML_GREEN
, XML_TYPE_PERCENT16
, 0 ), // signed? exists in SW, too, with same property name
190 GMAP( PROP_AdjustBlue
, XML_NAMESPACE_DRAW
, XML_BLUE
, XML_TYPE_PERCENT16
, 0 ), // signed? exists in SW, too, with same property name
191 GMAPV( PROP_GraphicCrop
, XML_NAMESPACE_FO
, XML_CLIP
, XML_TYPE_TEXT_CLIP
, CTF_TEXT_CLIP
, SvtSaveOptions::ODFSVER_012
), // exists in SW, too, with same property name
192 GMAP( PROP_GraphicCrop
, XML_NAMESPACE_FO
, XML_CLIP
, XML_TYPE_TEXT_CLIP11
, CTF_TEXT_CLIP11
), // exists in SW, too, with same property name
193 GMAP( PROP_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#
194 GMAP( PROP_IsMirrored
, XML_NAMESPACE_STYLE
, XML_MIRROR
, XML_TYPE_SD_MIRROR
|MID_FLAG_MULTI_PROPERTY
, 0 ), // exists in SW, too // #i40214#
196 // animation text attributes
197 TMAP( PROP_TextAnimationKind
, XML_NAMESPACE_STYLE
,XML_TEXT_BLINKING
, XML_TYPE_TEXT_ANIMATION_BLINKING
, CTF_TEXTANIMATION_BLINKING
),
198 GMAP( PROP_TextAnimationKind
, XML_NAMESPACE_TEXT
, XML_ANIMATION
, XML_TYPE_TEXT_ANIMATION
, CTF_TEXTANIMATION_KIND
),
199 GMAP( PROP_TextAnimationDirection
, XML_NAMESPACE_TEXT
, XML_ANIMATION_DIRECTION
, XML_TYPE_TEXT_ANIMATION_DIRECTION
, 0 ),
200 GMAP( PROP_TextAnimationStartInside
, XML_NAMESPACE_TEXT
, XML_ANIMATION_START_INSIDE
, XML_TYPE_BOOL
, 0 ),
201 GMAP( PROP_TextAnimationStopInside
, XML_NAMESPACE_TEXT
, XML_ANIMATION_STOP_INSIDE
, XML_TYPE_BOOL
, 0 ),
202 GMAP( PROP_TextAnimationCount
, XML_NAMESPACE_TEXT
, XML_ANIMATION_REPEAT
, XML_TYPE_NUMBER16
, 0 ),
203 GMAP( PROP_TextAnimationDelay
, XML_NAMESPACE_TEXT
, XML_ANIMATION_DELAY
, XML_TYPE_DURATION16_MS
, 0 ),
204 GMAP( PROP_TextAnimationAmount
, XML_NAMESPACE_TEXT
, XML_ANIMATION_STEPS
, XML_TYPE_TEXT_ANIMATION_STEPS
, 0 ),
206 // connector attributes
207 GMAP( PROP_EdgeNode1HorzDist
, XML_NAMESPACE_DRAW
, XML_START_LINE_SPACING_HORIZONTAL
, XML_TYPE_MEASURE
, 0 ),
208 GMAP( PROP_EdgeNode1VertDist
, XML_NAMESPACE_DRAW
, XML_START_LINE_SPACING_VERTICAL
, XML_TYPE_MEASURE
, 0 ),
209 GMAP( PROP_EdgeNode2HorzDist
, XML_NAMESPACE_DRAW
, XML_END_LINE_SPACING_HORIZONTAL
, XML_TYPE_MEASURE
, 0 ),
210 GMAP( PROP_EdgeNode2VertDist
, XML_NAMESPACE_DRAW
, XML_END_LINE_SPACING_VERTICAL
, XML_TYPE_MEASURE
, 0 ),
212 // measure attributes
213 GMAP( PROP_MeasureLineDistance
, XML_NAMESPACE_DRAW
, XML_LINE_DISTANCE
, XML_TYPE_MEASURE
, 0 ),
214 GMAP( PROP_MeasureHelpLineOverhang
, XML_NAMESPACE_DRAW
, XML_GUIDE_OVERHANG
, XML_TYPE_MEASURE
, 0 ),
215 GMAP( PROP_MeasureHelpLineDistance
, XML_NAMESPACE_DRAW
, XML_GUIDE_DISTANCE
, XML_TYPE_MEASURE
, 0 ),
216 GMAP( PROP_MeasureHelpLine1Length
, XML_NAMESPACE_DRAW
, XML_START_GUIDE
, XML_TYPE_MEASURE
, 0 ),
217 GMAP( PROP_MeasureHelpLine2Length
, XML_NAMESPACE_DRAW
, XML_END_GUIDE
, XML_TYPE_MEASURE
, 0 ),
218 GMAP( PROP_MeasureTextHorizontalPosition
, XML_NAMESPACE_DRAW
, XML_MEASURE_ALIGN
, XML_SD_TYPE_MEASURE_HALIGN
, 0 ),
219 GMAP( PROP_MeasureTextVerticalPosition
, XML_NAMESPACE_DRAW
, XML_MEASURE_VERTICAL_ALIGN
, XML_SD_TYPE_MEASURE_VALIGN
, 0 ),
220 GMAP( PROP_MeasureUnit
, XML_NAMESPACE_DRAW
, XML_UNIT
, XML_SD_TYPE_MEASURE_UNIT
, 0 ),
221 GMAP( PROP_MeasureShowUnit
, XML_NAMESPACE_DRAW
, XML_SHOW_UNIT
, XML_TYPE_BOOL
, 0 ),
222 GMAP( PROP_MeasureBelowReferenceEdge
, XML_NAMESPACE_DRAW
, XML_PLACING
, XML_SD_TYPE_MEASURE_PLACING
, 0 ),
223 GMAP( PROP_MeasureTextRotate90
, XML_NAMESPACE_DRAW
, XML_PARALLEL
, XML_TYPE_BOOL
, 0 ),
224 GMAP( PROP_MeasureDecimalPlaces
, XML_NAMESPACE_DRAW
, XML_DECIMAL_PLACES
, XML_TYPE_NUMBER16
, 0 ),
226 // 3D geometry attributes
227 GMAP( PROP_D3DHorizontalSegments
, XML_NAMESPACE_DR3D
, XML_HORIZONTAL_SEGMENTS
, XML_TYPE_NUMBER
, 0 ),
228 GMAP( PROP_D3DVerticalSegments
, XML_NAMESPACE_DR3D
, XML_VERTICAL_SEGMENTS
, XML_TYPE_NUMBER
, 0 ),
229 GMAP( PROP_D3DPercentDiagonal
, XML_NAMESPACE_DR3D
, XML_EDGE_ROUNDING
, XML_TYPE_PERCENT
, 0 ),
230 GMAP( PROP_D3DBackscale
, XML_NAMESPACE_DR3D
, XML_BACK_SCALE
, XML_TYPE_PERCENT
, 0 ),
231 GMAP( PROP_D3DEndAngle
, XML_NAMESPACE_DR3D
, XML_END_ANGLE
, XML_SD_TYPE_LATHE_ENDANGLE
, 0 ),
232 GMAP( PROP_D3DDepth
, XML_NAMESPACE_DR3D
, XML_DEPTH
, XML_TYPE_MEASURE
, 0 ),
233 GMAP( PROP_D3DDoubleSided
, XML_NAMESPACE_DR3D
, XML_BACKFACE_CULLING
, XML_SD_TYPE_BACKFACE_CULLING
, 0 ),
235 // #107245# New 3D properties which are possible for lathe and extrude 3d objects
236 GMAP( PROP_D3DCloseFront
, XML_NAMESPACE_DR3D
, XML_CLOSE_FRONT
, XML_TYPE_BOOL
, 0 ),
237 GMAP( PROP_D3DCloseBack
, XML_NAMESPACE_DR3D
, XML_CLOSE_BACK
, XML_TYPE_BOOL
, 0 ),
239 // 3D lighting attributes
240 GMAP( PROP_D3DNormalsKind
, XML_NAMESPACE_DR3D
, XML_NORMALS_KIND
, XML_SD_TYPE_NORMALS_KIND
, 0 ),
241 GMAP( PROP_D3DNormalsInvert
, XML_NAMESPACE_DR3D
, XML_NORMALS_DIRECTION
, XML_SD_TYPE_NORMALS_DIRECTION
, 0 ),
243 // 3D texture attributes
244 GMAP( PROP_D3DTextureProjectionX
, XML_NAMESPACE_DR3D
, XML_TEX_GENERATION_MODE_X
, XML_SD_TYPE_TEX_GENERATION_MODE_X
, 0 ),
245 GMAP( PROP_D3DTextureProjectionY
, XML_NAMESPACE_DR3D
, XML_TEX_GENERATION_MODE_Y
, XML_SD_TYPE_TEX_GENERATION_MODE_Y
, 0 ),
246 GMAP( PROP_D3DTextureKind
, XML_NAMESPACE_DR3D
, XML_TEX_KIND
, XML_SD_TYPE_TEX_KIND
, 0 ),
247 GMAP( PROP_D3DTextureMode
, XML_NAMESPACE_DR3D
, XML_TEX_MODE
, XML_SD_TYPE_TEX_MODE
, 0 ),
248 GMAP( PROP_D3DTextureFilter
, XML_NAMESPACE_DR3D
, XML_TEX_FILTER
, XML_SD_TYPE_BACKFACE_CULLING
, 0 ),
250 // 3D material attributes
251 GMAP( PROP_D3DMaterialColor
, XML_NAMESPACE_DR3D
, XML_DIFFUSE_COLOR
, XML_TYPE_COLOR
, 0 ),
252 GMAP( PROP_D3DMaterialEmission
, XML_NAMESPACE_DR3D
, XML_EMISSIVE_COLOR
, XML_TYPE_COLOR
, 0 ),
253 GMAP( PROP_D3DMaterialSpecular
, XML_NAMESPACE_DR3D
, XML_SPECULAR_COLOR
, XML_TYPE_COLOR
, 0 ),
254 GMAP( PROP_D3DMaterialSpecularIntensity
, XML_NAMESPACE_DR3D
, XML_SHININESS
, XML_TYPE_PERCENT
, 0 ),
256 // 3D shadow attributes
257 GMAP( PROP_D3DShadow3D
, XML_NAMESPACE_DR3D
, XML_SHADOW
, XML_SD_TYPE_VISIBLE_HIDDEN
, 0 ),
259 // #FontWork# attributes
260 GMAP( PROP_FontWorkStyle
, XML_NAMESPACE_DRAW
, XML_FONTWORK_STYLE
, XML_SD_TYPE_FONTWORK_STYLE
| MID_FLAG_ELEMENT_ITEM_EXPORT
, CTF_FONTWORK_STYLE
),
261 GMAP( PROP_FontWorkAdjust
, XML_NAMESPACE_DRAW
, XML_FONTWORK_ADJUST
, XML_SD_TYPE_FONTWORK_ADJUST
| MID_FLAG_ELEMENT_ITEM_EXPORT
,CTF_FONTWORK_ADJUST
),
262 GMAP( PROP_FontWorkDistance
, XML_NAMESPACE_DRAW
, XML_FONTWORK_DISTANCE
, XML_TYPE_MEASURE
| MID_FLAG_ELEMENT_ITEM_EXPORT
, CTF_FONTWORK_DISTANCE
),
263 GMAP( PROP_FontWorkStart
, XML_NAMESPACE_DRAW
, XML_FONTWORK_START
, XML_TYPE_MEASURE
| MID_FLAG_ELEMENT_ITEM_EXPORT
, CTF_FONTWORK_START
),
264 GMAP( PROP_FontWorkMirror
, XML_NAMESPACE_DRAW
, XML_FONTWORK_MIRROR
, XML_TYPE_BOOL
| MID_FLAG_ELEMENT_ITEM_EXPORT
, CTF_FONTWORK_MIRROR
),
265 GMAP( PROP_FontWorkOutline
, XML_NAMESPACE_DRAW
, XML_FONTWORK_OUTLINE
, XML_TYPE_BOOL
| MID_FLAG_ELEMENT_ITEM_EXPORT
, CTF_FONTWORK_OUTLINE
),
266 GMAP( PROP_FontWorkShadow
, XML_NAMESPACE_DRAW
, XML_FONTWORK_SHADOW
, XML_SD_TYPE_FONTWORK_SHADOW
| MID_FLAG_ELEMENT_ITEM_EXPORT
,CTF_FONTWORK_SHADOW
),
267 GMAP( PROP_FontWorkShadowColor
, XML_NAMESPACE_DRAW
, XML_FONTWORK_SHADOW_COLOR
, XML_TYPE_COLOR
| MID_FLAG_ELEMENT_ITEM_EXPORT
, CTF_FONTWORK_SHADOWCOLOR
),
268 GMAP( PROP_FontWorkShadowOffsetX
, XML_NAMESPACE_DRAW
, XML_FONTWORK_SHADOW_OFFSET_X
, XML_TYPE_MEASURE
| MID_FLAG_ELEMENT_ITEM_EXPORT
, CTF_FONTWORK_SHADOWOFFSETX
),
269 GMAP( PROP_FontWorkShadowOffsetY
, XML_NAMESPACE_DRAW
, XML_FONTWORK_SHADOW_OFFSET_Y
, XML_TYPE_MEASURE
| MID_FLAG_ELEMENT_ITEM_EXPORT
, CTF_FONTWORK_SHADOWOFFSETY
),
270 GMAP( PROP_FontWorkForm
, XML_NAMESPACE_DRAW
, XML_FONTWORK_FORM
, XML_SD_TYPE_FONTWORK_FORM
| MID_FLAG_ELEMENT_ITEM_EXPORT
, CTF_FONTWORK_FORM
),
271 GMAP( PROP_FontWorkHideForm
, XML_NAMESPACE_DRAW
, XML_FONTWORK_HIDE_FORM
, XML_TYPE_BOOL
| MID_FLAG_ELEMENT_ITEM_EXPORT
, CTF_FONTWORK_HIDEFORM
),
272 GMAP( PROP_FontWorkShadowTransparence
, XML_NAMESPACE_DRAW
, XML_FONTWORK_SHADOW_TRANSPARENCE
, XML_TYPE_PERCENT
| MID_FLAG_ELEMENT_ITEM_EXPORT
, CTF_FONTWORK_SHADOWTRANSPARENCE
),
274 // #FontWork# attributes
275 GMAPV( PROP_FontWorkStyle
, XML_NAMESPACE_DRAW_EXT
, XML_FONTWORK_STYLE
, XML_SD_TYPE_FONTWORK_STYLE
, CTF_FONTWORK_STYLE
, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
276 GMAPV( PROP_FontWorkAdjust
, XML_NAMESPACE_DRAW_EXT
, XML_FONTWORK_ADJUST
, XML_SD_TYPE_FONTWORK_ADJUST
,CTF_FONTWORK_ADJUST
, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
277 GMAPV( PROP_FontWorkDistance
, XML_NAMESPACE_DRAW_EXT
, XML_FONTWORK_DISTANCE
, XML_TYPE_MEASURE
, CTF_FONTWORK_DISTANCE
, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
278 GMAPV( PROP_FontWorkStart
, XML_NAMESPACE_DRAW_EXT
, XML_FONTWORK_START
, XML_TYPE_MEASURE
, CTF_FONTWORK_START
, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
279 GMAPV( PROP_FontWorkMirror
, XML_NAMESPACE_DRAW_EXT
, XML_FONTWORK_MIRROR
, XML_TYPE_BOOL
, CTF_FONTWORK_MIRROR
, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
280 GMAPV( PROP_FontWorkOutline
, XML_NAMESPACE_DRAW_EXT
, XML_FONTWORK_OUTLINE
, XML_TYPE_BOOL
, CTF_FONTWORK_OUTLINE
, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
281 GMAPV( PROP_FontWorkShadow
, XML_NAMESPACE_DRAW_EXT
, XML_FONTWORK_SHADOW
, XML_SD_TYPE_FONTWORK_SHADOW
,CTF_FONTWORK_SHADOW
, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
282 GMAPV( PROP_FontWorkShadowColor
, XML_NAMESPACE_DRAW_EXT
, XML_FONTWORK_SHADOW_COLOR
, XML_TYPE_COLOR
, CTF_FONTWORK_SHADOWCOLOR
, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
283 GMAPV( PROP_FontWorkShadowOffsetX
, XML_NAMESPACE_DRAW_EXT
, XML_FONTWORK_SHADOW_OFFSET_X
, XML_TYPE_MEASURE
, CTF_FONTWORK_SHADOWOFFSETX
, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
284 GMAPV( PROP_FontWorkShadowOffsetY
, XML_NAMESPACE_DRAW_EXT
, XML_FONTWORK_SHADOW_OFFSET_Y
, XML_TYPE_MEASURE
, CTF_FONTWORK_SHADOWOFFSETY
, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
285 GMAPV( PROP_FontWorkForm
, XML_NAMESPACE_DRAW_EXT
, XML_FONTWORK_FORM
, XML_SD_TYPE_FONTWORK_FORM
, CTF_FONTWORK_FORM
, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
286 GMAPV( PROP_FontWorkHideForm
, XML_NAMESPACE_DRAW_EXT
, XML_FONTWORK_HIDE_FORM
, XML_TYPE_BOOL
, CTF_FONTWORK_HIDEFORM
, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
287 GMAPV( PROP_FontWorkShadowTransparence
, XML_NAMESPACE_DRAW_EXT
, XML_FONTWORK_SHADOW_TRANSPARENCE
, XML_TYPE_PERCENT
, CTF_FONTWORK_SHADOWTRANSPARENCE
, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
289 // control attributes (border exists one more time for the text additions of shapes)
290 GMAP( PROP_ControlSymbolColor
, XML_NAMESPACE_DRAW
, XML_SYMBOL_COLOR
, XML_TYPE_COLOR
, 0 ),
291 GMAP( PROP_ControlBackground
, XML_NAMESPACE_FO
, XML_BACKGROUND_COLOR
, XML_TYPE_COLOR
|MID_FLAG_MULTI_PROPERTY
, 0 ),
292 GMAP( PROP_ControlBorder
, XML_NAMESPACE_FO
, XML_BORDER
, XML_SD_TYPE_CONTROL_BORDER
|MID_FLAG_MULTI_PROPERTY
|MID_FLAG_MERGE_ATTRIBUTE
, 0 ),
293 GMAP( PROP_ControlBorderColor
, XML_NAMESPACE_FO
, XML_BORDER
, XML_SD_TYPE_CONTROL_BORDER_COLOR
|MID_FLAG_MULTI_PROPERTY
|MID_FLAG_MERGE_ATTRIBUTE
, 0 ),
294 GMAP( PROP_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
),
295 GMAP( PROP_ControlTextEmphasis
, XML_NAMESPACE_STYLE
,XML_TEXT_EMPHASIZE
, XML_TYPE_CONTROL_TEXT_EMPHASIZE
, 0 ),
296 GMAP( PROP_ImageScaleMode
, XML_NAMESPACE_STYLE
,XML_REPEAT
, XML_SD_TYPE_IMAGE_SCALE_MODE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
297 GMAP( PROP_ControlWritingMode
, XML_NAMESPACE_STYLE
,XML_WRITING_MODE
, XML_TYPE_TEXT_WRITING_MODE_WITH_DEFAULT
|MID_FLAG_MULTI_PROPERTY
, CTF_CONTROLWRITINGMODE
),
299 // special entries for floating frames
300 GMAP( PROP_FrameIsAutoScroll
, XML_NAMESPACE_DRAW
, XML_FRAME_DISPLAY_SCROLLBAR
, XML_TYPE_BOOL
|MID_FLAG_MULTI_PROPERTY
, CTF_FRAME_DISPLAY_SCROLLBAR
),
301 GMAP( PROP_FrameIsBorder
, XML_NAMESPACE_DRAW
, XML_FRAME_DISPLAY_BORDER
, XML_TYPE_BOOL
|MID_FLAG_MULTI_PROPERTY
, CTF_FRAME_DISPLAY_BORDER
),
302 GMAP( PROP_FrameMarginWidth
, XML_NAMESPACE_DRAW
, XML_FRAME_MARGIN_HORIZONTAL
, XML_TYPE_MEASURE_PX
|MID_FLAG_MULTI_PROPERTY
, CTF_FRAME_MARGIN_HORI
),
303 GMAP( PROP_FrameMarginHeight
, XML_NAMESPACE_DRAW
, XML_FRAME_MARGIN_VERTICAL
, XML_TYPE_MEASURE_PX
|MID_FLAG_MULTI_PROPERTY
, CTF_FRAME_MARGIN_VERT
),
304 GMAP( PROP_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
),
305 GMAP( PROP_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
),
306 GMAP( PROP_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
),
307 GMAP( PROP_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
),
308 GMAP( PROP_IsInternal
, XML_NAMESPACE_DRAW
, XML__EMPTY
, XML_TYPE_BUILDIN_CMP_ONLY
, CTF_SD_OLE_ISINTERNAL
),
309 GMAP( PROP_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
),
310 GMAP( PROP_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
),
311 GMAP( PROP_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
),
312 GMAP( PROP_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
),
314 GMAP( PROP_Aspect
, XML_NAMESPACE_DRAW
, XML_DRAW_ASPECT
, XML_TYPE_TEXT_DRAW_ASPECT
|MID_FLAG_MULTI_PROPERTY
, CTF_SD_OLE_ASPECT
),
316 // caption properties
317 GMAP( PROP_CaptionType
, XML_NAMESPACE_DRAW
, XML_CAPTION_TYPE
, XML_SD_TYPE_CAPTION_TYPE
, 0 ),
318 GMAP( PROP_CaptionIsFixedAngle
, XML_NAMESPACE_DRAW
, XML_CAPTION_ANGLE_TYPE
, XML_SD_TYPE_CAPTION_ANGLE_TYPE
, 0 ),
319 GMAP( PROP_CaptionAngle
, XML_NAMESPACE_DRAW
, XML_CAPTION_ANGLE
, XML_TYPE_NUMBER
, 0 ),
320 GMAP( PROP_CaptionGap
, XML_NAMESPACE_DRAW
, XML_CAPTION_GAP
, XML_TYPE_MEASURE
, 0 ),
321 GMAP( PROP_CaptionEscapeDirection
, XML_NAMESPACE_DRAW
, XML_CAPTION_ESCAPE_DIRECTION
, XML_SD_TYPE_CAPTION_ESC_DIR
, 0 ),
322 GMAP( PROP_CaptionIsEscapeRelative
, XML_NAMESPACE_DRAW
, XML_CAPTION_ESCAPE
, XML_SD_TYPE_CAPTION_IS_ESC_REL
|MID_FLAG_MULTI_PROPERTY
, CTF_CAPTION_ISESCREL
),
323 GMAP( PROP_CaptionEscapeRelative
, XML_NAMESPACE_DRAW
, XML_CAPTION_ESCAPE
, XML_SD_TYPE_CAPTION_ESC_REL
|MID_FLAG_MULTI_PROPERTY
, CTF_CAPTION_ESCREL
),
324 GMAP( PROP_CaptionEscapeAbsolute
, XML_NAMESPACE_DRAW
, XML_CAPTION_ESCAPE
, XML_SD_TYPE_CAPTION_ESC_ABS
|MID_FLAG_MULTI_PROPERTY
, CTF_CAPTION_ESCABS
),
325 GMAP( PROP_CaptionLineLength
, XML_NAMESPACE_DRAW
, XML_CAPTION_LINE_LENGTH
, XML_TYPE_MEASURE
, 0 ),
326 GMAP( PROP_CaptionIsFitLineLength
, XML_NAMESPACE_DRAW
, XML_CAPTION_FIT_LINE_LENGTH
, XML_TYPE_BOOL
, 0 ),
328 // misc object properties
329 GMAP( PROP_MoveProtect
, XML_NAMESPACE_STYLE
, XML_PROTECT
, XML_SD_TYPE_MOVE_PROTECT
|MID_FLAG_MULTI_PROPERTY
|MID_FLAG_MERGE_ATTRIBUTE
, CTF_SD_MOVE_PROTECT
),
330 GMAP( PROP_SizeProtect
, XML_NAMESPACE_STYLE
, XML_PROTECT
, XML_SD_TYPE_SIZE_PROTECT
|MID_FLAG_MULTI_PROPERTY
|MID_FLAG_MERGE_ATTRIBUTE
, CTF_SD_SIZE_PROTECT
),
331 GMAP( PROP_WritingMode
, XML_NAMESPACE_STYLE
, XML_WRITING_MODE
, XML_SD_TYPE_WRITINGMODE2
, CTF_WRITINGMODE2
),
332 { PROP_WritingMode
, XML_NAMESPACE_LO_EXT
, XML_WRITING_MODE
, XML_SD_TYPE_WRITINGMODE2
|XML_TYPE_PROP_GRAPHIC
, 0, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
, true},
333 { PROP_Decorative
, XML_NAMESPACE_LO_EXT
, XML_DECORATIVE
, XML_TYPE_BOOL
|XML_TYPE_PROP_GRAPHIC
, 0, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
, false },
338 // entry list for presentation page properties
340 const XMLPropertyMapEntry aXMLSDPresPageProps
[] =
342 DPMAP( PROP_UserDefinedAttributes
, XML_NAMESPACE_TEXT
, XML_XMLNS
, XML_TYPE_ATTRIBUTE_CONTAINER
| MID_FLAG_SPECIAL_ITEM
, 0 ),
344 DPMAP( PROP_Change
, XML_NAMESPACE_PRESENTATION
, XML_TRANSITION_TYPE
, XML_SD_TYPE_PRESPAGE_TYPE
, CTF_PAGE_TRANS_TYPE
),
345 DPMAP( PROP_Effect
, XML_NAMESPACE_PRESENTATION
, XML_TRANSITION_STYLE
, XML_SD_TYPE_PRESPAGE_STYLE
, CTF_PAGE_TRANS_STYLE
),
346 DPMAP( PROP_Speed
, XML_NAMESPACE_PRESENTATION
, XML_TRANSITION_SPEED
, XML_SD_TYPE_PRESPAGE_SPEED
, CTF_PAGE_TRANS_SPEED
),
347 DPMAP( PROP_HighResDuration
, XML_NAMESPACE_PRESENTATION
, XML_DURATION
, XML_SD_TYPE_PRESPAGE_DURATION
, CTF_PAGE_TRANS_DURATION
),
348 DPMAP( PROP_Visible
, XML_NAMESPACE_PRESENTATION
, XML_VISIBILITY
, XML_SD_TYPE_PRESPAGE_VISIBILITY
, CTF_PAGE_VISIBLE
),
349 DPMAP( PROP_Sound
, XML_NAMESPACE_PRESENTATION
, XML_SOUND
, XML_TYPE_STRING
|MID_FLAG_ELEMENT_ITEM
, CTF_PAGE_SOUND_URL
),
350 DPMAP( PROP_BackgroundFullSize
, XML_NAMESPACE_DRAW
, XML_BACKGROUND_SIZE
, XML_SD_TYPE_PRESPAGE_BACKSIZE
, CTF_PAGE_BACKSIZE
),
352 DPMAP( PROP_IsBackgroundVisible
, XML_NAMESPACE_PRESENTATION
, XML_BACKGROUND_VISIBLE
, XML_TYPE_BOOL
, 0 ),
353 DPMAP( PROP_IsBackgroundObjectsVisible
, XML_NAMESPACE_PRESENTATION
, XML_BACKGROUND_OBJECTS_VISIBLE
, XML_TYPE_BOOL
, 0 ),
355 DPMAP( PROP_FillStyle
, XML_NAMESPACE_DRAW
, XML_FILL
, XML_SD_TYPE_FILLSTYLE
, 0 ),
356 DPMAP( PROP_FillColor
, XML_NAMESPACE_DRAW
, XML_FILL_COLOR
, XML_TYPE_COLOR
, 0 ),
357 DPMAP( PROP_FillGradientName
, XML_NAMESPACE_DRAW
, XML_FILL_GRADIENT_NAME
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_FILLGRADIENTNAME
),
358 DPMAP( PROP_FillGradientStepCount
, XML_NAMESPACE_DRAW
, XML_GRADIENT_STEP_COUNT
, XML_TYPE_NUMBER
, 0 ),
359 DPMAP( PROP_FillHatchName
, XML_NAMESPACE_DRAW
, XML_FILL_HATCH_NAME
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_FILLHATCHNAME
),
360 GMAP( PROP_FillBackground
, XML_NAMESPACE_DRAW
, XML_FILL_HATCH_SOLID
, XML_TYPE_BOOL
, 0 ),
361 DPMAP( PROP_FillBitmapName
, XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_NAME
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_FILLBITMAPNAME
),
362 DPMAP( PROP_FillTransparence
, XML_NAMESPACE_DRAW
, XML_OPACITY
, XML_TYPE_NEG_PERCENT
|MID_FLAG_MULTI_PROPERTY
, 0 ),
363 DPMAP( PROP_FillTransparenceGradientName
, XML_NAMESPACE_DRAW
, XML_OPACITY_NAME
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_FILLTRANSNAME
),
364 DPMAP( PROP_FillBitmapSizeX
, XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_WIDTH
, XML_SD_TYPE_FILLBITMAPSIZE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
365 DPMAP( PROP_FillBitmapLogicalSize
, XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_WIDTH
, XML_SD_TYPE_LOGICAL_SIZE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
366 DPMAP( PROP_FillBitmapSizeY
, XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_HEIGHT
, XML_SD_TYPE_FILLBITMAPSIZE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
367 DPMAP( PROP_FillBitmapLogicalSize
, XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_HEIGHT
, XML_SD_TYPE_LOGICAL_SIZE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
368 DPMAP( PROP_FillBitmapMode
, XML_NAMESPACE_STYLE
,XML_REPEAT
, XML_SD_TYPE_BITMAP_MODE
, 0 ),
369 DPMAP( PROP_FillBitmapPositionOffsetX
, XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_REF_POINT_X
, XML_TYPE_PERCENT
, 0 ),
370 DPMAP( PROP_FillBitmapPositionOffsetY
, XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_REF_POINT_Y
, XML_TYPE_PERCENT
, 0 ),
371 DPMAP( PROP_FillBitmapRectanglePoint
, XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_REF_POINT
, XML_SD_TYPE_BITMAP_REFPOINT
, 0 ),
372 DPMAP( PROP_FillBitmapOffsetX
, XML_NAMESPACE_DRAW
, XML_TILE_REPEAT_OFFSET
, XML_SD_TYPE_BITMAPREPOFFSETX
|MID_FLAG_MULTI_PROPERTY
, CTF_REPEAT_OFFSET_X
),
373 DPMAP( PROP_FillBitmapOffsetY
, XML_NAMESPACE_DRAW
, XML_TILE_REPEAT_OFFSET
, XML_SD_TYPE_BITMAPREPOFFSETY
|MID_FLAG_MULTI_PROPERTY
, CTF_REPEAT_OFFSET_Y
),
375 DPMAP( PROP_IsHeaderVisible
, XML_NAMESPACE_PRESENTATION
, XML_DISPLAY_HEADER
, XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE
, CTF_HEADER_VISIBLE
),
376 DPMAP( PROP_IsFooterVisible
, XML_NAMESPACE_PRESENTATION
, XML_DISPLAY_FOOTER
, XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE
, CTF_FOOTER_VISIBLE
),
377 DPMAP( PROP_IsPageNumberVisible
, XML_NAMESPACE_PRESENTATION
, XML_DISPLAY_PAGE_NUMBER
, XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE
, CTF_PAGE_NUMBER_VISIBLE
),
378 DPMAP( PROP_IsDateTimeVisible
, XML_NAMESPACE_PRESENTATION
, XML_DISPLAY_DATE_TIME
, XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE
, CTF_DATE_TIME_VISIBLE
),
380 DPMAP( PROP_TransitionType
, XML_NAMESPACE_SMIL
, XML_TYPE
, XML_SD_TYPE_TRANSITION_TYPE
, CTF_PAGE_TRANSITION_TYPE
),
381 DPMAP( PROP_TransitionSubtype
, XML_NAMESPACE_SMIL
, XML_SUBTYPE
, XML_SD_TYPE_TRANSTIION_SUBTYPE
, CTF_PAGE_TRANSITION_SUBTYPE
),
382 DPMAP( PROP_TransitionDirection
, XML_NAMESPACE_SMIL
, XML_DIRECTION
, XML_SD_TYPE_TRANSTIION_DIRECTION
, CTF_PAGE_TRANSITION_DIRECTION
),
383 DPMAP( PROP_TransitionFadeColor
, XML_NAMESPACE_SMIL
, XML_FADECOLOR
, XML_TYPE_COLOR
, CTF_PAGE_TRANSITION_FADECOLOR
),
387 /** contains the attribute to property mapping for a drawing layer table
388 WARNING: if attributes are added, SdXMLTableShapeContext::processAttribute needs to be updated!
390 const XMLPropertyMapEntry aXMLTableShapeAttributes
[] =
392 MAP_( PROP_UseFirstRowStyle
, XML_NAMESPACE_TABLE
, XML_USE_FIRST_ROW_STYLES
, XML_TYPE_BOOL
, 0 ),
393 MAP_( PROP_UseLastRowStyle
, XML_NAMESPACE_TABLE
, XML_USE_LAST_ROW_STYLES
, XML_TYPE_BOOL
, 0 ),
394 MAP_( PROP_UseFirstColumnStyle
, XML_NAMESPACE_TABLE
, XML_USE_FIRST_COLUMN_STYLES
, XML_TYPE_BOOL
, 0 ),
395 MAP_( PROP_UseLastColumnStyle
, XML_NAMESPACE_TABLE
, XML_USE_LAST_COLUMN_STYLES
, XML_TYPE_BOOL
, 0 ),
396 MAP_( PROP_UseBandingRowStyle
, XML_NAMESPACE_TABLE
, XML_USE_BANDING_ROWS_STYLES
, XML_TYPE_BOOL
, 0 ),
397 MAP_( PROP_UseBandingColumnStyle
, XML_NAMESPACE_TABLE
, XML_USE_BANDING_COLUMNS_STYLES
, XML_TYPE_BOOL
, 0 ),
401 // implementation of factory for own graphic properties
403 SvXMLEnumMapEntry
<drawing::LineStyle
> const aXML_LineStyle_EnumMap
[] =
405 { XML_NONE
, drawing::LineStyle_NONE
},
406 { XML_SOLID
, drawing::LineStyle_SOLID
},
407 { XML_DASH
, drawing::LineStyle_DASH
},
408 { XML_TOKEN_INVALID
, drawing::LineStyle(0) }
411 SvXMLEnumMapEntry
<drawing::LineJoint
> const aXML_LineJoint_EnumMap
[] =
413 { XML_NONE
, drawing::LineJoint_NONE
},
414 { XML_MITER
, drawing::LineJoint_MITER
},
415 { XML_ROUND
, drawing::LineJoint_ROUND
},
416 { XML_BEVEL
, drawing::LineJoint_BEVEL
},
417 { XML_MIDDLE
, drawing::LineJoint_MIDDLE
},
418 { XML_TOKEN_INVALID
, drawing::LineJoint(0) }
421 SvXMLEnumMapEntry
<drawing::LineCap
> const aXML_LineCap_EnumMap
[] =
423 { XML_BUTT
, drawing::LineCap_BUTT
},
424 { XML_ROUND
, drawing::LineCap_ROUND
},
425 // use XML_GRADIENTSTYLE_SQUARE as XML_SQUARE, is defined as "square" already
426 { XML_GRADIENTSTYLE_SQUARE
, drawing::LineCap_SQUARE
},
427 { XML_TOKEN_INVALID
, drawing::LineCap(0) }
430 SvXMLEnumMapEntry
<drawing::FillStyle
> const aXML_FillStyle_EnumMap
[] =
432 { XML_NONE
, drawing::FillStyle_NONE
},
433 { XML_SOLID
, drawing::FillStyle_SOLID
},
434 { XML_BITMAP
, drawing::FillStyle_BITMAP
},
435 { XML_GRADIENT
, drawing::FillStyle_GRADIENT
},
436 { XML_HATCH
, drawing::FillStyle_HATCH
},
437 { XML_TOKEN_INVALID
, drawing::FillStyle(0) }
440 SvXMLEnumMapEntry
<sal_Int32
> const aXML_PresChange_EnumMap
[] =
443 { XML_AUTOMATIC
, 1 },
444 { XML_SEMI_AUTOMATIC
, 2 },
445 { XML_TOKEN_INVALID
, 0 }
448 SvXMLEnumMapEntry
<presentation::AnimationSpeed
> const aXML_TransSpeed_EnumMap
[] =
450 { XML_FAST
, presentation::AnimationSpeed_FAST
},
451 { XML_MEDIUM
, presentation::AnimationSpeed_MEDIUM
},
452 { XML_SLOW
, presentation::AnimationSpeed_SLOW
},
453 { XML_TOKEN_INVALID
, presentation::AnimationSpeed(0) }
456 SvXMLEnumMapEntry
<presentation::FadeEffect
> const aXML_FadeEffect_EnumMap
[] =
458 { XML_NONE
, presentation::FadeEffect_NONE
},
459 { XML_FADE_FROM_LEFT
, presentation::FadeEffect_FADE_FROM_LEFT
},
460 { XML_FADE_FROM_TOP
, presentation::FadeEffect_FADE_FROM_TOP
},
461 { XML_FADE_FROM_RIGHT
, presentation::FadeEffect_FADE_FROM_RIGHT
},
462 { XML_FADE_FROM_BOTTOM
, presentation::FadeEffect_FADE_FROM_BOTTOM
},
463 { XML_FADE_TO_CENTER
, presentation::FadeEffect_FADE_TO_CENTER
},
464 { XML_FADE_FROM_CENTER
, presentation::FadeEffect_FADE_FROM_CENTER
},
465 { XML_MOVE_FROM_LEFT
, presentation::FadeEffect_MOVE_FROM_LEFT
},
466 { XML_MOVE_FROM_TOP
, presentation::FadeEffect_MOVE_FROM_TOP
},
467 { XML_MOVE_FROM_RIGHT
, presentation::FadeEffect_MOVE_FROM_RIGHT
},
468 { XML_MOVE_FROM_BOTTOM
, presentation::FadeEffect_MOVE_FROM_BOTTOM
},
469 { XML_ROLL_FROM_TOP
, presentation::FadeEffect_ROLL_FROM_TOP
},
470 { XML_ROLL_FROM_LEFT
, presentation::FadeEffect_ROLL_FROM_LEFT
},
471 { XML_ROLL_FROM_RIGHT
, presentation::FadeEffect_ROLL_FROM_RIGHT
},
472 { XML_ROLL_FROM_BOTTOM
, presentation::FadeEffect_ROLL_FROM_BOTTOM
},
473 { XML_VERTICAL_STRIPES
, presentation::FadeEffect_VERTICAL_STRIPES
},
474 { XML_HORIZONTAL_STRIPES
, presentation::FadeEffect_HORIZONTAL_STRIPES
},
475 { XML_CLOCKWISE
, presentation::FadeEffect_CLOCKWISE
},
476 { XML_COUNTERCLOCKWISE
, presentation::FadeEffect_COUNTERCLOCKWISE
},
477 { XML_FADE_FROM_UPPERLEFT
, presentation::FadeEffect_FADE_FROM_UPPERLEFT
},
478 { XML_FADE_FROM_UPPERRIGHT
, presentation::FadeEffect_FADE_FROM_UPPERRIGHT
},
479 { XML_FADE_FROM_LOWERLEFT
, presentation::FadeEffect_FADE_FROM_LOWERLEFT
},
480 { XML_FADE_FROM_LOWERRIGHT
, presentation::FadeEffect_FADE_FROM_LOWERRIGHT
},
481 { XML_CLOSE_VERTICAL
, presentation::FadeEffect_CLOSE_VERTICAL
},
482 { XML_CLOSE_HORIZONTAL
, presentation::FadeEffect_CLOSE_HORIZONTAL
},
483 { XML_OPEN_VERTICAL
, presentation::FadeEffect_OPEN_VERTICAL
},
484 { XML_OPEN_HORIZONTAL
, presentation::FadeEffect_OPEN_HORIZONTAL
},
485 { XML_SPIRALIN_LEFT
, presentation::FadeEffect_SPIRALIN_LEFT
},
486 { XML_SPIRALIN_RIGHT
, presentation::FadeEffect_SPIRALIN_RIGHT
},
487 { XML_SPIRALOUT_LEFT
, presentation::FadeEffect_SPIRALOUT_LEFT
},
488 { XML_SPIRALOUT_RIGHT
, presentation::FadeEffect_SPIRALOUT_RIGHT
},
489 { XML_DISSOLVE
, presentation::FadeEffect_DISSOLVE
},
490 { XML_WAVYLINE_FROM_LEFT
, presentation::FadeEffect_WAVYLINE_FROM_LEFT
},
491 { XML_WAVYLINE_FROM_TOP
, presentation::FadeEffect_WAVYLINE_FROM_TOP
},
492 { XML_WAVYLINE_FROM_RIGHT
, presentation::FadeEffect_WAVYLINE_FROM_RIGHT
},
493 { XML_WAVYLINE_FROM_BOTTOM
, presentation::FadeEffect_WAVYLINE_FROM_BOTTOM
},
494 { XML_RANDOM
, presentation::FadeEffect_RANDOM
},
495 { XML_STRETCH_FROM_LEFT
, presentation::FadeEffect_STRETCH_FROM_LEFT
},
496 { XML_STRETCH_FROM_TOP
, presentation::FadeEffect_STRETCH_FROM_TOP
},
497 { XML_STRETCH_FROM_RIGHT
, presentation::FadeEffect_STRETCH_FROM_RIGHT
},
498 { XML_STRETCH_FROM_BOTTOM
, presentation::FadeEffect_STRETCH_FROM_BOTTOM
},
499 { XML_VERTICAL_LINES
, presentation::FadeEffect_VERTICAL_LINES
},
500 { XML_HORIZONTAL_LINES
, presentation::FadeEffect_HORIZONTAL_LINES
},
501 { XML_MOVE_FROM_UPPERLEFT
, presentation::FadeEffect_MOVE_FROM_UPPERLEFT
},
502 { XML_MOVE_FROM_UPPERRIGHT
, presentation::FadeEffect_MOVE_FROM_UPPERRIGHT
},
503 { XML_MOVE_FROM_LOWERRIGHT
, presentation::FadeEffect_MOVE_FROM_LOWERRIGHT
},
504 { XML_MOVE_FROM_LOWERLEFT
, presentation::FadeEffect_MOVE_FROM_LOWERLEFT
},
505 { XML_UNCOVER_TO_LEFT
, presentation::FadeEffect_UNCOVER_TO_LEFT
},
506 { XML_UNCOVER_TO_UPPERLEFT
, presentation::FadeEffect_UNCOVER_TO_UPPERLEFT
},
507 { XML_UNCOVER_TO_TOP
, presentation::FadeEffect_UNCOVER_TO_TOP
},
508 { XML_UNCOVER_TO_UPPERRIGHT
,presentation::FadeEffect_UNCOVER_TO_UPPERRIGHT
},
509 { XML_UNCOVER_TO_RIGHT
, presentation::FadeEffect_UNCOVER_TO_RIGHT
},
510 { XML_UNCOVER_TO_LOWERRIGHT
,presentation::FadeEffect_UNCOVER_TO_LOWERRIGHT
},
511 { XML_UNCOVER_TO_BOTTOM
, presentation::FadeEffect_UNCOVER_TO_BOTTOM
},
512 { XML_UNCOVER_TO_LOWERLEFT
, presentation::FadeEffect_UNCOVER_TO_LOWERLEFT
},
513 { XML_VERTICAL_CHECKERBOARD
,presentation::FadeEffect_VERTICAL_CHECKERBOARD
},
514 { XML_HORIZONTAL_CHECKERBOARD
,presentation::FadeEffect_HORIZONTAL_CHECKERBOARD
},
515 { XML_TOKEN_INVALID
, presentation::FadeEffect(0) }
518 SvXMLEnumMapEntry
<drawing::ConnectorType
> const aXML_ConnectionKind_EnumMap
[] =
520 { XML_STANDARD
, drawing::ConnectorType_STANDARD
},
521 { XML_CURVE
, drawing::ConnectorType_CURVE
},
522 { XML_LINE
, drawing::ConnectorType_LINE
},
523 { XML_LINES
, drawing::ConnectorType_LINES
},
524 { XML_TOKEN_INVALID
, drawing::ConnectorType(0) }
527 SvXMLEnumMapEntry
<drawing::BitmapMode
> const aXML_BitmapMode_EnumMap
[] =
529 { XML_REPEAT
, drawing::BitmapMode_REPEAT
},
530 { XML_STRETCH
, drawing::BitmapMode_STRETCH
},
531 { XML_BACKGROUND_NO_REPEAT
, drawing::BitmapMode_NO_REPEAT
},
532 { XML_TOKEN_INVALID
, drawing::BitmapMode(0) }
537 SvXMLEnumMapEntry
<drawing::NormalsKind
> const aXML_NormalsKind_EnumMap
[] =
539 { XML_OBJECT
, drawing::NormalsKind_SPECIFIC
},
540 { XML_FLAT
, drawing::NormalsKind_FLAT
},
541 { XML_SPHERE
, drawing::NormalsKind_SPHERE
},
542 { XML_TOKEN_INVALID
, drawing::NormalsKind(0) }
545 SvXMLEnumMapEntry
<drawing::TextureProjectionMode
> const aXML_TexGenerationX_EnumMap
[] =
547 { XML_OBJECT
, drawing::TextureProjectionMode_OBJECTSPECIFIC
},
548 { XML_PARALLEL
, drawing::TextureProjectionMode_PARALLEL
},
549 { XML_SPHERE
, drawing::TextureProjectionMode_SPHERE
},
550 { XML_TOKEN_INVALID
, drawing::TextureProjectionMode(0) }
553 SvXMLEnumMapEntry
<drawing::TextureProjectionMode
> const aXML_TexGenerationY_EnumMap
[] =
555 { XML_OBJECT
, drawing::TextureProjectionMode_OBJECTSPECIFIC
},
556 { XML_PARALLEL
, drawing::TextureProjectionMode_PARALLEL
},
557 { XML_SPHERE
, drawing::TextureProjectionMode_SPHERE
},
558 { XML_TOKEN_INVALID
, drawing::TextureProjectionMode(0) }
561 SvXMLEnumMapEntry
<drawing::TextureKind2
> const aXML_TexKind_EnumMap
[] =
563 { XML_LUMINANCE
, drawing::TextureKind2_LUMINANCE
},
564 { XML_INTENSITY
, drawing::TextureKind2_INTENSITY
},
565 { XML_COLOR
, drawing::TextureKind2_COLOR
},
566 { XML_TOKEN_INVALID
, drawing::TextureKind2(0) }
569 SvXMLEnumMapEntry
<drawing::TextureMode
> const aXML_TexMode_EnumMap
[] =
571 { XML_REPLACE
, drawing::TextureMode_REPLACE
},
572 { XML_MODULATE
, drawing::TextureMode_MODULATE
},
573 { XML_BLEND
, drawing::TextureMode_BLEND
},
574 { XML_TOKEN_INVALID
, drawing::TextureMode(0) }
577 SvXMLEnumMapEntry
<drawing::RectanglePoint
> const aXML_RefPoint_EnumMap
[] =
579 { XML_TOP_LEFT
, drawing::RectanglePoint_LEFT_TOP
},
580 { XML_TOP
, drawing::RectanglePoint_MIDDLE_TOP
},
581 { XML_TOP_RIGHT
, drawing::RectanglePoint_RIGHT_TOP
},
582 { XML_LEFT
, drawing::RectanglePoint_LEFT_MIDDLE
},
583 { XML_CENTER
, drawing::RectanglePoint_MIDDLE_MIDDLE
},
584 { XML_RIGHT
, drawing::RectanglePoint_RIGHT_MIDDLE
},
585 { XML_BOTTOM_LEFT
, drawing::RectanglePoint_LEFT_BOTTOM
},
586 { XML_BOTTOM
, drawing::RectanglePoint_MIDDLE_BOTTOM
},
587 { XML_BOTTOM_RIGHT
, drawing::RectanglePoint_RIGHT_BOTTOM
},
588 { XML_TOKEN_INVALID
, drawing::RectanglePoint(0) }
591 SvXMLEnumMapEntry
<drawing::CircleKind
> const aXML_CircleKind_EnumMap
[] =
593 { XML_FULL
, drawing::CircleKind_FULL
},
594 { XML_SECTION
, drawing::CircleKind_SECTION
},
595 { XML_CUT
, drawing::CircleKind_CUT
},
596 { XML_ARC
, drawing::CircleKind_ARC
},
597 { XML_TOKEN_INVALID
, drawing::CircleKind(0) }
600 SvXMLEnumMapEntry
<text::WritingMode
> const aXML_WritingMode_EnumMap
[] =
602 { XML_TB_RL
, text::WritingMode_TB_RL
},
603 { XML_LR_TB
, text::WritingMode_LR_TB
},
604 { XML_TOKEN_INVALID
, text::WritingMode(0) }
607 SvXMLEnumMapEntry
<sal_Int16
> const aXML_WritingMode2_EnumMap
[] =
609 { XML_LR_TB
, text::WritingMode2::LR_TB
},
610 { XML_RL_TB
, text::WritingMode2::RL_TB
},
611 { XML_TB_RL
, text::WritingMode2::TB_RL
},
612 { XML_TB_LR
, text::WritingMode2::TB_LR
},
613 { XML_PAGE
, text::WritingMode2::CONTEXT
},
614 { XML_BT_LR
, text::WritingMode2::BT_LR
},
615 { XML_TB_RL90
, text::WritingMode2::TB_RL90
},
616 { XML_TOKEN_INVALID
, text::WritingMode2::LR_TB
}
619 SvXMLEnumMapEntry
<drawing::TextAnimationKind
> const pXML_TextAnimation_Enum
[] =
621 { XML_NONE
, drawing::TextAnimationKind_NONE
},
622 { XML_BLINKING
, drawing::TextAnimationKind_BLINK
}, // will be filtered
623 { XML_SCROLL
, drawing::TextAnimationKind_SCROLL
},
624 { XML_ALTERNATE
, drawing::TextAnimationKind_ALTERNATE
},
625 { XML_SLIDE
, drawing::TextAnimationKind_SLIDE
},
626 { XML_TOKEN_INVALID
, drawing::TextAnimationKind(0) }
629 SvXMLEnumMapEntry
<drawing::TextAnimationKind
> const pXML_TextAnimation_Blinking_Enum
[] =
631 { XML_FALSE
, drawing::TextAnimationKind_NONE
},
632 { XML_TRUE
, drawing::TextAnimationKind_BLINK
},
633 { XML_FALSE
, drawing::TextAnimationKind_SCROLL
},
634 { XML_FALSE
, drawing::TextAnimationKind_ALTERNATE
},
635 { XML_FALSE
, drawing::TextAnimationKind_SLIDE
},
636 { XML_TOKEN_INVALID
, drawing::TextAnimationKind(0) }
639 SvXMLEnumMapEntry
<drawing::TextAnimationDirection
> const pXML_TextAnimationDirection_Enum
[] =
641 { XML_LEFT
, drawing::TextAnimationDirection_LEFT
},
642 { XML_RIGHT
, drawing::TextAnimationDirection_RIGHT
}, // will be filtered
643 { XML_UP
, drawing::TextAnimationDirection_UP
},
644 { XML_DOWN
, drawing::TextAnimationDirection_DOWN
},
645 { XML_TOKEN_INVALID
, drawing::TextAnimationDirection(0) }
648 SvXMLEnumMapEntry
<drawing::TextHorizontalAdjust
> const pXML_TextAlign_Enum
[] =
650 { XML_LEFT
, drawing::TextHorizontalAdjust_LEFT
},
651 { XML_CENTER
, drawing::TextHorizontalAdjust_CENTER
},
652 { XML_RIGHT
, drawing::TextHorizontalAdjust_RIGHT
},
653 { XML_JUSTIFY
, drawing::TextHorizontalAdjust_BLOCK
},
654 { XML_TOKEN_INVALID
, drawing::TextHorizontalAdjust(0) }
657 SvXMLEnumMapEntry
<drawing::TextVerticalAdjust
> const pXML_VerticalAlign_Enum
[] =
659 { XML_TOP
, drawing::TextVerticalAdjust_TOP
},
660 { XML_MIDDLE
, drawing::TextVerticalAdjust_CENTER
},
661 { XML_BOTTOM
, drawing::TextVerticalAdjust_BOTTOM
},
662 { XML_JUSTIFY
, drawing::TextVerticalAdjust_BLOCK
},
663 { XML_TOKEN_INVALID
, drawing::TextVerticalAdjust(0) }
666 // note: PROPORTIONAL and ALLLINES are the same thing now!
667 SvXMLEnumMapEntry
<drawing::TextFitToSizeType
> const pXML_FitToSize_Enum_Odf12
[] =
669 { XML_FALSE
, drawing::TextFitToSizeType_NONE
},
670 { XML_TRUE
, drawing::TextFitToSizeType_PROPORTIONAL
},
671 { XML_TRUE
, drawing::TextFitToSizeType_ALLLINES
},
672 { XML_FALSE
, drawing::TextFitToSizeType_AUTOFIT
},
673 { XML_TOKEN_INVALID
, drawing::TextFitToSizeType(0) }
676 SvXMLEnumMapEntry
<drawing::TextFitToSizeType
> const pXML_FitToSize_Enum
[] =
678 { XML_FALSE
, drawing::TextFitToSizeType_NONE
},
679 { XML_TRUE
, drawing::TextFitToSizeType_PROPORTIONAL
},
680 { XML_ALL
, drawing::TextFitToSizeType_ALLLINES
},
681 { XML_SHRINK_TO_FIT
,drawing::TextFitToSizeType_AUTOFIT
},
682 { XML_TOKEN_INVALID
, drawing::TextFitToSizeType(0) }
685 SvXMLEnumMapEntry
<drawing::TextFitToSizeType
> const pXML_ShrinkToFit_Enum
[] =
687 { XML_FALSE
, drawing::TextFitToSizeType_NONE
},
688 { XML_FALSE
, drawing::TextFitToSizeType_PROPORTIONAL
},
689 { XML_FALSE
, drawing::TextFitToSizeType_ALLLINES
},
690 { XML_TRUE
, drawing::TextFitToSizeType_AUTOFIT
},
691 { XML_TOKEN_INVALID
, drawing::TextFitToSizeType(0) }
694 SvXMLEnumMapEntry
<sal_Int32
> const pXML_MeasureUnit_Enum
[] =
696 { XML_AUTOMATIC
, 0 },
704 { XML_UNIT_FOOT
, 9 },
706 { XML_TOKEN_INVALID
,0 }
709 SvXMLEnumMapEntry
<drawing::MeasureTextHorzPos
> const pXML_Measure_HAlign_Enum
[] =
711 { XML_AUTOMATIC
, drawing::MeasureTextHorzPos_AUTO
},
712 { XML_LEFT_OUTSIDE
, drawing::MeasureTextHorzPos_LEFTOUTSIDE
},
713 { XML_INSIDE
, drawing::MeasureTextHorzPos_INSIDE
},
714 { XML_RIGHT_OUTSIDE
, drawing::MeasureTextHorzPos_RIGHTOUTSIDE
},
715 { XML_TOKEN_INVALID
, drawing::MeasureTextHorzPos(0) }
718 SvXMLEnumMapEntry
<drawing::MeasureTextVertPos
> const pXML_Measure_VAlign_Enum
[] =
720 { XML_AUTOMATIC
, drawing::MeasureTextVertPos_AUTO
},
721 { XML_ABOVE
, drawing::MeasureTextVertPos_EAST
},
722 { XML_BELOW
, drawing::MeasureTextVertPos_WEST
},
723 { XML_CENTER
, drawing::MeasureTextVertPos_CENTERED
},
724 { XML_TOKEN_INVALID
, drawing::MeasureTextVertPos(0) }
728 SvXMLEnumMapEntry
<sal_Int32
> const pXML_Fontwork_Style_Enum
[] =
730 { XML_ROTATE
, 0 }, //XFormTextStyle::Rotate,
731 { XML_UPRIGHT
, 1 }, //XFormTextStyle::Upright,
732 { XML_SLANT_X
, 2 }, //XFormTextStyle::SlantX,
733 { XML_SLANT_Y
, 3 }, //XFormTextStyle::SlantY,
734 { XML_NONE
, 4 }, //XFormTextStyle::NONE
735 { XML_TOKEN_INVALID
,0 }
738 SvXMLEnumMapEntry
<sal_Int32
> const pXML_Fontwork_Adjust_Enum
[] =
740 { XML_LEFT
, 0 }, //XFormTextAdjust::Left,
741 { XML_RIGHT
, 1 }, //XFormTextAdjust::Right,
742 { XML_AUTOSIZE
, 2 }, //XFormTextAdjust::AutoSize,
743 { XML_CENTER
, 3 }, //XFormTextAdjust::Center
744 { XML_TOKEN_INVALID
,0 }
747 SvXMLEnumMapEntry
<sal_Int32
> const pXML_Fontwork_Shadow_Enum
[] =
749 { XML_NORMAL
, 0 }, //XFormTextShadow::Normal,
750 { XML_SLANT
, 1 }, //XFormTextShadow::Slant,
751 { XML_NONE
, 2 }, //XFormTextShadow::NONE
752 { XML_TOKEN_INVALID
,0 }
755 SvXMLEnumMapEntry
<sal_Int32
> const pXML_Fontwork_Form_Enum
[] =
757 { XML_NONE
, 0 }, //XFTFORM_NONE,
758 { XML_TOPCIRCLE
, 1 }, //XFTFORM_TOPCIRC,
759 { XML_BOTTOMCIRCLE
, 2 }, //XFTFORM_BOTCIRC,
760 { XML_LEFTCIRCLE
, 3 }, //XFTFORM_LFTCIRC,
761 { XML_RIGHTCIRCLE
, 4 }, //XFTFORM_RGTCIRC,
762 { XML_TOPARC
, 5 }, //XFTFORM_TOPARC,
763 { XML_BOTTOMARC
, 6 }, //XFTFORM_BOTARC,
764 { XML_LEFTARC
, 7 }, //XFTFORM_LFTARC,
765 { XML_RIGHTARC
, 8 }, //XFTFORM_RGTARC,
766 { XML_BUTTON1
, 9 }, //XFTFORM_BUTTON1,
767 { XML_BUTTON2
, 10 }, //XFTFORM_BUTTON2,
768 { XML_BUTTON3
, 11 }, //XFTFORM_BUTTON3,
769 { XML_BUTTON4
, 12 }, //XFTFORM_BUTTON4
770 { XML_TOKEN_INVALID
,0 }
773 SvXMLEnumMapEntry
<sal_Int32
> const pXML_Caption_Esc_Dir_Enum
[] =
775 { XML_HORIZONTAL
, 0 }, //SdrCaptionEscDir::Horizontal,
776 { XML_VERTICAL
, 1 }, //SdrCaptionEscDir::Vertical,
777 { XML_AUTO
, 2 }, //SdrCaptionEscDir::BestFit,
778 { XML_TOKEN_INVALID
,0 }
781 SvXMLEnumMapEntry
<sal_Int32
> const pXML_Caption_Type_Enum
[] =
783 { XML_STRAIGHT_LINE
, 0 }, //SdrCaptionType::Type1,
784 { XML_ANGLED_LINE
, 1 }, //SdrCaptionType::Type2,
785 { XML_ANGLED_CONNECTOR_LINE
, 2 }, //SdrCaptionType::Type3,
786 { XML_TOKEN_INVALID
,0 }
791 class XMLCaptionEscapeRelative
: public XMLPropertyHandler
794 virtual bool importXML(
795 const OUString
& rStrImpValue
,
796 css::uno::Any
& rValue
,
797 const SvXMLUnitConverter
& rUnitConverter
) const override
;
798 virtual bool exportXML(
799 OUString
& rStrExpValue
,
800 const css::uno::Any
& rValue
,
801 const SvXMLUnitConverter
& rUnitConverter
) const override
;
806 bool XMLCaptionEscapeRelative::importXML( const OUString
& rStrImpValue
, Any
& rValue
, const SvXMLUnitConverter
& ) const
810 if (!::sax::Converter::convertPercent( nValue
, rStrImpValue
))
818 bool XMLCaptionEscapeRelative::exportXML( OUString
& rStrExpValue
, const Any
& rValue
, const SvXMLUnitConverter
& ) const
820 sal_Int32 nValue
= 0;
821 if( !(rValue
>>= nValue
) )
826 ::sax::Converter::convertPercent( aOut
, nValue
);
827 rStrExpValue
= aOut
.makeStringAndClear();
833 class XMLMoveSizeProtectHdl
: public XMLPropertyHandler
836 explicit XMLMoveSizeProtectHdl( sal_Int32 nType
) : mnType( nType
) {}
838 virtual bool importXML(
839 const OUString
& rStrImpValue
,
840 css::uno::Any
& rValue
,
841 const SvXMLUnitConverter
& rUnitConverter
) const override
;
842 virtual bool exportXML(
843 OUString
& rStrExpValue
,
844 const css::uno::Any
& rValue
,
845 const SvXMLUnitConverter
& rUnitConverter
) const override
;
847 const sal_Int32 mnType
;
852 bool XMLMoveSizeProtectHdl::importXML( const OUString
& rStrImpValue
, Any
& rValue
, const SvXMLUnitConverter
& ) const
854 const bool bValue
= rStrImpValue
.indexOf( GetXMLToken( mnType
== XML_SD_TYPE_MOVE_PROTECT
? XML_POSITION
: XML_SIZE
) ) != -1;
859 bool XMLMoveSizeProtectHdl::exportXML( OUString
& rStrExpValue
, const Any
& rValue
, const SvXMLUnitConverter
& ) const
862 if( !(rValue
>>= bValue
) )
867 if( !rStrExpValue
.isEmpty() )
870 rStrExpValue
+= GetXMLToken( mnType
== XML_SD_TYPE_MOVE_PROTECT
? XML_POSITION
: XML_SIZE
);
878 class XMLSdHeaderFooterVisibilityTypeHdl
: public XMLPropertyHandler
881 virtual bool importXML( const OUString
& rStrImpValue
, css::uno::Any
& rValue
, const SvXMLUnitConverter
& rUnitConverter
) const override
;
882 virtual bool exportXML( OUString
& rStrExpValue
, const css::uno::Any
& rValue
, const SvXMLUnitConverter
& rUnitConverter
) const override
;
887 bool XMLSdHeaderFooterVisibilityTypeHdl::importXML(
888 const OUString
& rStrImpValue
,
889 css::uno::Any
& rValue
,
890 const SvXMLUnitConverter
& ) const
893 // attributes with this type where saved with VISIBLE|HIDDEN prior
894 // to src680m67. So we have to import that correctly
895 const bool bBool
= IsXMLToken(rStrImpValue
, XML_TRUE
) || IsXMLToken(rStrImpValue
, XML_VISIBLE
);
897 return bBool
|| IsXMLToken(rStrImpValue
, XML_FALSE
) || IsXMLToken(rStrImpValue
, XML_HIDDEN
);
900 bool XMLSdHeaderFooterVisibilityTypeHdl::exportXML(
901 OUString
& rStrExpValue
,
903 const SvXMLUnitConverter
& ) const
908 if (rValue
>>= bValue
)
911 ::sax::Converter::convertBool( aOut
, bValue
);
912 rStrExpValue
= aOut
.makeStringAndClear();
922 class XMLSdRotationAngleTypeHdl
: public XMLPropertyHandler
925 virtual bool importXML(const OUString
& rStrImpValue
, css::uno::Any
& rValue
, const SvXMLUnitConverter
& rUnitConverter
) const override
;
926 virtual bool exportXML(OUString
& rStrExpValue
, const css::uno::Any
& rValue
, const SvXMLUnitConverter
& rUnitConverter
) const override
;
931 bool XMLSdRotationAngleTypeHdl::importXML(
932 const OUString
& rStrImpValue
,
933 css::uno::Any
& rValue
,
934 const SvXMLUnitConverter
&) const
937 bool const bRet
= ::sax::Converter::convertNumber(nValue
, rStrImpValue
);
940 nValue
= (nValue
% 360);
942 nValue
= 360 + nValue
;
944 if (nValue
< 45 || nValue
> 315)
946 else if (nValue
< 180)
948 else /* if nValue <= 315 ) */
956 bool XMLSdRotationAngleTypeHdl::exportXML(
957 OUString
& rStrExpValue
,
959 const SvXMLUnitConverter
&) const
962 bool bRet
= (rValue
>>= nAngle
) && nAngle
!= 0;
965 rStrExpValue
= OUString::number(nAngle
/ 100);
972 class XMLFitToSizeEnumPropertyHdl
: public XMLEnumPropertyHdl
975 XMLFitToSizeEnumPropertyHdl(
976 const SvXMLEnumMapEntry
<drawing::TextFitToSizeType
> *const pMap
)
977 : XMLEnumPropertyHdl(pMap
) {}
979 virtual bool importXML(const OUString
& rStrImpValue
, uno::Any
& rValue
,
980 const SvXMLUnitConverter
& rUC
) const override
982 // we don't know here what the actual attribute name is -
983 // but we can combine the 2 attributes by just taking the
984 // "largest" result value; this can never result in ALLLINES
985 // so the implementation has to interpret PROPORTIONAL as ALLLINES;
986 // both "true" is invalid anyway.
988 auto const bRet
= XMLEnumPropertyHdl::importXML(rStrImpValue
, any
, rUC
);
993 assert(any
.hasValue());
994 if (!rValue
.hasValue() ||
995 rValue
.get
<drawing::TextFitToSizeType
>() < any
.get
<drawing::TextFitToSizeType
>())
997 rValue
= std::move(any
);
1006 class XMLLatheEndAngleHdl
: public XMLDoublePropHdl
1009 virtual bool importXML(const OUString
& rStrImpValue
, css::uno::Any
& rValue
,
1010 const SvXMLUnitConverter
& rUnitConverter
) const override
;
1011 virtual bool exportXML(OUString
& rStrExpValue
, const css::uno::Any
& rValue
,
1012 const SvXMLUnitConverter
& rUnitConverter
) const override
;
1016 bool XMLLatheEndAngleHdl::importXML(const OUString
& rStrImpValue
, uno::Any
& rValue
,
1017 const SvXMLUnitConverter
& rUC
) const
1019 // tdf#161327. We keep reading unit-less values as being in 1/10th of a degree for backward
1020 // compatibility for now. Values with unit are interpreted correctly.
1022 SvtSaveOptions::ODFSaneDefaultVersion::ODFSVER_013_EXTENDED
< rUC
.getSaneDefaultVersion(),
1024 "Check whether parameter isWrongOOo10thDegAngle can be false for newer LO version.");
1025 sal_Int16 nAngle
; // Angles are limited to 'short' in UNO property D3DEndAngle.
1026 bool const bRet
= ::sax::Converter::convert10thDegAngle(nAngle
, rStrImpValue
, true);
1036 bool XMLLatheEndAngleHdl::exportXML(OUString
& rStrExpValue
, const uno::Any
& rValue
,
1037 const SvXMLUnitConverter
& rUC
) const
1039 sal_Int16 nAngle
; // type of D3DEndAngle is 'short'.
1040 bool bRet
= rValue
>>= nAngle
;
1043 // tdf#161327. Adapt version to write unit deg, when most users have a LO version, that can
1044 // read angle units. Write 1/10 of a degree for all versions for backward compatibility till
1045 // then. Adapt test when LO writes a new default ODF version.
1046 if (SvtSaveOptions::ODFSaneDefaultVersion::ODFSVER_013_EXTENDED
1047 >= rUC
.getSaneDefaultVersion())
1048 rStrExpValue
= OUString::number(nAngle
); // wrong, but backward compatible
1051 SAL_WARN("xmloff.draw", "Check whether writing unit is indeed possible now.");
1052 double fAngle
= static_cast<double>(nAngle
) / 10.0;
1053 rStrExpValue
= OUString::number(fAngle
) + "deg";
1059 XMLSdPropHdlFactory::XMLSdPropHdlFactory( uno::Reference
< frame::XModel
> xModel
, SvXMLImport
& rImport
)
1060 : mxModel(std::move( xModel
)), mpExport(nullptr), mpImport( &rImport
)
1064 XMLSdPropHdlFactory::XMLSdPropHdlFactory( uno::Reference
< frame::XModel
> xModel
, SvXMLExport
& rExport
)
1065 : mxModel(std::move( xModel
)), mpExport( &rExport
), mpImport(nullptr)
1069 XMLSdPropHdlFactory::~XMLSdPropHdlFactory()
1073 const XMLPropertyHandler
* XMLSdPropHdlFactory::GetPropertyHandler( sal_Int32 nType
) const
1075 const XMLPropertyHandler
* pHdl
= XMLPropertyHandlerFactory::GetPropertyHandler( nType
);
1080 case XML_SD_TYPE_STROKE
:
1082 pHdl
= new XMLEnumPropertyHdl( aXML_LineStyle_EnumMap
);
1085 case XML_SD_TYPE_LINEJOIN
:
1087 pHdl
= new XMLEnumPropertyHdl( aXML_LineJoint_EnumMap
);
1090 case XML_SD_TYPE_LINECAP
:
1092 pHdl
= new XMLEnumPropertyHdl( aXML_LineCap_EnumMap
);
1095 case XML_SD_TYPE_FILLSTYLE
:
1097 pHdl
= new XMLEnumPropertyHdl( aXML_FillStyle_EnumMap
);
1100 case XML_SD_TYPE_PRESPAGE_TYPE
:
1102 pHdl
= new XMLEnumPropertyHdl( aXML_PresChange_EnumMap
);
1105 case XML_SD_TYPE_VISIBLE_HIDDEN
:
1107 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_VISIBLE
), GetXMLToken(XML_HIDDEN
) );
1110 case XML_TYPE_SD_MIRROR
:
1112 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_HORIZONTAL
), GetXMLToken(XML_NONE
) );
1115 case XML_SD_TYPE_PRESPAGE_STYLE
:
1117 pHdl
= new XMLEnumPropertyHdl( aXML_FadeEffect_EnumMap
);
1120 case XML_SD_TYPE_PRESPAGE_SPEED
:
1122 pHdl
= new XMLEnumPropertyHdl( aXML_TransSpeed_EnumMap
);
1125 case XML_SD_TYPE_PRESPAGE_DURATION
:
1127 pHdl
= new XMLDurationPropertyHdl
;
1130 case XML_SD_TYPE_TEXT_CROSSEDOUT
:
1132 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_SOLID
), GetXMLToken(XML_NONE
) );
1135 case XML_SD_TYPE_OPACITY
:
1137 pHdl
= new XMLOpacityPropertyHdl(mpImport
);
1140 case XML_SD_TYPE_WRITINGMODE
:
1142 pHdl
= new XMLEnumPropertyHdl( aXML_WritingMode_EnumMap
);
1145 case XML_SD_TYPE_WRITINGMODE2
:
1147 pHdl
= new XMLConstantsPropertyHandler ( aXML_WritingMode2_EnumMap
, XML_LR_TB
);
1150 case XML_SD_TYPE_PRESPAGE_VISIBILITY
:
1152 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_VISIBLE
), GetXMLToken(XML_HIDDEN
) );
1155 case XML_SD_TYPE_PRESPAGE_BACKSIZE
:
1157 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_FULL
), GetXMLToken(XML_BORDER
) );
1163 case XML_SD_TYPE_BACKFACE_CULLING
:
1165 // #87922# DoubleSided -> BackfaceCulling
1166 // This sal_Bool needs to be flipped, DoubleSided sal_True -> NO Backface culling
1168 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_DISABLED
), GetXMLToken(XML_ENABLED
) );
1172 case XML_SD_TYPE_NORMALS_KIND
:
1174 pHdl
= new XMLEnumPropertyHdl( aXML_NormalsKind_EnumMap
);
1177 case XML_SD_TYPE_NORMALS_DIRECTION
:
1179 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_NORMAL
), GetXMLToken(XML_INVERSE
) );
1182 case XML_SD_TYPE_TEX_GENERATION_MODE_X
:
1184 pHdl
= new XMLEnumPropertyHdl( aXML_TexGenerationX_EnumMap
);
1187 case XML_SD_TYPE_TEX_GENERATION_MODE_Y
:
1189 pHdl
= new XMLEnumPropertyHdl( aXML_TexGenerationY_EnumMap
);
1192 case XML_SD_TYPE_TEX_KIND
:
1194 pHdl
= new XMLEnumPropertyHdl( aXML_TexKind_EnumMap
);
1197 case XML_SD_TYPE_TEX_MODE
:
1199 pHdl
= new XMLEnumPropertyHdl( aXML_TexMode_EnumMap
);
1202 case XML_SD_TYPE_LATHE_ENDANGLE
:
1204 pHdl
= new XMLLatheEndAngleHdl
;
1207 case XML_SD_TYPE_NUMBULLET
:
1209 uno::Reference
<ucb::XAnyCompareFactory
> xCompareFac( mxModel
, uno::UNO_QUERY
);
1210 uno::Reference
<ucb::XAnyCompare
> xCompare
;
1211 if( xCompareFac
.is() )
1212 xCompare
= xCompareFac
->createAnyCompareByName( u
"NumberingRules"_ustr
);
1214 pHdl
= new XMLNumRulePropHdl( xCompare
);
1217 case XML_SD_TYPE_BITMAP_MODE
:
1219 pHdl
= new XMLEnumPropertyHdl( aXML_BitmapMode_EnumMap
);
1222 case XML_SD_TYPE_BITMAPREPOFFSETX
:
1223 case XML_SD_TYPE_BITMAPREPOFFSETY
:
1225 pHdl
= new XMLBitmapRepeatOffsetPropertyHandler( nType
== XML_SD_TYPE_BITMAPREPOFFSETX
);
1228 case XML_SD_TYPE_FILLBITMAPSIZE
:
1230 pHdl
= new XMLFillBitmapSizePropertyHandler();
1233 case XML_SD_TYPE_LOGICAL_SIZE
:
1235 pHdl
= new XMLBitmapLogicalSizePropertyHandler();
1238 case XML_SD_TYPE_BITMAP_REFPOINT
:
1240 pHdl
= new XMLEnumPropertyHdl( aXML_RefPoint_EnumMap
);
1243 case XML_TYPE_TEXT_ANIMATION
:
1244 pHdl
= new XMLEnumPropertyHdl( pXML_TextAnimation_Enum
);
1246 case XML_TYPE_TEXT_ANIMATION_BLINKING
:
1247 pHdl
= new XMLEnumPropertyHdl( pXML_TextAnimation_Blinking_Enum
);
1249 case XML_TYPE_TEXT_ANIMATION_DIRECTION
:
1250 pHdl
= new XMLEnumPropertyHdl( pXML_TextAnimationDirection_Enum
);
1252 case XML_TYPE_TEXT_ANIMATION_STEPS
:
1253 pHdl
= new XMLTextAnimationStepPropertyHdl
;
1255 case XML_SD_TYPE_TEXT_ALIGN
:
1256 pHdl
= new XMLEnumPropertyHdl( pXML_TextAlign_Enum
);
1258 case XML_SD_TYPE_VERTICAL_ALIGN
:
1259 pHdl
= new XMLEnumPropertyHdl( pXML_VerticalAlign_Enum
);
1261 case XML_SD_TYPE_FITTOSIZE
:
1264 && (mpExport
->getSaneDefaultVersion() // tdf#97630
1265 != SvtSaveOptions::ODFSVER_012_EXT_COMPAT
))
1267 pHdl
= new XMLFitToSizeEnumPropertyHdl(pXML_FitToSize_Enum_Odf12
);
1270 { // import all values written by old LO
1271 pHdl
= new XMLFitToSizeEnumPropertyHdl(pXML_FitToSize_Enum
);
1275 case XML_SD_TYPE_FITTOSIZE_AUTOFIT
:
1277 pHdl
= new XMLFitToSizeEnumPropertyHdl(pXML_ShrinkToFit_Enum
);
1280 case XML_SD_TYPE_MEASURE_UNIT
:
1281 pHdl
= new XMLEnumPropertyHdl( pXML_MeasureUnit_Enum
);
1283 case XML_SD_TYPE_MEASURE_HALIGN
:
1284 pHdl
= new XMLEnumPropertyHdl( pXML_Measure_HAlign_Enum
);
1286 case XML_SD_TYPE_MEASURE_VALIGN
:
1287 pHdl
= new XMLEnumPropertyHdl( pXML_Measure_VAlign_Enum
);
1289 case XML_SD_TYPE_MEASURE_PLACING
:
1291 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_BELOW
), GetXMLToken(XML_ABOVE
) );
1294 case XML_TYPE_TEXT_CLIP11
:
1295 pHdl
= new XMLClipPropertyHandler( true );
1297 case XML_TYPE_TEXT_CLIP
:
1298 pHdl
= new XMLClipPropertyHandler( false );
1302 case XML_SD_TYPE_FONTWORK_STYLE
:
1303 pHdl
= new XMLEnumPropertyHdl( pXML_Fontwork_Style_Enum
);
1305 case XML_SD_TYPE_FONTWORK_ADJUST
:
1306 pHdl
= new XMLEnumPropertyHdl( pXML_Fontwork_Adjust_Enum
);
1308 case XML_SD_TYPE_FONTWORK_SHADOW
:
1309 pHdl
= new XMLEnumPropertyHdl( pXML_Fontwork_Shadow_Enum
);
1311 case XML_SD_TYPE_FONTWORK_FORM
:
1312 pHdl
= new XMLEnumPropertyHdl( pXML_Fontwork_Form_Enum
);
1315 case XML_SD_TYPE_CONTROL_BORDER
:
1316 pHdl
= new ::xmloff::OControlBorderHandler( ::xmloff::OControlBorderHandler::STYLE
);
1318 case XML_SD_TYPE_CONTROL_BORDER_COLOR
:
1319 pHdl
= new ::xmloff::OControlBorderHandler( ::xmloff::OControlBorderHandler::COLOR
);
1321 case XML_SD_TYPE_IMAGE_SCALE_MODE
:
1322 pHdl
= new ::xmloff::ImageScaleModeHandler
;
1324 case XML_TYPE_CONTROL_TEXT_EMPHASIZE
:
1325 pHdl
= new ::xmloff::OControlTextEmphasisHandler
;
1328 case XML_SD_TYPE_CAPTION_ANGLE_TYPE
:
1330 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_FIXED
), GetXMLToken(XML_FREE
) );
1333 case XML_SD_TYPE_CAPTION_IS_ESC_REL
:
1334 pHdl
= new XMLIsPercentagePropertyHandler
;
1336 case XML_SD_TYPE_CAPTION_ESC_REL
:
1337 pHdl
= new XMLCaptionEscapeRelative
;
1339 case XML_SD_TYPE_CAPTION_ESC_ABS
:
1340 pHdl
= new XMLPercentOrMeasurePropertyHandler
;
1342 case XML_SD_TYPE_CAPTION_ESC_DIR
:
1343 pHdl
= new XMLEnumPropertyHdl( pXML_Caption_Esc_Dir_Enum
);
1345 case XML_SD_TYPE_CAPTION_TYPE
:
1346 pHdl
= new XMLEnumPropertyHdl( pXML_Caption_Type_Enum
);
1348 case XML_SD_TYPE_DATETIMEUPDATE
:
1349 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_FIXED
), GetXMLToken(XML_VARIABLE
) );
1351 case XML_SD_TYPE_DATETIME_FORMAT
:
1352 pHdl
= new XMLDateTimeFormatHdl( mpExport
);
1354 case XML_SD_TYPE_TRANSITION_TYPE
:
1355 pHdl
= new XMLEnumPropertyHdl( xmloff::aAnimations_EnumMap_TransitionType
);
1357 case XML_SD_TYPE_TRANSTIION_SUBTYPE
:
1358 pHdl
= new XMLEnumPropertyHdl( xmloff::aAnimations_EnumMap_TransitionSubType
);
1360 case XML_SD_TYPE_TRANSTIION_DIRECTION
:
1361 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_FORWARD
), GetXMLToken(XML_REVERSE
) );
1363 case XML_TYPE_WRAP_OPTION
:
1364 pHdl
= new XMLWordWrapPropertyHdl( mpImport
);
1367 case XML_SD_TYPE_MOVE_PROTECT
:
1368 case XML_SD_TYPE_SIZE_PROTECT
:
1369 pHdl
= new XMLMoveSizeProtectHdl( nType
);
1371 case XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE
:
1372 pHdl
= new XMLSdHeaderFooterVisibilityTypeHdl
;
1374 case XML_SD_TYPE_CELL_ROTATION_ANGLE
:
1375 pHdl
= new XMLSdRotationAngleTypeHdl
;
1377 case XML_TYPE_TEXT_COLUMNS
:
1378 pHdl
= new XMLTextColumnsPropertyHandler
;
1380 case XML_TYPE_COMPLEX_COLOR
:
1381 pHdl
= new XMLComplexColorHandler
;
1386 PutHdlCache(nType
, pHdl
);
1392 XMLShapePropertySetMapper::XMLShapePropertySetMapper(const rtl::Reference
< XMLPropertyHandlerFactory
>& rFactoryRef
,
1394 : XMLPropertySetMapper( aXMLSDProperties
, rFactoryRef
, bForExport
)
1398 XMLShapePropertySetMapper::~XMLShapePropertySetMapper()
1402 XMLShapeExportPropertyMapper::XMLShapeExportPropertyMapper( const rtl::Reference
< XMLPropertySetMapper
>& rMapper
, SvXMLExport
& rExport
)
1403 : SvXMLExportPropertyMapper( rMapper
)
1404 , maNumRuleExp( rExport
)
1405 , mbIsInAutoStyles( true )
1409 XMLShapeExportPropertyMapper::~XMLShapeExportPropertyMapper()
1413 void XMLShapeExportPropertyMapper::ContextFilter(
1414 bool bEnableFoFontFamily
,
1415 std::vector
< XMLPropertyState
>& rProperties
,
1416 const uno::Reference
< beans::XPropertySet
>& rPropSet
) const
1418 XMLPropertyState
* pRepeatOffsetX
= nullptr;
1419 XMLPropertyState
* pRepeatOffsetY
= nullptr;
1420 XMLPropertyState
* pTextAnimationBlinking
= nullptr;
1421 XMLPropertyState
* pTextAnimationKind
= nullptr;
1424 XMLPropertyState
* pFontWorkStyle
= nullptr;
1425 XMLPropertyState
* pFontWorkAdjust
= nullptr;
1426 XMLPropertyState
* pFontWorkDistance
= nullptr;
1427 XMLPropertyState
* pFontWorkStart
= nullptr;
1428 XMLPropertyState
* pFontWorkMirror
= nullptr;
1429 XMLPropertyState
* pFontWorkOutline
= nullptr;
1430 XMLPropertyState
* pFontWorkShadow
= nullptr;
1431 XMLPropertyState
* pFontWorkShadowColor
= nullptr;
1432 XMLPropertyState
* pFontWorkShadowOffsetx
= nullptr;
1433 XMLPropertyState
* pFontWorkShadowOffsety
= nullptr;
1434 XMLPropertyState
* pFontWorkForm
= nullptr;
1435 XMLPropertyState
* pFontWorkHideform
= nullptr;
1436 XMLPropertyState
* pFontWorkShadowTransparence
= nullptr;
1439 XMLPropertyState
* pOLEVisAreaLeft
= nullptr;
1440 XMLPropertyState
* pOLEVisAreaTop
= nullptr;
1441 XMLPropertyState
* pOLEVisAreaWidth
= nullptr;
1442 XMLPropertyState
* pOLEVisAreaHeight
= nullptr;
1443 XMLPropertyState
* pOLEIsInternal
= nullptr;
1446 XMLPropertyState
* pCaptionIsEscRel
= nullptr;
1447 XMLPropertyState
* pCaptionEscRel
= nullptr;
1448 XMLPropertyState
* pCaptionEscAbs
= nullptr;
1451 XMLPropertyState
* pClip11State
= nullptr;
1452 XMLPropertyState
* pClipState
= nullptr;
1454 XMLPropertyState
* pGraphicWritingMode2
= nullptr;
1455 XMLPropertyState
* pShapeWritingMode
= nullptr;
1456 XMLPropertyState
* pTextWritingMode
= nullptr;
1457 XMLPropertyState
* pControlWritingMode
= nullptr;
1459 // filter properties
1460 for( auto& rProp
: rProperties
)
1462 XMLPropertyState
*property
= &rProp
;
1463 if( property
->mnIndex
== -1 )
1466 // find properties with context
1467 // to prevent writing this property set mnIndex member to -1
1468 switch( getPropertySetMapper()->GetEntryContextId( property
->mnIndex
))
1470 case CTF_NUMBERINGRULES
:
1472 if( mbIsInAutoStyles
)
1473 property
->mnIndex
= -1;
1476 case CTF_SD_NUMBERINGRULES_NAME
:
1478 // this property is not exported in the style:properties element
1479 // because it's an XIndexAccess and not a string.
1480 // This will be handled in SvXMLAutoStylePoolP::exportStyleAttributes
1481 // This is suboptimal
1482 if( !mbIsInAutoStyles
)
1483 property
->mnIndex
= -1;
1486 case CTF_WRITINGMODE2
:
1487 pGraphicWritingMode2
= property
;
1489 case CTF_WRITINGMODE
:
1490 pShapeWritingMode
= property
;
1492 case CTF_CONTROLWRITINGMODE
:
1493 pControlWritingMode
= property
;
1495 case CTF_TEXTWRITINGMODE
:
1496 pTextWritingMode
= property
;
1498 case CTF_REPEAT_OFFSET_X
:
1499 pRepeatOffsetX
= property
;
1502 case CTF_REPEAT_OFFSET_Y
:
1503 pRepeatOffsetY
= property
;
1507 case CTF_FILLGRADIENTNAME
:
1508 case CTF_FILLHATCHNAME
:
1509 case CTF_FILLBITMAPNAME
:
1512 if( (property
->maValue
>>= aStr
) && aStr
.isEmpty() )
1513 property
->mnIndex
= -1;
1516 case CTF_TEXTANIMATION_BLINKING
:
1517 pTextAnimationBlinking
= property
;
1519 case CTF_TEXTANIMATION_KIND
:
1520 pTextAnimationKind
= property
;
1524 case CTF_FONTWORK_STYLE
: pFontWorkStyle
= property
; break;
1525 case CTF_FONTWORK_ADJUST
: pFontWorkAdjust
= property
; break;
1526 case CTF_FONTWORK_DISTANCE
: pFontWorkDistance
= property
; break;
1527 case CTF_FONTWORK_START
: pFontWorkStart
= property
; break;
1528 case CTF_FONTWORK_MIRROR
: pFontWorkMirror
= property
; break;
1529 case CTF_FONTWORK_OUTLINE
: pFontWorkOutline
= property
; break;
1530 case CTF_FONTWORK_SHADOW
: pFontWorkShadow
= property
; break;
1531 case CTF_FONTWORK_SHADOWCOLOR
: pFontWorkShadowColor
= property
; break;
1532 case CTF_FONTWORK_SHADOWOFFSETX
: pFontWorkShadowOffsetx
= property
; break;
1533 case CTF_FONTWORK_SHADOWOFFSETY
: pFontWorkShadowOffsety
= property
; break;
1534 case CTF_FONTWORK_FORM
: pFontWorkForm
= property
; break;
1535 case CTF_FONTWORK_HIDEFORM
: pFontWorkHideform
= property
; break;
1536 case CTF_FONTWORK_SHADOWTRANSPARENCE
: pFontWorkShadowTransparence
= property
; break;
1539 case CTF_SD_OLE_VIS_AREA_EXPORT_LEFT
: pOLEVisAreaLeft
= property
; break;
1540 case CTF_SD_OLE_VIS_AREA_EXPORT_TOP
: pOLEVisAreaTop
= property
; break;
1541 case CTF_SD_OLE_VIS_AREA_EXPORT_WIDTH
: pOLEVisAreaWidth
= property
; break;
1542 case CTF_SD_OLE_VIS_AREA_EXPORT_HEIGHT
: pOLEVisAreaHeight
= property
; break;
1543 case CTF_SD_OLE_ISINTERNAL
: pOLEIsInternal
= property
; break;
1545 case CTF_FRAME_DISPLAY_SCROLLBAR
:
1547 if( !property
->maValue
.hasValue() )
1548 property
->mnIndex
= -1;
1551 case CTF_FRAME_MARGIN_HORI
:
1552 case CTF_FRAME_MARGIN_VERT
:
1554 sal_Int32 nValue
= 0;
1555 if( (property
->maValue
>>= nValue
) && (nValue
< 0) )
1556 property
->mnIndex
= -1;
1560 case CTF_SD_MOVE_PROTECT
:
1563 if( (property
->maValue
>>= bProtected
) && !bProtected
)
1564 property
->mnIndex
= -1;
1567 case CTF_SD_SIZE_PROTECT
:
1570 if( (property
->maValue
>>= bProtected
) && !bProtected
)
1571 property
->mnIndex
= -1;
1574 case CTF_CAPTION_ISESCREL
: pCaptionIsEscRel
= property
; break;
1575 case CTF_CAPTION_ESCREL
: pCaptionEscRel
= property
; break;
1576 case CTF_CAPTION_ESCABS
: pCaptionEscAbs
= property
; break;
1577 case CTF_TEXT_CLIP11
: pClip11State
= property
; break;
1578 case CTF_TEXT_CLIP
: pClipState
= property
; break;
1582 if (pGraphicWritingMode2
)
1584 // A style:writing-mode attribute G in graphic-properties is only evaluated if there is no
1585 // style:writing-mode attribute P in the paragraph-properties of the same graphic style.
1586 // Otherwise the value of P is used. For values lr-tb, rl-tb and tb-rl the values G and P
1587 // should be the same. But other values in G cannot be expressed in P and would produce default
1588 // 0 value in P, preventing evaluation of G.
1589 sal_Int16 eGraphicWritingMode
;
1590 if ((pGraphicWritingMode2
->maValue
>>= eGraphicWritingMode
)
1591 && eGraphicWritingMode
>= text::WritingMode2::TB_LR
&& pShapeWritingMode
)
1592 pShapeWritingMode
->mnIndex
= -1;
1595 // check for duplicate writing mode
1596 if( pShapeWritingMode
&& (pTextWritingMode
|| pControlWritingMode
) )
1598 if( pTextWritingMode
)
1599 pTextWritingMode
->mnIndex
= -1;
1600 if( pControlWritingMode
)
1601 pControlWritingMode
->mnIndex
= -1;
1603 text::WritingMode eWritingMode
;
1604 if( pShapeWritingMode
->maValue
>>= eWritingMode
)
1606 if( text::WritingMode_LR_TB
== eWritingMode
)
1608 pShapeWritingMode
->mnIndex
= -1;
1609 pShapeWritingMode
= nullptr;
1613 else if( pTextWritingMode
&& pControlWritingMode
)
1615 pControlWritingMode
->mnIndex
= -1;
1617 sal_Int32 eWritingMode
;
1618 if (pTextWritingMode
->maValue
>>= eWritingMode
)
1620 if (text::WritingMode2::LR_TB
== eWritingMode
)
1622 pTextWritingMode
->mnIndex
= -1;
1623 pTextWritingMode
= nullptr;
1628 // do not export visual area for internal ole objects
1629 if( pOLEIsInternal
)
1632 if( (pOLEIsInternal
->maValue
>>= bInternal
) && !bInternal
)
1636 awt::Rectangle aRect
;
1637 if( rPropSet
->getPropertyValue( u
"VisibleArea"_ustr
) >>= aRect
)
1639 if( pOLEVisAreaLeft
)
1641 pOLEVisAreaLeft
->mnIndex
= getPropertySetMapper()->FindEntryIndex( CTF_SD_OLE_VIS_AREA_IMPORT_LEFT
);
1642 pOLEVisAreaLeft
->maValue
<<= aRect
;
1644 if( pOLEVisAreaTop
)
1646 pOLEVisAreaTop
->mnIndex
= getPropertySetMapper()->FindEntryIndex( CTF_SD_OLE_VIS_AREA_IMPORT_TOP
);
1647 pOLEVisAreaTop
->maValue
<<= aRect
;
1649 if( pOLEVisAreaWidth
)
1651 pOLEVisAreaWidth
->mnIndex
= getPropertySetMapper()->FindEntryIndex( CTF_SD_OLE_VIS_AREA_IMPORT_WIDTH
);
1652 pOLEVisAreaWidth
->maValue
<<= aRect
;
1654 if( pOLEVisAreaHeight
)
1656 pOLEVisAreaHeight
->mnIndex
= getPropertySetMapper()->FindEntryIndex( CTF_SD_OLE_VIS_AREA_IMPORT_HEIGHT
);
1657 pOLEVisAreaHeight
->maValue
<<= aRect
;
1661 catch( uno::Exception
& )
1667 if( pOLEVisAreaLeft
) pOLEVisAreaLeft
->mnIndex
= -1;
1668 if( pOLEVisAreaTop
) pOLEVisAreaTop
->mnIndex
= -1;
1669 if( pOLEVisAreaWidth
) pOLEVisAreaWidth
->mnIndex
= -1;
1670 if( pOLEVisAreaHeight
) pOLEVisAreaHeight
->mnIndex
= -1;
1673 pOLEIsInternal
->mnIndex
= -1;
1676 if( pTextAnimationBlinking
&& pTextAnimationKind
)
1678 drawing::TextAnimationKind eKind
;
1679 if( (pTextAnimationKind
->maValue
>>= eKind
) && eKind
!= drawing::TextAnimationKind_BLINK
)
1681 pTextAnimationBlinking
->mnIndex
= -1;
1685 pTextAnimationKind
->mnIndex
= -1;
1689 if( pRepeatOffsetX
&& pRepeatOffsetY
)
1691 sal_Int32 nOffset
= 0;
1692 if( ( pRepeatOffsetX
->maValue
>>= nOffset
) && ( nOffset
== 0 ) )
1693 pRepeatOffsetX
->mnIndex
= -1;
1695 pRepeatOffsetY
->mnIndex
= -1;
1701 sal_Int32 nStyle
= 0;
1703 if(pFontWorkStyle
->maValue
>>= nStyle
)
1705 if(/*XFormTextStyle::NONE*/4 == nStyle
)
1707 pFontWorkStyle
->mnIndex
= -1;
1709 pFontWorkAdjust
->mnIndex
= -1;
1710 if(pFontWorkDistance
)
1711 pFontWorkDistance
->mnIndex
= -1;
1713 pFontWorkStart
->mnIndex
= -1;
1715 pFontWorkMirror
->mnIndex
= -1;
1716 if(pFontWorkOutline
)
1717 pFontWorkOutline
->mnIndex
= -1;
1719 pFontWorkShadow
->mnIndex
= -1;
1720 if(pFontWorkShadowColor
)
1721 pFontWorkShadowColor
->mnIndex
= -1;
1722 if(pFontWorkShadowOffsetx
)
1723 pFontWorkShadowOffsetx
->mnIndex
= -1;
1724 if(pFontWorkShadowOffsety
)
1725 pFontWorkShadowOffsety
->mnIndex
= -1;
1727 pFontWorkForm
->mnIndex
= -1;
1728 if(pFontWorkHideform
)
1729 pFontWorkHideform
->mnIndex
= -1;
1730 if(pFontWorkShadowTransparence
)
1731 pFontWorkShadowTransparence
->mnIndex
= -1;
1736 if( pCaptionIsEscRel
)
1738 bool bIsRel
= false;
1739 pCaptionIsEscRel
->maValue
>>= bIsRel
;
1743 if( pCaptionEscAbs
)
1744 pCaptionEscAbs
->mnIndex
= -1;
1748 if( pCaptionEscRel
)
1749 pCaptionEscRel
->mnIndex
= -1;
1752 pCaptionIsEscRel
->mnIndex
= -1;
1755 if( pClipState
!= nullptr && pClip11State
!= nullptr )
1756 pClip11State
->mnIndex
= -1;
1758 SvXMLExportPropertyMapper::ContextFilter(bEnableFoFontFamily
, rProperties
, rPropSet
);
1761 void XMLShapeExportPropertyMapper::handleSpecialItem(
1762 comphelper::AttributeList
& rAttrList
,
1763 const XMLPropertyState
& rProperty
,
1764 const SvXMLUnitConverter
& rUnitConverter
,
1765 const SvXMLNamespaceMap
& rNamespaceMap
,
1766 const ::std::vector
< XMLPropertyState
> *pProperties
,
1767 sal_uInt32 nIdx
) const
1769 switch( getPropertySetMapper()->GetEntryContextId( rProperty
.mnIndex
) )
1771 case CTF_SD_CONTROL_SHAPE_DATA_STYLE
:
1772 // not to be handled by the base class
1776 SvXMLExportPropertyMapper::handleSpecialItem( rAttrList
, rProperty
, rUnitConverter
, rNamespaceMap
, pProperties
, nIdx
);
1781 void XMLShapeExportPropertyMapper::handleElementItem(
1782 SvXMLExport
& rExport
,
1783 const XMLPropertyState
& rProperty
,
1784 SvXmlExportFlags nFlags
,
1785 const ::std::vector
< XMLPropertyState
> *pProperties
,
1786 sal_uInt32 nIdx
) const
1788 switch( getPropertySetMapper()->GetEntryContextId( rProperty
.mnIndex
) )
1790 case CTF_NUMBERINGRULES
:
1792 // only export list-styles as elements in styles section
1793 if( !mbIsInAutoStyles
)
1795 uno::Reference
< container::XIndexReplace
> xNumRule( rProperty
.maValue
, uno::UNO_QUERY
);
1797 const_cast<XMLShapeExportPropertyMapper
*>(this)->maNumRuleExp
.exportNumberingRule(GetStyleName(), false, xNumRule
);
1802 SvXMLExportPropertyMapper::handleElementItem( rExport
, rProperty
, nFlags
, pProperties
, nIdx
);
1807 XMLPageExportPropertyMapper::XMLPageExportPropertyMapper( const rtl::Reference
< XMLPropertySetMapper
>& rMapper
, SvXMLExport
& rExport
) :
1808 SvXMLExportPropertyMapper( rMapper
),
1813 XMLPageExportPropertyMapper::~XMLPageExportPropertyMapper()
1817 void XMLPageExportPropertyMapper::ContextFilter(
1818 bool bEnableFoFontFamily
,
1819 std::vector
< XMLPropertyState
>& rProperties
,
1820 const uno::Reference
< beans::XPropertySet
>& rPropSet
) const
1822 XMLPropertyState
* pRepeatOffsetX
= nullptr;
1823 XMLPropertyState
* pRepeatOffsetY
= nullptr;
1824 XMLPropertyState
* pTransType
= nullptr;
1825 XMLPropertyState
* pTransDuration
= nullptr;
1826 XMLPropertyState
* pDateTimeUpdate
= nullptr;
1827 XMLPropertyState
* pDateTimeFormat
= nullptr;
1828 XMLPropertyState
* pTransitionFadeColor
= nullptr;
1830 sal_Int16 nTransitionType
= 0;
1832 // filter properties
1833 for( auto& rProp
: rProperties
)
1835 XMLPropertyState
*property
= &rProp
;
1836 if( property
->mnIndex
== -1 )
1839 // find properties with context
1840 // to prevent writing this property set mnIndex member to -1
1841 switch( getPropertySetMapper()->GetEntryContextId( property
->mnIndex
))
1844 case CTF_REPEAT_OFFSET_X
:
1845 pRepeatOffsetX
= property
;
1848 case CTF_REPEAT_OFFSET_Y
:
1849 pRepeatOffsetY
= property
;
1851 case CTF_PAGE_TRANS_TYPE
:
1852 pTransType
= property
;
1854 case CTF_PAGE_TRANS_STYLE
:
1855 if( mrExport
.getExportFlags() & SvXMLExportFlags::OASIS
)
1856 (*property
).mnIndex
= -1;
1858 case CTF_PAGE_TRANSITION_TYPE
:
1860 if( (!(mrExport
.getExportFlags() & SvXMLExportFlags::OASIS
)) ||
1861 (((*property
).maValue
>>= nTransitionType
) && (nTransitionType
== 0)) )
1862 (*property
).mnIndex
= -1;
1865 case CTF_PAGE_TRANSITION_SUBTYPE
:
1867 sal_Int16 nTransitionSubtype
= sal_Int16();
1868 if( (!(mrExport
.getExportFlags() & SvXMLExportFlags::OASIS
)) ||
1869 (((*property
).maValue
>>= nTransitionSubtype
) && (nTransitionSubtype
== 0)) )
1870 (*property
).mnIndex
= -1;
1874 case CTF_PAGE_TRANSITION_DIRECTION
:
1877 if( (!(mrExport
.getExportFlags() & SvXMLExportFlags::OASIS
)) ||
1878 (((*property
).maValue
>>= bDirection
) && bDirection
) )
1879 (*property
).mnIndex
= -1;
1882 case CTF_PAGE_TRANSITION_FADECOLOR
:
1883 if( !(mrExport
.getExportFlags() & SvXMLExportFlags::OASIS
) )
1884 (*property
).mnIndex
= -1;
1886 pTransitionFadeColor
= property
;
1888 case CTF_PAGE_TRANS_SPEED
:
1890 presentation::AnimationSpeed aEnum
;
1891 if( ((*property
).maValue
>>= aEnum
) && aEnum
== presentation::AnimationSpeed_MEDIUM
)
1892 (*property
).mnIndex
= -1;
1895 case CTF_PAGE_VISIBLE
:
1897 bool bVisible
= false;
1898 (*property
).maValue
>>= bVisible
;
1900 (*property
).mnIndex
= -1;
1903 case CTF_PAGE_TRANS_DURATION
:
1904 pTransDuration
= property
;
1906 case CTF_HEADER_TEXT
:
1907 case CTF_FOOTER_TEXT
:
1908 case CTF_DATE_TIME_TEXT
:
1911 (*property
).maValue
>>= aValue
;
1912 if( aValue
.isEmpty() )
1913 (*property
).mnIndex
= -1;
1917 case CTF_DATE_TIME_UPDATE
:
1918 pDateTimeUpdate
= property
;
1921 case CTF_DATE_TIME_FORMAT
:
1922 pDateTimeFormat
= property
;
1927 if( pTransitionFadeColor
&& nTransitionType
!= css::animations::TransitionType::FADE
)
1928 pTransitionFadeColor
->mnIndex
= -1;
1930 if( pDateTimeFormat
&& pDateTimeUpdate
)
1932 bool bIsFixed
= false;
1933 pDateTimeUpdate
->maValue
>>= bIsFixed
;
1935 pDateTimeFormat
->mnIndex
= -1;
1938 if( pRepeatOffsetX
&& pRepeatOffsetY
)
1940 sal_Int32 nOffset
= 0;
1941 if( ( pRepeatOffsetX
->maValue
>>= nOffset
) && ( nOffset
== 0 ) )
1942 pRepeatOffsetX
->mnIndex
= -1;
1944 pRepeatOffsetY
->mnIndex
= -1;
1947 if( pTransType
&& pTransDuration
)
1949 sal_Int32 nChange
= 0;
1950 pTransType
->maValue
>>= nChange
;
1952 // only export duration for automatic
1954 pTransDuration
->mnIndex
= -1;
1956 // do not export default transition change
1958 pTransType
->mnIndex
= -1;
1961 SvXMLExportPropertyMapper::ContextFilter(bEnableFoFontFamily
, rProperties
, rPropSet
);
1964 void XMLPageExportPropertyMapper::handleElementItem(
1965 SvXMLExport
& rExport
,
1966 const XMLPropertyState
& rProperty
,
1967 SvXmlExportFlags nFlags
,
1968 const ::std::vector
< XMLPropertyState
> *pProperties
,
1969 sal_uInt32 nIdx
) const
1971 switch( getPropertySetMapper()->GetEntryContextId( rProperty
.mnIndex
) )
1973 case CTF_PAGE_SOUND_URL
:
1976 if( (rProperty
.maValue
>>= aSoundURL
) && !aSoundURL
.isEmpty() )
1978 mrExport
.AddAttribute(XML_NAMESPACE_XLINK
, XML_HREF
, mrExport
.GetRelativeReference(aSoundURL
) );
1979 mrExport
.AddAttribute( XML_NAMESPACE_XLINK
, XML_TYPE
, XML_SIMPLE
);
1980 mrExport
.AddAttribute( XML_NAMESPACE_XLINK
, XML_SHOW
, XML_NEW
);
1981 mrExport
.AddAttribute( XML_NAMESPACE_XLINK
, XML_ACTUATE
, XML_ONREQUEST
);
1982 SvXMLElementExport
aElem( mrExport
, XML_NAMESPACE_PRESENTATION
, XML_SOUND
, true, true );
1987 SvXMLExportPropertyMapper::handleElementItem( rExport
, rProperty
, nFlags
, pProperties
, nIdx
);
1992 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */