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