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