LibreOffice Module xmloff (master)  1
sdpropls.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #include <com/sun/star/animations/TransitionType.hpp>
21 #include <com/sun/star/ucb/XAnyCompareFactory.hpp>
22 #include <com/sun/star/container/XIndexReplace.hpp>
23 #include <com/sun/star/drawing/LineStyle.hpp>
24 #include <com/sun/star/drawing/LineJoint.hpp>
25 #include <com/sun/star/drawing/LineCap.hpp>
26 #include <com/sun/star/presentation/AnimationSpeed.hpp>
27 #include <com/sun/star/presentation/FadeEffect.hpp>
28 
29 #include <com/sun/star/text/WritingMode.hpp>
30 #include <com/sun/star/text/WritingMode2.hpp>
33 #include <WordWrapPropertyHdl.hxx>
34 #include <enummaps.hxx>
35 #include "numithdl.hxx"
39 #include <com/sun/star/drawing/TextAnimationKind.hpp>
40 #include <com/sun/star/drawing/TextAnimationDirection.hpp>
41 #include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
42 #include <com/sun/star/drawing/TextVerticalAdjust.hpp>
43 #include <com/sun/star/drawing/TextFitToSizeType.hpp>
44 #include <com/sun/star/drawing/MeasureTextHorzPos.hpp>
45 #include <com/sun/star/drawing/MeasureTextVertPos.hpp>
47 #include <xmloff/xmltoken.hxx>
48 #include "sdpropls.hxx"
49 #include <propimp0.hxx>
50 #include <xmloff/xmlexp.hxx>
51 #include <xmloff/xmlnamespace.hxx>
52 #include <com/sun/star/drawing/NormalsKind.hpp>
53 #include <com/sun/star/drawing/TextureProjectionMode.hpp>
54 #include <com/sun/star/drawing/TextureKind.hpp>
55 #include <com/sun/star/drawing/TextureMode.hpp>
56 #include <com/sun/star/beans/XPropertySet.hpp>
57 #include <xmloff/txtprmap.hxx>
62 #include <animations.hxx>
63 #include <sax/tools/converter.hxx>
64 #include <xmlsdtypes.hxx>
65 
66 using ::com::sun::star::uno::Any;
67 
68 using namespace ::com::sun::star;
69 using namespace ::xmloff::token;
70 
71 #define MAP_(name,prefix,token,type,context) { name, prefix, token, type, context, SvtSaveOptions::ODFSVER_010, false }
72 #define MAPV_(name,prefix,token,type,context,version) { name, prefix, token, type, context, version, false }
73 #define GMAP(name,prefix,token,type,context) MAP_(name,prefix,token,type|XML_TYPE_PROP_GRAPHIC,context)
74 #define GMAP_D(name,prefix,token,type,context) MAP_(name,prefix,token,type|XML_TYPE_PROP_GRAPHIC|MID_FLAG_DEFAULT_ITEM_EXPORT,context)
75 #define GMAPV(name,prefix,token,type,context,version) MAPV_(name,prefix,token,type|XML_TYPE_PROP_GRAPHIC,context,version)
76 #define DPMAP(name,prefix,token,type,context) MAP_(name,prefix,token,type|XML_TYPE_PROP_DRAWING_PAGE,context)
77 #define TMAP(name,prefix,token,type,context) MAP_(name,prefix,token,type|XML_TYPE_PROP_TEXT,context)
78 #define PMAP(name,prefix,token,type,context) MAP_(name,prefix,token,type|XML_TYPE_PROP_PARAGRAPH,context)
79 #define MAP_END() { nullptr, 0, XML_EMPTY, 0 ,0, SvtSaveOptions::ODFSVER_010, false }
80 
81 // entry list for graphic properties
82 
84 {
85  // this entry must be first! this is needed for XMLShapeImportHelper::CreateExternalShapePropMapper
86 
87  // ^^^though CreateExternalShapePropMapper is gone now, hmm^^^
88  GMAP( "UserDefinedAttributes", XML_NAMESPACE_TEXT, XML_XMLNS, XML_TYPE_ATTRIBUTE_CONTAINER | MID_FLAG_SPECIAL_ITEM, 0 ),
89 
90  // stroke attributes
101  GMAP( "LineTransparence", XML_NAMESPACE_SVG, XML_STROKE_OPACITY, XML_SD_TYPE_OPACITY, 0 ),
104 
105  // fill attributes
113  GMAP( "FillGradientStepCount", XML_NAMESPACE_DRAW, XML_GRADIENT_STEP_COUNT, XML_TYPE_NUMBER16, 0 ),
115  GMAP( "FillBackground", XML_NAMESPACE_DRAW, XML_FILL_HATCH_SOLID, XML_TYPE_BOOL, 0 ),
118  GMAP( "FillTransparence", XML_NAMESPACE_DRAW, XML_OPACITY, XML_TYPE_NEG_PERCENT16|MID_FLAG_MULTI_PROPERTY, 0 ), // exists in SW, too
125  GMAP( "FillBitmapPositionOffsetX", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT_X, XML_TYPE_PERCENT, 0 ),
126  GMAP( "FillBitmapPositionOffsetY", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT_Y, XML_TYPE_PERCENT, 0 ),
130 
131  // text frame attributes
134  GMAP( "TextAutoGrowHeight", XML_NAMESPACE_DRAW, XML_AUTO_GROW_HEIGHT, XML_TYPE_BOOL, 0 ),
135  GMAP( "TextAutoGrowWidth", XML_NAMESPACE_DRAW, XML_AUTO_GROW_WIDTH, XML_TYPE_BOOL, 0 ),
138  GMAP( "TextContourFrame", XML_NAMESPACE_DRAW, XML_FIT_TO_CONTOUR, XML_TYPE_BOOL, 0 ),
139  GMAP( "TextMaximumFrameHeight", XML_NAMESPACE_FO, XML_MAX_HEIGHT, XML_TYPE_MEASURE, 0 ),
140  GMAP( "TextMaximumFrameWidth", XML_NAMESPACE_FO, XML_MAX_WIDTH, XML_TYPE_MEASURE, 0 ),
141  GMAP( "TextMinimumFrameHeight", XML_NAMESPACE_FO, XML_MIN_HEIGHT, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, 0 ), // exists in SW, too
143  GMAP( "TextUpperDistance", XML_NAMESPACE_FO, XML_PADDING_TOP, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, 0 ), // exists in SW, too
144  GMAP( "TextLowerDistance", XML_NAMESPACE_FO, XML_PADDING_BOTTOM, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, 0 ), // exists in SW, too
145  GMAP( "TextLeftDistance", XML_NAMESPACE_FO, XML_PADDING_LEFT, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, 0 ), // exists in SW, too
146  GMAP( "TextRightDistance", XML_NAMESPACE_FO, XML_PADDING_RIGHT, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, 0 ), // exists in SW, too
151  GMAP( "TextChainNextName", XML_NAMESPACE_DRAW, XML_CHAIN_NEXT_NAME, XML_TYPE_STRING, 0 ),
152 
154 
155  // shadow attributes
157  GMAP( "ShadowXDistance", XML_NAMESPACE_DRAW, XML_SHADOW_OFFSET_X, XML_TYPE_MEASURE, 0 ),
158  GMAP( "ShadowYDistance", XML_NAMESPACE_DRAW, XML_SHADOW_OFFSET_Y, XML_TYPE_MEASURE, 0 ),
160  GMAP( "ShadowTransparence", XML_NAMESPACE_DRAW, XML_SHADOW_OPACITY, XML_TYPE_NEG_PERCENT, 0 ),
162 
163  // glow attributes
167 
168  // soft edge attributes
170 
171  // graphic attributes
172  GMAP( "GraphicColorMode", XML_NAMESPACE_DRAW, XML_COLOR_MODE, XML_TYPE_COLOR_MODE, 0 ), // exists in SW, too, with same property name
173  GMAP( "AdjustLuminance", XML_NAMESPACE_DRAW, XML_LUMINANCE, XML_TYPE_PERCENT16, 0 ), // signed? exists in SW, too, with same property name
174  GMAP( "AdjustContrast", XML_NAMESPACE_DRAW, XML_CONTRAST, XML_TYPE_PERCENT16, 0 ), // signed? exists in SW, too, with same property name
175  GMAP( "Gamma", XML_NAMESPACE_DRAW, XML_GAMMA, XML_TYPE_DOUBLE_PERCENT, 0 ), // signed? exists in SW, too, with same property name
176  GMAP( "AdjustRed", XML_NAMESPACE_DRAW, XML_RED, XML_TYPE_PERCENT16, 0 ), // signed? exists in SW, too, with same property name
177  GMAP( "AdjustGreen", XML_NAMESPACE_DRAW, XML_GREEN, XML_TYPE_PERCENT16, 0 ), // signed? exists in SW, too, with same property name
178  GMAP( "AdjustBlue", XML_NAMESPACE_DRAW, XML_BLUE, XML_TYPE_PERCENT16, 0 ), // signed? exists in SW, too, with same property name
179  GMAPV( "GraphicCrop", XML_NAMESPACE_FO, XML_CLIP, XML_TYPE_TEXT_CLIP, CTF_TEXT_CLIP, SvtSaveOptions::ODFSVER_012), // exists in SW, too, with same property name
180  GMAP( "GraphicCrop", XML_NAMESPACE_FO, XML_CLIP, XML_TYPE_TEXT_CLIP11, CTF_TEXT_CLIP11 ), // exists in SW, too, with same property name
181  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#
182  GMAP( "IsMirrored", XML_NAMESPACE_STYLE, XML_MIRROR, XML_TYPE_SD_MIRROR|MID_FLAG_MULTI_PROPERTY, 0 ), // exists in SW, too // #i40214#
183 
184  // animation text attributes
188  GMAP( "TextAnimationStartInside", XML_NAMESPACE_TEXT, XML_ANIMATION_START_INSIDE, XML_TYPE_BOOL, 0 ),
189  GMAP( "TextAnimationStopInside", XML_NAMESPACE_TEXT, XML_ANIMATION_STOP_INSIDE, XML_TYPE_BOOL, 0 ),
190  GMAP( "TextAnimationCount", XML_NAMESPACE_TEXT, XML_ANIMATION_REPEAT, XML_TYPE_NUMBER16, 0 ),
193 
194  // connector attributes
199 
200  // measure attributes
201  GMAP( "MeasureLineDistance", XML_NAMESPACE_DRAW, XML_LINE_DISTANCE, XML_TYPE_MEASURE, 0 ),
202  GMAP( "MeasureHelpLineOverhang", XML_NAMESPACE_DRAW, XML_GUIDE_OVERHANG, XML_TYPE_MEASURE, 0 ),
203  GMAP( "MeasureHelpLineDistance", XML_NAMESPACE_DRAW, XML_GUIDE_DISTANCE, XML_TYPE_MEASURE, 0 ),
204  GMAP( "MeasureHelpLine1Length", XML_NAMESPACE_DRAW, XML_START_GUIDE, XML_TYPE_MEASURE, 0 ),
205  GMAP( "MeasureHelpLine2Length", XML_NAMESPACE_DRAW, XML_END_GUIDE, XML_TYPE_MEASURE, 0 ),
206  GMAP( "MeasureTextHorizontalPosition", XML_NAMESPACE_DRAW, XML_MEASURE_ALIGN, XML_SD_TYPE_MEASURE_HALIGN, 0 ),
207  GMAP( "MeasureTextVerticalPosition", XML_NAMESPACE_DRAW, XML_MEASURE_VERTICAL_ALIGN, XML_SD_TYPE_MEASURE_VALIGN, 0 ),
209  GMAP( "MeasureShowUnit", XML_NAMESPACE_DRAW, XML_SHOW_UNIT, XML_TYPE_BOOL, 0 ),
210  GMAP( "MeasureBelowReferenceEdge", XML_NAMESPACE_DRAW, XML_PLACING, XML_SD_TYPE_MEASURE_PLACING, 0 ),
211  GMAP( "MeasureTextRotate90", XML_NAMESPACE_DRAW, XML_PARALLEL, XML_TYPE_BOOL, 0 ),
212  GMAP( "MeasureDecimalPlaces", XML_NAMESPACE_DRAW, XML_DECIMAL_PLACES, XML_TYPE_NUMBER16, 0 ),
213 
214  // 3D geometry attributes
215  GMAP( "D3DHorizontalSegments", XML_NAMESPACE_DR3D, XML_HORIZONTAL_SEGMENTS, XML_TYPE_NUMBER, 0 ),
216  GMAP( "D3DVerticalSegments", XML_NAMESPACE_DR3D, XML_VERTICAL_SEGMENTS, XML_TYPE_NUMBER, 0 ),
217  GMAP( "D3DPercentDiagonal", XML_NAMESPACE_DR3D, XML_EDGE_ROUNDING, XML_TYPE_PERCENT, 0 ),
218  GMAP( "D3DBackscale", XML_NAMESPACE_DR3D, XML_BACK_SCALE, XML_TYPE_PERCENT, 0 ),
219  GMAP( "D3DEndAngle", XML_NAMESPACE_DR3D, XML_END_ANGLE, XML_TYPE_NUMBER, 0 ),
222 
223  // #107245# New 3D properties which are possible for lathe and extrude 3d objects
224  GMAP( "D3DCloseFront", XML_NAMESPACE_DR3D, XML_CLOSE_FRONT, XML_TYPE_BOOL, 0 ),
225  GMAP( "D3DCloseBack", XML_NAMESPACE_DR3D, XML_CLOSE_BACK, XML_TYPE_BOOL, 0 ),
226 
227  // 3D lighting attributes
230 
231  // 3D texture attributes
234  GMAP( "D3DTextureKind", XML_NAMESPACE_DR3D, XML_TEX_KIND, XML_SD_TYPE_TEX_KIND, 0 ),
235  GMAP( "D3DTextureMode", XML_NAMESPACE_DR3D, XML_TEX_MODE, XML_SD_TYPE_TEX_MODE, 0 ),
237 
238  // 3D material attributes
239  GMAP( "D3DMaterialColor", XML_NAMESPACE_DR3D, XML_DIFFUSE_COLOR, XML_TYPE_COLOR, 0 ),
240  GMAP( "D3DMaterialEmission", XML_NAMESPACE_DR3D, XML_EMISSIVE_COLOR, XML_TYPE_COLOR, 0 ),
241  GMAP( "D3DMaterialSpecular", XML_NAMESPACE_DR3D, XML_SPECULAR_COLOR, XML_TYPE_COLOR, 0 ),
242  GMAP( "D3DMaterialSpecularIntensity", XML_NAMESPACE_DR3D, XML_SHININESS, XML_TYPE_PERCENT, 0 ),
243 
244  // 3D shadow attributes
246 
247  // #FontWork# attributes
261 
262  // #FontWork# attributes
276 
277  // control attributes (border exists one more time for the text additions of shapes)
278  GMAP( "ControlSymbolColor", XML_NAMESPACE_DRAW, XML_SYMBOL_COLOR, XML_TYPE_COLOR, 0 ),
286 
287  // special entries for floating frames
301 
303 
304  // caption properties
314  GMAP( "CaptionIsFitLineLength", XML_NAMESPACE_DRAW, XML_CAPTION_FIT_LINE_LENGTH, XML_TYPE_BOOL, 0 ),
315 
316  // misc object properties
319 
320  MAP_END()
321 };
322 
323 // entry list for presentation page properties
324 
326 {
327  DPMAP( "UserDefinedAttributes", XML_NAMESPACE_TEXT, XML_XMLNS, XML_TYPE_ATTRIBUTE_CONTAINER | MID_FLAG_SPECIAL_ITEM, 0 ),
328 
336 
339 
343  DPMAP( "FillGradientStepCount", XML_NAMESPACE_DRAW, XML_GRADIENT_STEP_COUNT, XML_TYPE_NUMBER, 0 ),
345  GMAP( "FillBackground", XML_NAMESPACE_DRAW, XML_FILL_HATCH_SOLID, XML_TYPE_BOOL, 0 ),
354  DPMAP( "FillBitmapPositionOffsetX", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT_X, XML_TYPE_PERCENT, 0 ),
355  DPMAP( "FillBitmapPositionOffsetY", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT_Y, XML_TYPE_PERCENT, 0 ),
359 
364 
369  MAP_END()
370 };
371 
376 {
379  MAP_( "UseFirstColumnStyle", XML_NAMESPACE_TABLE, XML_USE_FIRST_COLUMN_STYLES, XML_TYPE_BOOL, 0 ),
382  MAP_( "UseBandingColumnStyle", XML_NAMESPACE_TABLE, XML_USE_BANDING_COLUMNS_STYLES, XML_TYPE_BOOL, 0 ),
383  MAP_END()
384 };
385 
386 // implementation of factory for own graphic properties
387 
389 {
390  { XML_NONE, drawing::LineStyle_NONE },
391  { XML_SOLID, drawing::LineStyle_SOLID },
392  { XML_DASH, drawing::LineStyle_DASH },
393  { XML_TOKEN_INVALID, drawing::LineStyle(0) }
394 };
395 
397 {
398  { XML_NONE, drawing::LineJoint_NONE },
399  { XML_MITER, drawing::LineJoint_MITER },
400  { XML_ROUND, drawing::LineJoint_ROUND },
401  { XML_BEVEL, drawing::LineJoint_BEVEL },
402  { XML_MIDDLE, drawing::LineJoint_MIDDLE },
403  { XML_TOKEN_INVALID, drawing::LineJoint(0) }
404 };
405 
407 {
408  { XML_BUTT, drawing::LineCap_BUTT },
409  { XML_ROUND, drawing::LineCap_ROUND },
410  // use XML_GRADIENTSTYLE_SQUARE as XML_SQUARE, is defined as "square" already
411  { XML_GRADIENTSTYLE_SQUARE, drawing::LineCap_SQUARE },
412  { XML_TOKEN_INVALID, drawing::LineCap(0) }
413 };
414 
416 {
417  { XML_NONE, drawing::FillStyle_NONE },
418  { XML_SOLID, drawing::FillStyle_SOLID },
419  { XML_BITMAP, drawing::FillStyle_BITMAP },
420  { XML_GRADIENT, drawing::FillStyle_GRADIENT },
421  { XML_HATCH, drawing::FillStyle_HATCH },
423 };
424 
426 {
427  { XML_MANUAL, 0 },
428  { XML_AUTOMATIC, 1 },
429  { XML_SEMI_AUTOMATIC, 2 },
430  { XML_TOKEN_INVALID, 0 }
431 };
432 
434 {
435  { XML_FAST, presentation::AnimationSpeed_FAST },
436  { XML_MEDIUM, presentation::AnimationSpeed_MEDIUM },
437  { XML_SLOW, presentation::AnimationSpeed_SLOW },
438  { XML_TOKEN_INVALID, presentation::AnimationSpeed(0) }
439 };
440 
442 {
443  { XML_NONE, presentation::FadeEffect_NONE },
444  { XML_FADE_FROM_LEFT, presentation::FadeEffect_FADE_FROM_LEFT },
445  { XML_FADE_FROM_TOP, presentation::FadeEffect_FADE_FROM_TOP },
446  { XML_FADE_FROM_RIGHT, presentation::FadeEffect_FADE_FROM_RIGHT },
447  { XML_FADE_FROM_BOTTOM, presentation::FadeEffect_FADE_FROM_BOTTOM },
448  { XML_FADE_TO_CENTER, presentation::FadeEffect_FADE_TO_CENTER },
449  { XML_FADE_FROM_CENTER, presentation::FadeEffect_FADE_FROM_CENTER },
450  { XML_MOVE_FROM_LEFT, presentation::FadeEffect_MOVE_FROM_LEFT },
451  { XML_MOVE_FROM_TOP, presentation::FadeEffect_MOVE_FROM_TOP },
452  { XML_MOVE_FROM_RIGHT, presentation::FadeEffect_MOVE_FROM_RIGHT },
453  { XML_MOVE_FROM_BOTTOM, presentation::FadeEffect_MOVE_FROM_BOTTOM },
454  { XML_ROLL_FROM_TOP, presentation::FadeEffect_ROLL_FROM_TOP },
455  { XML_ROLL_FROM_LEFT, presentation::FadeEffect_ROLL_FROM_LEFT },
456  { XML_ROLL_FROM_RIGHT, presentation::FadeEffect_ROLL_FROM_RIGHT },
457  { XML_ROLL_FROM_BOTTOM, presentation::FadeEffect_ROLL_FROM_BOTTOM },
458  { XML_VERTICAL_STRIPES, presentation::FadeEffect_VERTICAL_STRIPES },
459  { XML_HORIZONTAL_STRIPES, presentation::FadeEffect_HORIZONTAL_STRIPES },
460  { XML_CLOCKWISE, presentation::FadeEffect_CLOCKWISE },
461  { XML_COUNTERCLOCKWISE, presentation::FadeEffect_COUNTERCLOCKWISE },
462  { XML_FADE_FROM_UPPERLEFT, presentation::FadeEffect_FADE_FROM_UPPERLEFT },
463  { XML_FADE_FROM_UPPERRIGHT, presentation::FadeEffect_FADE_FROM_UPPERRIGHT },
464  { XML_FADE_FROM_LOWERLEFT, presentation::FadeEffect_FADE_FROM_LOWERLEFT },
465  { XML_FADE_FROM_LOWERRIGHT, presentation::FadeEffect_FADE_FROM_LOWERRIGHT },
466  { XML_CLOSE_VERTICAL, presentation::FadeEffect_CLOSE_VERTICAL },
467  { XML_CLOSE_HORIZONTAL, presentation::FadeEffect_CLOSE_HORIZONTAL },
468  { XML_OPEN_VERTICAL, presentation::FadeEffect_OPEN_VERTICAL },
469  { XML_OPEN_HORIZONTAL, presentation::FadeEffect_OPEN_HORIZONTAL },
470  { XML_SPIRALIN_LEFT, presentation::FadeEffect_SPIRALIN_LEFT },
471  { XML_SPIRALIN_RIGHT, presentation::FadeEffect_SPIRALIN_RIGHT },
472  { XML_SPIRALOUT_LEFT, presentation::FadeEffect_SPIRALOUT_LEFT },
473  { XML_SPIRALOUT_RIGHT, presentation::FadeEffect_SPIRALOUT_RIGHT },
474  { XML_DISSOLVE, presentation::FadeEffect_DISSOLVE },
475  { XML_WAVYLINE_FROM_LEFT, presentation::FadeEffect_WAVYLINE_FROM_LEFT },
476  { XML_WAVYLINE_FROM_TOP, presentation::FadeEffect_WAVYLINE_FROM_TOP },
477  { XML_WAVYLINE_FROM_RIGHT, presentation::FadeEffect_WAVYLINE_FROM_RIGHT },
478  { XML_WAVYLINE_FROM_BOTTOM, presentation::FadeEffect_WAVYLINE_FROM_BOTTOM },
479  { XML_RANDOM, presentation::FadeEffect_RANDOM },
480  { XML_STRETCH_FROM_LEFT, presentation::FadeEffect_STRETCH_FROM_LEFT },
481  { XML_STRETCH_FROM_TOP, presentation::FadeEffect_STRETCH_FROM_TOP },
482  { XML_STRETCH_FROM_RIGHT, presentation::FadeEffect_STRETCH_FROM_RIGHT },
483  { XML_STRETCH_FROM_BOTTOM, presentation::FadeEffect_STRETCH_FROM_BOTTOM },
484  { XML_VERTICAL_LINES, presentation::FadeEffect_VERTICAL_LINES },
485  { XML_HORIZONTAL_LINES, presentation::FadeEffect_HORIZONTAL_LINES },
486  { XML_MOVE_FROM_UPPERLEFT, presentation::FadeEffect_MOVE_FROM_UPPERLEFT },
487  { XML_MOVE_FROM_UPPERRIGHT, presentation::FadeEffect_MOVE_FROM_UPPERRIGHT },
488  { XML_MOVE_FROM_LOWERRIGHT, presentation::FadeEffect_MOVE_FROM_LOWERRIGHT },
489  { XML_MOVE_FROM_LOWERLEFT, presentation::FadeEffect_MOVE_FROM_LOWERLEFT },
490  { XML_UNCOVER_TO_LEFT, presentation::FadeEffect_UNCOVER_TO_LEFT },
491  { XML_UNCOVER_TO_UPPERLEFT, presentation::FadeEffect_UNCOVER_TO_UPPERLEFT },
492  { XML_UNCOVER_TO_TOP, presentation::FadeEffect_UNCOVER_TO_TOP },
493  { XML_UNCOVER_TO_UPPERRIGHT,presentation::FadeEffect_UNCOVER_TO_UPPERRIGHT },
494  { XML_UNCOVER_TO_RIGHT, presentation::FadeEffect_UNCOVER_TO_RIGHT },
495  { XML_UNCOVER_TO_LOWERRIGHT,presentation::FadeEffect_UNCOVER_TO_LOWERRIGHT },
496  { XML_UNCOVER_TO_BOTTOM, presentation::FadeEffect_UNCOVER_TO_BOTTOM },
497  { XML_UNCOVER_TO_LOWERLEFT, presentation::FadeEffect_UNCOVER_TO_LOWERLEFT },
498  { XML_VERTICAL_CHECKERBOARD,presentation::FadeEffect_VERTICAL_CHECKERBOARD },
499  { XML_HORIZONTAL_CHECKERBOARD,presentation::FadeEffect_HORIZONTAL_CHECKERBOARD },
500  { XML_TOKEN_INVALID, presentation::FadeEffect(0) }
501 };
502 
504 {
505  { XML_STANDARD, drawing::ConnectorType_STANDARD },
506  { XML_CURVE, drawing::ConnectorType_CURVE },
507  { XML_LINE, drawing::ConnectorType_LINE },
508  { XML_LINES, drawing::ConnectorType_LINES },
509  { XML_TOKEN_INVALID, drawing::ConnectorType(0) }
510 };
511 
513 {
514  { XML_REPEAT, drawing::BitmapMode_REPEAT },
515  { XML_STRETCH, drawing::BitmapMode_STRETCH },
516  { XML_BACKGROUND_NO_REPEAT, drawing::BitmapMode_NO_REPEAT },
517  { XML_TOKEN_INVALID, drawing::BitmapMode(0) }
518 };
519 
520 // 3D EnumMaps
521 
523 {
524  { XML_OBJECT, drawing::NormalsKind_SPECIFIC },
525  { XML_FLAT, drawing::NormalsKind_FLAT },
526  { XML_SPHERE, drawing::NormalsKind_SPHERE },
527  { XML_TOKEN_INVALID, drawing::NormalsKind(0) }
528 };
529 
531 {
532  { XML_OBJECT, drawing::TextureProjectionMode_OBJECTSPECIFIC },
533  { XML_PARALLEL, drawing::TextureProjectionMode_PARALLEL },
534  { XML_SPHERE, drawing::TextureProjectionMode_SPHERE },
535  { XML_TOKEN_INVALID, drawing::TextureProjectionMode(0) }
536 };
537 
539 {
540  { XML_OBJECT, drawing::TextureProjectionMode_OBJECTSPECIFIC },
541  { XML_PARALLEL, drawing::TextureProjectionMode_PARALLEL },
542  { XML_SPHERE, drawing::TextureProjectionMode_SPHERE },
543  { XML_TOKEN_INVALID, drawing::TextureProjectionMode(0) }
544 };
545 
547 {
548  { XML_LUMINANCE, drawing::TextureKind_LUMINANCE },
549  { XML_COLOR, drawing::TextureKind_COLOR },
550  { XML_TOKEN_INVALID, drawing::TextureKind(0) }
551 };
552 
554 {
555  { XML_REPLACE, drawing::TextureMode_REPLACE },
556  { XML_MODULATE, drawing::TextureMode_MODULATE },
557  { XML_BLEND, drawing::TextureMode_BLEND },
558  { XML_TOKEN_INVALID, drawing::TextureMode(0) }
559 };
560 
562 {
563  { XML_TOP_LEFT, drawing::RectanglePoint_LEFT_TOP },
564  { XML_TOP, drawing::RectanglePoint_MIDDLE_TOP },
565  { XML_TOP_RIGHT, drawing::RectanglePoint_RIGHT_TOP },
566  { XML_LEFT, drawing::RectanglePoint_LEFT_MIDDLE },
567  { XML_CENTER, drawing::RectanglePoint_MIDDLE_MIDDLE },
568  { XML_RIGHT, drawing::RectanglePoint_RIGHT_MIDDLE },
569  { XML_BOTTOM_LEFT, drawing::RectanglePoint_LEFT_BOTTOM },
570  { XML_BOTTOM, drawing::RectanglePoint_MIDDLE_BOTTOM },
571  { XML_BOTTOM_RIGHT, drawing::RectanglePoint_RIGHT_BOTTOM },
572  { XML_TOKEN_INVALID, drawing::RectanglePoint(0) }
573 };
574 
576 {
577  { XML_FULL, drawing::CircleKind_FULL },
578  { XML_SECTION, drawing::CircleKind_SECTION },
579  { XML_CUT, drawing::CircleKind_CUT },
580  { XML_ARC, drawing::CircleKind_ARC },
581  { XML_TOKEN_INVALID, drawing::CircleKind(0) }
582 };
583 
585 {
586  { XML_TB_RL, text::WritingMode_TB_RL },
587  { XML_LR_TB, text::WritingMode_LR_TB },
588  { XML_TOKEN_INVALID, text::WritingMode(0) }
589 };
590 
592 {
593  { XML_NONE, drawing::TextAnimationKind_NONE },
594  { XML_BLINKING, drawing::TextAnimationKind_BLINK }, // will be filtered
595  { XML_SCROLL, drawing::TextAnimationKind_SCROLL },
596  { XML_ALTERNATE, drawing::TextAnimationKind_ALTERNATE },
597  { XML_SLIDE, drawing::TextAnimationKind_SLIDE },
598  { XML_TOKEN_INVALID, drawing::TextAnimationKind(0) }
599 };
600 
602 {
603  { XML_FALSE, drawing::TextAnimationKind_NONE },
604  { XML_TRUE, drawing::TextAnimationKind_BLINK },
605  { XML_FALSE, drawing::TextAnimationKind_SCROLL },
606  { XML_FALSE, drawing::TextAnimationKind_ALTERNATE },
607  { XML_FALSE, drawing::TextAnimationKind_SLIDE },
608  { XML_TOKEN_INVALID, drawing::TextAnimationKind(0) }
609 };
610 
612 {
613  { XML_LEFT, drawing::TextAnimationDirection_LEFT },
614  { XML_RIGHT, drawing::TextAnimationDirection_RIGHT }, // will be filtered
615  { XML_UP, drawing::TextAnimationDirection_UP },
616  { XML_DOWN, drawing::TextAnimationDirection_DOWN },
617  { XML_TOKEN_INVALID, drawing::TextAnimationDirection(0) }
618 };
619 
621 {
622  { XML_LEFT, drawing::TextHorizontalAdjust_LEFT },
623  { XML_CENTER, drawing::TextHorizontalAdjust_CENTER },
624  { XML_RIGHT, drawing::TextHorizontalAdjust_RIGHT },
625  { XML_JUSTIFY, drawing::TextHorizontalAdjust_BLOCK },
626  { XML_TOKEN_INVALID, drawing::TextHorizontalAdjust(0) }
627 };
628 
630 {
631  { XML_TOP, drawing::TextVerticalAdjust_TOP },
632  { XML_MIDDLE, drawing::TextVerticalAdjust_CENTER },
633  { XML_BOTTOM, drawing::TextVerticalAdjust_BOTTOM },
634  { XML_JUSTIFY, drawing::TextVerticalAdjust_BLOCK },
635  { XML_TOKEN_INVALID, drawing::TextVerticalAdjust(0) }
636 };
637 
638 // note: PROPORTIONAL and ALLLINES are the same thing now!
640 {
641  { XML_FALSE, drawing::TextFitToSizeType_NONE },
642  { XML_TRUE, drawing::TextFitToSizeType_PROPORTIONAL },
643  { XML_TRUE, drawing::TextFitToSizeType_ALLLINES },
644  { XML_FALSE, drawing::TextFitToSizeType_AUTOFIT },
645  { XML_TOKEN_INVALID, drawing::TextFitToSizeType(0) }
646 };
647 
649 {
650  { XML_FALSE, drawing::TextFitToSizeType_NONE },
651  { XML_TRUE, drawing::TextFitToSizeType_PROPORTIONAL },
652  { XML_ALL, drawing::TextFitToSizeType_ALLLINES },
653  { XML_SHRINK_TO_FIT,drawing::TextFitToSizeType_AUTOFIT },
654  { XML_TOKEN_INVALID, drawing::TextFitToSizeType(0) }
655 };
656 
658 {
659  { XML_FALSE, drawing::TextFitToSizeType_NONE },
660  { XML_FALSE, drawing::TextFitToSizeType_PROPORTIONAL },
661  { XML_FALSE, drawing::TextFitToSizeType_ALLLINES },
662  { XML_TRUE, drawing::TextFitToSizeType_AUTOFIT },
663  { XML_TOKEN_INVALID, drawing::TextFitToSizeType(0) }
664 };
665 
667 {
668  { XML_AUTOMATIC, 0 },
669  { XML_MM, 1 },
670  { XML_UNIT_CM, 2 },
671  { XML_UNIT_M, 3 },
672  { XML_KM, 4 },
673  { XML_UNIT_PT, 6 },
674  { XML_UNIT_PC, 7 },
675  { XML_IN, 8 },
676  { XML_UNIT_FOOT, 9 },
677  { XML_MI, 10 },
678  { XML_TOKEN_INVALID,0 }
679 };
680 
682 {
683  { XML_AUTOMATIC, drawing::MeasureTextHorzPos_AUTO },
684  { XML_LEFT_OUTSIDE, drawing::MeasureTextHorzPos_LEFTOUTSIDE },
685  { XML_INSIDE, drawing::MeasureTextHorzPos_INSIDE },
686  { XML_RIGHT_OUTSIDE, drawing::MeasureTextHorzPos_RIGHTOUTSIDE},
687  { XML_TOKEN_INVALID, drawing::MeasureTextHorzPos(0) }
688 };
689 
691 {
692  { XML_AUTOMATIC, drawing::MeasureTextVertPos_AUTO },
693  { XML_ABOVE, drawing::MeasureTextVertPos_EAST },
694  { XML_BELOW, drawing::MeasureTextVertPos_WEST },
695  { XML_CENTER, drawing::MeasureTextVertPos_CENTERED },
696  { XML_TOKEN_INVALID, drawing::MeasureTextVertPos(0) }
697 };
698 
699 // #FontWork#
701 {
702  { XML_ROTATE, 0 }, //XFormTextStyle::Rotate,
703  { XML_UPRIGHT, 1 }, //XFormTextStyle::Upright,
704  { XML_SLANT_X, 2 }, //XFormTextStyle::SlantX,
705  { XML_SLANT_Y, 3 }, //XFormTextStyle::SlantY,
706  { XML_NONE, 4 }, //XFormTextStyle::NONE
707  { XML_TOKEN_INVALID,0 }
708 };
709 
711 {
712  { XML_LEFT, 0 }, //XFormTextAdjust::Left,
713  { XML_RIGHT, 1 }, //XFormTextAdjust::Right,
714  { XML_AUTOSIZE, 2 }, //XFormTextAdjust::AutoSize,
715  { XML_CENTER, 3 }, //XFormTextAdjust::Center
716  { XML_TOKEN_INVALID,0 }
717 };
718 
720 {
721  { XML_NORMAL, 0 }, //XFormTextShadow::Normal,
722  { XML_SLANT, 1 }, //XFormTextShadow::Slant,
723  { XML_NONE, 2 }, //XFormTextShadow::NONE
724  { XML_TOKEN_INVALID,0 }
725 };
726 
728 {
729  { XML_NONE, 0 }, //XFTFORM_NONE,
730  { XML_TOPCIRCLE, 1 }, //XFTFORM_TOPCIRC,
731  { XML_BOTTOMCIRCLE, 2 }, //XFTFORM_BOTCIRC,
732  { XML_LEFTCIRCLE, 3 }, //XFTFORM_LFTCIRC,
733  { XML_RIGHTCIRCLE, 4 }, //XFTFORM_RGTCIRC,
734  { XML_TOPARC, 5 }, //XFTFORM_TOPARC,
735  { XML_BOTTOMARC, 6 }, //XFTFORM_BOTARC,
736  { XML_LEFTARC, 7 }, //XFTFORM_LFTARC,
737  { XML_RIGHTARC, 8 }, //XFTFORM_RGTARC,
738  { XML_BUTTON1, 9 }, //XFTFORM_BUTTON1,
739  { XML_BUTTON2, 10 }, //XFTFORM_BUTTON2,
740  { XML_BUTTON3, 11 }, //XFTFORM_BUTTON3,
741  { XML_BUTTON4, 12 }, //XFTFORM_BUTTON4
742  { XML_TOKEN_INVALID,0 }
743 };
744 
746 {
747  { XML_HORIZONTAL, 0 }, //SdrCaptionEscDir::Horizontal,
748  { XML_VERTICAL, 1 }, //SdrCaptionEscDir::Vertical,
749  { XML_AUTO, 2 }, //SdrCaptionEscDir::BestFit,
750  { XML_TOKEN_INVALID,0 }
751 };
752 
754 {
755  { XML_STRAIGHT_LINE, 0 }, //SdrCaptionType::Type1,
756  { XML_ANGLED_LINE, 1 }, //SdrCaptionType::Type2,
757  { XML_ANGLED_CONNECTOR_LINE, 2 }, //SdrCaptionType::Type3,
758  { XML_TOKEN_INVALID,0 }
759 };
760 
761 namespace {
762 
763 class XMLCaptionEscapeRelative : public XMLPropertyHandler
764 {
765 public:
766  virtual bool importXML(
767  const OUString& rStrImpValue,
768  css::uno::Any& rValue,
769  const SvXMLUnitConverter& rUnitConverter ) const override;
770  virtual bool exportXML(
771  OUString& rStrExpValue,
772  const css::uno::Any& rValue,
773  const SvXMLUnitConverter& rUnitConverter ) const override;
774 };
775 
776 }
777 
778 bool XMLCaptionEscapeRelative::importXML( const OUString& rStrImpValue, Any& rValue, const SvXMLUnitConverter& ) const
779 {
780  sal_Int32 nValue;
781 
782  if (!::sax::Converter::convertPercent( nValue, rStrImpValue ))
783  return false;
784 
785  nValue *= 100;
786  rValue <<= nValue;
787  return true;
788 }
789 
790 bool XMLCaptionEscapeRelative::exportXML( OUString& rStrExpValue, const Any& rValue, const SvXMLUnitConverter& ) const
791 {
792  sal_Int32 nValue = 0;
793  if( !(rValue >>= nValue ) )
794  return false;
795 
796  nValue /= 100;
797  OUStringBuffer aOut;
798  ::sax::Converter::convertPercent( aOut, nValue );
799  rStrExpValue = aOut.makeStringAndClear();
800  return true;
801 }
802 
803 namespace {
804 
805 class XMLMoveSizeProtectHdl : public XMLPropertyHandler
806 {
807 public:
808  explicit XMLMoveSizeProtectHdl( sal_Int32 nType ) : mnType( nType ) {}
809 
810  virtual bool importXML(
811  const OUString& rStrImpValue,
812  css::uno::Any& rValue,
813  const SvXMLUnitConverter& rUnitConverter ) const override;
814  virtual bool exportXML(
815  OUString& rStrExpValue,
816  const css::uno::Any& rValue,
817  const SvXMLUnitConverter& rUnitConverter ) const override;
818 private:
819  const sal_Int32 mnType;
820 };
821 
822 }
823 
824 bool XMLMoveSizeProtectHdl::importXML( const OUString& rStrImpValue, Any& rValue, const SvXMLUnitConverter& ) const
825 {
826  const bool bValue = rStrImpValue.indexOf( GetXMLToken( mnType == XML_SD_TYPE_MOVE_PROTECT ? XML_POSITION : XML_SIZE ) ) != -1;
827  rValue <<= bValue;
828  return true;
829 }
830 
831 bool XMLMoveSizeProtectHdl::exportXML( OUString& rStrExpValue, const Any& rValue, const SvXMLUnitConverter& ) const
832 {
833  bool bValue;
834  if( !(rValue >>= bValue ) )
835  return false;
836 
837  if( bValue )
838  {
839  if( !rStrExpValue.isEmpty() )
840  rStrExpValue += " ";
841 
842  rStrExpValue += GetXMLToken( mnType == XML_SD_TYPE_MOVE_PROTECT ? XML_POSITION : XML_SIZE );
843  }
844 
845  return true;
846 }
847 
848 namespace {
849 
850 class XMLSdHeaderFooterVisibilityTypeHdl : public XMLPropertyHandler
851 {
852 public:
853  virtual bool importXML( const OUString& rStrImpValue, css::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const override;
854  virtual bool exportXML( OUString& rStrExpValue, const css::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const override;
855 };
856 
857 }
858 
860  const OUString& rStrImpValue,
861  css::uno::Any& rValue,
862  const SvXMLUnitConverter& ) const
863 {
864  // #i38644#
865  // attributes with this type where saved with VISIBLE|HIDDEN prior
866  // to src680m67. So we have to import that correctly
867  const bool bBool = IsXMLToken(rStrImpValue, XML_TRUE) || IsXMLToken(rStrImpValue, XML_VISIBLE);
868  rValue <<= bBool;
869  return bBool || IsXMLToken(rStrImpValue, XML_FALSE) || IsXMLToken(rStrImpValue, XML_HIDDEN);
870 }
871 
873  OUString& rStrExpValue,
874  const Any& rValue,
875  const SvXMLUnitConverter& ) const
876 {
877  bool bRet = false;
878  bool bValue;
879 
880  if (rValue >>= bValue)
881  {
882  OUStringBuffer aOut;
883  ::sax::Converter::convertBool( aOut, bValue );
884  rStrExpValue = aOut.makeStringAndClear();
885 
886  bRet = true;
887  }
888 
889  return bRet;
890 }
891 
892 namespace {
893 
894 class XMLSdRotationAngleTypeHdl : public XMLPropertyHandler
895 {
896 public:
897  virtual bool importXML(const OUString& rStrImpValue, css::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter) const override;
898  virtual bool exportXML(OUString& rStrExpValue, const css::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter) const override;
899 };
900 
901 }
902 
904  const OUString& rStrImpValue,
905  css::uno::Any& rValue,
906  const SvXMLUnitConverter&) const
907 {
908  sal_Int32 nValue;
909  bool const bRet = ::sax::Converter::convertNumber(nValue, rStrImpValue);
910  if (bRet)
911  {
912  nValue = (nValue % 360);
913  if (nValue < 0)
914  nValue = 360 + nValue;
915  sal_Int32 nAngle;
916  if (nValue < 45 || nValue > 315)
917  nAngle = 0;
918  else if (nValue < 180)
919  nAngle = 9000;
920  else /* if nValue <= 315 ) */
921  nAngle = 27000;
922 
923  rValue <<= nAngle;
924  }
925  return bRet;
926 }
927 
929  OUString& rStrExpValue,
930  const Any& rValue,
931  const SvXMLUnitConverter&) const
932 {
933  sal_Int32 nAngle;
934  bool bRet = (rValue >>= nAngle) && nAngle != 0;
935  if (bRet)
936  {
937  rStrExpValue = OUString::number(nAngle / 100);
938  }
939  return bRet;
940 }
941 
942 namespace {
943 
944 class XMLFitToSizeEnumPropertyHdl : public XMLEnumPropertyHdl
945 {
946 public:
947  XMLFitToSizeEnumPropertyHdl(
949  : XMLEnumPropertyHdl(pMap) {}
950 
951  virtual bool importXML(const OUString& rStrImpValue, uno::Any& rValue,
952  const SvXMLUnitConverter& rUC) const override
953  {
954  // we don't know here what the actual attribute name is -
955  // but we can combine the 2 attributes by just taking the
956  // "largest" result value; this can never result in ALLLINES
957  // so the implementation has to interpret PROPORTIONAL as ALLLINES;
958  // both "true" is invalid anyway.
959  Any any;
960  auto const bRet = XMLEnumPropertyHdl::importXML(rStrImpValue, any, rUC);
961  if (!bRet)
962  {
963  return false;
964  }
965  assert(any.hasValue());
966  if (!rValue.hasValue() ||
967  rValue.get<drawing::TextFitToSizeType>() < any.get<drawing::TextFitToSizeType>())
968  {
969  rValue = any;
970  }
971  return true;
972  }
973 };
974 
975 }
976 
977 XMLSdPropHdlFactory::XMLSdPropHdlFactory( uno::Reference< frame::XModel > const & xModel, SvXMLImport& rImport )
978 : mxModel( xModel ), mpExport(nullptr), mpImport( &rImport )
979 {
980 }
981 
982 XMLSdPropHdlFactory::XMLSdPropHdlFactory( uno::Reference< frame::XModel > const & xModel, SvXMLExport& rExport )
983 : mxModel( xModel ), mpExport( &rExport ), mpImport(nullptr)
984 {
985 }
986 
988 {
989 }
990 
992 {
994  if(!pHdl)
995  {
996  switch(nType)
997  {
998  case XML_SD_TYPE_STROKE :
999  {
1000  pHdl = new XMLEnumPropertyHdl( aXML_LineStyle_EnumMap);
1001  break;
1002  }
1003  case XML_SD_TYPE_LINEJOIN :
1004  {
1005  pHdl = new XMLEnumPropertyHdl( aXML_LineJoint_EnumMap);
1006  break;
1007  }
1008  case XML_SD_TYPE_LINECAP :
1009  {
1010  pHdl = new XMLEnumPropertyHdl( aXML_LineCap_EnumMap );
1011  break;
1012  }
1013  case XML_SD_TYPE_FILLSTYLE :
1014  {
1015  pHdl = new XMLEnumPropertyHdl( aXML_FillStyle_EnumMap );
1016  break;
1017  }
1019  {
1020  pHdl = new XMLEnumPropertyHdl( aXML_PresChange_EnumMap );
1021  break;
1022  }
1024  {
1026  break;
1027  }
1028  case XML_TYPE_SD_MIRROR:
1029  {
1031  break;
1032  }
1034  {
1035  pHdl = new XMLEnumPropertyHdl( aXML_FadeEffect_EnumMap );
1036  break;
1037  }
1039  {
1040  pHdl = new XMLEnumPropertyHdl( aXML_TransSpeed_EnumMap );
1041  break;
1042  }
1044  {
1045  pHdl = new XMLDurationPropertyHdl;
1046  break;
1047  }
1049  {
1051  break;
1052  }
1053  case XML_SD_TYPE_OPACITY :
1054  {
1055  pHdl = new XMLOpacityPropertyHdl(mpImport);
1056  break;
1057  }
1059  {
1060  pHdl = new XMLEnumPropertyHdl( aXML_WritingMode_EnumMap );
1061  break;
1062  }
1064  {
1066  break;
1067  }
1069  {
1071  break;
1072  }
1073 
1074  // 3D Properties
1075 
1077  {
1078  // #87922# DoubleSided -> BackfaceCulling
1079  // This sal_Bool needs to be flipped, DoubleSided sal_True -> NO Backface culling
1080  // and vice versa.
1082  break;
1083  }
1084 
1086  {
1087  pHdl = new XMLEnumPropertyHdl( aXML_NormalsKind_EnumMap );
1088  break;
1089  }
1091  {
1093  break;
1094  }
1096  {
1097  pHdl = new XMLEnumPropertyHdl( aXML_TexGenerationX_EnumMap );
1098  break;
1099  }
1101  {
1102  pHdl = new XMLEnumPropertyHdl( aXML_TexGenerationY_EnumMap );
1103  break;
1104  }
1105  case XML_SD_TYPE_TEX_KIND:
1106  {
1107  pHdl = new XMLEnumPropertyHdl( aXML_TexKind_EnumMap );
1108  break;
1109  }
1110  case XML_SD_TYPE_TEX_MODE:
1111  {
1112  pHdl = new XMLEnumPropertyHdl( aXML_TexMode_EnumMap );
1113  break;
1114  }
1115  case XML_SD_TYPE_NUMBULLET:
1116  {
1117  uno::Reference<ucb::XAnyCompareFactory> xCompareFac( mxModel, uno::UNO_QUERY );
1118  uno::Reference<ucb::XAnyCompare> xCompare;
1119  if( xCompareFac.is() )
1120  xCompare = xCompareFac->createAnyCompareByName( "NumberingRules" );
1121 
1122  pHdl = new XMLNumRulePropHdl( xCompare );
1123  break;
1124  }
1126  {
1127  pHdl = new XMLEnumPropertyHdl( aXML_BitmapMode_EnumMap );
1128  break;
1129  }
1132  {
1134  break;
1135  }
1137  {
1138  pHdl = new XMLFillBitmapSizePropertyHandler();
1139  break;
1140  }
1142  {
1144  break;
1145  }
1147  {
1148  pHdl = new XMLEnumPropertyHdl( aXML_RefPoint_EnumMap);
1149  break;
1150  }
1152  pHdl = new XMLEnumPropertyHdl( pXML_TextAnimation_Enum);
1153  break;
1155  pHdl = new XMLEnumPropertyHdl( pXML_TextAnimation_Blinking_Enum);
1156  break;
1158  pHdl = new XMLEnumPropertyHdl( pXML_TextAnimationDirection_Enum);
1159  break;
1162  break;
1164  pHdl = new XMLEnumPropertyHdl( pXML_TextAlign_Enum);
1165  break;
1167  pHdl = new XMLEnumPropertyHdl( pXML_VerticalAlign_Enum);
1168  break;
1169  case XML_SD_TYPE_FITTOSIZE:
1170  {
1171  if (mpExport
1172  && (mpExport->getSaneDefaultVersion() // tdf#97630
1174  {
1175  pHdl = new XMLFitToSizeEnumPropertyHdl(pXML_FitToSize_Enum_Odf12);
1176  }
1177  else
1178  { // import all values written by old LO
1179  pHdl = new XMLFitToSizeEnumPropertyHdl(pXML_FitToSize_Enum);
1180  }
1181  }
1182  break;
1184  {
1185  pHdl = new XMLFitToSizeEnumPropertyHdl(pXML_ShrinkToFit_Enum);
1186  }
1187  break;
1189  pHdl = new XMLEnumPropertyHdl( pXML_MeasureUnit_Enum );
1190  break;
1192  pHdl = new XMLEnumPropertyHdl( pXML_Measure_HAlign_Enum);
1193  break;
1195  pHdl = new XMLEnumPropertyHdl( pXML_Measure_VAlign_Enum);
1196  break;
1198  {
1200  }
1201  break;
1202  case XML_TYPE_TEXT_CLIP11:
1203  pHdl = new XMLClipPropertyHandler( true );
1204  break;
1205  case XML_TYPE_TEXT_CLIP:
1206  pHdl = new XMLClipPropertyHandler( false );
1207  break;
1208 
1209  // #FontWork#
1211  pHdl = new XMLEnumPropertyHdl( pXML_Fontwork_Style_Enum );
1212  break;
1214  pHdl = new XMLEnumPropertyHdl( pXML_Fontwork_Adjust_Enum );
1215  break;
1217  pHdl = new XMLEnumPropertyHdl( pXML_Fontwork_Shadow_Enum );
1218  break;
1220  pHdl = new XMLEnumPropertyHdl( pXML_Fontwork_Form_Enum );
1221  break;
1222 
1224  pHdl = new ::xmloff::OControlBorderHandler( ::xmloff::OControlBorderHandler::STYLE );
1225  break;
1227  pHdl = new ::xmloff::OControlBorderHandler( ::xmloff::OControlBorderHandler::COLOR );
1228  break;
1230  pHdl = new ::xmloff::ImageScaleModeHandler;
1231  break;
1233  pHdl = new ::xmloff::OControlTextEmphasisHandler;
1234  break;
1235 
1237  {
1239  break;
1240  }
1242  pHdl = new XMLIsPercentagePropertyHandler;
1243  break;
1245  pHdl = new XMLCaptionEscapeRelative;
1246  break;
1249  break;
1251  pHdl = new XMLEnumPropertyHdl( pXML_Caption_Esc_Dir_Enum );
1252  break;
1254  pHdl = new XMLEnumPropertyHdl( pXML_Caption_Type_Enum );
1255  break;
1258  break;
1260  pHdl = new XMLDateTimeFormatHdl( mpExport );
1261  break;
1264  break;
1267  break;
1270  break;
1271  case XML_TYPE_WRAP_OPTION:
1272  pHdl = new XMLWordWrapPropertyHdl( mpImport );
1273  break;
1274 
1277  pHdl = new XMLMoveSizeProtectHdl( nType );
1278  break;
1280  pHdl = new XMLSdHeaderFooterVisibilityTypeHdl;
1281  break;
1283  pHdl = new XMLSdRotationAngleTypeHdl;
1284  break;
1285  case XML_TYPE_TEXT_COLUMNS:
1286  pHdl = new XMLTextColumnsPropertyHandler;
1287  break;
1288  case XML_TYPE_THEME_COLOR:
1290  break;
1291  }
1292 
1293  if(pHdl)
1294  PutHdlCache(nType, pHdl);
1295  }
1296 
1297  return pHdl;
1298 }
1299 
1301  bool bForExport)
1302 : XMLPropertySetMapper( aXMLSDProperties, rFactoryRef, bForExport )
1303 {
1304 }
1305 
1307 {
1308 }
1309 
1311 : SvXMLExportPropertyMapper( rMapper )
1312 , maNumRuleExp( rExport )
1313 , mbIsInAutoStyles( true )
1314 {
1315 }
1316 
1318 {
1319 }
1320 
1322  bool bEnableFoFontFamily,
1323  std::vector< XMLPropertyState >& rProperties,
1324  const uno::Reference< beans::XPropertySet >& rPropSet ) const
1325 {
1326  XMLPropertyState* pRepeatOffsetX = nullptr;
1327  XMLPropertyState* pRepeatOffsetY = nullptr;
1328  XMLPropertyState* pTextAnimationBlinking = nullptr;
1329  XMLPropertyState* pTextAnimationKind = nullptr;
1330 
1331  // #FontWork#
1332  XMLPropertyState* pFontWorkStyle = nullptr;
1333  XMLPropertyState* pFontWorkAdjust = nullptr;
1334  XMLPropertyState* pFontWorkDistance = nullptr;
1335  XMLPropertyState* pFontWorkStart = nullptr;
1336  XMLPropertyState* pFontWorkMirror = nullptr;
1337  XMLPropertyState* pFontWorkOutline = nullptr;
1338  XMLPropertyState* pFontWorkShadow = nullptr;
1339  XMLPropertyState* pFontWorkShadowColor = nullptr;
1340  XMLPropertyState* pFontWorkShadowOffsetx = nullptr;
1341  XMLPropertyState* pFontWorkShadowOffsety = nullptr;
1342  XMLPropertyState* pFontWorkForm = nullptr;
1343  XMLPropertyState* pFontWorkHideform = nullptr;
1344  XMLPropertyState* pFontWorkShadowTransparence = nullptr;
1345 
1346  // OLE
1347  XMLPropertyState* pOLEVisAreaLeft = nullptr;
1348  XMLPropertyState* pOLEVisAreaTop = nullptr;
1349  XMLPropertyState* pOLEVisAreaWidth = nullptr;
1350  XMLPropertyState* pOLEVisAreaHeight = nullptr;
1351  XMLPropertyState* pOLEIsInternal = nullptr;
1352 
1353  // caption
1354  XMLPropertyState* pCaptionIsEscRel = nullptr;
1355  XMLPropertyState* pCaptionEscRel = nullptr;
1356  XMLPropertyState* pCaptionEscAbs = nullptr;
1357 
1358  // filter fo:clip
1359  XMLPropertyState* pClip11State = nullptr;
1360  XMLPropertyState* pClipState = nullptr;
1361 
1362  XMLPropertyState* pShapeWritingMode = nullptr;
1363  XMLPropertyState* pTextWritingMode = nullptr;
1364  XMLPropertyState* pControlWritingMode = nullptr;
1365 
1366  // filter properties
1367  for( auto& rProp : rProperties )
1368  {
1369  XMLPropertyState *property = &rProp;
1370  if( property->mnIndex == -1 )
1371  continue;
1372 
1373  // find properties with context
1374  // to prevent writing this property set mnIndex member to -1
1375  switch( getPropertySetMapper()->GetEntryContextId( property->mnIndex ))
1376  {
1377  case CTF_NUMBERINGRULES:
1378  {
1379  if( mbIsInAutoStyles )
1380  property->mnIndex = -1;
1381  }
1382  break;
1384  {
1385  // this property is not exported in the style:properties element
1386  // because it's an XIndexAccess and not a string.
1387  // This will be handled in SvXMLAutoStylePoolP::exportStyleAttributes
1388  // This is suboptimal
1389  if( !mbIsInAutoStyles )
1390  property->mnIndex = -1;
1391  }
1392  break;
1393  case CTF_WRITINGMODE:
1394  pShapeWritingMode = property;
1395  break;
1397  pControlWritingMode = property;
1398  break;
1399  case CTF_TEXTWRITINGMODE:
1400  pTextWritingMode = property;
1401  break;
1402  case CTF_REPEAT_OFFSET_X:
1403  pRepeatOffsetX = property;
1404  break;
1405 
1406  case CTF_REPEAT_OFFSET_Y:
1407  pRepeatOffsetY = property;
1408  break;
1409 
1410  case CTF_DASHNAME:
1411  case CTF_FILLGRADIENTNAME:
1412  case CTF_FILLHATCHNAME:
1413  case CTF_FILLBITMAPNAME:
1414  {
1415  OUString aStr;
1416  if( (property->maValue >>= aStr) && aStr.isEmpty() )
1417  property->mnIndex = -1;
1418  }
1419  break;
1421  pTextAnimationBlinking = property;
1422  break;
1424  pTextAnimationKind = property;
1425  break;
1426 
1427  // #FontWork#
1428  case CTF_FONTWORK_STYLE: pFontWorkStyle = property; break;
1429  case CTF_FONTWORK_ADJUST: pFontWorkAdjust = property; break;
1430  case CTF_FONTWORK_DISTANCE: pFontWorkDistance = property; break;
1431  case CTF_FONTWORK_START: pFontWorkStart = property; break;
1432  case CTF_FONTWORK_MIRROR: pFontWorkMirror = property; break;
1433  case CTF_FONTWORK_OUTLINE: pFontWorkOutline = property; break;
1434  case CTF_FONTWORK_SHADOW: pFontWorkShadow = property; break;
1435  case CTF_FONTWORK_SHADOWCOLOR: pFontWorkShadowColor = property; break;
1436  case CTF_FONTWORK_SHADOWOFFSETX: pFontWorkShadowOffsetx = property; break;
1437  case CTF_FONTWORK_SHADOWOFFSETY: pFontWorkShadowOffsety = property; break;
1438  case CTF_FONTWORK_FORM: pFontWorkForm = property; break;
1439  case CTF_FONTWORK_HIDEFORM: pFontWorkHideform = property; break;
1440  case CTF_FONTWORK_SHADOWTRANSPARENCE: pFontWorkShadowTransparence = property; break;
1441 
1442  // OLE
1443  case CTF_SD_OLE_VIS_AREA_EXPORT_LEFT: pOLEVisAreaLeft = property; break;
1444  case CTF_SD_OLE_VIS_AREA_EXPORT_TOP: pOLEVisAreaTop = property; break;
1445  case CTF_SD_OLE_VIS_AREA_EXPORT_WIDTH: pOLEVisAreaWidth = property; break;
1446  case CTF_SD_OLE_VIS_AREA_EXPORT_HEIGHT: pOLEVisAreaHeight = property; break;
1447  case CTF_SD_OLE_ISINTERNAL: pOLEIsInternal = property; break;
1448 
1450  {
1451  if( !property->maValue.hasValue() )
1452  property->mnIndex = -1;
1453  }
1454  break;
1455  case CTF_FRAME_MARGIN_HORI:
1456  case CTF_FRAME_MARGIN_VERT:
1457  {
1458  sal_Int32 nValue = 0;
1459  if( (property->maValue >>= nValue) && (nValue < 0) )
1460  property->mnIndex = -1;
1461  }
1462  break;
1463 
1464  case CTF_SD_MOVE_PROTECT:
1465  {
1466  bool bProtected;
1467  if( (property->maValue >>= bProtected) && !bProtected )
1468  property->mnIndex = -1;
1469  }
1470  break;
1471  case CTF_SD_SIZE_PROTECT:
1472  {
1473  bool bProtected;
1474  if( (property->maValue >>= bProtected) && !bProtected )
1475  property->mnIndex = -1;
1476  }
1477  break;
1478  case CTF_CAPTION_ISESCREL: pCaptionIsEscRel = property; break;
1479  case CTF_CAPTION_ESCREL: pCaptionEscRel = property; break;
1480  case CTF_CAPTION_ESCABS: pCaptionEscAbs = property; break;
1481  case CTF_TEXT_CLIP11: pClip11State = property; break;
1482  case CTF_TEXT_CLIP: pClipState = property; break;
1483  }
1484  }
1485 
1486  // check for duplicate writing mode
1487  if( pShapeWritingMode && (pTextWritingMode || pControlWritingMode) )
1488  {
1489  if( pTextWritingMode )
1490  pTextWritingMode->mnIndex = -1;
1491  if( pControlWritingMode )
1492  pControlWritingMode->mnIndex = -1;
1493 
1494  text::WritingMode eWritingMode;
1495  if( pShapeWritingMode->maValue >>= eWritingMode )
1496  {
1497  if( text::WritingMode_LR_TB == eWritingMode )
1498  {
1499  pShapeWritingMode->mnIndex = -1;
1500  pShapeWritingMode = nullptr;
1501  }
1502  }
1503  }
1504  else if( pTextWritingMode && pControlWritingMode )
1505  {
1506  pControlWritingMode->mnIndex = -1;
1507 
1508  sal_Int32 eWritingMode;
1509  if (pTextWritingMode->maValue >>= eWritingMode)
1510  {
1511  if (text::WritingMode2::LR_TB == eWritingMode)
1512  {
1513  pTextWritingMode->mnIndex = -1;
1514  pTextWritingMode = nullptr;
1515  }
1516  }
1517  }
1518 
1519  // do not export visual area for internal ole objects
1520  if( pOLEIsInternal )
1521  {
1522  bool bInternal;
1523  if( (pOLEIsInternal->maValue >>= bInternal) && !bInternal )
1524  {
1525  try
1526  {
1527  awt::Rectangle aRect;
1528  if( rPropSet->getPropertyValue( "VisibleArea" ) >>= aRect )
1529  {
1530  if( pOLEVisAreaLeft )
1531  {
1532  pOLEVisAreaLeft->mnIndex = getPropertySetMapper()->FindEntryIndex( CTF_SD_OLE_VIS_AREA_IMPORT_LEFT );
1533  pOLEVisAreaLeft->maValue <<= aRect;
1534  }
1535  if( pOLEVisAreaTop )
1536  {
1537  pOLEVisAreaTop->mnIndex = getPropertySetMapper()->FindEntryIndex( CTF_SD_OLE_VIS_AREA_IMPORT_TOP );
1538  pOLEVisAreaTop->maValue <<= aRect;
1539  }
1540  if( pOLEVisAreaWidth )
1541  {
1542  pOLEVisAreaWidth->mnIndex = getPropertySetMapper()->FindEntryIndex( CTF_SD_OLE_VIS_AREA_IMPORT_WIDTH );
1543  pOLEVisAreaWidth->maValue <<= aRect;
1544  }
1545  if( pOLEVisAreaHeight )
1546  {
1547  pOLEVisAreaHeight->mnIndex = getPropertySetMapper()->FindEntryIndex( CTF_SD_OLE_VIS_AREA_IMPORT_HEIGHT );
1548  pOLEVisAreaHeight->maValue <<= aRect;
1549  }
1550  }
1551  }
1552  catch( uno::Exception& )
1553  {
1554  }
1555  }
1556  else
1557  {
1558  if( pOLEVisAreaLeft ) pOLEVisAreaLeft->mnIndex = -1;
1559  if( pOLEVisAreaTop ) pOLEVisAreaTop->mnIndex = -1;
1560  if( pOLEVisAreaWidth ) pOLEVisAreaWidth->mnIndex = -1;
1561  if( pOLEVisAreaHeight ) pOLEVisAreaHeight->mnIndex = -1;
1562  }
1563 
1564  pOLEIsInternal->mnIndex = -1;
1565  }
1566 
1567  if( pTextAnimationBlinking && pTextAnimationKind )
1568  {
1569  drawing::TextAnimationKind eKind;
1570  if( (pTextAnimationKind->maValue >>= eKind) && eKind != drawing::TextAnimationKind_BLINK )
1571  {
1572  pTextAnimationBlinking->mnIndex = -1;
1573  }
1574  else
1575  {
1576  pTextAnimationKind->mnIndex = -1;
1577  }
1578  }
1579 
1580  if( pRepeatOffsetX && pRepeatOffsetY )
1581  {
1582  sal_Int32 nOffset = 0;
1583  if( ( pRepeatOffsetX->maValue >>= nOffset ) && ( nOffset == 0 ) )
1584  pRepeatOffsetX->mnIndex = -1;
1585  else
1586  pRepeatOffsetY->mnIndex = -1;
1587  }
1588 
1589  if(pFontWorkStyle)
1590  {
1591  // #FontWork#
1592  sal_Int32 nStyle = 0;
1593 
1594  if(pFontWorkStyle->maValue >>= nStyle)
1595  {
1596  if(/*XFormTextStyle::NONE*/4 == nStyle)
1597  {
1598  pFontWorkStyle->mnIndex = -1;
1599  if(pFontWorkAdjust)
1600  pFontWorkAdjust->mnIndex = -1;
1601  if(pFontWorkDistance)
1602  pFontWorkDistance->mnIndex = -1;
1603  if(pFontWorkStart)
1604  pFontWorkStart->mnIndex = -1;
1605  if(pFontWorkMirror)
1606  pFontWorkMirror->mnIndex = -1;
1607  if(pFontWorkOutline)
1608  pFontWorkOutline->mnIndex = -1;
1609  if(pFontWorkShadow)
1610  pFontWorkShadow->mnIndex = -1;
1611  if(pFontWorkShadowColor)
1612  pFontWorkShadowColor->mnIndex = -1;
1613  if(pFontWorkShadowOffsetx)
1614  pFontWorkShadowOffsetx->mnIndex = -1;
1615  if(pFontWorkShadowOffsety)
1616  pFontWorkShadowOffsety->mnIndex = -1;
1617  if(pFontWorkForm)
1618  pFontWorkForm->mnIndex = -1;
1619  if(pFontWorkHideform)
1620  pFontWorkHideform->mnIndex = -1;
1621  if(pFontWorkShadowTransparence)
1622  pFontWorkShadowTransparence->mnIndex = -1;
1623  }
1624  }
1625  }
1626 
1627  if( pCaptionIsEscRel )
1628  {
1629  bool bIsRel = false;
1630  pCaptionIsEscRel->maValue >>= bIsRel;
1631 
1632  if( bIsRel )
1633  {
1634  if( pCaptionEscAbs )
1635  pCaptionEscAbs->mnIndex = -1;
1636  }
1637  else
1638  {
1639  if( pCaptionEscRel )
1640  pCaptionEscRel->mnIndex = -1;
1641  }
1642 
1643  pCaptionIsEscRel->mnIndex = -1;
1644  }
1645 
1646  if( pClipState != nullptr && pClip11State != nullptr )
1647  pClip11State->mnIndex = -1;
1648 
1649  SvXMLExportPropertyMapper::ContextFilter(bEnableFoFontFamily, rProperties, rPropSet);
1650 }
1651 
1653  SvXMLAttributeList& rAttrList,
1654  const XMLPropertyState& rProperty,
1655  const SvXMLUnitConverter& rUnitConverter,
1656  const SvXMLNamespaceMap& rNamespaceMap,
1657  const ::std::vector< XMLPropertyState > *pProperties,
1658  sal_uInt32 nIdx ) const
1659 {
1660  switch( getPropertySetMapper()->GetEntryContextId( rProperty.mnIndex ) )
1661  {
1663  // not to be handled by the base class
1664  break;
1665 
1666  default:
1667  SvXMLExportPropertyMapper::handleSpecialItem( rAttrList, rProperty, rUnitConverter, rNamespaceMap, pProperties, nIdx );
1668  break;
1669  }
1670 }
1671 
1673  SvXMLExport& rExport,
1674  const XMLPropertyState& rProperty,
1675  SvXmlExportFlags nFlags,
1676  const ::std::vector< XMLPropertyState > *pProperties,
1677  sal_uInt32 nIdx) const
1678 {
1679  switch( getPropertySetMapper()->GetEntryContextId( rProperty.mnIndex ) )
1680  {
1681  case CTF_NUMBERINGRULES:
1682  {
1683  // only export list-styles as elements in styles section
1684  if( !mbIsInAutoStyles )
1685  {
1686  uno::Reference< container::XIndexReplace > xNumRule( rProperty.maValue, uno::UNO_QUERY );
1687  if( xNumRule.is() )
1688  const_cast<XMLShapeExportPropertyMapper*>(this)->maNumRuleExp.exportNumberingRule(GetStyleName(), false, xNumRule);
1689  }
1690  }
1691  break;
1692  default:
1693  SvXMLExportPropertyMapper::handleElementItem( rExport, rProperty, nFlags, pProperties, nIdx );
1694  break;
1695  }
1696 }
1697 
1699  SvXMLExportPropertyMapper( rMapper ),
1700  mrExport( rExport )
1701 {
1702 }
1703 
1705 {
1706 }
1707 
1709  bool bEnableFoFontFamily,
1710  std::vector< XMLPropertyState >& rProperties,
1711  const uno::Reference< beans::XPropertySet >& rPropSet ) const
1712 {
1713  XMLPropertyState* pRepeatOffsetX = nullptr;
1714  XMLPropertyState* pRepeatOffsetY = nullptr;
1715  XMLPropertyState* pTransType = nullptr;
1716  XMLPropertyState* pTransDuration = nullptr;
1717  XMLPropertyState* pDateTimeUpdate = nullptr;
1718  XMLPropertyState* pDateTimeFormat = nullptr;
1719  XMLPropertyState* pTransitionFadeColor = nullptr;
1720 
1721  sal_Int16 nTransitionType = 0;
1722 
1723  // filter properties
1724  for( auto& rProp : rProperties )
1725  {
1726  XMLPropertyState *property = &rProp;
1727  if( property->mnIndex == -1 )
1728  continue;
1729 
1730  // find properties with context
1731  // to prevent writing this property set mnIndex member to -1
1732  switch( getPropertySetMapper()->GetEntryContextId( property->mnIndex ))
1733  {
1734 
1735  case CTF_REPEAT_OFFSET_X:
1736  pRepeatOffsetX = property;
1737  break;
1738 
1739  case CTF_REPEAT_OFFSET_Y:
1740  pRepeatOffsetY = property;
1741  break;
1742  case CTF_PAGE_TRANS_TYPE:
1743  pTransType = property;
1744  break;
1745  case CTF_PAGE_TRANS_STYLE:
1747  (*property).mnIndex = -1;
1748  break;
1750  {
1752  (((*property).maValue >>= nTransitionType) && (nTransitionType == 0)) )
1753  (*property).mnIndex = -1;
1754  }
1755  break;
1757  {
1758  sal_Int16 nTransitionSubtype = sal_Int16();
1760  (((*property).maValue >>= nTransitionSubtype) && (nTransitionSubtype == 0)) )
1761  (*property).mnIndex = -1;
1762 
1763  }
1764  break;
1766  {
1767  bool bDirection;
1769  (((*property).maValue >>= bDirection) && bDirection) )
1770  (*property).mnIndex = -1;
1771  }
1772  break;
1775  (*property).mnIndex = -1;
1776  else
1777  pTransitionFadeColor = property;
1778  break;
1779  case CTF_PAGE_TRANS_SPEED:
1780  {
1781  presentation::AnimationSpeed aEnum;
1782  if( ((*property).maValue >>= aEnum) && aEnum == presentation::AnimationSpeed_MEDIUM )
1783  (*property).mnIndex = -1;
1784  }
1785  break;
1786  case CTF_PAGE_VISIBLE:
1787  {
1788  bool bVisible = false;
1789  (*property).maValue >>= bVisible;
1790  if( bVisible )
1791  (*property).mnIndex = -1;
1792  }
1793  break;
1795  pTransDuration = property;
1796  break;
1797  case CTF_HEADER_TEXT:
1798  case CTF_FOOTER_TEXT:
1799  case CTF_DATE_TIME_TEXT:
1800  {
1801  OUString aValue;
1802  (*property).maValue >>= aValue;
1803  if( aValue.isEmpty() )
1804  (*property).mnIndex = -1;
1805  }
1806  break;
1807 
1808  case CTF_DATE_TIME_UPDATE:
1809  pDateTimeUpdate = property;
1810  break;
1811 
1812  case CTF_DATE_TIME_FORMAT:
1813  pDateTimeFormat = property;
1814  break;
1815  }
1816  }
1817 
1818  if( pTransitionFadeColor && nTransitionType != css::animations::TransitionType::FADE )
1819  pTransitionFadeColor->mnIndex = -1;
1820 
1821  if( pDateTimeFormat && pDateTimeUpdate )
1822  {
1823  bool bIsFixed = false;
1824  pDateTimeUpdate->maValue >>= bIsFixed;
1825  if( bIsFixed )
1826  pDateTimeFormat->mnIndex = -1;
1827  }
1828 
1829  if( pRepeatOffsetX && pRepeatOffsetY )
1830  {
1831  sal_Int32 nOffset = 0;
1832  if( ( pRepeatOffsetX->maValue >>= nOffset ) && ( nOffset == 0 ) )
1833  pRepeatOffsetX->mnIndex = -1;
1834  else
1835  pRepeatOffsetY->mnIndex = -1;
1836  }
1837 
1838  if( pTransType && pTransDuration )
1839  {
1840  sal_Int32 nChange = 0;
1841  pTransType->maValue >>= nChange;
1842 
1843  // only export duration for automatic
1844  if( nChange != 1 )
1845  pTransDuration->mnIndex = -1;
1846 
1847  // do not export default transition change
1848  if( nChange == 0 )
1849  pTransType->mnIndex = -1;
1850  }
1851 
1852  SvXMLExportPropertyMapper::ContextFilter(bEnableFoFontFamily, rProperties, rPropSet);
1853 }
1854 
1856  SvXMLExport& rExport,
1857  const XMLPropertyState& rProperty,
1858  SvXmlExportFlags nFlags,
1859  const ::std::vector< XMLPropertyState > *pProperties,
1860  sal_uInt32 nIdx) const
1861 {
1862  switch( getPropertySetMapper()->GetEntryContextId( rProperty.mnIndex ) )
1863  {
1864  case CTF_PAGE_SOUND_URL:
1865  {
1866  OUString aSoundURL;
1867  if( (rProperty.maValue >>= aSoundURL) && !aSoundURL.isEmpty() )
1868  {
1874  }
1875  }
1876  break;
1877  default:
1878  SvXMLExportPropertyMapper::handleElementItem( rExport, rProperty, nFlags, pProperties, nIdx );
1879  break;
1880  }
1881 }
1882 
1883 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SvXMLEnumMapEntry< drawing::TextAnimationKind > const pXML_TextAnimation_Blinking_Enum[]
Definition: sdpropls.cxx:601
#define XML_TYPE_TEXT_CLIP11
Definition: xmltypes.hxx:218
#define XML_SD_TYPE_FONTWORK_FORM
Definition: xmlsdtypes.hxx:86
#define CTF_DATE_TIME_UPDATE
Definition: xmlsdtypes.hxx:192
#define CTF_CAPTION_ESCREL
Definition: xmlsdtypes.hxx:179
#define XML_SD_TYPE_CELL_ROTATION_ANGLE
Definition: xmlsdtypes.hxx:120
#define XML_TYPE_PERCENT
Definition: xmltypes.hxx:129
#define XML_SD_TYPE_CAPTION_ESC_REL
Definition: xmlsdtypes.hxx:92
const SvXMLEnumMapEntry< sal_Int16 > aAnimations_EnumMap_TransitionSubType[]
#define XML_SD_TYPE_CAPTION_IS_ESC_REL
Definition: xmlsdtypes.hxx:91
SvXMLEnumMapEntry< presentation::FadeEffect > const aXML_FadeEffect_EnumMap[]
Definition: sdpropls.cxx:441
#define XML_SD_TYPE_BACKFACE_CULLING
Definition: xmlsdtypes.hxx:73
css::uno::Reference< css::frame::XModel > mxModel
Definition: sdpropls.hxx:56
#define XML_SD_TYPE_FITTOSIZE_AUTOFIT
Definition: xmlsdtypes.hxx:69
SvXMLEnumMapEntry< drawing::TextVerticalAdjust > const pXML_VerticalAlign_Enum[]
Definition: sdpropls.cxx:629
SvXMLEnumMapEntry< drawing::LineStyle > const aXML_LineStyle_EnumMap[]
Definition: sdpropls.cxx:388
bool hasValue()
#define XML_TYPE_SD_MIRROR
Definition: xmlsdtypes.hxx:109
#define XML_SD_TYPE_TEX_KIND
Definition: xmlsdtypes.hxx:78
SvXMLEnumMapEntry< sal_Int32 > const pXML_Caption_Esc_Dir_Enum[]
Definition: sdpropls.cxx:745
#define MID_FLAG_ELEMENT_ITEM_EXPORT
Definition: xmltypes.hxx:67
bool bVisible
virtual void handleElementItem(SvXMLExport &rExport, const XMLPropertyState &rProperty, SvXmlExportFlags nFlags, const ::std::vector< XMLPropertyState > *pProperties, sal_uInt32 nIdx) const
this method is called for every item that has the MID_FLAG_ELEMENT_EXPORT flag set ...
Definition: xmlexppr.cxx:865
#define CTF_HEADER_VISIBLE
Definition: xmlsdtypes.hxx:184
virtual const XMLPropertyHandler * GetPropertyHandler(sal_Int32 nType) const
This method retrieves a PropertyHandler for the given XML-type.
Definition: prhdlfac.cxx:138
#define CTF_CONTROLWRITINGMODE
Definition: xmlsdtypes.hxx:123
SvXMLEnumMapEntry< sal_Int32 > const pXML_Fontwork_Shadow_Enum[]
Definition: sdpropls.cxx:719
#define XML_TYPE_BUILDIN_CMP_ONLY
Definition: xmltypes.hxx:142
#define XML_TYPE_NEG_PERCENT16
Definition: xmltypes.hxx:153
This is a handler either only import/exports percent or measure.
#define CTF_TEXTANIMATION_KIND
Definition: xmlsdtypes.hxx:142
constexpr sal_uInt16 XML_NAMESPACE_DR3D
SvXMLEnumMapEntry< sal_uInt16 > const pXML_ThemeColor_Enum[]
Definition: txtprhdl.cxx:252
const OUString & GetStyleName() const
Definition: xmlexppr.cxx:1123
virtual ~XMLShapeExportPropertyMapper() override
Definition: sdpropls.cxx:1317
#define CTF_NUMBERINGRULES
Definition: xmlsdtypes.hxx:122
#define XML_TYPE_COLOR_MODE
Definition: xmltypes.hxx:145
constexpr sal_uInt16 XML_NAMESPACE_DRAW_EXT
#define CTF_DATE_TIME_TEXT
Definition: xmlsdtypes.hxx:190
#define CTF_SD_OLE_VIS_AREA_EXPORT_LEFT
Definition: xmlsdtypes.hxx:197
virtual const XMLPropertyHandler * GetPropertyHandler(sal_Int32 nType) const override
This method retrieves a PropertyHandler for the given XML-type.
Definition: sdpropls.cxx:991
the SvXMLTypeConverter converts values of various types from their internal representation to the tex...
Definition: xmluconv.hxx:82
#define CTF_FONTWORK_SHADOWCOLOR
Definition: xmlsdtypes.hxx:158
enum SAL_DLLPUBLIC_RTTI FillStyle
Definition: xmlimppr.hxx:42
#define MID_FLAG_NO_PROPERTY_IMPORT
Definition: xmltypes.hxx:76
SvXMLEnumMapEntry< drawing::ConnectorType > const aXML_ConnectionKind_EnumMap[]
Definition: sdpropls.cxx:503
#define XML_TYPE_PERCENT16
Definition: xmltypes.hxx:131
const XMLPropertyMapEntry aXMLSDProperties[]
Definition: sdpropls.cxx:83
virtual ~XMLSdPropHdlFactory() override
Definition: sdpropls.cxx:987
#define CTF_LINEENDNAME
Definition: xmlsdtypes.hxx:136
SvXMLEnumMapEntry< drawing::RectanglePoint > const aXML_RefPoint_EnumMap[]
Definition: sdpropls.cxx:561
#define XML_SD_TYPE_TRANSTIION_DIRECTION
Definition: xmlsdtypes.hxx:115
#define CTF_PAGE_TRANS_TYPE
Definition: xmlsdtypes.hxx:129
const SvXMLEnumMapEntry< sal_Int16 > aAnimations_EnumMap_TransitionType[]
virtual ~XMLShapePropertySetMapper() override
Definition: sdpropls.cxx:1306
#define CTF_PAGE_TRANS_DURATION
Definition: xmlsdtypes.hxx:132
#define CTF_FRAME_MARGIN_HORI
Definition: txtprmap.hxx:132
#define XML_TYPE_WRAP_OPTION
Definition: xmltypes.hxx:265
PropertyHandler for the XML-data-type:
#define XML_SD_TYPE_BITMAP_MODE
Definition: xmlsdtypes.hxx:49
SvXMLEnumMapEntry< drawing::TextAnimationKind > const pXML_TextAnimation_Enum[]
Definition: sdpropls.cxx:591
#define XML_SD_TYPE_CAPTION_TYPE
Definition: xmlsdtypes.hxx:95
#define CTF_PAGE_TRANSITION_DIRECTION
Definition: xmlsdtypes.hxx:146
constexpr sal_uInt16 XML_NAMESPACE_XLINK
sal_Int32 mnIndex
Definition: maptype.hxx:141
#define CTF_FONTWORK_FORM
Definition: xmlsdtypes.hxx:161
virtual void handleElementItem(SvXMLExport &rExport, const XMLPropertyState &rProperty, SvXmlExportFlags nFlags, const ::std::vector< XMLPropertyState > *pProperties, sal_uInt32 nIdx) const override
this method is called for every item that has the MID_FLAG_ELEMENT_EXPORT flag set ...
Definition: sdpropls.cxx:1672
#define CTF_FONTWORK_STYLE
Definition: xmlsdtypes.hxx:151
css::uno::Reference< css::frame::XModel2 > mxModel
#define XML_TYPE_TEXT_ANIMATION_BLINKING
Definition: xmlsdtypes.hxx:56
SvXMLEnumMapEntry< drawing::TextureProjectionMode > const aXML_TexGenerationY_EnumMap[]
Definition: sdpropls.cxx:538
SvXMLEnumMapEntry< drawing::TextFitToSizeType > const pXML_FitToSize_Enum_Odf12[]
Definition: sdpropls.cxx:639
#define CTF_SD_OLE_VIS_AREA_EXPORT_WIDTH
Definition: xmlsdtypes.hxx:199
Abstract base-class for different XML-types.
constexpr sal_uInt16 XML_NAMESPACE_LO_EXT
bool IsXMLToken(std::u16string_view rString, enum XMLTokenEnum eToken)
compare eToken to the string
Definition: xmltoken.cxx:3573
#define CTF_FRAME_DISPLAY_SCROLLBAR
Definition: txtprmap.hxx:130
SvXMLEnumMapEntry< drawing::TextureKind > const aXML_TexKind_EnumMap[]
Definition: sdpropls.cxx:546
#define CTF_SD_MOVE_PROTECT
Definition: xmlsdtypes.hxx:173
#define CTF_FILLGRADIENTNAME
Definition: xmlsdtypes.hxx:137
virtual void handleSpecialItem(SvXMLAttributeList &rAttrList, const XMLPropertyState &rProperty, const SvXMLUnitConverter &rUnitConverter, const SvXMLNamespaceMap &rNamespaceMap, const ::std::vector< XMLPropertyState > *pProperties, sal_uInt32 nIdx) const
this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_EXPORT flag set ...
Definition: xmlexppr.cxx:849
PropertyHandler for a named xml bool type:
#define CTF_FILLTRANSNAME
Definition: xmlsdtypes.hxx:140
#define XML_SD_TYPE_NUMBULLET
Definition: xmlsdtypes.hxx:47
#define XML_SD_TYPE_BITMAPREPOFFSETY
Definition: xmlsdtypes.hxx:51
#define CTF_PAGE_TRANS_STYLE
Definition: xmlsdtypes.hxx:130
#define XML_SD_TYPE_MEASURE_UNIT
Definition: xmlsdtypes.hxx:63
#define CTF_DATE_TIME_VISIBLE
Definition: xmlsdtypes.hxx:187
#define CTF_REPEAT_OFFSET_X
Definition: xmlsdtypes.hxx:125
#define GMAP(name, prefix, token, type, context)
Definition: sdpropls.cxx:73
#define TMAP(name, prefix, token, type, context)
Definition: sdpropls.cxx:77
const XMLPropertyMapEntry aXMLSDPresPageProps[]
Definition: sdpropls.cxx:325
#define CTF_CAPTION_ISESCREL
Definition: xmlsdtypes.hxx:178
virtual void handleSpecialItem(SvXMLAttributeList &rAttrList, const XMLPropertyState &rProperty, const SvXMLUnitConverter &rUnitConverter, const SvXMLNamespaceMap &rNamespaceMap, const ::std::vector< XMLPropertyState > *pProperties, sal_uInt32 nIdx) const override
this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_EXPORT flag set ...
Definition: sdpropls.cxx:1652
#define XML_SD_TYPE_DATETIMEUPDATE
Definition: xmlsdtypes.hxx:99
#define CTF_HEADER_TEXT
Definition: xmlsdtypes.hxx:188
PropertyHandler for a generic xml enumeration type:
#define MID_FLAG_MERGE_ATTRIBUTE
Definition: xmltypes.hxx:57
#define XML_TYPE_DURATION16_MS
Definition: xmltypes.hxx:146
#define XML_TYPE_STYLENAME
Definition: xmltypes.hxx:150
SvXMLEnumMapEntry< drawing::FillStyle > const aXML_FillStyle_EnumMap[]
Definition: sdpropls.cxx:415
#define XML_TYPE_DOUBLE_PERCENT
Definition: xmltypes.hxx:154
#define XML_SD_TYPE_TEXT_CROSSEDOUT
Definition: xmlsdtypes.hxx:46
#define XML_SD_TYPE_STROKE
Definition: xmlsdtypes.hxx:33
#define XML_TYPE_TEXT_WRITING_MODE_WITH_DEFAULT
Definition: xmltypes.hxx:251
#define CTF_FILLBITMAPNAME
Definition: xmlsdtypes.hxx:139
PropertyHandler for the XML-data-type:
virtual void ContextFilter(bool bEnableFoFontFamily,::std::vector< XMLPropertyState > &rProperties, const css::uno::Reference< css::beans::XPropertySet > &rPropSet) const
Application-specific filter.
Definition: xmlexppr.cxx:664
#define CTF_SD_CONTROL_SHAPE_DATA_STYLE
Definition: contextid.hxx:35
#define XML_SD_TYPE_BITMAP_REFPOINT
Definition: xmlsdtypes.hxx:54
#define XML_TYPE_TEXT_CLIP
Definition: xmltypes.hxx:273
void AddAttribute(sal_uInt16 nPrefix, const OUString &rName, const OUString &rValue)
Definition: xmlexp.cxx:911
#define XML_TYPE_RECTANGLE_HEIGHT
Definition: xmltypes.hxx:162
#define MID_FLAG_MULTI_PROPERTY
Definition: xmltypes.hxx:64
#define XML_SD_TYPE_LINECAP
Definition: xmlsdtypes.hxx:68
#define DPMAP(name, prefix, token, type, context)
Definition: sdpropls.cxx:76
#define XML_SD_TYPE_PRESPAGE_VISIBILITY
Definition: xmlsdtypes.hxx:38
#define CTF_SD_SIZE_PROTECT
Definition: xmlsdtypes.hxx:174
#define CTF_FOOTER_VISIBLE
Definition: xmlsdtypes.hxx:185
OUString GetRelativeReference(const OUString &rValue)
Definition: xmlexp.cxx:2064
#define XML_SD_TYPE_PRESPAGE_STYLE
Definition: xmlsdtypes.hxx:35
SvXMLImport * mpImport
Definition: sdpropls.hxx:58
SvXMLEnumMapEntry< sal_Int32 > const pXML_Caption_Type_Enum[]
Definition: sdpropls.cxx:753
SvXMLEnumMapEntry< drawing::NormalsKind > const aXML_NormalsKind_EnumMap[]
Definition: sdpropls.cxx:522
constexpr sal_uInt16 XML_NAMESPACE_DRAW
#define MID_FLAG_ELEMENT_ITEM
Definition: xmltypes.hxx:70
SvXMLEnumMapEntry< drawing::MeasureTextHorzPos > const pXML_Measure_HAlign_Enum[]
Definition: sdpropls.cxx:681
#define CTF_PAGE_TRANS_SPEED
Definition: xmlsdtypes.hxx:131
SvXMLEnumMapEntry< sal_Int32 > const pXML_MeasureUnit_Enum[]
Definition: sdpropls.cxx:666
SvXMLExport * mpExport
Definition: sdpropls.hxx:57
XMLOFF_DLLPUBLIC void exportXML(OUString const &rStrName, css::uno::Any const &rValue, SvXMLExport &rExport)
#define CTF_PAGE_TRANSITION_FADECOLOR
Definition: xmlsdtypes.hxx:147
#define CTF_SD_OLE_VIS_AREA_IMPORT_TOP
Definition: xmlsdtypes.hxx:168
SvXMLEnumMapEntry< presentation::AnimationSpeed > const aXML_TransSpeed_EnumMap[]
Definition: sdpropls.cxx:433
#define CTF_CAPTION_ESCABS
Definition: xmlsdtypes.hxx:180
#define CTF_PAGE_SOUND_URL
Definition: xmlsdtypes.hxx:127
const XMLPropertyMapEntry aXMLTableShapeAttributes[]
contains the attribute to property mapping for a drawing layer table WARNING: if attributes are added...
Definition: sdpropls.cxx:375
Abstract base-class for different XML-types.
SvtSaveOptions::ODFSaneDefaultVersion getSaneDefaultVersion() const
returns the deterministic version for odf export
Definition: xmlexp.cxx:2271
#define XML_SD_TYPE_PRESPAGE_TYPE
Definition: xmlsdtypes.hxx:34
#define CTF_SD_OLE_VIS_AREA_IMPORT_HEIGHT
Definition: xmlsdtypes.hxx:170
#define CTF_TEXT_CLIP
Definition: txtprmap.hxx:171
#define CTF_SD_OLE_ISINTERNAL
Definition: xmlsdtypes.hxx:171
constexpr sal_uInt16 XML_NAMESPACE_SVG
#define XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE
Definition: xmlsdtypes.hxx:116
#define CTF_FONTWORK_SHADOWTRANSPARENCE
Definition: xmlsdtypes.hxx:163
#define XML_SD_TYPE_TRANSITION_TYPE
Definition: xmlsdtypes.hxx:113
constexpr sal_uInt16 XML_NAMESPACE_FO
#define CTF_SD_OLE_VIS_AREA_EXPORT_HEIGHT
Definition: xmlsdtypes.hxx:200
#define CTF_SD_OLE_VIS_AREA_IMPORT_WIDTH
Definition: xmlsdtypes.hxx:169
constexpr sal_uInt16 XML_NAMESPACE_TEXT
sal_Int32 mnType
SvXMLEnumMapEntry< sal_Int32 > const pXML_Fontwork_Form_Enum[]
Definition: sdpropls.cxx:727
#define XML_SD_TYPE_MEASURE_HALIGN
Definition: xmlsdtypes.hxx:61
#define CTF_PAGE_NUMBER_VISIBLE
Definition: xmlsdtypes.hxx:186
#define GMAPV(name, prefix, token, type, context, version)
Definition: sdpropls.cxx:75
#define CTF_FOOTER_TEXT
Definition: xmlsdtypes.hxx:189
#define XML_SD_TYPE_DATETIME_FORMAT
Definition: xmlsdtypes.hxx:100
#define XML_TYPE_ATTRIBUTE_CONTAINER
Definition: xmltypes.hxx:219
#define XML_TYPE_THEME_COLOR
Definition: xmltypes.hxx:297
#define XML_SD_TYPE_BITMAPREPOFFSETX
Definition: xmlsdtypes.hxx:50
#define XML_TYPE_CONTROL_TEXT_EMPHASIZE
Definition: xmltypes.hxx:247
#define XML_TYPE_TEXT_ANIMATION_DIRECTION
Definition: xmltypes.hxx:239
#define XML_SD_TYPE_SIZE_PROTECT
Definition: xmlsdtypes.hxx:105
const Any & any
#define XML_TYPE_TEXT_ANIMATION_STEPS
Definition: xmlsdtypes.hxx:57
#define XML_SD_TYPE_TEX_MODE
Definition: xmlsdtypes.hxx:79
#define MID_FLAG_NO_PROPERTY
Definition: xmltypes.hxx:78
#define XML_TYPE_TEXT_ANIMATION
Definition: xmltypes.hxx:238
#define CTF_TEXTWRITINGMODE
Definition: txtprmap.hxx:63
#define XML_TYPE_NEG_PERCENT
Definition: xmltypes.hxx:151
#define GMAP_D(name, prefix, token, type, context)
Definition: sdpropls.cxx:74
#define XML_SD_TYPE_PRESPAGE_SPEED
Definition: xmlsdtypes.hxx:36
#define MID_FLAG_NO_PROPERTY_EXPORT
Definition: xmltypes.hxx:73
Represents a property with its API-name, its XML-name and the type of its value.
Definition: maptype.hxx:31
#define XML_TYPE_MEASURE_PX
Definition: xmltypes.hxx:147
#define XML_TYPE_NUMBER
Definition: xmltypes.hxx:134
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const =0
Exports the given value according to the XML-data-type corresponding to the derived class...
#define XML_SD_TYPE_FILLSTYLE
Definition: xmlsdtypes.hxx:42
SvXMLEnumMapEntry< drawing::TextAnimationDirection > const pXML_TextAnimationDirection_Enum[]
Definition: sdpropls.cxx:611
XMLShapeExportPropertyMapper(const rtl::Reference< XMLPropertySetMapper > &rMapper, SvXMLExport &rExport)
Definition: sdpropls.cxx:1310
SvXMLEnumMapEntry< drawing::LineCap > const aXML_LineCap_EnumMap[]
Definition: sdpropls.cxx:406
#define MID_FLAG_SPECIAL_ITEM
Definition: xmltypes.hxx:87
#define XML_SD_TYPE_CAPTION_ESC_ABS
Definition: xmlsdtypes.hxx:93
PropertyHandler for the list-style.
Definition: numithdl.hxx:28
#define CTF_FRAME_DISPLAY_BORDER
Definition: txtprmap.hxx:131
#define XML_SD_TYPE_NORMALS_KIND
Definition: xmlsdtypes.hxx:74
#define XML_TYPE_TEXT_DRAW_ASPECT
Definition: xmltypes.hxx:246
#define XML_TYPE_NUMBER16
Definition: xmltypes.hxx:136
#define CTF_FONTWORK_HIDEFORM
Definition: xmlsdtypes.hxx:162
#define CTF_FRAME_MARGIN_VERT
Definition: txtprmap.hxx:133
virtual void ContextFilter(bool bEnableFoFontFamily,::std::vector< XMLPropertyState > &rProperties, const css::uno::Reference< css::beans::XPropertySet > &rPropSet) const override
Application-specific filter.
Definition: sdpropls.cxx:1321
#define XML_SD_TYPE_FILLBITMAPSIZE
Definition: xmlsdtypes.hxx:52
SvXMLEnumMapEntry< drawing::TextFitToSizeType > const pXML_ShrinkToFit_Enum[]
Definition: sdpropls.cxx:657
#define CTF_FILLHATCHNAME
Definition: xmlsdtypes.hxx:138
#define CTF_TEXTANIMATION_BLINKING
Definition: xmlsdtypes.hxx:141
static bool convertBool(bool &rBool, std::u16string_view rString)
#define XML_SD_TYPE_VISIBLE_HIDDEN
Definition: xmlsdtypes.hxx:45
#define MID_FLAG_MERGE_PROPERTY
Definition: xmltypes.hxx:61
#define CTF_SD_OLE_ASPECT
Definition: xmlsdtypes.hxx:196
#define CTF_LINESTARTNAME
Definition: xmlsdtypes.hxx:135
static bool convertPercent(sal_Int32 &rValue, std::u16string_view rString)
XMLOFF_DLLPUBLIC bool importXML(css::uno::Reference< css::xml::sax::XFastAttributeList > const &xAttrList, css::uno::Any &rValue, OUString &rStrName, SvXMLImport &rImport)
#define XML_TYPE_RECTANGLE_WIDTH
Definition: xmltypes.hxx:161
#define CTF_SD_OLE_VIS_AREA_EXPORT_TOP
Definition: xmlsdtypes.hxx:198
#define CTF_PAGE_BACKSIZE
Definition: xmlsdtypes.hxx:133
#define CTF_PAGE_TRANSITION_TYPE
Definition: xmlsdtypes.hxx:144
#define XML_SD_TYPE_LINEJOIN
Definition: xmlsdtypes.hxx:41
#define XML_SD_TYPE_NORMALS_DIRECTION
Definition: xmlsdtypes.hxx:75
#define MAP_END()
Definition: sdpropls.cxx:79
#define XML_SD_TYPE_FONTWORK_STYLE
Definition: xmlsdtypes.hxx:83
Map an XMLTokenEnum to an enum value.
Definition: ximpshap.hxx:39
constexpr sal_uInt16 XML_NAMESPACE_PRESENTATION
#define CTF_FONTWORK_SHADOW
Definition: xmlsdtypes.hxx:157
#define XML_SD_TYPE_MEASURE_VALIGN
Definition: xmlsdtypes.hxx:62
#define XML_TYPE_STRING
Definition: xmltypes.hxx:132
SvXMLEnumMapEntry< drawing::TextureProjectionMode > const aXML_TexGenerationX_EnumMap[]
Definition: sdpropls.cxx:530
#define CTF_FONTWORK_ADJUST
Definition: xmlsdtypes.hxx:152
#define CTF_FONTWORK_SHADOWOFFSETX
Definition: xmlsdtypes.hxx:159
#define XML_SD_TYPE_CONTROL_BORDER
Definition: xmlsdtypes.hxx:65
SvXMLEnumMapEntry< sal_Int32 > const pXML_Fontwork_Style_Enum[]
Definition: sdpropls.cxx:700
css::uno::Any maValue
Definition: maptype.hxx:142
constexpr sal_uInt16 XML_NAMESPACE_TABLE
#define MAP_(name, prefix, token, type, context)
Definition: sdpropls.cxx:71
SvXMLEnumMapEntry< drawing::BitmapMode > const aXML_BitmapMode_EnumMap[]
Definition: sdpropls.cxx:512
#define XML_SD_TYPE_TRANSTIION_SUBTYPE
Definition: xmlsdtypes.hxx:114
#define XML_SD_TYPE_MEASURE_PLACING
Definition: xmlsdtypes.hxx:64
SvXmlExportFlags
Definition: xmlexppr.hxx:39
#define PMAP(name, prefix, token, type, context)
Definition: sdpropls.cxx:78
#define XML_SD_TYPE_VERTICAL_ALIGN
Definition: xmlsdtypes.hxx:59
#define XML_SD_TYPE_TEXT_ALIGN
Definition: xmlsdtypes.hxx:58
#define XML_SD_TYPE_CONTROL_BORDER_COLOR
Definition: xmlsdtypes.hxx:66
#define CTF_FONTWORK_DISTANCE
Definition: xmlsdtypes.hxx:153
const OUString & GetXMLToken(enum XMLTokenEnum eToken)
return the OUString representation for eToken
Definition: xmltoken.cxx:3517
constexpr sal_uInt16 XML_NAMESPACE_SMIL
Handling of tokens in XML:
#define CTF_DASHNAME
Definition: xmlsdtypes.hxx:134
#define CTF_SD_OLE_VIS_AREA_IMPORT_LEFT
Definition: xmlsdtypes.hxx:167
#define XML_TYPE_MEASURE
Definition: xmltypes.hxx:126
#define CTF_FONTWORK_SHADOWOFFSETY
Definition: xmlsdtypes.hxx:160
XMLPageExportPropertyMapper(const rtl::Reference< XMLPropertySetMapper > &rMapper, SvXMLExport &rExport)
Definition: sdpropls.cxx:1698
#define XML_TYPE_TEXT_COLUMNS
Definition: xmltypes.hxx:204
Smart struct to transport an Any with an index to the appropriate property-name.
Definition: maptype.hxx:139
#define CTF_FONTWORK_START
Definition: xmlsdtypes.hxx:154
#define XML_SD_TYPE_LOGICAL_SIZE
Definition: xmlsdtypes.hxx:53
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Imports the given value according to the XML-data-type corresponding to the derived class...
SvXMLEnumMapEntry< drawing::TextFitToSizeType > const pXML_FitToSize_Enum[]
Definition: sdpropls.cxx:648
#define XML_SD_TYPE_CAPTION_ANGLE_TYPE
Definition: xmlsdtypes.hxx:90
Abstract base-class for different XML-types.
#define XML_TYPE_PERCENT100
Definition: xmltypes.hxx:156
#define XML_SD_TYPE_FONTWORK_ADJUST
Definition: xmlsdtypes.hxx:84
#define CTF_DATE_TIME_FORMAT
Definition: xmlsdtypes.hxx:191
#define XML_SD_TYPE_TEX_GENERATION_MODE_X
Definition: xmlsdtypes.hxx:76
SvXMLEnumMapEntry< drawing::TextureMode > const aXML_TexMode_EnumMap[]
Definition: sdpropls.cxx:553
SvXMLEnumMapEntry< sal_Int32 > const pXML_Fontwork_Adjust_Enum[]
Definition: sdpropls.cxx:710
SvXMLEnumMapEntry< drawing::LineJoint > const aXML_LineJoint_EnumMap[]
Definition: sdpropls.cxx:396
#define CTF_FILLCOLOR
Definition: txtprmap.hxx:203
#define CTF_WRITINGMODE
Definition: xmlsdtypes.hxx:124
#define XML_SD_TYPE_PRESPAGE_DURATION
Definition: xmlsdtypes.hxx:37
#define CTF_TEXT_CLIP11
Definition: txtprmap.hxx:172
#define XML_SD_TYPE_PRESPAGE_BACKSIZE
Definition: xmlsdtypes.hxx:55
SvXMLEnumMapEntry< drawing::TextHorizontalAdjust > const pXML_TextAlign_Enum[]
Definition: sdpropls.cxx:620
#define XML_SD_TYPE_FONTWORK_SHADOW
Definition: xmlsdtypes.hxx:85
#define CTF_PAGE_VISIBLE
Definition: xmlsdtypes.hxx:128
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const =0
Imports the given value according to the XML-data-type corresponding to the derived class...
Abstract base-class for different XML-types.
Definition: xmlprhdl.hxx:35
#define XML_TYPE_BOOL
Definition: xmltypes.hxx:125
SvXMLEnumMapEntry< text::WritingMode > const aXML_WritingMode_EnumMap[]
Definition: sdpropls.cxx:584
#define XML_SD_TYPE_OPACITY
Definition: xmlsdtypes.hxx:40
#define XML_SD_TYPE_WRITINGMODE
Definition: xmlsdtypes.hxx:48
#define CTF_FONTWORK_MIRROR
Definition: xmlsdtypes.hxx:155
#define CTF_REPEAT_OFFSET_Y
Definition: xmlsdtypes.hxx:126
#define CTF_FILLSTYLE
Definition: txtprmap.hxx:202
#define XML_SD_TYPE_MOVE_PROTECT
Definition: xmlsdtypes.hxx:104
#define CTF_TEXTCOLUMNS
Definition: txtprmap.hxx:77
virtual void ContextFilter(bool bEnableFoFontFamily,::std::vector< XMLPropertyState > &rProperties, const css::uno::Reference< css::beans::XPropertySet > &rPropSet) const override
Application-specific filter.
Definition: sdpropls.cxx:1708
This is a handler that returns true for import if the attribute string contains a '' value...
SvXMLExportFlags getExportFlags() const
Definition: xmlexp.hxx:478
#define XML_SD_TYPE_IMAGE_SCALE_MODE
Definition: xmlsdtypes.hxx:67
Abstract base-class for different XML-types.
#define XML_SD_TYPE_FITTOSIZE
Definition: xmlsdtypes.hxx:60
#define CTF_FONTWORK_OUTLINE
Definition: xmlsdtypes.hxx:156
aStr
SvXMLEnumMapEntry< drawing::CircleKind > const aXML_CircleKind_EnumMap[]
Definition: sdpropls.cxx:575
XMLShapePropertySetMapper(const rtl::Reference< XMLPropertyHandlerFactory > &rFactoryRef, bool bForExport)
Definition: sdpropls.cxx:1300
#define CTF_PAGE_TRANSITION_SUBTYPE
Definition: xmlsdtypes.hxx:145
constexpr sal_uInt16 XML_NAMESPACE_STYLE
#define XML_TYPE_RECTANGLE_TOP
Definition: xmltypes.hxx:160
#define XML_TYPE_RECTANGLE_LEFT
Definition: xmltypes.hxx:159
SvXMLEnumMapEntry< drawing::MeasureTextVertPos > const pXML_Measure_VAlign_Enum[]
Definition: sdpropls.cxx:690
#define XML_TYPE_COLOR
Definition: xmltypes.hxx:133
#define CTF_SD_NUMBERINGRULES_NAME
Definition: contextid.hxx:36
virtual ~XMLPageExportPropertyMapper() override
Definition: sdpropls.cxx:1704
sal_Int16 nValue
const rtl::Reference< XMLPropertySetMapper > & getPropertySetMapper() const
Definition: xmlexppr.cxx:1113
virtual void handleElementItem(SvXMLExport &rExport, const XMLPropertyState &rProperty, SvXmlExportFlags nFlags, const ::std::vector< XMLPropertyState > *pProperties, sal_uInt32 nIdx) const override
this method is called for every item that has the MID_FLAG_ELEMENT_EXPORT flag set ...
Definition: sdpropls.cxx:1855
void PutHdlCache(sal_Int32 nType, const XMLPropertyHandler *pHdl) const
Puts a PropertyHandler into the internal cache.
Definition: prhdlfac.cxx:156
XMLSdPropHdlFactory(css::uno::Reference< css::frame::XModel > const &xModel, SvXMLExport &rExport)
SvXMLEnumMapEntry< sal_Int32 > const aXML_PresChange_EnumMap[]
Definition: sdpropls.cxx:425
#define XML_SD_TYPE_CAPTION_ESC_DIR
Definition: xmlsdtypes.hxx:94
static bool convertNumber(sal_Int32 &rValue, std::u16string_view aString, sal_Int32 nMin=SAL_MIN_INT32, sal_Int32 nMax=SAL_MAX_INT32)
#define XML_SD_TYPE_TEX_GENERATION_MODE_Y
Definition: xmlsdtypes.hxx:77