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/TextureKind.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>
69 using ::com::sun::star::uno::Any
;
71 using namespace ::com::sun::star
;
72 using namespace ::xmloff::token
;
74 #define MAP_(name,prefix,token,type,context) { name, prefix, token, type, context, SvtSaveOptions::ODFSVER_010, false }
75 #define MAPV_(name,prefix,token,type,context,version) { name, 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() { nullptr }
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( PROP_UserDefinedAttributes
, XML_NAMESPACE_TEXT
, XML_XMLNS
, XML_TYPE_ATTRIBUTE_CONTAINER
| MID_FLAG_SPECIAL_ITEM
, 0 ),
94 GMAP( PROP_LineStyle
, XML_NAMESPACE_DRAW
, XML_STROKE
, XML_SD_TYPE_STROKE
, 0 ),
95 GMAP( PROP_LineDashName
, XML_NAMESPACE_DRAW
, XML_STROKE_DASH
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_DASHNAME
),
96 GMAP( PROP_LineWidth
, XML_NAMESPACE_SVG
, XML_STROKE_WIDTH
, XML_TYPE_MEASURE
, 0 ),
97 GMAP_D( PROP_LineColor
, XML_NAMESPACE_SVG
, XML_STROKE_COLOR
, XML_TYPE_COLOR
, 0),
98 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
),
99 GMAP( PROP_LineStartName
, XML_NAMESPACE_DRAW
, XML_MARKER_START
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_LINESTARTNAME
),
100 GMAP( PROP_LineStartWidth
, XML_NAMESPACE_DRAW
, XML_MARKER_START_WIDTH
, XML_TYPE_MEASURE
, 0 ),
101 GMAP( PROP_LineStartCenter
, XML_NAMESPACE_DRAW
, XML_MARKER_START_CENTER
, XML_TYPE_BOOL
, 0 ),
102 GMAP( PROP_LineEndName
, XML_NAMESPACE_DRAW
, XML_MARKER_END
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_LINEENDNAME
),
103 GMAP( PROP_LineEndWidth
, XML_NAMESPACE_DRAW
, XML_MARKER_END_WIDTH
, XML_TYPE_MEASURE
, 0 ),
104 GMAP( PROP_LineEndCenter
, XML_NAMESPACE_DRAW
, XML_MARKER_END_CENTER
, XML_TYPE_BOOL
, 0 ),
105 GMAP( PROP_LineTransparence
, XML_NAMESPACE_SVG
, XML_STROKE_OPACITY
, XML_SD_TYPE_OPACITY
, 0 ),
106 GMAP( PROP_LineJoint
, XML_NAMESPACE_DRAW
, XML_STROKE_LINEJOIN
, XML_SD_TYPE_LINEJOIN
, 0 ),
107 GMAP( PROP_LineCap
, XML_NAMESPACE_SVG
, XML_STROKE_LINECAP
, XML_SD_TYPE_LINECAP
, 0 ),
110 GMAP( PROP_FillStyle
, XML_NAMESPACE_DRAW
, XML_FILL
, XML_SD_TYPE_FILLSTYLE
, CTF_FILLSTYLE
),
111 GMAP_D(PROP_FillColor
, XML_NAMESPACE_DRAW
, XML_FILL_COLOR
, XML_TYPE_COLOR
, CTF_FILLCOLOR
),
112 GMAP_D(PROP_FillColor2
, XML_NAMESPACE_DRAW
, XML_SECONDARY_FILL_COLOR
, XML_TYPE_COLOR
, 0),
113 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
),
114 GMAP( PROP_FillGradientName
, XML_NAMESPACE_DRAW
, XML_FILL_GRADIENT_NAME
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_FILLGRADIENTNAME
),
115 GMAP( PROP_FillGradientStepCount
, XML_NAMESPACE_DRAW
, XML_GRADIENT_STEP_COUNT
, XML_TYPE_NUMBER16
, 0 ),
116 GMAP( PROP_FillHatchName
, XML_NAMESPACE_DRAW
, XML_FILL_HATCH_NAME
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_FILLHATCHNAME
),
117 GMAP( PROP_FillBackground
, XML_NAMESPACE_DRAW
, XML_FILL_HATCH_SOLID
, XML_TYPE_BOOL
, 0 ),
118 GMAPV( PROP_FillUseSlideBackground
, XML_NAMESPACE_LO_EXT
, XML_FILL_USE_SLIDE_BACKGROUND
, XML_TYPE_BOOL
, 0, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
119 GMAP( PROP_FillBitmapName
, XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_NAME
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_FILLBITMAPNAME
),
120 GMAP( PROP_FillTransparence
, XML_NAMESPACE_DRAW
, XML_OPACITY
, XML_TYPE_NEG_PERCENT16
|MID_FLAG_MULTI_PROPERTY
, 0 ), // exists in SW, too
121 GMAP( PROP_FillTransparenceGradientName
, XML_NAMESPACE_DRAW
, XML_OPACITY_NAME
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_FILLTRANSNAME
),
122 GMAP( PROP_FillBitmapSizeX
, XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_WIDTH
, XML_SD_TYPE_FILLBITMAPSIZE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
123 GMAP( PROP_FillBitmapLogicalSize
, XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_WIDTH
, XML_SD_TYPE_LOGICAL_SIZE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
124 GMAP( PROP_FillBitmapSizeY
, XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_HEIGHT
, XML_SD_TYPE_FILLBITMAPSIZE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
125 GMAP( PROP_FillBitmapLogicalSize
, XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_HEIGHT
, XML_SD_TYPE_LOGICAL_SIZE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
126 GMAP( PROP_FillBitmapMode
, XML_NAMESPACE_STYLE
,XML_REPEAT
, XML_SD_TYPE_BITMAP_MODE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
127 GMAP( PROP_FillBitmapPositionOffsetX
, XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_REF_POINT_X
, XML_TYPE_PERCENT
, 0 ),
128 GMAP( PROP_FillBitmapPositionOffsetY
, XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_REF_POINT_Y
, XML_TYPE_PERCENT
, 0 ),
129 GMAP( PROP_FillBitmapRectanglePoint
, XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_REF_POINT
, XML_SD_TYPE_BITMAP_REFPOINT
, 0 ),
130 GMAP( PROP_FillBitmapOffsetX
, XML_NAMESPACE_DRAW
, XML_TILE_REPEAT_OFFSET
, XML_SD_TYPE_BITMAPREPOFFSETX
|MID_FLAG_MULTI_PROPERTY
, CTF_REPEAT_OFFSET_X
),
131 GMAP( PROP_FillBitmapOffsetY
, XML_NAMESPACE_DRAW
, XML_TILE_REPEAT_OFFSET
, XML_SD_TYPE_BITMAPREPOFFSETY
|MID_FLAG_MULTI_PROPERTY
, CTF_REPEAT_OFFSET_Y
),
133 // text frame attributes
134 GMAP( PROP_TextHorizontalAdjust
, XML_NAMESPACE_DRAW
, XML_TEXTAREA_HORIZONTAL_ALIGN
, XML_SD_TYPE_TEXT_ALIGN
, 0 ),
135 GMAP( PROP_TextVerticalAdjust
, XML_NAMESPACE_DRAW
, XML_TEXTAREA_VERTICAL_ALIGN
, XML_SD_TYPE_VERTICAL_ALIGN
, 0 ),
136 GMAP( PROP_TextAutoGrowHeight
, XML_NAMESPACE_DRAW
, XML_AUTO_GROW_HEIGHT
, XML_TYPE_BOOL
, 0 ),
137 GMAP( PROP_TextAutoGrowWidth
, XML_NAMESPACE_DRAW
, XML_AUTO_GROW_WIDTH
, XML_TYPE_BOOL
, 0 ),
138 GMAP( PROP_TextFitToSize
, XML_NAMESPACE_DRAW
, XML_FIT_TO_SIZE
, XML_SD_TYPE_FITTOSIZE
|MID_FLAG_MERGE_PROPERTY
, 0),
139 GMAPV( PROP_TextFitToSize
, XML_NAMESPACE_STYLE
, XML_SHRINK_TO_FIT
, XML_SD_TYPE_FITTOSIZE_AUTOFIT
|MID_FLAG_MERGE_PROPERTY
, 0, SvtSaveOptions::ODFSVER_012
),
140 GMAP( PROP_TextContourFrame
, XML_NAMESPACE_DRAW
, XML_FIT_TO_CONTOUR
, XML_TYPE_BOOL
, 0 ),
141 GMAP( PROP_TextMaximumFrameHeight
, XML_NAMESPACE_FO
, XML_MAX_HEIGHT
, XML_TYPE_MEASURE
, 0 ),
142 GMAP( PROP_TextMaximumFrameWidth
, XML_NAMESPACE_FO
, XML_MAX_WIDTH
, XML_TYPE_MEASURE
, 0 ),
143 GMAP( PROP_TextMinimumFrameHeight
, XML_NAMESPACE_FO
, XML_MIN_HEIGHT
, XML_TYPE_MEASURE
|MID_FLAG_MULTI_PROPERTY
, 0 ), // exists in SW, too
144 GMAP( PROP_TextMinimumFrameWidth
, XML_NAMESPACE_FO
, XML_MIN_WIDTH
, XML_TYPE_MEASURE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
145 GMAP( PROP_TextUpperDistance
, XML_NAMESPACE_FO
, XML_PADDING_TOP
, XML_TYPE_MEASURE
|MID_FLAG_MULTI_PROPERTY
, 0 ), // exists in SW, too
146 GMAP( PROP_TextLowerDistance
, XML_NAMESPACE_FO
, XML_PADDING_BOTTOM
, XML_TYPE_MEASURE
|MID_FLAG_MULTI_PROPERTY
, 0 ), // exists in SW, too
147 GMAP( PROP_TextLeftDistance
, XML_NAMESPACE_FO
, XML_PADDING_LEFT
, XML_TYPE_MEASURE
|MID_FLAG_MULTI_PROPERTY
, 0 ), // exists in SW, too
148 GMAP( PROP_TextRightDistance
, XML_NAMESPACE_FO
, XML_PADDING_RIGHT
, XML_TYPE_MEASURE
|MID_FLAG_MULTI_PROPERTY
, 0 ), // exists in SW, too
149 PMAP( PROP_TextWritingMode
, XML_NAMESPACE_STYLE
,XML_WRITING_MODE
, XML_SD_TYPE_WRITINGMODE
|MID_FLAG_MULTI_PROPERTY
, CTF_WRITINGMODE
),
150 GMAP( PROP_NumberingRules
, XML_NAMESPACE_TEXT
, XML_LIST_STYLE
, XML_SD_TYPE_NUMBULLET
|MID_FLAG_ELEMENT_ITEM
, CTF_NUMBERINGRULES
),
151 GMAP( PROP_NumberingRules
, XML_NAMESPACE_TEXT
, XML_LIST_STYLE_NAME
, XML_TYPE_STRING
, CTF_SD_NUMBERINGRULES_NAME
),
152 GMAP( PROP_TextWordWrap
, XML_NAMESPACE_FO
, XML_WRAP_OPTION
, XML_TYPE_WRAP_OPTION
, 0 ),
153 GMAP( PROP_TextChainNextName
, XML_NAMESPACE_DRAW
, XML_CHAIN_NEXT_NAME
, XML_TYPE_STRING
, 0 ),
154 GMAP( PROP_TextClipVerticalOverflow
, XML_NAMESPACE_STYLE
, XML_OVERFLOW_BEHAVIOR
, XML_TYPE_TEXT_OVERFLOW_BEHAVIOR
, 0 ),
156 GMAP( PROP_TextColumns
, XML_NAMESPACE_STYLE
, XML_COLUMNS
, XML_TYPE_TEXT_COLUMNS
|MID_FLAG_ELEMENT_ITEM
, CTF_TEXTCOLUMNS
),
159 GMAP( PROP_Shadow
, XML_NAMESPACE_DRAW
, XML_SHADOW
, XML_SD_TYPE_VISIBLE_HIDDEN
, 0 ),
160 GMAP( PROP_ShadowXDistance
, XML_NAMESPACE_DRAW
, XML_SHADOW_OFFSET_X
, XML_TYPE_MEASURE
, 0 ),
161 GMAP( PROP_ShadowYDistance
, XML_NAMESPACE_DRAW
, XML_SHADOW_OFFSET_Y
, XML_TYPE_MEASURE
, 0 ),
162 GMAP( PROP_ShadowColor
, XML_NAMESPACE_DRAW
, XML_SHADOW_COLOR
, XML_TYPE_COLOR
, 0 ),
163 GMAP( PROP_ShadowTransparence
, XML_NAMESPACE_DRAW
, XML_SHADOW_OPACITY
, XML_TYPE_NEG_PERCENT
, 0 ),
164 GMAPV( PROP_ShadowBlur
, XML_NAMESPACE_LO_EXT
, XML_SHADOW_BLUR
, XML_TYPE_MEASURE
, 0, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
167 GMAPV( PROP_GlowEffectRadius
, XML_NAMESPACE_LO_EXT
, XML_GLOW_RADIUS
, XML_TYPE_MEASURE
, 0, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
168 GMAPV( PROP_GlowEffectColor
, XML_NAMESPACE_LO_EXT
, XML_GLOW_COLOR
, XML_TYPE_COLOR
, 0, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
169 GMAPV( PROP_GlowEffectTransparency
, XML_NAMESPACE_LO_EXT
, XML_GLOW_TRANSPARENCY
, XML_TYPE_PERCENT16
, 0, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
171 // soft edge attributes
172 GMAPV( PROP_SoftEdgeRadius
, XML_NAMESPACE_LO_EXT
, XML_SOFTEDGE_RADIUS
, XML_TYPE_MEASURE
, 0, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
174 // graphic attributes
175 GMAP( PROP_GraphicColorMode
, XML_NAMESPACE_DRAW
, XML_COLOR_MODE
, XML_TYPE_COLOR_MODE
, 0 ), // exists in SW, too, with same property name
176 GMAP( PROP_AdjustLuminance
, XML_NAMESPACE_DRAW
, XML_LUMINANCE
, XML_TYPE_PERCENT16
, 0 ), // signed? exists in SW, too, with same property name
177 GMAP( PROP_AdjustContrast
, XML_NAMESPACE_DRAW
, XML_CONTRAST
, XML_TYPE_PERCENT16
, 0 ), // signed? exists in SW, too, with same property name
178 GMAP( PROP_Gamma
, XML_NAMESPACE_DRAW
, XML_GAMMA
, XML_TYPE_DOUBLE_PERCENT
, 0 ), // signed? exists in SW, too, with same property name
179 GMAP( PROP_AdjustRed
, XML_NAMESPACE_DRAW
, XML_RED
, XML_TYPE_PERCENT16
, 0 ), // signed? exists in SW, too, with same property name
180 GMAP( PROP_AdjustGreen
, XML_NAMESPACE_DRAW
, XML_GREEN
, XML_TYPE_PERCENT16
, 0 ), // signed? exists in SW, too, with same property name
181 GMAP( PROP_AdjustBlue
, XML_NAMESPACE_DRAW
, XML_BLUE
, XML_TYPE_PERCENT16
, 0 ), // signed? exists in SW, too, with same property name
182 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
183 GMAP( PROP_GraphicCrop
, XML_NAMESPACE_FO
, XML_CLIP
, XML_TYPE_TEXT_CLIP11
, CTF_TEXT_CLIP11
), // exists in SW, too, with same property name
184 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#
185 GMAP( PROP_IsMirrored
, XML_NAMESPACE_STYLE
, XML_MIRROR
, XML_TYPE_SD_MIRROR
|MID_FLAG_MULTI_PROPERTY
, 0 ), // exists in SW, too // #i40214#
187 // animation text attributes
188 TMAP( PROP_TextAnimationKind
, XML_NAMESPACE_STYLE
,XML_TEXT_BLINKING
, XML_TYPE_TEXT_ANIMATION_BLINKING
, CTF_TEXTANIMATION_BLINKING
),
189 GMAP( PROP_TextAnimationKind
, XML_NAMESPACE_TEXT
, XML_ANIMATION
, XML_TYPE_TEXT_ANIMATION
, CTF_TEXTANIMATION_KIND
),
190 GMAP( PROP_TextAnimationDirection
, XML_NAMESPACE_TEXT
, XML_ANIMATION_DIRECTION
, XML_TYPE_TEXT_ANIMATION_DIRECTION
, 0 ),
191 GMAP( PROP_TextAnimationStartInside
, XML_NAMESPACE_TEXT
, XML_ANIMATION_START_INSIDE
, XML_TYPE_BOOL
, 0 ),
192 GMAP( PROP_TextAnimationStopInside
, XML_NAMESPACE_TEXT
, XML_ANIMATION_STOP_INSIDE
, XML_TYPE_BOOL
, 0 ),
193 GMAP( PROP_TextAnimationCount
, XML_NAMESPACE_TEXT
, XML_ANIMATION_REPEAT
, XML_TYPE_NUMBER16
, 0 ),
194 GMAP( PROP_TextAnimationDelay
, XML_NAMESPACE_TEXT
, XML_ANIMATION_DELAY
, XML_TYPE_DURATION16_MS
, 0 ),
195 GMAP( PROP_TextAnimationAmount
, XML_NAMESPACE_TEXT
, XML_ANIMATION_STEPS
, XML_TYPE_TEXT_ANIMATION_STEPS
, 0 ),
197 // connector attributes
198 GMAP( PROP_EdgeNode1HorzDist
, XML_NAMESPACE_DRAW
, XML_START_LINE_SPACING_HORIZONTAL
, XML_TYPE_MEASURE
, 0 ),
199 GMAP( PROP_EdgeNode1VertDist
, XML_NAMESPACE_DRAW
, XML_START_LINE_SPACING_VERTICAL
, XML_TYPE_MEASURE
, 0 ),
200 GMAP( PROP_EdgeNode2HorzDist
, XML_NAMESPACE_DRAW
, XML_END_LINE_SPACING_HORIZONTAL
, XML_TYPE_MEASURE
, 0 ),
201 GMAP( PROP_EdgeNode2VertDist
, XML_NAMESPACE_DRAW
, XML_END_LINE_SPACING_VERTICAL
, XML_TYPE_MEASURE
, 0 ),
203 // measure attributes
204 GMAP( PROP_MeasureLineDistance
, XML_NAMESPACE_DRAW
, XML_LINE_DISTANCE
, XML_TYPE_MEASURE
, 0 ),
205 GMAP( PROP_MeasureHelpLineOverhang
, XML_NAMESPACE_DRAW
, XML_GUIDE_OVERHANG
, XML_TYPE_MEASURE
, 0 ),
206 GMAP( PROP_MeasureHelpLineDistance
, XML_NAMESPACE_DRAW
, XML_GUIDE_DISTANCE
, XML_TYPE_MEASURE
, 0 ),
207 GMAP( PROP_MeasureHelpLine1Length
, XML_NAMESPACE_DRAW
, XML_START_GUIDE
, XML_TYPE_MEASURE
, 0 ),
208 GMAP( PROP_MeasureHelpLine2Length
, XML_NAMESPACE_DRAW
, XML_END_GUIDE
, XML_TYPE_MEASURE
, 0 ),
209 GMAP( PROP_MeasureTextHorizontalPosition
, XML_NAMESPACE_DRAW
, XML_MEASURE_ALIGN
, XML_SD_TYPE_MEASURE_HALIGN
, 0 ),
210 GMAP( PROP_MeasureTextVerticalPosition
, XML_NAMESPACE_DRAW
, XML_MEASURE_VERTICAL_ALIGN
, XML_SD_TYPE_MEASURE_VALIGN
, 0 ),
211 GMAP( PROP_MeasureUnit
, XML_NAMESPACE_DRAW
, XML_UNIT
, XML_SD_TYPE_MEASURE_UNIT
, 0 ),
212 GMAP( PROP_MeasureShowUnit
, XML_NAMESPACE_DRAW
, XML_SHOW_UNIT
, XML_TYPE_BOOL
, 0 ),
213 GMAP( PROP_MeasureBelowReferenceEdge
, XML_NAMESPACE_DRAW
, XML_PLACING
, XML_SD_TYPE_MEASURE_PLACING
, 0 ),
214 GMAP( PROP_MeasureTextRotate90
, XML_NAMESPACE_DRAW
, XML_PARALLEL
, XML_TYPE_BOOL
, 0 ),
215 GMAP( PROP_MeasureDecimalPlaces
, XML_NAMESPACE_DRAW
, XML_DECIMAL_PLACES
, XML_TYPE_NUMBER16
, 0 ),
217 // 3D geometry attributes
218 GMAP( PROP_D3DHorizontalSegments
, XML_NAMESPACE_DR3D
, XML_HORIZONTAL_SEGMENTS
, XML_TYPE_NUMBER
, 0 ),
219 GMAP( PROP_D3DVerticalSegments
, XML_NAMESPACE_DR3D
, XML_VERTICAL_SEGMENTS
, XML_TYPE_NUMBER
, 0 ),
220 GMAP( PROP_D3DPercentDiagonal
, XML_NAMESPACE_DR3D
, XML_EDGE_ROUNDING
, XML_TYPE_PERCENT
, 0 ),
221 GMAP( PROP_D3DBackscale
, XML_NAMESPACE_DR3D
, XML_BACK_SCALE
, XML_TYPE_PERCENT
, 0 ),
222 GMAP( PROP_D3DEndAngle
, XML_NAMESPACE_DR3D
, XML_END_ANGLE
, XML_TYPE_NUMBER
, 0 ),
223 GMAP( PROP_D3DDepth
, XML_NAMESPACE_DR3D
, XML_DEPTH
, XML_TYPE_MEASURE
, 0 ),
224 GMAP( PROP_D3DDoubleSided
, XML_NAMESPACE_DR3D
, XML_BACKFACE_CULLING
, XML_SD_TYPE_BACKFACE_CULLING
, 0 ),
226 // #107245# New 3D properties which are possible for lathe and extrude 3d objects
227 GMAP( PROP_D3DCloseFront
, XML_NAMESPACE_DR3D
, XML_CLOSE_FRONT
, XML_TYPE_BOOL
, 0 ),
228 GMAP( PROP_D3DCloseBack
, XML_NAMESPACE_DR3D
, XML_CLOSE_BACK
, XML_TYPE_BOOL
, 0 ),
230 // 3D lighting attributes
231 GMAP( PROP_D3DNormalsKind
, XML_NAMESPACE_DR3D
, XML_NORMALS_KIND
, XML_SD_TYPE_NORMALS_KIND
, 0 ),
232 GMAP( PROP_D3DNormalsInvert
, XML_NAMESPACE_DR3D
, XML_NORMALS_DIRECTION
, XML_SD_TYPE_NORMALS_DIRECTION
, 0 ),
234 // 3D texture attributes
235 GMAP( PROP_D3DTextureProjectionX
, XML_NAMESPACE_DR3D
, XML_TEX_GENERATION_MODE_X
, XML_SD_TYPE_TEX_GENERATION_MODE_X
, 0 ),
236 GMAP( PROP_D3DTextureProjectionY
, XML_NAMESPACE_DR3D
, XML_TEX_GENERATION_MODE_Y
, XML_SD_TYPE_TEX_GENERATION_MODE_Y
, 0 ),
237 GMAP( PROP_D3DTextureKind
, XML_NAMESPACE_DR3D
, XML_TEX_KIND
, XML_SD_TYPE_TEX_KIND
, 0 ),
238 GMAP( PROP_D3DTextureMode
, XML_NAMESPACE_DR3D
, XML_TEX_MODE
, XML_SD_TYPE_TEX_MODE
, 0 ),
239 GMAP( PROP_D3DTextureFilter
, XML_NAMESPACE_DR3D
, XML_TEX_FILTER
, XML_SD_TYPE_BACKFACE_CULLING
, 0 ),
241 // 3D material attributes
242 GMAP( PROP_D3DMaterialColor
, XML_NAMESPACE_DR3D
, XML_DIFFUSE_COLOR
, XML_TYPE_COLOR
, 0 ),
243 GMAP( PROP_D3DMaterialEmission
, XML_NAMESPACE_DR3D
, XML_EMISSIVE_COLOR
, XML_TYPE_COLOR
, 0 ),
244 GMAP( PROP_D3DMaterialSpecular
, XML_NAMESPACE_DR3D
, XML_SPECULAR_COLOR
, XML_TYPE_COLOR
, 0 ),
245 GMAP( PROP_D3DMaterialSpecularIntensity
, XML_NAMESPACE_DR3D
, XML_SHININESS
, XML_TYPE_PERCENT
, 0 ),
247 // 3D shadow attributes
248 GMAP( PROP_D3DShadow3D
, XML_NAMESPACE_DR3D
, XML_SHADOW
, XML_SD_TYPE_VISIBLE_HIDDEN
, 0 ),
250 // #FontWork# attributes
251 GMAP( PROP_FontWorkStyle
, XML_NAMESPACE_DRAW
, XML_FONTWORK_STYLE
, XML_SD_TYPE_FONTWORK_STYLE
| MID_FLAG_ELEMENT_ITEM_EXPORT
, CTF_FONTWORK_STYLE
),
252 GMAP( PROP_FontWorkAdjust
, XML_NAMESPACE_DRAW
, XML_FONTWORK_ADJUST
, XML_SD_TYPE_FONTWORK_ADJUST
| MID_FLAG_ELEMENT_ITEM_EXPORT
,CTF_FONTWORK_ADJUST
),
253 GMAP( PROP_FontWorkDistance
, XML_NAMESPACE_DRAW
, XML_FONTWORK_DISTANCE
, XML_TYPE_MEASURE
| MID_FLAG_ELEMENT_ITEM_EXPORT
, CTF_FONTWORK_DISTANCE
),
254 GMAP( PROP_FontWorkStart
, XML_NAMESPACE_DRAW
, XML_FONTWORK_START
, XML_TYPE_MEASURE
| MID_FLAG_ELEMENT_ITEM_EXPORT
, CTF_FONTWORK_START
),
255 GMAP( PROP_FontWorkMirror
, XML_NAMESPACE_DRAW
, XML_FONTWORK_MIRROR
, XML_TYPE_BOOL
| MID_FLAG_ELEMENT_ITEM_EXPORT
, CTF_FONTWORK_MIRROR
),
256 GMAP( PROP_FontWorkOutline
, XML_NAMESPACE_DRAW
, XML_FONTWORK_OUTLINE
, XML_TYPE_BOOL
| MID_FLAG_ELEMENT_ITEM_EXPORT
, CTF_FONTWORK_OUTLINE
),
257 GMAP( PROP_FontWorkShadow
, XML_NAMESPACE_DRAW
, XML_FONTWORK_SHADOW
, XML_SD_TYPE_FONTWORK_SHADOW
| MID_FLAG_ELEMENT_ITEM_EXPORT
,CTF_FONTWORK_SHADOW
),
258 GMAP( PROP_FontWorkShadowColor
, XML_NAMESPACE_DRAW
, XML_FONTWORK_SHADOW_COLOR
, XML_TYPE_COLOR
| MID_FLAG_ELEMENT_ITEM_EXPORT
, CTF_FONTWORK_SHADOWCOLOR
),
259 GMAP( PROP_FontWorkShadowOffsetX
, XML_NAMESPACE_DRAW
, XML_FONTWORK_SHADOW_OFFSET_X
, XML_TYPE_MEASURE
| MID_FLAG_ELEMENT_ITEM_EXPORT
, CTF_FONTWORK_SHADOWOFFSETX
),
260 GMAP( PROP_FontWorkShadowOffsetY
, XML_NAMESPACE_DRAW
, XML_FONTWORK_SHADOW_OFFSET_Y
, XML_TYPE_MEASURE
| MID_FLAG_ELEMENT_ITEM_EXPORT
, CTF_FONTWORK_SHADOWOFFSETY
),
261 GMAP( PROP_FontWorkForm
, XML_NAMESPACE_DRAW
, XML_FONTWORK_FORM
, XML_SD_TYPE_FONTWORK_FORM
| MID_FLAG_ELEMENT_ITEM_EXPORT
, CTF_FONTWORK_FORM
),
262 GMAP( PROP_FontWorkHideForm
, XML_NAMESPACE_DRAW
, XML_FONTWORK_HIDE_FORM
, XML_TYPE_BOOL
| MID_FLAG_ELEMENT_ITEM_EXPORT
, CTF_FONTWORK_HIDEFORM
),
263 GMAP( PROP_FontWorkShadowTransparence
, XML_NAMESPACE_DRAW
, XML_FONTWORK_SHADOW_TRANSPARENCE
, XML_TYPE_PERCENT
| MID_FLAG_ELEMENT_ITEM_EXPORT
, CTF_FONTWORK_SHADOWTRANSPARENCE
),
265 // #FontWork# attributes
266 GMAPV( PROP_FontWorkStyle
, XML_NAMESPACE_DRAW_EXT
, XML_FONTWORK_STYLE
, XML_SD_TYPE_FONTWORK_STYLE
, CTF_FONTWORK_STYLE
, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
267 GMAPV( PROP_FontWorkAdjust
, XML_NAMESPACE_DRAW_EXT
, XML_FONTWORK_ADJUST
, XML_SD_TYPE_FONTWORK_ADJUST
,CTF_FONTWORK_ADJUST
, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
268 GMAPV( PROP_FontWorkDistance
, XML_NAMESPACE_DRAW_EXT
, XML_FONTWORK_DISTANCE
, XML_TYPE_MEASURE
, CTF_FONTWORK_DISTANCE
, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
269 GMAPV( PROP_FontWorkStart
, XML_NAMESPACE_DRAW_EXT
, XML_FONTWORK_START
, XML_TYPE_MEASURE
, CTF_FONTWORK_START
, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
270 GMAPV( PROP_FontWorkMirror
, XML_NAMESPACE_DRAW_EXT
, XML_FONTWORK_MIRROR
, XML_TYPE_BOOL
, CTF_FONTWORK_MIRROR
, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
271 GMAPV( PROP_FontWorkOutline
, XML_NAMESPACE_DRAW_EXT
, XML_FONTWORK_OUTLINE
, XML_TYPE_BOOL
, CTF_FONTWORK_OUTLINE
, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
272 GMAPV( PROP_FontWorkShadow
, XML_NAMESPACE_DRAW_EXT
, XML_FONTWORK_SHADOW
, XML_SD_TYPE_FONTWORK_SHADOW
,CTF_FONTWORK_SHADOW
, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
273 GMAPV( PROP_FontWorkShadowColor
, XML_NAMESPACE_DRAW_EXT
, XML_FONTWORK_SHADOW_COLOR
, XML_TYPE_COLOR
, CTF_FONTWORK_SHADOWCOLOR
, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
274 GMAPV( PROP_FontWorkShadowOffsetX
, XML_NAMESPACE_DRAW_EXT
, XML_FONTWORK_SHADOW_OFFSET_X
, XML_TYPE_MEASURE
, CTF_FONTWORK_SHADOWOFFSETX
, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
275 GMAPV( PROP_FontWorkShadowOffsetY
, XML_NAMESPACE_DRAW_EXT
, XML_FONTWORK_SHADOW_OFFSET_Y
, XML_TYPE_MEASURE
, CTF_FONTWORK_SHADOWOFFSETY
, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
276 GMAPV( PROP_FontWorkForm
, XML_NAMESPACE_DRAW_EXT
, XML_FONTWORK_FORM
, XML_SD_TYPE_FONTWORK_FORM
, CTF_FONTWORK_FORM
, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
277 GMAPV( PROP_FontWorkHideForm
, XML_NAMESPACE_DRAW_EXT
, XML_FONTWORK_HIDE_FORM
, XML_TYPE_BOOL
, CTF_FONTWORK_HIDEFORM
, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
278 GMAPV( PROP_FontWorkShadowTransparence
, XML_NAMESPACE_DRAW_EXT
, XML_FONTWORK_SHADOW_TRANSPARENCE
, XML_TYPE_PERCENT
, CTF_FONTWORK_SHADOWTRANSPARENCE
, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
),
280 // control attributes (border exists one more time for the text additions of shapes)
281 GMAP( PROP_ControlSymbolColor
, XML_NAMESPACE_DRAW
, XML_SYMBOL_COLOR
, XML_TYPE_COLOR
, 0 ),
282 GMAP( PROP_ControlBackground
, XML_NAMESPACE_FO
, XML_BACKGROUND_COLOR
, XML_TYPE_COLOR
|MID_FLAG_MULTI_PROPERTY
, 0 ),
283 GMAP( PROP_ControlBorder
, XML_NAMESPACE_FO
, XML_BORDER
, XML_SD_TYPE_CONTROL_BORDER
|MID_FLAG_MULTI_PROPERTY
|MID_FLAG_MERGE_ATTRIBUTE
, 0 ),
284 GMAP( PROP_ControlBorderColor
, XML_NAMESPACE_FO
, XML_BORDER
, XML_SD_TYPE_CONTROL_BORDER_COLOR
|MID_FLAG_MULTI_PROPERTY
|MID_FLAG_MERGE_ATTRIBUTE
, 0 ),
285 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
),
286 GMAP( PROP_ControlTextEmphasis
, XML_NAMESPACE_STYLE
,XML_TEXT_EMPHASIZE
, XML_TYPE_CONTROL_TEXT_EMPHASIZE
, 0 ),
287 GMAP( PROP_ImageScaleMode
, XML_NAMESPACE_STYLE
,XML_REPEAT
, XML_SD_TYPE_IMAGE_SCALE_MODE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
288 GMAP( PROP_ControlWritingMode
, XML_NAMESPACE_STYLE
,XML_WRITING_MODE
, XML_TYPE_TEXT_WRITING_MODE_WITH_DEFAULT
|MID_FLAG_MULTI_PROPERTY
, CTF_CONTROLWRITINGMODE
),
290 // special entries for floating frames
291 GMAP( PROP_FrameIsAutoScroll
, XML_NAMESPACE_DRAW
, XML_FRAME_DISPLAY_SCROLLBAR
, XML_TYPE_BOOL
|MID_FLAG_MULTI_PROPERTY
, CTF_FRAME_DISPLAY_SCROLLBAR
),
292 GMAP( PROP_FrameIsBorder
, XML_NAMESPACE_DRAW
, XML_FRAME_DISPLAY_BORDER
, XML_TYPE_BOOL
|MID_FLAG_MULTI_PROPERTY
, CTF_FRAME_DISPLAY_BORDER
),
293 GMAP( PROP_FrameMarginWidth
, XML_NAMESPACE_DRAW
, XML_FRAME_MARGIN_HORIZONTAL
, XML_TYPE_MEASURE_PX
|MID_FLAG_MULTI_PROPERTY
, CTF_FRAME_MARGIN_HORI
),
294 GMAP( PROP_FrameMarginHeight
, XML_NAMESPACE_DRAW
, XML_FRAME_MARGIN_VERTICAL
, XML_TYPE_MEASURE_PX
|MID_FLAG_MULTI_PROPERTY
, CTF_FRAME_MARGIN_VERT
),
295 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
),
296 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
),
297 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
),
298 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
),
299 GMAP( PROP_IsInternal
, XML_NAMESPACE_DRAW
, XML__EMPTY
, XML_TYPE_BUILDIN_CMP_ONLY
, CTF_SD_OLE_ISINTERNAL
),
300 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
),
301 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
),
302 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
),
303 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
),
305 GMAP( PROP_Aspect
, XML_NAMESPACE_DRAW
, XML_DRAW_ASPECT
, XML_TYPE_TEXT_DRAW_ASPECT
|MID_FLAG_MULTI_PROPERTY
, CTF_SD_OLE_ASPECT
),
307 // caption properties
308 GMAP( PROP_CaptionType
, XML_NAMESPACE_DRAW
, XML_CAPTION_TYPE
, XML_SD_TYPE_CAPTION_TYPE
, 0 ),
309 GMAP( PROP_CaptionIsFixedAngle
, XML_NAMESPACE_DRAW
, XML_CAPTION_ANGLE_TYPE
, XML_SD_TYPE_CAPTION_ANGLE_TYPE
, 0 ),
310 GMAP( PROP_CaptionAngle
, XML_NAMESPACE_DRAW
, XML_CAPTION_ANGLE
, XML_TYPE_NUMBER
, 0 ),
311 GMAP( PROP_CaptionGap
, XML_NAMESPACE_DRAW
, XML_CAPTION_GAP
, XML_TYPE_MEASURE
, 0 ),
312 GMAP( PROP_CaptionEscapeDirection
, XML_NAMESPACE_DRAW
, XML_CAPTION_ESCAPE_DIRECTION
, XML_SD_TYPE_CAPTION_ESC_DIR
, 0 ),
313 GMAP( PROP_CaptionIsEscapeRelative
, XML_NAMESPACE_DRAW
, XML_CAPTION_ESCAPE
, XML_SD_TYPE_CAPTION_IS_ESC_REL
|MID_FLAG_MULTI_PROPERTY
, CTF_CAPTION_ISESCREL
),
314 GMAP( PROP_CaptionEscapeRelative
, XML_NAMESPACE_DRAW
, XML_CAPTION_ESCAPE
, XML_SD_TYPE_CAPTION_ESC_REL
|MID_FLAG_MULTI_PROPERTY
, CTF_CAPTION_ESCREL
),
315 GMAP( PROP_CaptionEscapeAbsolute
, XML_NAMESPACE_DRAW
, XML_CAPTION_ESCAPE
, XML_SD_TYPE_CAPTION_ESC_ABS
|MID_FLAG_MULTI_PROPERTY
, CTF_CAPTION_ESCABS
),
316 GMAP( PROP_CaptionLineLength
, XML_NAMESPACE_DRAW
, XML_CAPTION_LINE_LENGTH
, XML_TYPE_MEASURE
, 0 ),
317 GMAP( PROP_CaptionIsFitLineLength
, XML_NAMESPACE_DRAW
, XML_CAPTION_FIT_LINE_LENGTH
, XML_TYPE_BOOL
, 0 ),
319 // misc object properties
320 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
),
321 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
),
322 GMAP( PROP_WritingMode
, XML_NAMESPACE_STYLE
, XML_WRITING_MODE
, XML_SD_TYPE_WRITINGMODE2
, CTF_WRITINGMODE2
),
323 { PROP_WritingMode
, XML_NAMESPACE_LO_EXT
, XML_WRITING_MODE
, XML_SD_TYPE_WRITINGMODE2
|XML_TYPE_PROP_GRAPHIC
, 0, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
, true},
324 { PROP_Decorative
, XML_NAMESPACE_LO_EXT
, XML_DECORATIVE
, XML_TYPE_BOOL
|XML_TYPE_PROP_GRAPHIC
, 0, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED
, false },
329 // entry list for presentation page properties
331 const XMLPropertyMapEntry aXMLSDPresPageProps
[] =
333 DPMAP( PROP_UserDefinedAttributes
, XML_NAMESPACE_TEXT
, XML_XMLNS
, XML_TYPE_ATTRIBUTE_CONTAINER
| MID_FLAG_SPECIAL_ITEM
, 0 ),
335 DPMAP( PROP_Change
, XML_NAMESPACE_PRESENTATION
, XML_TRANSITION_TYPE
, XML_SD_TYPE_PRESPAGE_TYPE
, CTF_PAGE_TRANS_TYPE
),
336 DPMAP( PROP_Effect
, XML_NAMESPACE_PRESENTATION
, XML_TRANSITION_STYLE
, XML_SD_TYPE_PRESPAGE_STYLE
, CTF_PAGE_TRANS_STYLE
),
337 DPMAP( PROP_Speed
, XML_NAMESPACE_PRESENTATION
, XML_TRANSITION_SPEED
, XML_SD_TYPE_PRESPAGE_SPEED
, CTF_PAGE_TRANS_SPEED
),
338 DPMAP( PROP_HighResDuration
, XML_NAMESPACE_PRESENTATION
, XML_DURATION
, XML_SD_TYPE_PRESPAGE_DURATION
, CTF_PAGE_TRANS_DURATION
),
339 DPMAP( PROP_Visible
, XML_NAMESPACE_PRESENTATION
, XML_VISIBILITY
, XML_SD_TYPE_PRESPAGE_VISIBILITY
, CTF_PAGE_VISIBLE
),
340 DPMAP( PROP_Sound
, XML_NAMESPACE_PRESENTATION
, XML_SOUND
, XML_TYPE_STRING
|MID_FLAG_ELEMENT_ITEM
, CTF_PAGE_SOUND_URL
),
341 DPMAP( PROP_BackgroundFullSize
, XML_NAMESPACE_DRAW
, XML_BACKGROUND_SIZE
, XML_SD_TYPE_PRESPAGE_BACKSIZE
, CTF_PAGE_BACKSIZE
),
343 DPMAP( PROP_IsBackgroundVisible
, XML_NAMESPACE_PRESENTATION
, XML_BACKGROUND_VISIBLE
, XML_TYPE_BOOL
, 0 ),
344 DPMAP( PROP_IsBackgroundObjectsVisible
, XML_NAMESPACE_PRESENTATION
, XML_BACKGROUND_OBJECTS_VISIBLE
, XML_TYPE_BOOL
, 0 ),
346 DPMAP( PROP_FillStyle
, XML_NAMESPACE_DRAW
, XML_FILL
, XML_SD_TYPE_FILLSTYLE
, 0 ),
347 DPMAP( PROP_FillColor
, XML_NAMESPACE_DRAW
, XML_FILL_COLOR
, XML_TYPE_COLOR
, 0 ),
348 DPMAP( PROP_FillGradientName
, XML_NAMESPACE_DRAW
, XML_FILL_GRADIENT_NAME
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_FILLGRADIENTNAME
),
349 DPMAP( PROP_FillGradientStepCount
, XML_NAMESPACE_DRAW
, XML_GRADIENT_STEP_COUNT
, XML_TYPE_NUMBER
, 0 ),
350 DPMAP( PROP_FillHatchName
, XML_NAMESPACE_DRAW
, XML_FILL_HATCH_NAME
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_FILLHATCHNAME
),
351 GMAP( PROP_FillBackground
, XML_NAMESPACE_DRAW
, XML_FILL_HATCH_SOLID
, XML_TYPE_BOOL
, 0 ),
352 DPMAP( PROP_FillBitmapName
, XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_NAME
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_FILLBITMAPNAME
),
353 DPMAP( PROP_FillTransparence
, XML_NAMESPACE_DRAW
, XML_OPACITY
, XML_TYPE_NEG_PERCENT
|MID_FLAG_MULTI_PROPERTY
, 0 ),
354 DPMAP( PROP_FillTransparenceGradientName
, XML_NAMESPACE_DRAW
, XML_OPACITY_NAME
, XML_TYPE_STYLENAME
|MID_FLAG_NO_PROPERTY_IMPORT
, CTF_FILLTRANSNAME
),
355 DPMAP( PROP_FillBitmapSizeX
, XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_WIDTH
, XML_SD_TYPE_FILLBITMAPSIZE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
356 DPMAP( PROP_FillBitmapLogicalSize
, XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_WIDTH
, XML_SD_TYPE_LOGICAL_SIZE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
357 DPMAP( PROP_FillBitmapSizeY
, XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_HEIGHT
, XML_SD_TYPE_FILLBITMAPSIZE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
358 DPMAP( PROP_FillBitmapLogicalSize
, XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_HEIGHT
, XML_SD_TYPE_LOGICAL_SIZE
|MID_FLAG_MULTI_PROPERTY
, 0 ),
359 DPMAP( PROP_FillBitmapMode
, XML_NAMESPACE_STYLE
,XML_REPEAT
, XML_SD_TYPE_BITMAP_MODE
, 0 ),
360 DPMAP( PROP_FillBitmapPositionOffsetX
, XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_REF_POINT_X
, XML_TYPE_PERCENT
, 0 ),
361 DPMAP( PROP_FillBitmapPositionOffsetY
, XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_REF_POINT_Y
, XML_TYPE_PERCENT
, 0 ),
362 DPMAP( PROP_FillBitmapRectanglePoint
, XML_NAMESPACE_DRAW
, XML_FILL_IMAGE_REF_POINT
, XML_SD_TYPE_BITMAP_REFPOINT
, 0 ),
363 DPMAP( PROP_FillBitmapOffsetX
, XML_NAMESPACE_DRAW
, XML_TILE_REPEAT_OFFSET
, XML_SD_TYPE_BITMAPREPOFFSETX
|MID_FLAG_MULTI_PROPERTY
, CTF_REPEAT_OFFSET_X
),
364 DPMAP( PROP_FillBitmapOffsetY
, XML_NAMESPACE_DRAW
, XML_TILE_REPEAT_OFFSET
, XML_SD_TYPE_BITMAPREPOFFSETY
|MID_FLAG_MULTI_PROPERTY
, CTF_REPEAT_OFFSET_Y
),
366 DPMAP( PROP_IsHeaderVisible
, XML_NAMESPACE_PRESENTATION
, XML_DISPLAY_HEADER
, XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE
, CTF_HEADER_VISIBLE
),
367 DPMAP( PROP_IsFooterVisible
, XML_NAMESPACE_PRESENTATION
, XML_DISPLAY_FOOTER
, XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE
, CTF_FOOTER_VISIBLE
),
368 DPMAP( PROP_IsPageNumberVisible
, XML_NAMESPACE_PRESENTATION
, XML_DISPLAY_PAGE_NUMBER
, XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE
, CTF_PAGE_NUMBER_VISIBLE
),
369 DPMAP( PROP_IsDateTimeVisible
, XML_NAMESPACE_PRESENTATION
, XML_DISPLAY_DATE_TIME
, XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE
, CTF_DATE_TIME_VISIBLE
),
371 DPMAP( PROP_TransitionType
, XML_NAMESPACE_SMIL
, XML_TYPE
, XML_SD_TYPE_TRANSITION_TYPE
, CTF_PAGE_TRANSITION_TYPE
),
372 DPMAP( PROP_TransitionSubtype
, XML_NAMESPACE_SMIL
, XML_SUBTYPE
, XML_SD_TYPE_TRANSTIION_SUBTYPE
, CTF_PAGE_TRANSITION_SUBTYPE
),
373 DPMAP( PROP_TransitionDirection
, XML_NAMESPACE_SMIL
, XML_DIRECTION
, XML_SD_TYPE_TRANSTIION_DIRECTION
, CTF_PAGE_TRANSITION_DIRECTION
),
374 DPMAP( PROP_TransitionFadeColor
, XML_NAMESPACE_SMIL
, XML_FADECOLOR
, XML_TYPE_COLOR
, CTF_PAGE_TRANSITION_FADECOLOR
),
378 /** contains the attribute to property mapping for a drawing layer table
379 WARNING: if attributes are added, SdXMLTableShapeContext::processAttribute needs to be updated!
381 const XMLPropertyMapEntry aXMLTableShapeAttributes
[] =
383 MAP_( PROP_UseFirstRowStyle
, XML_NAMESPACE_TABLE
, XML_USE_FIRST_ROW_STYLES
, XML_TYPE_BOOL
, 0 ),
384 MAP_( PROP_UseLastRowStyle
, XML_NAMESPACE_TABLE
, XML_USE_LAST_ROW_STYLES
, XML_TYPE_BOOL
, 0 ),
385 MAP_( PROP_UseFirstColumnStyle
, XML_NAMESPACE_TABLE
, XML_USE_FIRST_COLUMN_STYLES
, XML_TYPE_BOOL
, 0 ),
386 MAP_( PROP_UseLastColumnStyle
, XML_NAMESPACE_TABLE
, XML_USE_LAST_COLUMN_STYLES
, XML_TYPE_BOOL
, 0 ),
387 MAP_( PROP_UseBandingRowStyle
, XML_NAMESPACE_TABLE
, XML_USE_BANDING_ROWS_STYLES
, XML_TYPE_BOOL
, 0 ),
388 MAP_( PROP_UseBandingColumnStyle
, XML_NAMESPACE_TABLE
, XML_USE_BANDING_COLUMNS_STYLES
, XML_TYPE_BOOL
, 0 ),
392 // implementation of factory for own graphic properties
394 SvXMLEnumMapEntry
<drawing::LineStyle
> const aXML_LineStyle_EnumMap
[] =
396 { XML_NONE
, drawing::LineStyle_NONE
},
397 { XML_SOLID
, drawing::LineStyle_SOLID
},
398 { XML_DASH
, drawing::LineStyle_DASH
},
399 { XML_TOKEN_INVALID
, drawing::LineStyle(0) }
402 SvXMLEnumMapEntry
<drawing::LineJoint
> const aXML_LineJoint_EnumMap
[] =
404 { XML_NONE
, drawing::LineJoint_NONE
},
405 { XML_MITER
, drawing::LineJoint_MITER
},
406 { XML_ROUND
, drawing::LineJoint_ROUND
},
407 { XML_BEVEL
, drawing::LineJoint_BEVEL
},
408 { XML_MIDDLE
, drawing::LineJoint_MIDDLE
},
409 { XML_TOKEN_INVALID
, drawing::LineJoint(0) }
412 SvXMLEnumMapEntry
<drawing::LineCap
> const aXML_LineCap_EnumMap
[] =
414 { XML_BUTT
, drawing::LineCap_BUTT
},
415 { XML_ROUND
, drawing::LineCap_ROUND
},
416 // use XML_GRADIENTSTYLE_SQUARE as XML_SQUARE, is defined as "square" already
417 { XML_GRADIENTSTYLE_SQUARE
, drawing::LineCap_SQUARE
},
418 { XML_TOKEN_INVALID
, drawing::LineCap(0) }
421 SvXMLEnumMapEntry
<drawing::FillStyle
> const aXML_FillStyle_EnumMap
[] =
423 { XML_NONE
, drawing::FillStyle_NONE
},
424 { XML_SOLID
, drawing::FillStyle_SOLID
},
425 { XML_BITMAP
, drawing::FillStyle_BITMAP
},
426 { XML_GRADIENT
, drawing::FillStyle_GRADIENT
},
427 { XML_HATCH
, drawing::FillStyle_HATCH
},
428 { XML_TOKEN_INVALID
, drawing::FillStyle(0) }
431 SvXMLEnumMapEntry
<sal_Int32
> const aXML_PresChange_EnumMap
[] =
434 { XML_AUTOMATIC
, 1 },
435 { XML_SEMI_AUTOMATIC
, 2 },
436 { XML_TOKEN_INVALID
, 0 }
439 SvXMLEnumMapEntry
<presentation::AnimationSpeed
> const aXML_TransSpeed_EnumMap
[] =
441 { XML_FAST
, presentation::AnimationSpeed_FAST
},
442 { XML_MEDIUM
, presentation::AnimationSpeed_MEDIUM
},
443 { XML_SLOW
, presentation::AnimationSpeed_SLOW
},
444 { XML_TOKEN_INVALID
, presentation::AnimationSpeed(0) }
447 SvXMLEnumMapEntry
<presentation::FadeEffect
> const aXML_FadeEffect_EnumMap
[] =
449 { XML_NONE
, presentation::FadeEffect_NONE
},
450 { XML_FADE_FROM_LEFT
, presentation::FadeEffect_FADE_FROM_LEFT
},
451 { XML_FADE_FROM_TOP
, presentation::FadeEffect_FADE_FROM_TOP
},
452 { XML_FADE_FROM_RIGHT
, presentation::FadeEffect_FADE_FROM_RIGHT
},
453 { XML_FADE_FROM_BOTTOM
, presentation::FadeEffect_FADE_FROM_BOTTOM
},
454 { XML_FADE_TO_CENTER
, presentation::FadeEffect_FADE_TO_CENTER
},
455 { XML_FADE_FROM_CENTER
, presentation::FadeEffect_FADE_FROM_CENTER
},
456 { XML_MOVE_FROM_LEFT
, presentation::FadeEffect_MOVE_FROM_LEFT
},
457 { XML_MOVE_FROM_TOP
, presentation::FadeEffect_MOVE_FROM_TOP
},
458 { XML_MOVE_FROM_RIGHT
, presentation::FadeEffect_MOVE_FROM_RIGHT
},
459 { XML_MOVE_FROM_BOTTOM
, presentation::FadeEffect_MOVE_FROM_BOTTOM
},
460 { XML_ROLL_FROM_TOP
, presentation::FadeEffect_ROLL_FROM_TOP
},
461 { XML_ROLL_FROM_LEFT
, presentation::FadeEffect_ROLL_FROM_LEFT
},
462 { XML_ROLL_FROM_RIGHT
, presentation::FadeEffect_ROLL_FROM_RIGHT
},
463 { XML_ROLL_FROM_BOTTOM
, presentation::FadeEffect_ROLL_FROM_BOTTOM
},
464 { XML_VERTICAL_STRIPES
, presentation::FadeEffect_VERTICAL_STRIPES
},
465 { XML_HORIZONTAL_STRIPES
, presentation::FadeEffect_HORIZONTAL_STRIPES
},
466 { XML_CLOCKWISE
, presentation::FadeEffect_CLOCKWISE
},
467 { XML_COUNTERCLOCKWISE
, presentation::FadeEffect_COUNTERCLOCKWISE
},
468 { XML_FADE_FROM_UPPERLEFT
, presentation::FadeEffect_FADE_FROM_UPPERLEFT
},
469 { XML_FADE_FROM_UPPERRIGHT
, presentation::FadeEffect_FADE_FROM_UPPERRIGHT
},
470 { XML_FADE_FROM_LOWERLEFT
, presentation::FadeEffect_FADE_FROM_LOWERLEFT
},
471 { XML_FADE_FROM_LOWERRIGHT
, presentation::FadeEffect_FADE_FROM_LOWERRIGHT
},
472 { XML_CLOSE_VERTICAL
, presentation::FadeEffect_CLOSE_VERTICAL
},
473 { XML_CLOSE_HORIZONTAL
, presentation::FadeEffect_CLOSE_HORIZONTAL
},
474 { XML_OPEN_VERTICAL
, presentation::FadeEffect_OPEN_VERTICAL
},
475 { XML_OPEN_HORIZONTAL
, presentation::FadeEffect_OPEN_HORIZONTAL
},
476 { XML_SPIRALIN_LEFT
, presentation::FadeEffect_SPIRALIN_LEFT
},
477 { XML_SPIRALIN_RIGHT
, presentation::FadeEffect_SPIRALIN_RIGHT
},
478 { XML_SPIRALOUT_LEFT
, presentation::FadeEffect_SPIRALOUT_LEFT
},
479 { XML_SPIRALOUT_RIGHT
, presentation::FadeEffect_SPIRALOUT_RIGHT
},
480 { XML_DISSOLVE
, presentation::FadeEffect_DISSOLVE
},
481 { XML_WAVYLINE_FROM_LEFT
, presentation::FadeEffect_WAVYLINE_FROM_LEFT
},
482 { XML_WAVYLINE_FROM_TOP
, presentation::FadeEffect_WAVYLINE_FROM_TOP
},
483 { XML_WAVYLINE_FROM_RIGHT
, presentation::FadeEffect_WAVYLINE_FROM_RIGHT
},
484 { XML_WAVYLINE_FROM_BOTTOM
, presentation::FadeEffect_WAVYLINE_FROM_BOTTOM
},
485 { XML_RANDOM
, presentation::FadeEffect_RANDOM
},
486 { XML_STRETCH_FROM_LEFT
, presentation::FadeEffect_STRETCH_FROM_LEFT
},
487 { XML_STRETCH_FROM_TOP
, presentation::FadeEffect_STRETCH_FROM_TOP
},
488 { XML_STRETCH_FROM_RIGHT
, presentation::FadeEffect_STRETCH_FROM_RIGHT
},
489 { XML_STRETCH_FROM_BOTTOM
, presentation::FadeEffect_STRETCH_FROM_BOTTOM
},
490 { XML_VERTICAL_LINES
, presentation::FadeEffect_VERTICAL_LINES
},
491 { XML_HORIZONTAL_LINES
, presentation::FadeEffect_HORIZONTAL_LINES
},
492 { XML_MOVE_FROM_UPPERLEFT
, presentation::FadeEffect_MOVE_FROM_UPPERLEFT
},
493 { XML_MOVE_FROM_UPPERRIGHT
, presentation::FadeEffect_MOVE_FROM_UPPERRIGHT
},
494 { XML_MOVE_FROM_LOWERRIGHT
, presentation::FadeEffect_MOVE_FROM_LOWERRIGHT
},
495 { XML_MOVE_FROM_LOWERLEFT
, presentation::FadeEffect_MOVE_FROM_LOWERLEFT
},
496 { XML_UNCOVER_TO_LEFT
, presentation::FadeEffect_UNCOVER_TO_LEFT
},
497 { XML_UNCOVER_TO_UPPERLEFT
, presentation::FadeEffect_UNCOVER_TO_UPPERLEFT
},
498 { XML_UNCOVER_TO_TOP
, presentation::FadeEffect_UNCOVER_TO_TOP
},
499 { XML_UNCOVER_TO_UPPERRIGHT
,presentation::FadeEffect_UNCOVER_TO_UPPERRIGHT
},
500 { XML_UNCOVER_TO_RIGHT
, presentation::FadeEffect_UNCOVER_TO_RIGHT
},
501 { XML_UNCOVER_TO_LOWERRIGHT
,presentation::FadeEffect_UNCOVER_TO_LOWERRIGHT
},
502 { XML_UNCOVER_TO_BOTTOM
, presentation::FadeEffect_UNCOVER_TO_BOTTOM
},
503 { XML_UNCOVER_TO_LOWERLEFT
, presentation::FadeEffect_UNCOVER_TO_LOWERLEFT
},
504 { XML_VERTICAL_CHECKERBOARD
,presentation::FadeEffect_VERTICAL_CHECKERBOARD
},
505 { XML_HORIZONTAL_CHECKERBOARD
,presentation::FadeEffect_HORIZONTAL_CHECKERBOARD
},
506 { XML_TOKEN_INVALID
, presentation::FadeEffect(0) }
509 SvXMLEnumMapEntry
<drawing::ConnectorType
> const aXML_ConnectionKind_EnumMap
[] =
511 { XML_STANDARD
, drawing::ConnectorType_STANDARD
},
512 { XML_CURVE
, drawing::ConnectorType_CURVE
},
513 { XML_LINE
, drawing::ConnectorType_LINE
},
514 { XML_LINES
, drawing::ConnectorType_LINES
},
515 { XML_TOKEN_INVALID
, drawing::ConnectorType(0) }
518 SvXMLEnumMapEntry
<drawing::BitmapMode
> const aXML_BitmapMode_EnumMap
[] =
520 { XML_REPEAT
, drawing::BitmapMode_REPEAT
},
521 { XML_STRETCH
, drawing::BitmapMode_STRETCH
},
522 { XML_BACKGROUND_NO_REPEAT
, drawing::BitmapMode_NO_REPEAT
},
523 { XML_TOKEN_INVALID
, drawing::BitmapMode(0) }
528 SvXMLEnumMapEntry
<drawing::NormalsKind
> const aXML_NormalsKind_EnumMap
[] =
530 { XML_OBJECT
, drawing::NormalsKind_SPECIFIC
},
531 { XML_FLAT
, drawing::NormalsKind_FLAT
},
532 { XML_SPHERE
, drawing::NormalsKind_SPHERE
},
533 { XML_TOKEN_INVALID
, drawing::NormalsKind(0) }
536 SvXMLEnumMapEntry
<drawing::TextureProjectionMode
> const aXML_TexGenerationX_EnumMap
[] =
538 { XML_OBJECT
, drawing::TextureProjectionMode_OBJECTSPECIFIC
},
539 { XML_PARALLEL
, drawing::TextureProjectionMode_PARALLEL
},
540 { XML_SPHERE
, drawing::TextureProjectionMode_SPHERE
},
541 { XML_TOKEN_INVALID
, drawing::TextureProjectionMode(0) }
544 SvXMLEnumMapEntry
<drawing::TextureProjectionMode
> const aXML_TexGenerationY_EnumMap
[] =
546 { XML_OBJECT
, drawing::TextureProjectionMode_OBJECTSPECIFIC
},
547 { XML_PARALLEL
, drawing::TextureProjectionMode_PARALLEL
},
548 { XML_SPHERE
, drawing::TextureProjectionMode_SPHERE
},
549 { XML_TOKEN_INVALID
, drawing::TextureProjectionMode(0) }
552 SvXMLEnumMapEntry
<drawing::TextureKind
> const aXML_TexKind_EnumMap
[] =
554 { XML_LUMINANCE
, drawing::TextureKind_LUMINANCE
},
555 { XML_COLOR
, drawing::TextureKind_COLOR
},
556 { XML_TOKEN_INVALID
, drawing::TextureKind(0) }
559 SvXMLEnumMapEntry
<drawing::TextureMode
> const aXML_TexMode_EnumMap
[] =
561 { XML_REPLACE
, drawing::TextureMode_REPLACE
},
562 { XML_MODULATE
, drawing::TextureMode_MODULATE
},
563 { XML_BLEND
, drawing::TextureMode_BLEND
},
564 { XML_TOKEN_INVALID
, drawing::TextureMode(0) }
567 SvXMLEnumMapEntry
<drawing::RectanglePoint
> const aXML_RefPoint_EnumMap
[] =
569 { XML_TOP_LEFT
, drawing::RectanglePoint_LEFT_TOP
},
570 { XML_TOP
, drawing::RectanglePoint_MIDDLE_TOP
},
571 { XML_TOP_RIGHT
, drawing::RectanglePoint_RIGHT_TOP
},
572 { XML_LEFT
, drawing::RectanglePoint_LEFT_MIDDLE
},
573 { XML_CENTER
, drawing::RectanglePoint_MIDDLE_MIDDLE
},
574 { XML_RIGHT
, drawing::RectanglePoint_RIGHT_MIDDLE
},
575 { XML_BOTTOM_LEFT
, drawing::RectanglePoint_LEFT_BOTTOM
},
576 { XML_BOTTOM
, drawing::RectanglePoint_MIDDLE_BOTTOM
},
577 { XML_BOTTOM_RIGHT
, drawing::RectanglePoint_RIGHT_BOTTOM
},
578 { XML_TOKEN_INVALID
, drawing::RectanglePoint(0) }
581 SvXMLEnumMapEntry
<drawing::CircleKind
> const aXML_CircleKind_EnumMap
[] =
583 { XML_FULL
, drawing::CircleKind_FULL
},
584 { XML_SECTION
, drawing::CircleKind_SECTION
},
585 { XML_CUT
, drawing::CircleKind_CUT
},
586 { XML_ARC
, drawing::CircleKind_ARC
},
587 { XML_TOKEN_INVALID
, drawing::CircleKind(0) }
590 SvXMLEnumMapEntry
<text::WritingMode
> const aXML_WritingMode_EnumMap
[] =
592 { XML_TB_RL
, text::WritingMode_TB_RL
},
593 { XML_LR_TB
, text::WritingMode_LR_TB
},
594 { XML_TOKEN_INVALID
, text::WritingMode(0) }
597 SvXMLEnumMapEntry
<sal_Int16
> const aXML_WritingMode2_EnumMap
[] =
599 { XML_LR_TB
, text::WritingMode2::LR_TB
},
600 { XML_RL_TB
, text::WritingMode2::RL_TB
},
601 { XML_TB_RL
, text::WritingMode2::TB_RL
},
602 { XML_TB_LR
, text::WritingMode2::TB_LR
},
603 { XML_PAGE
, text::WritingMode2::CONTEXT
},
604 { XML_BT_LR
, text::WritingMode2::BT_LR
},
605 { XML_TB_RL90
, text::WritingMode2::TB_RL90
},
606 { XML_TOKEN_INVALID
, text::WritingMode2::LR_TB
}
609 SvXMLEnumMapEntry
<drawing::TextAnimationKind
> const pXML_TextAnimation_Enum
[] =
611 { XML_NONE
, drawing::TextAnimationKind_NONE
},
612 { XML_BLINKING
, drawing::TextAnimationKind_BLINK
}, // will be filtered
613 { XML_SCROLL
, drawing::TextAnimationKind_SCROLL
},
614 { XML_ALTERNATE
, drawing::TextAnimationKind_ALTERNATE
},
615 { XML_SLIDE
, drawing::TextAnimationKind_SLIDE
},
616 { XML_TOKEN_INVALID
, drawing::TextAnimationKind(0) }
619 SvXMLEnumMapEntry
<drawing::TextAnimationKind
> const pXML_TextAnimation_Blinking_Enum
[] =
621 { XML_FALSE
, drawing::TextAnimationKind_NONE
},
622 { XML_TRUE
, drawing::TextAnimationKind_BLINK
},
623 { XML_FALSE
, drawing::TextAnimationKind_SCROLL
},
624 { XML_FALSE
, drawing::TextAnimationKind_ALTERNATE
},
625 { XML_FALSE
, drawing::TextAnimationKind_SLIDE
},
626 { XML_TOKEN_INVALID
, drawing::TextAnimationKind(0) }
629 SvXMLEnumMapEntry
<drawing::TextAnimationDirection
> const pXML_TextAnimationDirection_Enum
[] =
631 { XML_LEFT
, drawing::TextAnimationDirection_LEFT
},
632 { XML_RIGHT
, drawing::TextAnimationDirection_RIGHT
}, // will be filtered
633 { XML_UP
, drawing::TextAnimationDirection_UP
},
634 { XML_DOWN
, drawing::TextAnimationDirection_DOWN
},
635 { XML_TOKEN_INVALID
, drawing::TextAnimationDirection(0) }
638 SvXMLEnumMapEntry
<drawing::TextHorizontalAdjust
> const pXML_TextAlign_Enum
[] =
640 { XML_LEFT
, drawing::TextHorizontalAdjust_LEFT
},
641 { XML_CENTER
, drawing::TextHorizontalAdjust_CENTER
},
642 { XML_RIGHT
, drawing::TextHorizontalAdjust_RIGHT
},
643 { XML_JUSTIFY
, drawing::TextHorizontalAdjust_BLOCK
},
644 { XML_TOKEN_INVALID
, drawing::TextHorizontalAdjust(0) }
647 SvXMLEnumMapEntry
<drawing::TextVerticalAdjust
> const pXML_VerticalAlign_Enum
[] =
649 { XML_TOP
, drawing::TextVerticalAdjust_TOP
},
650 { XML_MIDDLE
, drawing::TextVerticalAdjust_CENTER
},
651 { XML_BOTTOM
, drawing::TextVerticalAdjust_BOTTOM
},
652 { XML_JUSTIFY
, drawing::TextVerticalAdjust_BLOCK
},
653 { XML_TOKEN_INVALID
, drawing::TextVerticalAdjust(0) }
656 // note: PROPORTIONAL and ALLLINES are the same thing now!
657 SvXMLEnumMapEntry
<drawing::TextFitToSizeType
> const pXML_FitToSize_Enum_Odf12
[] =
659 { XML_FALSE
, drawing::TextFitToSizeType_NONE
},
660 { XML_TRUE
, drawing::TextFitToSizeType_PROPORTIONAL
},
661 { XML_TRUE
, drawing::TextFitToSizeType_ALLLINES
},
662 { XML_FALSE
, drawing::TextFitToSizeType_AUTOFIT
},
663 { XML_TOKEN_INVALID
, drawing::TextFitToSizeType(0) }
666 SvXMLEnumMapEntry
<drawing::TextFitToSizeType
> const pXML_FitToSize_Enum
[] =
668 { XML_FALSE
, drawing::TextFitToSizeType_NONE
},
669 { XML_TRUE
, drawing::TextFitToSizeType_PROPORTIONAL
},
670 { XML_ALL
, drawing::TextFitToSizeType_ALLLINES
},
671 { XML_SHRINK_TO_FIT
,drawing::TextFitToSizeType_AUTOFIT
},
672 { XML_TOKEN_INVALID
, drawing::TextFitToSizeType(0) }
675 SvXMLEnumMapEntry
<drawing::TextFitToSizeType
> const pXML_ShrinkToFit_Enum
[] =
677 { XML_FALSE
, drawing::TextFitToSizeType_NONE
},
678 { XML_FALSE
, drawing::TextFitToSizeType_PROPORTIONAL
},
679 { XML_FALSE
, drawing::TextFitToSizeType_ALLLINES
},
680 { XML_TRUE
, drawing::TextFitToSizeType_AUTOFIT
},
681 { XML_TOKEN_INVALID
, drawing::TextFitToSizeType(0) }
684 SvXMLEnumMapEntry
<sal_Int32
> const pXML_MeasureUnit_Enum
[] =
686 { XML_AUTOMATIC
, 0 },
694 { XML_UNIT_FOOT
, 9 },
696 { XML_TOKEN_INVALID
,0 }
699 SvXMLEnumMapEntry
<drawing::MeasureTextHorzPos
> const pXML_Measure_HAlign_Enum
[] =
701 { XML_AUTOMATIC
, drawing::MeasureTextHorzPos_AUTO
},
702 { XML_LEFT_OUTSIDE
, drawing::MeasureTextHorzPos_LEFTOUTSIDE
},
703 { XML_INSIDE
, drawing::MeasureTextHorzPos_INSIDE
},
704 { XML_RIGHT_OUTSIDE
, drawing::MeasureTextHorzPos_RIGHTOUTSIDE
},
705 { XML_TOKEN_INVALID
, drawing::MeasureTextHorzPos(0) }
708 SvXMLEnumMapEntry
<drawing::MeasureTextVertPos
> const pXML_Measure_VAlign_Enum
[] =
710 { XML_AUTOMATIC
, drawing::MeasureTextVertPos_AUTO
},
711 { XML_ABOVE
, drawing::MeasureTextVertPos_EAST
},
712 { XML_BELOW
, drawing::MeasureTextVertPos_WEST
},
713 { XML_CENTER
, drawing::MeasureTextVertPos_CENTERED
},
714 { XML_TOKEN_INVALID
, drawing::MeasureTextVertPos(0) }
718 SvXMLEnumMapEntry
<sal_Int32
> const pXML_Fontwork_Style_Enum
[] =
720 { XML_ROTATE
, 0 }, //XFormTextStyle::Rotate,
721 { XML_UPRIGHT
, 1 }, //XFormTextStyle::Upright,
722 { XML_SLANT_X
, 2 }, //XFormTextStyle::SlantX,
723 { XML_SLANT_Y
, 3 }, //XFormTextStyle::SlantY,
724 { XML_NONE
, 4 }, //XFormTextStyle::NONE
725 { XML_TOKEN_INVALID
,0 }
728 SvXMLEnumMapEntry
<sal_Int32
> const pXML_Fontwork_Adjust_Enum
[] =
730 { XML_LEFT
, 0 }, //XFormTextAdjust::Left,
731 { XML_RIGHT
, 1 }, //XFormTextAdjust::Right,
732 { XML_AUTOSIZE
, 2 }, //XFormTextAdjust::AutoSize,
733 { XML_CENTER
, 3 }, //XFormTextAdjust::Center
734 { XML_TOKEN_INVALID
,0 }
737 SvXMLEnumMapEntry
<sal_Int32
> const pXML_Fontwork_Shadow_Enum
[] =
739 { XML_NORMAL
, 0 }, //XFormTextShadow::Normal,
740 { XML_SLANT
, 1 }, //XFormTextShadow::Slant,
741 { XML_NONE
, 2 }, //XFormTextShadow::NONE
742 { XML_TOKEN_INVALID
,0 }
745 SvXMLEnumMapEntry
<sal_Int32
> const pXML_Fontwork_Form_Enum
[] =
747 { XML_NONE
, 0 }, //XFTFORM_NONE,
748 { XML_TOPCIRCLE
, 1 }, //XFTFORM_TOPCIRC,
749 { XML_BOTTOMCIRCLE
, 2 }, //XFTFORM_BOTCIRC,
750 { XML_LEFTCIRCLE
, 3 }, //XFTFORM_LFTCIRC,
751 { XML_RIGHTCIRCLE
, 4 }, //XFTFORM_RGTCIRC,
752 { XML_TOPARC
, 5 }, //XFTFORM_TOPARC,
753 { XML_BOTTOMARC
, 6 }, //XFTFORM_BOTARC,
754 { XML_LEFTARC
, 7 }, //XFTFORM_LFTARC,
755 { XML_RIGHTARC
, 8 }, //XFTFORM_RGTARC,
756 { XML_BUTTON1
, 9 }, //XFTFORM_BUTTON1,
757 { XML_BUTTON2
, 10 }, //XFTFORM_BUTTON2,
758 { XML_BUTTON3
, 11 }, //XFTFORM_BUTTON3,
759 { XML_BUTTON4
, 12 }, //XFTFORM_BUTTON4
760 { XML_TOKEN_INVALID
,0 }
763 SvXMLEnumMapEntry
<sal_Int32
> const pXML_Caption_Esc_Dir_Enum
[] =
765 { XML_HORIZONTAL
, 0 }, //SdrCaptionEscDir::Horizontal,
766 { XML_VERTICAL
, 1 }, //SdrCaptionEscDir::Vertical,
767 { XML_AUTO
, 2 }, //SdrCaptionEscDir::BestFit,
768 { XML_TOKEN_INVALID
,0 }
771 SvXMLEnumMapEntry
<sal_Int32
> const pXML_Caption_Type_Enum
[] =
773 { XML_STRAIGHT_LINE
, 0 }, //SdrCaptionType::Type1,
774 { XML_ANGLED_LINE
, 1 }, //SdrCaptionType::Type2,
775 { XML_ANGLED_CONNECTOR_LINE
, 2 }, //SdrCaptionType::Type3,
776 { XML_TOKEN_INVALID
,0 }
781 class XMLCaptionEscapeRelative
: public XMLPropertyHandler
784 virtual bool importXML(
785 const OUString
& rStrImpValue
,
786 css::uno::Any
& rValue
,
787 const SvXMLUnitConverter
& rUnitConverter
) const override
;
788 virtual bool exportXML(
789 OUString
& rStrExpValue
,
790 const css::uno::Any
& rValue
,
791 const SvXMLUnitConverter
& rUnitConverter
) const override
;
796 bool XMLCaptionEscapeRelative::importXML( const OUString
& rStrImpValue
, Any
& rValue
, const SvXMLUnitConverter
& ) const
800 if (!::sax::Converter::convertPercent( nValue
, rStrImpValue
))
808 bool XMLCaptionEscapeRelative::exportXML( OUString
& rStrExpValue
, const Any
& rValue
, const SvXMLUnitConverter
& ) const
810 sal_Int32 nValue
= 0;
811 if( !(rValue
>>= nValue
) )
816 ::sax::Converter::convertPercent( aOut
, nValue
);
817 rStrExpValue
= aOut
.makeStringAndClear();
823 class XMLMoveSizeProtectHdl
: public XMLPropertyHandler
826 explicit XMLMoveSizeProtectHdl( sal_Int32 nType
) : mnType( nType
) {}
828 virtual bool importXML(
829 const OUString
& rStrImpValue
,
830 css::uno::Any
& rValue
,
831 const SvXMLUnitConverter
& rUnitConverter
) const override
;
832 virtual bool exportXML(
833 OUString
& rStrExpValue
,
834 const css::uno::Any
& rValue
,
835 const SvXMLUnitConverter
& rUnitConverter
) const override
;
837 const sal_Int32 mnType
;
842 bool XMLMoveSizeProtectHdl::importXML( const OUString
& rStrImpValue
, Any
& rValue
, const SvXMLUnitConverter
& ) const
844 const bool bValue
= rStrImpValue
.indexOf( GetXMLToken( mnType
== XML_SD_TYPE_MOVE_PROTECT
? XML_POSITION
: XML_SIZE
) ) != -1;
849 bool XMLMoveSizeProtectHdl::exportXML( OUString
& rStrExpValue
, const Any
& rValue
, const SvXMLUnitConverter
& ) const
852 if( !(rValue
>>= bValue
) )
857 if( !rStrExpValue
.isEmpty() )
860 rStrExpValue
+= GetXMLToken( mnType
== XML_SD_TYPE_MOVE_PROTECT
? XML_POSITION
: XML_SIZE
);
868 class XMLSdHeaderFooterVisibilityTypeHdl
: public XMLPropertyHandler
871 virtual bool importXML( const OUString
& rStrImpValue
, css::uno::Any
& rValue
, const SvXMLUnitConverter
& rUnitConverter
) const override
;
872 virtual bool exportXML( OUString
& rStrExpValue
, const css::uno::Any
& rValue
, const SvXMLUnitConverter
& rUnitConverter
) const override
;
877 bool XMLSdHeaderFooterVisibilityTypeHdl::importXML(
878 const OUString
& rStrImpValue
,
879 css::uno::Any
& rValue
,
880 const SvXMLUnitConverter
& ) const
883 // attributes with this type where saved with VISIBLE|HIDDEN prior
884 // to src680m67. So we have to import that correctly
885 const bool bBool
= IsXMLToken(rStrImpValue
, XML_TRUE
) || IsXMLToken(rStrImpValue
, XML_VISIBLE
);
887 return bBool
|| IsXMLToken(rStrImpValue
, XML_FALSE
) || IsXMLToken(rStrImpValue
, XML_HIDDEN
);
890 bool XMLSdHeaderFooterVisibilityTypeHdl::exportXML(
891 OUString
& rStrExpValue
,
893 const SvXMLUnitConverter
& ) const
898 if (rValue
>>= bValue
)
901 ::sax::Converter::convertBool( aOut
, bValue
);
902 rStrExpValue
= aOut
.makeStringAndClear();
912 class XMLSdRotationAngleTypeHdl
: public XMLPropertyHandler
915 virtual bool importXML(const OUString
& rStrImpValue
, css::uno::Any
& rValue
, const SvXMLUnitConverter
& rUnitConverter
) const override
;
916 virtual bool exportXML(OUString
& rStrExpValue
, const css::uno::Any
& rValue
, const SvXMLUnitConverter
& rUnitConverter
) const override
;
921 bool XMLSdRotationAngleTypeHdl::importXML(
922 const OUString
& rStrImpValue
,
923 css::uno::Any
& rValue
,
924 const SvXMLUnitConverter
&) const
927 bool const bRet
= ::sax::Converter::convertNumber(nValue
, rStrImpValue
);
930 nValue
= (nValue
% 360);
932 nValue
= 360 + nValue
;
934 if (nValue
< 45 || nValue
> 315)
936 else if (nValue
< 180)
938 else /* if nValue <= 315 ) */
946 bool XMLSdRotationAngleTypeHdl::exportXML(
947 OUString
& rStrExpValue
,
949 const SvXMLUnitConverter
&) const
952 bool bRet
= (rValue
>>= nAngle
) && nAngle
!= 0;
955 rStrExpValue
= OUString::number(nAngle
/ 100);
962 class XMLFitToSizeEnumPropertyHdl
: public XMLEnumPropertyHdl
965 XMLFitToSizeEnumPropertyHdl(
966 const SvXMLEnumMapEntry
<drawing::TextFitToSizeType
> *const pMap
)
967 : XMLEnumPropertyHdl(pMap
) {}
969 virtual bool importXML(const OUString
& rStrImpValue
, uno::Any
& rValue
,
970 const SvXMLUnitConverter
& rUC
) const override
972 // we don't know here what the actual attribute name is -
973 // but we can combine the 2 attributes by just taking the
974 // "largest" result value; this can never result in ALLLINES
975 // so the implementation has to interpret PROPORTIONAL as ALLLINES;
976 // both "true" is invalid anyway.
978 auto const bRet
= XMLEnumPropertyHdl::importXML(rStrImpValue
, any
, rUC
);
983 assert(any
.hasValue());
984 if (!rValue
.hasValue() ||
985 rValue
.get
<drawing::TextFitToSizeType
>() < any
.get
<drawing::TextFitToSizeType
>())
995 XMLSdPropHdlFactory::XMLSdPropHdlFactory( uno::Reference
< frame::XModel
> xModel
, SvXMLImport
& rImport
)
996 : mxModel(std::move( xModel
)), mpExport(nullptr), mpImport( &rImport
)
1000 XMLSdPropHdlFactory::XMLSdPropHdlFactory( uno::Reference
< frame::XModel
> xModel
, SvXMLExport
& rExport
)
1001 : mxModel(std::move( xModel
)), mpExport( &rExport
), mpImport(nullptr)
1005 XMLSdPropHdlFactory::~XMLSdPropHdlFactory()
1009 const XMLPropertyHandler
* XMLSdPropHdlFactory::GetPropertyHandler( sal_Int32 nType
) const
1011 const XMLPropertyHandler
* pHdl
= XMLPropertyHandlerFactory::GetPropertyHandler( nType
);
1016 case XML_SD_TYPE_STROKE
:
1018 pHdl
= new XMLEnumPropertyHdl( aXML_LineStyle_EnumMap
);
1021 case XML_SD_TYPE_LINEJOIN
:
1023 pHdl
= new XMLEnumPropertyHdl( aXML_LineJoint_EnumMap
);
1026 case XML_SD_TYPE_LINECAP
:
1028 pHdl
= new XMLEnumPropertyHdl( aXML_LineCap_EnumMap
);
1031 case XML_SD_TYPE_FILLSTYLE
:
1033 pHdl
= new XMLEnumPropertyHdl( aXML_FillStyle_EnumMap
);
1036 case XML_SD_TYPE_PRESPAGE_TYPE
:
1038 pHdl
= new XMLEnumPropertyHdl( aXML_PresChange_EnumMap
);
1041 case XML_SD_TYPE_VISIBLE_HIDDEN
:
1043 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_VISIBLE
), GetXMLToken(XML_HIDDEN
) );
1046 case XML_TYPE_SD_MIRROR
:
1048 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_HORIZONTAL
), GetXMLToken(XML_NONE
) );
1051 case XML_SD_TYPE_PRESPAGE_STYLE
:
1053 pHdl
= new XMLEnumPropertyHdl( aXML_FadeEffect_EnumMap
);
1056 case XML_SD_TYPE_PRESPAGE_SPEED
:
1058 pHdl
= new XMLEnumPropertyHdl( aXML_TransSpeed_EnumMap
);
1061 case XML_SD_TYPE_PRESPAGE_DURATION
:
1063 pHdl
= new XMLDurationPropertyHdl
;
1066 case XML_SD_TYPE_TEXT_CROSSEDOUT
:
1068 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_SOLID
), GetXMLToken(XML_NONE
) );
1071 case XML_SD_TYPE_OPACITY
:
1073 pHdl
= new XMLOpacityPropertyHdl(mpImport
);
1076 case XML_SD_TYPE_WRITINGMODE
:
1078 pHdl
= new XMLEnumPropertyHdl( aXML_WritingMode_EnumMap
);
1081 case XML_SD_TYPE_WRITINGMODE2
:
1083 pHdl
= new XMLConstantsPropertyHandler ( aXML_WritingMode2_EnumMap
, XML_LR_TB
);
1086 case XML_SD_TYPE_PRESPAGE_VISIBILITY
:
1088 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_VISIBLE
), GetXMLToken(XML_HIDDEN
) );
1091 case XML_SD_TYPE_PRESPAGE_BACKSIZE
:
1093 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_FULL
), GetXMLToken(XML_BORDER
) );
1099 case XML_SD_TYPE_BACKFACE_CULLING
:
1101 // #87922# DoubleSided -> BackfaceCulling
1102 // This sal_Bool needs to be flipped, DoubleSided sal_True -> NO Backface culling
1104 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_DISABLED
), GetXMLToken(XML_ENABLED
) );
1108 case XML_SD_TYPE_NORMALS_KIND
:
1110 pHdl
= new XMLEnumPropertyHdl( aXML_NormalsKind_EnumMap
);
1113 case XML_SD_TYPE_NORMALS_DIRECTION
:
1115 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_NORMAL
), GetXMLToken(XML_INVERSE
) );
1118 case XML_SD_TYPE_TEX_GENERATION_MODE_X
:
1120 pHdl
= new XMLEnumPropertyHdl( aXML_TexGenerationX_EnumMap
);
1123 case XML_SD_TYPE_TEX_GENERATION_MODE_Y
:
1125 pHdl
= new XMLEnumPropertyHdl( aXML_TexGenerationY_EnumMap
);
1128 case XML_SD_TYPE_TEX_KIND
:
1130 pHdl
= new XMLEnumPropertyHdl( aXML_TexKind_EnumMap
);
1133 case XML_SD_TYPE_TEX_MODE
:
1135 pHdl
= new XMLEnumPropertyHdl( aXML_TexMode_EnumMap
);
1138 case XML_SD_TYPE_NUMBULLET
:
1140 uno::Reference
<ucb::XAnyCompareFactory
> xCompareFac( mxModel
, uno::UNO_QUERY
);
1141 uno::Reference
<ucb::XAnyCompare
> xCompare
;
1142 if( xCompareFac
.is() )
1143 xCompare
= xCompareFac
->createAnyCompareByName( "NumberingRules" );
1145 pHdl
= new XMLNumRulePropHdl( xCompare
);
1148 case XML_SD_TYPE_BITMAP_MODE
:
1150 pHdl
= new XMLEnumPropertyHdl( aXML_BitmapMode_EnumMap
);
1153 case XML_SD_TYPE_BITMAPREPOFFSETX
:
1154 case XML_SD_TYPE_BITMAPREPOFFSETY
:
1156 pHdl
= new XMLBitmapRepeatOffsetPropertyHandler( nType
== XML_SD_TYPE_BITMAPREPOFFSETX
);
1159 case XML_SD_TYPE_FILLBITMAPSIZE
:
1161 pHdl
= new XMLFillBitmapSizePropertyHandler();
1164 case XML_SD_TYPE_LOGICAL_SIZE
:
1166 pHdl
= new XMLBitmapLogicalSizePropertyHandler();
1169 case XML_SD_TYPE_BITMAP_REFPOINT
:
1171 pHdl
= new XMLEnumPropertyHdl( aXML_RefPoint_EnumMap
);
1174 case XML_TYPE_TEXT_ANIMATION
:
1175 pHdl
= new XMLEnumPropertyHdl( pXML_TextAnimation_Enum
);
1177 case XML_TYPE_TEXT_ANIMATION_BLINKING
:
1178 pHdl
= new XMLEnumPropertyHdl( pXML_TextAnimation_Blinking_Enum
);
1180 case XML_TYPE_TEXT_ANIMATION_DIRECTION
:
1181 pHdl
= new XMLEnumPropertyHdl( pXML_TextAnimationDirection_Enum
);
1183 case XML_TYPE_TEXT_ANIMATION_STEPS
:
1184 pHdl
= new XMLTextAnimationStepPropertyHdl
;
1186 case XML_SD_TYPE_TEXT_ALIGN
:
1187 pHdl
= new XMLEnumPropertyHdl( pXML_TextAlign_Enum
);
1189 case XML_SD_TYPE_VERTICAL_ALIGN
:
1190 pHdl
= new XMLEnumPropertyHdl( pXML_VerticalAlign_Enum
);
1192 case XML_SD_TYPE_FITTOSIZE
:
1195 && (mpExport
->getSaneDefaultVersion() // tdf#97630
1196 != SvtSaveOptions::ODFSVER_012_EXT_COMPAT
))
1198 pHdl
= new XMLFitToSizeEnumPropertyHdl(pXML_FitToSize_Enum_Odf12
);
1201 { // import all values written by old LO
1202 pHdl
= new XMLFitToSizeEnumPropertyHdl(pXML_FitToSize_Enum
);
1206 case XML_SD_TYPE_FITTOSIZE_AUTOFIT
:
1208 pHdl
= new XMLFitToSizeEnumPropertyHdl(pXML_ShrinkToFit_Enum
);
1211 case XML_SD_TYPE_MEASURE_UNIT
:
1212 pHdl
= new XMLEnumPropertyHdl( pXML_MeasureUnit_Enum
);
1214 case XML_SD_TYPE_MEASURE_HALIGN
:
1215 pHdl
= new XMLEnumPropertyHdl( pXML_Measure_HAlign_Enum
);
1217 case XML_SD_TYPE_MEASURE_VALIGN
:
1218 pHdl
= new XMLEnumPropertyHdl( pXML_Measure_VAlign_Enum
);
1220 case XML_SD_TYPE_MEASURE_PLACING
:
1222 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_BELOW
), GetXMLToken(XML_ABOVE
) );
1225 case XML_TYPE_TEXT_CLIP11
:
1226 pHdl
= new XMLClipPropertyHandler( true );
1228 case XML_TYPE_TEXT_CLIP
:
1229 pHdl
= new XMLClipPropertyHandler( false );
1233 case XML_SD_TYPE_FONTWORK_STYLE
:
1234 pHdl
= new XMLEnumPropertyHdl( pXML_Fontwork_Style_Enum
);
1236 case XML_SD_TYPE_FONTWORK_ADJUST
:
1237 pHdl
= new XMLEnumPropertyHdl( pXML_Fontwork_Adjust_Enum
);
1239 case XML_SD_TYPE_FONTWORK_SHADOW
:
1240 pHdl
= new XMLEnumPropertyHdl( pXML_Fontwork_Shadow_Enum
);
1242 case XML_SD_TYPE_FONTWORK_FORM
:
1243 pHdl
= new XMLEnumPropertyHdl( pXML_Fontwork_Form_Enum
);
1246 case XML_SD_TYPE_CONTROL_BORDER
:
1247 pHdl
= new ::xmloff::OControlBorderHandler( ::xmloff::OControlBorderHandler::STYLE
);
1249 case XML_SD_TYPE_CONTROL_BORDER_COLOR
:
1250 pHdl
= new ::xmloff::OControlBorderHandler( ::xmloff::OControlBorderHandler::COLOR
);
1252 case XML_SD_TYPE_IMAGE_SCALE_MODE
:
1253 pHdl
= new ::xmloff::ImageScaleModeHandler
;
1255 case XML_TYPE_CONTROL_TEXT_EMPHASIZE
:
1256 pHdl
= new ::xmloff::OControlTextEmphasisHandler
;
1259 case XML_SD_TYPE_CAPTION_ANGLE_TYPE
:
1261 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_FIXED
), GetXMLToken(XML_FREE
) );
1264 case XML_SD_TYPE_CAPTION_IS_ESC_REL
:
1265 pHdl
= new XMLIsPercentagePropertyHandler
;
1267 case XML_SD_TYPE_CAPTION_ESC_REL
:
1268 pHdl
= new XMLCaptionEscapeRelative
;
1270 case XML_SD_TYPE_CAPTION_ESC_ABS
:
1271 pHdl
= new XMLPercentOrMeasurePropertyHandler
;
1273 case XML_SD_TYPE_CAPTION_ESC_DIR
:
1274 pHdl
= new XMLEnumPropertyHdl( pXML_Caption_Esc_Dir_Enum
);
1276 case XML_SD_TYPE_CAPTION_TYPE
:
1277 pHdl
= new XMLEnumPropertyHdl( pXML_Caption_Type_Enum
);
1279 case XML_SD_TYPE_DATETIMEUPDATE
:
1280 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_FIXED
), GetXMLToken(XML_VARIABLE
) );
1282 case XML_SD_TYPE_DATETIME_FORMAT
:
1283 pHdl
= new XMLDateTimeFormatHdl( mpExport
);
1285 case XML_SD_TYPE_TRANSITION_TYPE
:
1286 pHdl
= new XMLEnumPropertyHdl( xmloff::aAnimations_EnumMap_TransitionType
);
1288 case XML_SD_TYPE_TRANSTIION_SUBTYPE
:
1289 pHdl
= new XMLEnumPropertyHdl( xmloff::aAnimations_EnumMap_TransitionSubType
);
1291 case XML_SD_TYPE_TRANSTIION_DIRECTION
:
1292 pHdl
= new XMLNamedBoolPropertyHdl( GetXMLToken(XML_FORWARD
), GetXMLToken(XML_REVERSE
) );
1294 case XML_TYPE_WRAP_OPTION
:
1295 pHdl
= new XMLWordWrapPropertyHdl( mpImport
);
1298 case XML_SD_TYPE_MOVE_PROTECT
:
1299 case XML_SD_TYPE_SIZE_PROTECT
:
1300 pHdl
= new XMLMoveSizeProtectHdl( nType
);
1302 case XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE
:
1303 pHdl
= new XMLSdHeaderFooterVisibilityTypeHdl
;
1305 case XML_SD_TYPE_CELL_ROTATION_ANGLE
:
1306 pHdl
= new XMLSdRotationAngleTypeHdl
;
1308 case XML_TYPE_TEXT_COLUMNS
:
1309 pHdl
= new XMLTextColumnsPropertyHandler
;
1311 case XML_TYPE_COMPLEX_COLOR
:
1312 pHdl
= new XMLComplexColorHandler
;
1317 PutHdlCache(nType
, pHdl
);
1323 XMLShapePropertySetMapper::XMLShapePropertySetMapper(const rtl::Reference
< XMLPropertyHandlerFactory
>& rFactoryRef
,
1325 : XMLPropertySetMapper( aXMLSDProperties
, rFactoryRef
, bForExport
)
1329 XMLShapePropertySetMapper::~XMLShapePropertySetMapper()
1333 XMLShapeExportPropertyMapper::XMLShapeExportPropertyMapper( const rtl::Reference
< XMLPropertySetMapper
>& rMapper
, SvXMLExport
& rExport
)
1334 : SvXMLExportPropertyMapper( rMapper
)
1335 , maNumRuleExp( rExport
)
1336 , mbIsInAutoStyles( true )
1340 XMLShapeExportPropertyMapper::~XMLShapeExportPropertyMapper()
1344 void XMLShapeExportPropertyMapper::ContextFilter(
1345 bool bEnableFoFontFamily
,
1346 std::vector
< XMLPropertyState
>& rProperties
,
1347 const uno::Reference
< beans::XPropertySet
>& rPropSet
) const
1349 XMLPropertyState
* pRepeatOffsetX
= nullptr;
1350 XMLPropertyState
* pRepeatOffsetY
= nullptr;
1351 XMLPropertyState
* pTextAnimationBlinking
= nullptr;
1352 XMLPropertyState
* pTextAnimationKind
= nullptr;
1355 XMLPropertyState
* pFontWorkStyle
= nullptr;
1356 XMLPropertyState
* pFontWorkAdjust
= nullptr;
1357 XMLPropertyState
* pFontWorkDistance
= nullptr;
1358 XMLPropertyState
* pFontWorkStart
= nullptr;
1359 XMLPropertyState
* pFontWorkMirror
= nullptr;
1360 XMLPropertyState
* pFontWorkOutline
= nullptr;
1361 XMLPropertyState
* pFontWorkShadow
= nullptr;
1362 XMLPropertyState
* pFontWorkShadowColor
= nullptr;
1363 XMLPropertyState
* pFontWorkShadowOffsetx
= nullptr;
1364 XMLPropertyState
* pFontWorkShadowOffsety
= nullptr;
1365 XMLPropertyState
* pFontWorkForm
= nullptr;
1366 XMLPropertyState
* pFontWorkHideform
= nullptr;
1367 XMLPropertyState
* pFontWorkShadowTransparence
= nullptr;
1370 XMLPropertyState
* pOLEVisAreaLeft
= nullptr;
1371 XMLPropertyState
* pOLEVisAreaTop
= nullptr;
1372 XMLPropertyState
* pOLEVisAreaWidth
= nullptr;
1373 XMLPropertyState
* pOLEVisAreaHeight
= nullptr;
1374 XMLPropertyState
* pOLEIsInternal
= nullptr;
1377 XMLPropertyState
* pCaptionIsEscRel
= nullptr;
1378 XMLPropertyState
* pCaptionEscRel
= nullptr;
1379 XMLPropertyState
* pCaptionEscAbs
= nullptr;
1382 XMLPropertyState
* pClip11State
= nullptr;
1383 XMLPropertyState
* pClipState
= nullptr;
1385 XMLPropertyState
* pGraphicWritingMode2
= nullptr;
1386 XMLPropertyState
* pShapeWritingMode
= nullptr;
1387 XMLPropertyState
* pTextWritingMode
= nullptr;
1388 XMLPropertyState
* pControlWritingMode
= nullptr;
1390 // filter properties
1391 for( auto& rProp
: rProperties
)
1393 XMLPropertyState
*property
= &rProp
;
1394 if( property
->mnIndex
== -1 )
1397 // find properties with context
1398 // to prevent writing this property set mnIndex member to -1
1399 switch( getPropertySetMapper()->GetEntryContextId( property
->mnIndex
))
1401 case CTF_NUMBERINGRULES
:
1403 if( mbIsInAutoStyles
)
1404 property
->mnIndex
= -1;
1407 case CTF_SD_NUMBERINGRULES_NAME
:
1409 // this property is not exported in the style:properties element
1410 // because it's an XIndexAccess and not a string.
1411 // This will be handled in SvXMLAutoStylePoolP::exportStyleAttributes
1412 // This is suboptimal
1413 if( !mbIsInAutoStyles
)
1414 property
->mnIndex
= -1;
1417 case CTF_WRITINGMODE2
:
1418 pGraphicWritingMode2
= property
;
1420 case CTF_WRITINGMODE
:
1421 pShapeWritingMode
= property
;
1423 case CTF_CONTROLWRITINGMODE
:
1424 pControlWritingMode
= property
;
1426 case CTF_TEXTWRITINGMODE
:
1427 pTextWritingMode
= property
;
1429 case CTF_REPEAT_OFFSET_X
:
1430 pRepeatOffsetX
= property
;
1433 case CTF_REPEAT_OFFSET_Y
:
1434 pRepeatOffsetY
= property
;
1438 case CTF_FILLGRADIENTNAME
:
1439 case CTF_FILLHATCHNAME
:
1440 case CTF_FILLBITMAPNAME
:
1443 if( (property
->maValue
>>= aStr
) && aStr
.isEmpty() )
1444 property
->mnIndex
= -1;
1447 case CTF_TEXTANIMATION_BLINKING
:
1448 pTextAnimationBlinking
= property
;
1450 case CTF_TEXTANIMATION_KIND
:
1451 pTextAnimationKind
= property
;
1455 case CTF_FONTWORK_STYLE
: pFontWorkStyle
= property
; break;
1456 case CTF_FONTWORK_ADJUST
: pFontWorkAdjust
= property
; break;
1457 case CTF_FONTWORK_DISTANCE
: pFontWorkDistance
= property
; break;
1458 case CTF_FONTWORK_START
: pFontWorkStart
= property
; break;
1459 case CTF_FONTWORK_MIRROR
: pFontWorkMirror
= property
; break;
1460 case CTF_FONTWORK_OUTLINE
: pFontWorkOutline
= property
; break;
1461 case CTF_FONTWORK_SHADOW
: pFontWorkShadow
= property
; break;
1462 case CTF_FONTWORK_SHADOWCOLOR
: pFontWorkShadowColor
= property
; break;
1463 case CTF_FONTWORK_SHADOWOFFSETX
: pFontWorkShadowOffsetx
= property
; break;
1464 case CTF_FONTWORK_SHADOWOFFSETY
: pFontWorkShadowOffsety
= property
; break;
1465 case CTF_FONTWORK_FORM
: pFontWorkForm
= property
; break;
1466 case CTF_FONTWORK_HIDEFORM
: pFontWorkHideform
= property
; break;
1467 case CTF_FONTWORK_SHADOWTRANSPARENCE
: pFontWorkShadowTransparence
= property
; break;
1470 case CTF_SD_OLE_VIS_AREA_EXPORT_LEFT
: pOLEVisAreaLeft
= property
; break;
1471 case CTF_SD_OLE_VIS_AREA_EXPORT_TOP
: pOLEVisAreaTop
= property
; break;
1472 case CTF_SD_OLE_VIS_AREA_EXPORT_WIDTH
: pOLEVisAreaWidth
= property
; break;
1473 case CTF_SD_OLE_VIS_AREA_EXPORT_HEIGHT
: pOLEVisAreaHeight
= property
; break;
1474 case CTF_SD_OLE_ISINTERNAL
: pOLEIsInternal
= property
; break;
1476 case CTF_FRAME_DISPLAY_SCROLLBAR
:
1478 if( !property
->maValue
.hasValue() )
1479 property
->mnIndex
= -1;
1482 case CTF_FRAME_MARGIN_HORI
:
1483 case CTF_FRAME_MARGIN_VERT
:
1485 sal_Int32 nValue
= 0;
1486 if( (property
->maValue
>>= nValue
) && (nValue
< 0) )
1487 property
->mnIndex
= -1;
1491 case CTF_SD_MOVE_PROTECT
:
1494 if( (property
->maValue
>>= bProtected
) && !bProtected
)
1495 property
->mnIndex
= -1;
1498 case CTF_SD_SIZE_PROTECT
:
1501 if( (property
->maValue
>>= bProtected
) && !bProtected
)
1502 property
->mnIndex
= -1;
1505 case CTF_CAPTION_ISESCREL
: pCaptionIsEscRel
= property
; break;
1506 case CTF_CAPTION_ESCREL
: pCaptionEscRel
= property
; break;
1507 case CTF_CAPTION_ESCABS
: pCaptionEscAbs
= property
; break;
1508 case CTF_TEXT_CLIP11
: pClip11State
= property
; break;
1509 case CTF_TEXT_CLIP
: pClipState
= property
; break;
1513 if (pGraphicWritingMode2
)
1515 // A style:writing-mode attribute G in graphic-properties is only evaluated if there is no
1516 // style:writing-mode attribute P in the paragraph-properties of the same graphic style.
1517 // Otherwise the value of P is used. For values lr-tb, rl-tb and tb-rl the values G and P
1518 // should be the same. But other values in G cannot be expressed in P and would produce default
1519 // 0 value in P, preventing evaluation of G.
1520 sal_Int16 eGraphicWritingMode
;
1521 if ((pGraphicWritingMode2
->maValue
>>= eGraphicWritingMode
)
1522 && eGraphicWritingMode
>= text::WritingMode2::TB_LR
&& pShapeWritingMode
)
1523 pShapeWritingMode
->mnIndex
= -1;
1526 // check for duplicate writing mode
1527 if( pShapeWritingMode
&& (pTextWritingMode
|| pControlWritingMode
) )
1529 if( pTextWritingMode
)
1530 pTextWritingMode
->mnIndex
= -1;
1531 if( pControlWritingMode
)
1532 pControlWritingMode
->mnIndex
= -1;
1534 text::WritingMode eWritingMode
;
1535 if( pShapeWritingMode
->maValue
>>= eWritingMode
)
1537 if( text::WritingMode_LR_TB
== eWritingMode
)
1539 pShapeWritingMode
->mnIndex
= -1;
1540 pShapeWritingMode
= nullptr;
1544 else if( pTextWritingMode
&& pControlWritingMode
)
1546 pControlWritingMode
->mnIndex
= -1;
1548 sal_Int32 eWritingMode
;
1549 if (pTextWritingMode
->maValue
>>= eWritingMode
)
1551 if (text::WritingMode2::LR_TB
== eWritingMode
)
1553 pTextWritingMode
->mnIndex
= -1;
1554 pTextWritingMode
= nullptr;
1559 // do not export visual area for internal ole objects
1560 if( pOLEIsInternal
)
1563 if( (pOLEIsInternal
->maValue
>>= bInternal
) && !bInternal
)
1567 awt::Rectangle aRect
;
1568 if( rPropSet
->getPropertyValue( "VisibleArea" ) >>= aRect
)
1570 if( pOLEVisAreaLeft
)
1572 pOLEVisAreaLeft
->mnIndex
= getPropertySetMapper()->FindEntryIndex( CTF_SD_OLE_VIS_AREA_IMPORT_LEFT
);
1573 pOLEVisAreaLeft
->maValue
<<= aRect
;
1575 if( pOLEVisAreaTop
)
1577 pOLEVisAreaTop
->mnIndex
= getPropertySetMapper()->FindEntryIndex( CTF_SD_OLE_VIS_AREA_IMPORT_TOP
);
1578 pOLEVisAreaTop
->maValue
<<= aRect
;
1580 if( pOLEVisAreaWidth
)
1582 pOLEVisAreaWidth
->mnIndex
= getPropertySetMapper()->FindEntryIndex( CTF_SD_OLE_VIS_AREA_IMPORT_WIDTH
);
1583 pOLEVisAreaWidth
->maValue
<<= aRect
;
1585 if( pOLEVisAreaHeight
)
1587 pOLEVisAreaHeight
->mnIndex
= getPropertySetMapper()->FindEntryIndex( CTF_SD_OLE_VIS_AREA_IMPORT_HEIGHT
);
1588 pOLEVisAreaHeight
->maValue
<<= aRect
;
1592 catch( uno::Exception
& )
1598 if( pOLEVisAreaLeft
) pOLEVisAreaLeft
->mnIndex
= -1;
1599 if( pOLEVisAreaTop
) pOLEVisAreaTop
->mnIndex
= -1;
1600 if( pOLEVisAreaWidth
) pOLEVisAreaWidth
->mnIndex
= -1;
1601 if( pOLEVisAreaHeight
) pOLEVisAreaHeight
->mnIndex
= -1;
1604 pOLEIsInternal
->mnIndex
= -1;
1607 if( pTextAnimationBlinking
&& pTextAnimationKind
)
1609 drawing::TextAnimationKind eKind
;
1610 if( (pTextAnimationKind
->maValue
>>= eKind
) && eKind
!= drawing::TextAnimationKind_BLINK
)
1612 pTextAnimationBlinking
->mnIndex
= -1;
1616 pTextAnimationKind
->mnIndex
= -1;
1620 if( pRepeatOffsetX
&& pRepeatOffsetY
)
1622 sal_Int32 nOffset
= 0;
1623 if( ( pRepeatOffsetX
->maValue
>>= nOffset
) && ( nOffset
== 0 ) )
1624 pRepeatOffsetX
->mnIndex
= -1;
1626 pRepeatOffsetY
->mnIndex
= -1;
1632 sal_Int32 nStyle
= 0;
1634 if(pFontWorkStyle
->maValue
>>= nStyle
)
1636 if(/*XFormTextStyle::NONE*/4 == nStyle
)
1638 pFontWorkStyle
->mnIndex
= -1;
1640 pFontWorkAdjust
->mnIndex
= -1;
1641 if(pFontWorkDistance
)
1642 pFontWorkDistance
->mnIndex
= -1;
1644 pFontWorkStart
->mnIndex
= -1;
1646 pFontWorkMirror
->mnIndex
= -1;
1647 if(pFontWorkOutline
)
1648 pFontWorkOutline
->mnIndex
= -1;
1650 pFontWorkShadow
->mnIndex
= -1;
1651 if(pFontWorkShadowColor
)
1652 pFontWorkShadowColor
->mnIndex
= -1;
1653 if(pFontWorkShadowOffsetx
)
1654 pFontWorkShadowOffsetx
->mnIndex
= -1;
1655 if(pFontWorkShadowOffsety
)
1656 pFontWorkShadowOffsety
->mnIndex
= -1;
1658 pFontWorkForm
->mnIndex
= -1;
1659 if(pFontWorkHideform
)
1660 pFontWorkHideform
->mnIndex
= -1;
1661 if(pFontWorkShadowTransparence
)
1662 pFontWorkShadowTransparence
->mnIndex
= -1;
1667 if( pCaptionIsEscRel
)
1669 bool bIsRel
= false;
1670 pCaptionIsEscRel
->maValue
>>= bIsRel
;
1674 if( pCaptionEscAbs
)
1675 pCaptionEscAbs
->mnIndex
= -1;
1679 if( pCaptionEscRel
)
1680 pCaptionEscRel
->mnIndex
= -1;
1683 pCaptionIsEscRel
->mnIndex
= -1;
1686 if( pClipState
!= nullptr && pClip11State
!= nullptr )
1687 pClip11State
->mnIndex
= -1;
1689 SvXMLExportPropertyMapper::ContextFilter(bEnableFoFontFamily
, rProperties
, rPropSet
);
1692 void XMLShapeExportPropertyMapper::handleSpecialItem(
1693 comphelper::AttributeList
& rAttrList
,
1694 const XMLPropertyState
& rProperty
,
1695 const SvXMLUnitConverter
& rUnitConverter
,
1696 const SvXMLNamespaceMap
& rNamespaceMap
,
1697 const ::std::vector
< XMLPropertyState
> *pProperties
,
1698 sal_uInt32 nIdx
) const
1700 switch( getPropertySetMapper()->GetEntryContextId( rProperty
.mnIndex
) )
1702 case CTF_SD_CONTROL_SHAPE_DATA_STYLE
:
1703 // not to be handled by the base class
1707 SvXMLExportPropertyMapper::handleSpecialItem( rAttrList
, rProperty
, rUnitConverter
, rNamespaceMap
, pProperties
, nIdx
);
1712 void XMLShapeExportPropertyMapper::handleElementItem(
1713 SvXMLExport
& rExport
,
1714 const XMLPropertyState
& rProperty
,
1715 SvXmlExportFlags nFlags
,
1716 const ::std::vector
< XMLPropertyState
> *pProperties
,
1717 sal_uInt32 nIdx
) const
1719 switch( getPropertySetMapper()->GetEntryContextId( rProperty
.mnIndex
) )
1721 case CTF_NUMBERINGRULES
:
1723 // only export list-styles as elements in styles section
1724 if( !mbIsInAutoStyles
)
1726 uno::Reference
< container::XIndexReplace
> xNumRule( rProperty
.maValue
, uno::UNO_QUERY
);
1728 const_cast<XMLShapeExportPropertyMapper
*>(this)->maNumRuleExp
.exportNumberingRule(GetStyleName(), false, xNumRule
);
1733 SvXMLExportPropertyMapper::handleElementItem( rExport
, rProperty
, nFlags
, pProperties
, nIdx
);
1738 XMLPageExportPropertyMapper::XMLPageExportPropertyMapper( const rtl::Reference
< XMLPropertySetMapper
>& rMapper
, SvXMLExport
& rExport
) :
1739 SvXMLExportPropertyMapper( rMapper
),
1744 XMLPageExportPropertyMapper::~XMLPageExportPropertyMapper()
1748 void XMLPageExportPropertyMapper::ContextFilter(
1749 bool bEnableFoFontFamily
,
1750 std::vector
< XMLPropertyState
>& rProperties
,
1751 const uno::Reference
< beans::XPropertySet
>& rPropSet
) const
1753 XMLPropertyState
* pRepeatOffsetX
= nullptr;
1754 XMLPropertyState
* pRepeatOffsetY
= nullptr;
1755 XMLPropertyState
* pTransType
= nullptr;
1756 XMLPropertyState
* pTransDuration
= nullptr;
1757 XMLPropertyState
* pDateTimeUpdate
= nullptr;
1758 XMLPropertyState
* pDateTimeFormat
= nullptr;
1759 XMLPropertyState
* pTransitionFadeColor
= nullptr;
1761 sal_Int16 nTransitionType
= 0;
1763 // filter properties
1764 for( auto& rProp
: rProperties
)
1766 XMLPropertyState
*property
= &rProp
;
1767 if( property
->mnIndex
== -1 )
1770 // find properties with context
1771 // to prevent writing this property set mnIndex member to -1
1772 switch( getPropertySetMapper()->GetEntryContextId( property
->mnIndex
))
1775 case CTF_REPEAT_OFFSET_X
:
1776 pRepeatOffsetX
= property
;
1779 case CTF_REPEAT_OFFSET_Y
:
1780 pRepeatOffsetY
= property
;
1782 case CTF_PAGE_TRANS_TYPE
:
1783 pTransType
= property
;
1785 case CTF_PAGE_TRANS_STYLE
:
1786 if( mrExport
.getExportFlags() & SvXMLExportFlags::OASIS
)
1787 (*property
).mnIndex
= -1;
1789 case CTF_PAGE_TRANSITION_TYPE
:
1791 if( (!(mrExport
.getExportFlags() & SvXMLExportFlags::OASIS
)) ||
1792 (((*property
).maValue
>>= nTransitionType
) && (nTransitionType
== 0)) )
1793 (*property
).mnIndex
= -1;
1796 case CTF_PAGE_TRANSITION_SUBTYPE
:
1798 sal_Int16 nTransitionSubtype
= sal_Int16();
1799 if( (!(mrExport
.getExportFlags() & SvXMLExportFlags::OASIS
)) ||
1800 (((*property
).maValue
>>= nTransitionSubtype
) && (nTransitionSubtype
== 0)) )
1801 (*property
).mnIndex
= -1;
1805 case CTF_PAGE_TRANSITION_DIRECTION
:
1808 if( (!(mrExport
.getExportFlags() & SvXMLExportFlags::OASIS
)) ||
1809 (((*property
).maValue
>>= bDirection
) && bDirection
) )
1810 (*property
).mnIndex
= -1;
1813 case CTF_PAGE_TRANSITION_FADECOLOR
:
1814 if( !(mrExport
.getExportFlags() & SvXMLExportFlags::OASIS
) )
1815 (*property
).mnIndex
= -1;
1817 pTransitionFadeColor
= property
;
1819 case CTF_PAGE_TRANS_SPEED
:
1821 presentation::AnimationSpeed aEnum
;
1822 if( ((*property
).maValue
>>= aEnum
) && aEnum
== presentation::AnimationSpeed_MEDIUM
)
1823 (*property
).mnIndex
= -1;
1826 case CTF_PAGE_VISIBLE
:
1828 bool bVisible
= false;
1829 (*property
).maValue
>>= bVisible
;
1831 (*property
).mnIndex
= -1;
1834 case CTF_PAGE_TRANS_DURATION
:
1835 pTransDuration
= property
;
1837 case CTF_HEADER_TEXT
:
1838 case CTF_FOOTER_TEXT
:
1839 case CTF_DATE_TIME_TEXT
:
1842 (*property
).maValue
>>= aValue
;
1843 if( aValue
.isEmpty() )
1844 (*property
).mnIndex
= -1;
1848 case CTF_DATE_TIME_UPDATE
:
1849 pDateTimeUpdate
= property
;
1852 case CTF_DATE_TIME_FORMAT
:
1853 pDateTimeFormat
= property
;
1858 if( pTransitionFadeColor
&& nTransitionType
!= css::animations::TransitionType::FADE
)
1859 pTransitionFadeColor
->mnIndex
= -1;
1861 if( pDateTimeFormat
&& pDateTimeUpdate
)
1863 bool bIsFixed
= false;
1864 pDateTimeUpdate
->maValue
>>= bIsFixed
;
1866 pDateTimeFormat
->mnIndex
= -1;
1869 if( pRepeatOffsetX
&& pRepeatOffsetY
)
1871 sal_Int32 nOffset
= 0;
1872 if( ( pRepeatOffsetX
->maValue
>>= nOffset
) && ( nOffset
== 0 ) )
1873 pRepeatOffsetX
->mnIndex
= -1;
1875 pRepeatOffsetY
->mnIndex
= -1;
1878 if( pTransType
&& pTransDuration
)
1880 sal_Int32 nChange
= 0;
1881 pTransType
->maValue
>>= nChange
;
1883 // only export duration for automatic
1885 pTransDuration
->mnIndex
= -1;
1887 // do not export default transition change
1889 pTransType
->mnIndex
= -1;
1892 SvXMLExportPropertyMapper::ContextFilter(bEnableFoFontFamily
, rProperties
, rPropSet
);
1895 void XMLPageExportPropertyMapper::handleElementItem(
1896 SvXMLExport
& rExport
,
1897 const XMLPropertyState
& rProperty
,
1898 SvXmlExportFlags nFlags
,
1899 const ::std::vector
< XMLPropertyState
> *pProperties
,
1900 sal_uInt32 nIdx
) const
1902 switch( getPropertySetMapper()->GetEntryContextId( rProperty
.mnIndex
) )
1904 case CTF_PAGE_SOUND_URL
:
1907 if( (rProperty
.maValue
>>= aSoundURL
) && !aSoundURL
.isEmpty() )
1909 mrExport
.AddAttribute(XML_NAMESPACE_XLINK
, XML_HREF
, mrExport
.GetRelativeReference(aSoundURL
) );
1910 mrExport
.AddAttribute( XML_NAMESPACE_XLINK
, XML_TYPE
, XML_SIMPLE
);
1911 mrExport
.AddAttribute( XML_NAMESPACE_XLINK
, XML_SHOW
, XML_NEW
);
1912 mrExport
.AddAttribute( XML_NAMESPACE_XLINK
, XML_ACTUATE
, XML_ONREQUEST
);
1913 SvXMLElementExport
aElem( mrExport
, XML_NAMESPACE_PRESENTATION
, XML_SOUND
, true, true );
1918 SvXMLExportPropertyMapper::handleElementItem( rExport
, rProperty
, nFlags
, pProperties
, nIdx
);
1923 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */