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, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFSVER_010, false }
72 #define MAPV_(name,prefix,token,type,context,version) { name, sizeof(name)-1, 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, 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
110  GMAP( "FillGradientStepCount", XML_NAMESPACE_DRAW, XML_GRADIENT_STEP_COUNT, XML_TYPE_NUMBER16, 0 ),
112  GMAP( "FillBackground", XML_NAMESPACE_DRAW, XML_FILL_HATCH_SOLID, XML_TYPE_BOOL, 0 ),
114  GMAP( "FillTransparence", XML_NAMESPACE_DRAW, XML_OPACITY, XML_TYPE_NEG_PERCENT16|MID_FLAG_MULTI_PROPERTY, 0 ), // exists in SW, too
121  GMAP( "FillBitmapPositionOffsetX", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT_X, XML_TYPE_PERCENT, 0 ),
122  GMAP( "FillBitmapPositionOffsetY", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT_Y, XML_TYPE_PERCENT, 0 ),
126 
127  // text frame attributes
130  GMAP( "TextAutoGrowHeight", XML_NAMESPACE_DRAW, XML_AUTO_GROW_HEIGHT, XML_TYPE_BOOL, 0 ),
131  GMAP( "TextAutoGrowWidth", XML_NAMESPACE_DRAW, XML_AUTO_GROW_WIDTH, XML_TYPE_BOOL, 0 ),
134  GMAP( "TextContourFrame", XML_NAMESPACE_DRAW, XML_FIT_TO_CONTOUR, XML_TYPE_BOOL, 0 ),
135  GMAP( "TextMaximumFrameHeight", XML_NAMESPACE_FO, XML_MAX_HEIGHT, XML_TYPE_MEASURE, 0 ),
136  GMAP( "TextMaximumFrameWidth", XML_NAMESPACE_FO, XML_MAX_WIDTH, XML_TYPE_MEASURE, 0 ),
137  GMAP( "TextMinimumFrameHeight", XML_NAMESPACE_FO, XML_MIN_HEIGHT, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, 0 ), // exists in SW, too
139  GMAP( "TextUpperDistance", XML_NAMESPACE_FO, XML_PADDING_TOP, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, 0 ), // exists in SW, too
140  GMAP( "TextLowerDistance", XML_NAMESPACE_FO, XML_PADDING_BOTTOM, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, 0 ), // exists in SW, too
141  GMAP( "TextLeftDistance", XML_NAMESPACE_FO, XML_PADDING_LEFT, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, 0 ), // exists in SW, too
142  GMAP( "TextRightDistance", XML_NAMESPACE_FO, XML_PADDING_RIGHT, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, 0 ), // exists in SW, too
147  GMAP( "TextChainNextName", XML_NAMESPACE_DRAW, XML_CHAIN_NEXT_NAME, XML_TYPE_STRING, 0 ),
148 
150 
151  // shadow attributes
153  GMAP( "ShadowXDistance", XML_NAMESPACE_DRAW, XML_SHADOW_OFFSET_X, XML_TYPE_MEASURE, 0 ),
154  GMAP( "ShadowYDistance", XML_NAMESPACE_DRAW, XML_SHADOW_OFFSET_Y, XML_TYPE_MEASURE, 0 ),
156  GMAP( "ShadowTransparence", XML_NAMESPACE_DRAW, XML_SHADOW_OPACITY, XML_TYPE_NEG_PERCENT, 0 ),
158 
159  // glow attributes
163 
164  // soft edge attributes
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::ODFSVER_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
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 ),
189 
190  // connector attributes
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 ),
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 ),
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
226 
227  // 3D texture attributes
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 ),
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
242 
243  // #FontWork# attributes
257 
258  // #FontWork# attributes
272 
273  // control attributes (border exists one more time for the text additions of shapes)
274  GMAP( "ControlSymbolColor", XML_NAMESPACE_DRAW, XML_SYMBOL_COLOR, XML_TYPE_COLOR, 0 ),
282 
283  // special entries for floating frames
297 
299 
300  // caption properties
310  GMAP( "CaptionIsFitLineLength", XML_NAMESPACE_DRAW, XML_CAPTION_FIT_LINE_LENGTH, XML_TYPE_BOOL, 0 ),
311 
312  // misc object properties
315 
316  MAP_END()
317 };
318 
319 // entry list for presentation page properties
320 
322 {
323  DPMAP( "UserDefinedAttributes", XML_NAMESPACE_TEXT, XML_XMLNS, XML_TYPE_ATTRIBUTE_CONTAINER | MID_FLAG_SPECIAL_ITEM, 0 ),
324 
332 
335 
339  DPMAP( "FillGradientStepCount", XML_NAMESPACE_DRAW, XML_GRADIENT_STEP_COUNT, XML_TYPE_NUMBER, 0 ),
341  GMAP( "FillBackground", XML_NAMESPACE_DRAW, XML_FILL_HATCH_SOLID, XML_TYPE_BOOL, 0 ),
350  DPMAP( "FillBitmapPositionOffsetX", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT_X, XML_TYPE_PERCENT, 0 ),
351  DPMAP( "FillBitmapPositionOffsetY", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT_Y, XML_TYPE_PERCENT, 0 ),
355 
360 
365  MAP_END()
366 };
367 
372 {
375  MAP_( "UseFirstColumnStyle", XML_NAMESPACE_TABLE, XML_USE_FIRST_COLUMN_STYLES, XML_TYPE_BOOL, 0 ),
378  MAP_( "UseBandingColumnStyle", XML_NAMESPACE_TABLE, XML_USE_BANDING_COLUMNS_STYLES, XML_TYPE_BOOL, 0 ),
379  MAP_END()
380 };
381 
382 // implementation of factory for own graphic properties
383 
385 {
386  { XML_NONE, drawing::LineStyle_NONE },
387  { XML_SOLID, drawing::LineStyle_SOLID },
388  { XML_DASH, drawing::LineStyle_DASH },
389  { XML_TOKEN_INVALID, drawing::LineStyle(0) }
390 };
391 
393 {
394  { XML_NONE, drawing::LineJoint_NONE },
395  { XML_MITER, drawing::LineJoint_MITER },
396  { XML_ROUND, drawing::LineJoint_ROUND },
397  { XML_BEVEL, drawing::LineJoint_BEVEL },
398  { XML_MIDDLE, drawing::LineJoint_MIDDLE },
399  { XML_TOKEN_INVALID, drawing::LineJoint(0) }
400 };
401 
403 {
404  { XML_BUTT, drawing::LineCap_BUTT },
405  { XML_ROUND, drawing::LineCap_ROUND },
406  // use XML_GRADIENTSTYLE_SQUARE as XML_SQUARE, is defined as "square" already
407  { XML_GRADIENTSTYLE_SQUARE, drawing::LineCap_SQUARE },
408  { XML_TOKEN_INVALID, drawing::LineCap(0) }
409 };
410 
412 {
413  { XML_NONE, drawing::FillStyle_NONE },
414  { XML_SOLID, drawing::FillStyle_SOLID },
415  { XML_BITMAP, drawing::FillStyle_BITMAP },
416  { XML_GRADIENT, drawing::FillStyle_GRADIENT },
417  { XML_HATCH, drawing::FillStyle_HATCH },
419 };
420 
422 {
423  { XML_MANUAL, 0 },
424  { XML_AUTOMATIC, 1 },
425  { XML_SEMI_AUTOMATIC, 2 },
426  { XML_TOKEN_INVALID, 0 }
427 };
428 
430 {
431  { XML_FAST, presentation::AnimationSpeed_FAST },
432  { XML_MEDIUM, presentation::AnimationSpeed_MEDIUM },
433  { XML_SLOW, presentation::AnimationSpeed_SLOW },
434  { XML_TOKEN_INVALID, presentation::AnimationSpeed(0) }
435 };
436 
438 {
439  { XML_NONE, presentation::FadeEffect_NONE },
440  { XML_FADE_FROM_LEFT, presentation::FadeEffect_FADE_FROM_LEFT },
441  { XML_FADE_FROM_TOP, presentation::FadeEffect_FADE_FROM_TOP },
442  { XML_FADE_FROM_RIGHT, presentation::FadeEffect_FADE_FROM_RIGHT },
443  { XML_FADE_FROM_BOTTOM, presentation::FadeEffect_FADE_FROM_BOTTOM },
444  { XML_FADE_TO_CENTER, presentation::FadeEffect_FADE_TO_CENTER },
445  { XML_FADE_FROM_CENTER, presentation::FadeEffect_FADE_FROM_CENTER },
446  { XML_MOVE_FROM_LEFT, presentation::FadeEffect_MOVE_FROM_LEFT },
447  { XML_MOVE_FROM_TOP, presentation::FadeEffect_MOVE_FROM_TOP },
448  { XML_MOVE_FROM_RIGHT, presentation::FadeEffect_MOVE_FROM_RIGHT },
449  { XML_MOVE_FROM_BOTTOM, presentation::FadeEffect_MOVE_FROM_BOTTOM },
450  { XML_ROLL_FROM_TOP, presentation::FadeEffect_ROLL_FROM_TOP },
451  { XML_ROLL_FROM_LEFT, presentation::FadeEffect_ROLL_FROM_LEFT },
452  { XML_ROLL_FROM_RIGHT, presentation::FadeEffect_ROLL_FROM_RIGHT },
453  { XML_ROLL_FROM_BOTTOM, presentation::FadeEffect_ROLL_FROM_BOTTOM },
454  { XML_VERTICAL_STRIPES, presentation::FadeEffect_VERTICAL_STRIPES },
455  { XML_HORIZONTAL_STRIPES, presentation::FadeEffect_HORIZONTAL_STRIPES },
456  { XML_CLOCKWISE, presentation::FadeEffect_CLOCKWISE },
457  { XML_COUNTERCLOCKWISE, presentation::FadeEffect_COUNTERCLOCKWISE },
458  { XML_FADE_FROM_UPPERLEFT, presentation::FadeEffect_FADE_FROM_UPPERLEFT },
459  { XML_FADE_FROM_UPPERRIGHT, presentation::FadeEffect_FADE_FROM_UPPERRIGHT },
460  { XML_FADE_FROM_LOWERLEFT, presentation::FadeEffect_FADE_FROM_LOWERLEFT },
461  { XML_FADE_FROM_LOWERRIGHT, presentation::FadeEffect_FADE_FROM_LOWERRIGHT },
462  { XML_CLOSE_VERTICAL, presentation::FadeEffect_CLOSE_VERTICAL },
463  { XML_CLOSE_HORIZONTAL, presentation::FadeEffect_CLOSE_HORIZONTAL },
464  { XML_OPEN_VERTICAL, presentation::FadeEffect_OPEN_VERTICAL },
465  { XML_OPEN_HORIZONTAL, presentation::FadeEffect_OPEN_HORIZONTAL },
466  { XML_SPIRALIN_LEFT, presentation::FadeEffect_SPIRALIN_LEFT },
467  { XML_SPIRALIN_RIGHT, presentation::FadeEffect_SPIRALIN_RIGHT },
468  { XML_SPIRALOUT_LEFT, presentation::FadeEffect_SPIRALOUT_LEFT },
469  { XML_SPIRALOUT_RIGHT, presentation::FadeEffect_SPIRALOUT_RIGHT },
470  { XML_DISSOLVE, presentation::FadeEffect_DISSOLVE },
471  { XML_WAVYLINE_FROM_LEFT, presentation::FadeEffect_WAVYLINE_FROM_LEFT },
472  { XML_WAVYLINE_FROM_TOP, presentation::FadeEffect_WAVYLINE_FROM_TOP },
473  { XML_WAVYLINE_FROM_RIGHT, presentation::FadeEffect_WAVYLINE_FROM_RIGHT },
474  { XML_WAVYLINE_FROM_BOTTOM, presentation::FadeEffect_WAVYLINE_FROM_BOTTOM },
475  { XML_RANDOM, presentation::FadeEffect_RANDOM },
476  { XML_STRETCH_FROM_LEFT, presentation::FadeEffect_STRETCH_FROM_LEFT },
477  { XML_STRETCH_FROM_TOP, presentation::FadeEffect_STRETCH_FROM_TOP },
478  { XML_STRETCH_FROM_RIGHT, presentation::FadeEffect_STRETCH_FROM_RIGHT },
479  { XML_STRETCH_FROM_BOTTOM, presentation::FadeEffect_STRETCH_FROM_BOTTOM },
480  { XML_VERTICAL_LINES, presentation::FadeEffect_VERTICAL_LINES },
481  { XML_HORIZONTAL_LINES, presentation::FadeEffect_HORIZONTAL_LINES },
482  { XML_MOVE_FROM_UPPERLEFT, presentation::FadeEffect_MOVE_FROM_UPPERLEFT },
483  { XML_MOVE_FROM_UPPERRIGHT, presentation::FadeEffect_MOVE_FROM_UPPERRIGHT },
484  { XML_MOVE_FROM_LOWERRIGHT, presentation::FadeEffect_MOVE_FROM_LOWERRIGHT },
485  { XML_MOVE_FROM_LOWERLEFT, presentation::FadeEffect_MOVE_FROM_LOWERLEFT },
486  { XML_UNCOVER_TO_LEFT, presentation::FadeEffect_UNCOVER_TO_LEFT },
487  { XML_UNCOVER_TO_UPPERLEFT, presentation::FadeEffect_UNCOVER_TO_UPPERLEFT },
488  { XML_UNCOVER_TO_TOP, presentation::FadeEffect_UNCOVER_TO_TOP },
489  { XML_UNCOVER_TO_UPPERRIGHT,presentation::FadeEffect_UNCOVER_TO_UPPERRIGHT },
490  { XML_UNCOVER_TO_RIGHT, presentation::FadeEffect_UNCOVER_TO_RIGHT },
491  { XML_UNCOVER_TO_LOWERRIGHT,presentation::FadeEffect_UNCOVER_TO_LOWERRIGHT },
492  { XML_UNCOVER_TO_BOTTOM, presentation::FadeEffect_UNCOVER_TO_BOTTOM },
493  { XML_UNCOVER_TO_LOWERLEFT, presentation::FadeEffect_UNCOVER_TO_LOWERLEFT },
494  { XML_VERTICAL_CHECKERBOARD,presentation::FadeEffect_VERTICAL_CHECKERBOARD },
495  { XML_HORIZONTAL_CHECKERBOARD,presentation::FadeEffect_HORIZONTAL_CHECKERBOARD },
496  { XML_TOKEN_INVALID, presentation::FadeEffect(0) }
497 };
498 
500 {
501  { XML_STANDARD, drawing::ConnectorType_STANDARD },
502  { XML_CURVE, drawing::ConnectorType_CURVE },
503  { XML_LINE, drawing::ConnectorType_LINE },
504  { XML_LINES, drawing::ConnectorType_LINES },
505  { XML_TOKEN_INVALID, drawing::ConnectorType(0) }
506 };
507 
509 {
510  { XML_REPEAT, drawing::BitmapMode_REPEAT },
511  { XML_STRETCH, drawing::BitmapMode_STRETCH },
512  { XML_BACKGROUND_NO_REPEAT, drawing::BitmapMode_NO_REPEAT },
513  { XML_TOKEN_INVALID, drawing::BitmapMode(0) }
514 };
515 
516 // 3D EnumMaps
517 
519 {
520  { XML_OBJECT, drawing::NormalsKind_SPECIFIC },
521  { XML_FLAT, drawing::NormalsKind_FLAT },
522  { XML_SPHERE, drawing::NormalsKind_SPHERE },
523  { XML_TOKEN_INVALID, drawing::NormalsKind(0) }
524 };
525 
527 {
528  { XML_OBJECT, drawing::TextureProjectionMode_OBJECTSPECIFIC },
529  { XML_PARALLEL, drawing::TextureProjectionMode_PARALLEL },
530  { XML_SPHERE, drawing::TextureProjectionMode_SPHERE },
531  { XML_TOKEN_INVALID, drawing::TextureProjectionMode(0) }
532 };
533 
535 {
536  { XML_OBJECT, drawing::TextureProjectionMode_OBJECTSPECIFIC },
537  { XML_PARALLEL, drawing::TextureProjectionMode_PARALLEL },
538  { XML_SPHERE, drawing::TextureProjectionMode_SPHERE },
539  { XML_TOKEN_INVALID, drawing::TextureProjectionMode(0) }
540 };
541 
543 {
544  { XML_LUMINANCE, drawing::TextureKind_LUMINANCE },
545  { XML_COLOR, drawing::TextureKind_COLOR },
546  { XML_TOKEN_INVALID, drawing::TextureKind(0) }
547 };
548 
550 {
551  { XML_REPLACE, drawing::TextureMode_REPLACE },
552  { XML_MODULATE, drawing::TextureMode_MODULATE },
553  { XML_BLEND, drawing::TextureMode_BLEND },
554  { XML_TOKEN_INVALID, drawing::TextureMode(0) }
555 };
556 
558 {
559  { XML_TOP_LEFT, drawing::RectanglePoint_LEFT_TOP },
560  { XML_TOP, drawing::RectanglePoint_MIDDLE_TOP },
561  { XML_TOP_RIGHT, drawing::RectanglePoint_RIGHT_TOP },
562  { XML_LEFT, drawing::RectanglePoint_LEFT_MIDDLE },
563  { XML_CENTER, drawing::RectanglePoint_MIDDLE_MIDDLE },
564  { XML_RIGHT, drawing::RectanglePoint_RIGHT_MIDDLE },
565  { XML_BOTTOM_LEFT, drawing::RectanglePoint_LEFT_BOTTOM },
566  { XML_BOTTOM, drawing::RectanglePoint_MIDDLE_BOTTOM },
567  { XML_BOTTOM_RIGHT, drawing::RectanglePoint_RIGHT_BOTTOM },
568  { XML_TOKEN_INVALID, drawing::RectanglePoint(0) }
569 };
570 
572 {
573  { XML_FULL, drawing::CircleKind_FULL },
574  { XML_SECTION, drawing::CircleKind_SECTION },
575  { XML_CUT, drawing::CircleKind_CUT },
576  { XML_ARC, drawing::CircleKind_ARC },
577  { XML_TOKEN_INVALID, drawing::CircleKind(0) }
578 };
579 
581 {
582  { XML_TB_RL, text::WritingMode_TB_RL },
583  { XML_LR_TB, text::WritingMode_LR_TB },
584  { XML_TOKEN_INVALID, text::WritingMode(0) }
585 };
586 
588 {
589  { XML_NONE, drawing::TextAnimationKind_NONE },
590  { XML_BLINKING, drawing::TextAnimationKind_BLINK }, // will be filtered
591  { XML_SCROLL, drawing::TextAnimationKind_SCROLL },
592  { XML_ALTERNATE, drawing::TextAnimationKind_ALTERNATE },
593  { XML_SLIDE, drawing::TextAnimationKind_SLIDE },
594  { XML_TOKEN_INVALID, drawing::TextAnimationKind(0) }
595 };
596 
598 {
599  { XML_FALSE, drawing::TextAnimationKind_NONE },
600  { XML_TRUE, drawing::TextAnimationKind_BLINK },
601  { XML_FALSE, drawing::TextAnimationKind_SCROLL },
602  { XML_FALSE, drawing::TextAnimationKind_ALTERNATE },
603  { XML_FALSE, drawing::TextAnimationKind_SLIDE },
604  { XML_TOKEN_INVALID, drawing::TextAnimationKind(0) }
605 };
606 
608 {
609  { XML_LEFT, drawing::TextAnimationDirection_LEFT },
610  { XML_RIGHT, drawing::TextAnimationDirection_RIGHT }, // will be filtered
611  { XML_UP, drawing::TextAnimationDirection_UP },
612  { XML_DOWN, drawing::TextAnimationDirection_DOWN },
613  { XML_TOKEN_INVALID, drawing::TextAnimationDirection(0) }
614 };
615 
617 {
618  { XML_LEFT, drawing::TextHorizontalAdjust_LEFT },
619  { XML_CENTER, drawing::TextHorizontalAdjust_CENTER },
620  { XML_RIGHT, drawing::TextHorizontalAdjust_RIGHT },
621  { XML_JUSTIFY, drawing::TextHorizontalAdjust_BLOCK },
622  { XML_TOKEN_INVALID, drawing::TextHorizontalAdjust(0) }
623 };
624 
626 {
627  { XML_TOP, drawing::TextVerticalAdjust_TOP },
628  { XML_MIDDLE, drawing::TextVerticalAdjust_CENTER },
629  { XML_BOTTOM, drawing::TextVerticalAdjust_BOTTOM },
630  { XML_JUSTIFY, drawing::TextVerticalAdjust_BLOCK },
631  { XML_TOKEN_INVALID, drawing::TextVerticalAdjust(0) }
632 };
633 
634 // note: PROPORTIONAL and ALLLINES are the same thing now!
636 {
637  { XML_FALSE, drawing::TextFitToSizeType_NONE },
638  { XML_TRUE, drawing::TextFitToSizeType_PROPORTIONAL },
639  { XML_TRUE, drawing::TextFitToSizeType_ALLLINES },
640  { XML_FALSE, drawing::TextFitToSizeType_AUTOFIT },
641  { XML_TOKEN_INVALID, drawing::TextFitToSizeType(0) }
642 };
643 
645 {
646  { XML_FALSE, drawing::TextFitToSizeType_NONE },
647  { XML_TRUE, drawing::TextFitToSizeType_PROPORTIONAL },
648  { XML_ALL, drawing::TextFitToSizeType_ALLLINES },
649  { XML_SHRINK_TO_FIT,drawing::TextFitToSizeType_AUTOFIT },
650  { XML_TOKEN_INVALID, drawing::TextFitToSizeType(0) }
651 };
652 
654 {
655  { XML_FALSE, drawing::TextFitToSizeType_NONE },
656  { XML_FALSE, drawing::TextFitToSizeType_PROPORTIONAL },
657  { XML_FALSE, drawing::TextFitToSizeType_ALLLINES },
658  { XML_TRUE, drawing::TextFitToSizeType_AUTOFIT },
659  { XML_TOKEN_INVALID, drawing::TextFitToSizeType(0) }
660 };
661 
663 {
664  { XML_AUTOMATIC, 0 },
665  { XML_MM, 1 },
666  { XML_UNIT_CM, 2 },
667  { XML_UNIT_M, 3 },
668  { XML_KM, 4 },
669  { XML_UNIT_PT, 6 },
670  { XML_UNIT_PC, 7 },
671  { XML_IN, 8 },
672  { XML_UNIT_FOOT, 9 },
673  { XML_MI, 10 },
674  { XML_TOKEN_INVALID,0 }
675 };
676 
678 {
679  { XML_AUTOMATIC, drawing::MeasureTextHorzPos_AUTO },
680  { XML_LEFT_OUTSIDE, drawing::MeasureTextHorzPos_LEFTOUTSIDE },
681  { XML_INSIDE, drawing::MeasureTextHorzPos_INSIDE },
682  { XML_RIGHT_OUTSIDE, drawing::MeasureTextHorzPos_RIGHTOUTSIDE},
683  { XML_TOKEN_INVALID, drawing::MeasureTextHorzPos(0) }
684 };
685 
687 {
688  { XML_AUTOMATIC, drawing::MeasureTextVertPos_AUTO },
689  { XML_ABOVE, drawing::MeasureTextVertPos_EAST },
690  { XML_BELOW, drawing::MeasureTextVertPos_WEST },
691  { XML_CENTER, drawing::MeasureTextVertPos_CENTERED },
692  { XML_TOKEN_INVALID, drawing::MeasureTextVertPos(0) }
693 };
694 
695 // #FontWork#
697 {
698  { XML_ROTATE, 0 }, //XFormTextStyle::Rotate,
699  { XML_UPRIGHT, 1 }, //XFormTextStyle::Upright,
700  { XML_SLANT_X, 2 }, //XFormTextStyle::SlantX,
701  { XML_SLANT_Y, 3 }, //XFormTextStyle::SlantY,
702  { XML_NONE, 4 }, //XFormTextStyle::NONE
703  { XML_TOKEN_INVALID,0 }
704 };
705 
707 {
708  { XML_LEFT, 0 }, //XFormTextAdjust::Left,
709  { XML_RIGHT, 1 }, //XFormTextAdjust::Right,
710  { XML_AUTOSIZE, 2 }, //XFormTextAdjust::AutoSize,
711  { XML_CENTER, 3 }, //XFormTextAdjust::Center
712  { XML_TOKEN_INVALID,0 }
713 };
714 
716 {
717  { XML_NORMAL, 0 }, //XFormTextShadow::Normal,
718  { XML_SLANT, 1 }, //XFormTextShadow::Slant,
719  { XML_NONE, 2 }, //XFormTextShadow::NONE
720  { XML_TOKEN_INVALID,0 }
721 };
722 
724 {
725  { XML_NONE, 0 }, //XFTFORM_NONE,
726  { XML_TOPCIRCLE, 1 }, //XFTFORM_TOPCIRC,
727  { XML_BOTTOMCIRCLE, 2 }, //XFTFORM_BOTCIRC,
728  { XML_LEFTCIRCLE, 3 }, //XFTFORM_LFTCIRC,
729  { XML_RIGHTCIRCLE, 4 }, //XFTFORM_RGTCIRC,
730  { XML_TOPARC, 5 }, //XFTFORM_TOPARC,
731  { XML_BOTTOMARC, 6 }, //XFTFORM_BOTARC,
732  { XML_LEFTARC, 7 }, //XFTFORM_LFTARC,
733  { XML_RIGHTARC, 8 }, //XFTFORM_RGTARC,
734  { XML_BUTTON1, 9 }, //XFTFORM_BUTTON1,
735  { XML_BUTTON2, 10 }, //XFTFORM_BUTTON2,
736  { XML_BUTTON3, 11 }, //XFTFORM_BUTTON3,
737  { XML_BUTTON4, 12 }, //XFTFORM_BUTTON4
738  { XML_TOKEN_INVALID,0 }
739 };
740 
742 {
743  { XML_HORIZONTAL, 0 }, //SdrCaptionEscDir::Horizontal,
744  { XML_VERTICAL, 1 }, //SdrCaptionEscDir::Vertical,
745  { XML_AUTO, 2 }, //SdrCaptionEscDir::BestFit,
746  { XML_TOKEN_INVALID,0 }
747 };
748 
750 {
751  { XML_STRAIGHT_LINE, 0 }, //SdrCaptionType::Type1,
752  { XML_ANGLED_LINE, 1 }, //SdrCaptionType::Type2,
753  { XML_ANGLED_CONNECTOR_LINE, 2 }, //SdrCaptionType::Type3,
754  { XML_TOKEN_INVALID,0 }
755 };
756 
757 namespace {
758 
759 class XMLCaptionEscapeRelative : public XMLPropertyHandler
760 {
761 public:
762  virtual bool importXML(
763  const OUString& rStrImpValue,
764  css::uno::Any& rValue,
765  const SvXMLUnitConverter& rUnitConverter ) const override;
766  virtual bool exportXML(
767  OUString& rStrExpValue,
768  const css::uno::Any& rValue,
769  const SvXMLUnitConverter& rUnitConverter ) const override;
770 };
771 
772 }
773 
774 bool XMLCaptionEscapeRelative::importXML( const OUString& rStrImpValue, Any& rValue, const SvXMLUnitConverter& ) const
775 {
776  sal_Int32 nValue;
777 
778  if (!::sax::Converter::convertPercent( nValue, rStrImpValue ))
779  return false;
780 
781  nValue *= 100;
782  rValue <<= nValue;
783  return true;
784 }
785 
786 bool XMLCaptionEscapeRelative::exportXML( OUString& rStrExpValue, const Any& rValue, const SvXMLUnitConverter& ) const
787 {
788  sal_Int32 nValue = 0;
789  if( !(rValue >>= nValue ) )
790  return false;
791 
792  nValue /= 100;
793  OUStringBuffer aOut;
794  ::sax::Converter::convertPercent( aOut, nValue );
795  rStrExpValue = aOut.makeStringAndClear();
796  return true;
797 }
798 
799 namespace {
800 
801 class XMLMoveSizeProtectHdl : public XMLPropertyHandler
802 {
803 public:
804  explicit XMLMoveSizeProtectHdl( sal_Int32 nType ) : mnType( nType ) {}
805 
806  virtual bool importXML(
807  const OUString& rStrImpValue,
808  css::uno::Any& rValue,
809  const SvXMLUnitConverter& rUnitConverter ) const override;
810  virtual bool exportXML(
811  OUString& rStrExpValue,
812  const css::uno::Any& rValue,
813  const SvXMLUnitConverter& rUnitConverter ) const override;
814 private:
815  const sal_Int32 mnType;
816 };
817 
818 }
819 
820 bool XMLMoveSizeProtectHdl::importXML( const OUString& rStrImpValue, Any& rValue, const SvXMLUnitConverter& ) const
821 {
822  const bool bValue = rStrImpValue.indexOf( GetXMLToken( mnType == XML_SD_TYPE_MOVE_PROTECT ? XML_POSITION : XML_SIZE ) ) != -1;
823  rValue <<= bValue;
824  return true;
825 }
826 
827 bool XMLMoveSizeProtectHdl::exportXML( OUString& rStrExpValue, const Any& rValue, const SvXMLUnitConverter& ) const
828 {
829  bool bValue;
830  if( !(rValue >>= bValue ) )
831  return false;
832 
833  if( bValue )
834  {
835  if( !rStrExpValue.isEmpty() )
836  rStrExpValue += " ";
837 
838  rStrExpValue += GetXMLToken( mnType == XML_SD_TYPE_MOVE_PROTECT ? XML_POSITION : XML_SIZE );
839  }
840 
841  return true;
842 }
843 
844 namespace {
845 
846 class XMLSdHeaderFooterVisibilityTypeHdl : public XMLPropertyHandler
847 {
848 public:
849  virtual bool importXML( const OUString& rStrImpValue, css::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const override;
850  virtual bool exportXML( OUString& rStrExpValue, const css::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const override;
851 };
852 
853 }
854 
856  const OUString& rStrImpValue,
857  css::uno::Any& rValue,
858  const SvXMLUnitConverter& ) const
859 {
860  // #i38644#
861  // attributes with this type where saved with VISIBLE|HIDDEN prior
862  // to src680m67. So we have to import that correctly
863  const bool bBool = IsXMLToken(rStrImpValue, XML_TRUE) || IsXMLToken(rStrImpValue, XML_VISIBLE);
864  rValue <<= bBool;
865  return bBool || IsXMLToken(rStrImpValue, XML_FALSE) || IsXMLToken(rStrImpValue, XML_HIDDEN);
866 }
867 
869  OUString& rStrExpValue,
870  const Any& rValue,
871  const SvXMLUnitConverter& ) const
872 {
873  bool bRet = false;
874  bool bValue;
875 
876  if (rValue >>= bValue)
877  {
878  OUStringBuffer aOut;
879  ::sax::Converter::convertBool( aOut, bValue );
880  rStrExpValue = aOut.makeStringAndClear();
881 
882  bRet = true;
883  }
884 
885  return bRet;
886 }
887 
888 namespace {
889 
890 class XMLSdRotationAngleTypeHdl : public XMLPropertyHandler
891 {
892 public:
893  virtual bool importXML(const OUString& rStrImpValue, css::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter) const override;
894  virtual bool exportXML(OUString& rStrExpValue, const css::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter) const override;
895 };
896 
897 }
898 
900  const OUString& rStrImpValue,
901  css::uno::Any& rValue,
902  const SvXMLUnitConverter&) const
903 {
904  sal_Int32 nValue;
905  bool const bRet = ::sax::Converter::convertNumber(nValue, rStrImpValue);
906  if (bRet)
907  {
908  nValue = (nValue % 360);
909  if (nValue < 0)
910  nValue = 360 + nValue;
911  sal_Int32 nAngle;
912  if (nValue < 45 || nValue > 315)
913  nAngle = 0;
914  else if (nValue < 180)
915  nAngle = 9000;
916  else /* if nValue <= 315 ) */
917  nAngle = 27000;
918 
919  rValue <<= nAngle;
920  }
921  return bRet;
922 }
923 
925  OUString& rStrExpValue,
926  const Any& rValue,
927  const SvXMLUnitConverter&) const
928 {
929  sal_Int32 nAngle;
930  bool bRet = (rValue >>= nAngle) && nAngle != 0;
931  if (bRet)
932  {
933  rStrExpValue = OUString::number(nAngle / 100);
934  }
935  return bRet;
936 }
937 
938 namespace {
939 
940 class XMLFitToSizeEnumPropertyHdl : public XMLEnumPropertyHdl
941 {
942 public:
943  XMLFitToSizeEnumPropertyHdl(
945  : XMLEnumPropertyHdl(pMap) {}
946 
947  virtual bool importXML(const OUString& rStrImpValue, uno::Any& rValue,
948  const SvXMLUnitConverter& rUC) const override
949  {
950  // we don't know here what the actual attribute name is -
951  // but we can combine the 2 attributes by just taking the
952  // "largest" result value; this can never result in ALLLINES
953  // so the implementation has to interpret PROPORTIONAL as ALLLINES;
954  // both "true" is invalid anyway.
955  Any any;
956  auto const bRet = XMLEnumPropertyHdl::importXML(rStrImpValue, any, rUC);
957  if (!bRet)
958  {
959  return false;
960  }
961  assert(any.hasValue());
962  if (!rValue.hasValue() ||
963  rValue.get<drawing::TextFitToSizeType>() < any.get<drawing::TextFitToSizeType>())
964  {
965  rValue = any;
966  }
967  return true;
968  }
969 };
970 
971 }
972 
973 XMLSdPropHdlFactory::XMLSdPropHdlFactory( uno::Reference< frame::XModel > const & xModel, SvXMLImport& rImport )
974 : mxModel( xModel ), mpExport(nullptr), mpImport( &rImport )
975 {
976 }
977 
978 XMLSdPropHdlFactory::XMLSdPropHdlFactory( uno::Reference< frame::XModel > const & xModel, SvXMLExport& rExport )
979 : mxModel( xModel ), mpExport( &rExport ), mpImport(nullptr)
980 {
981 }
982 
984 {
985 }
986 
988 {
990  if(!pHdl)
991  {
992  switch(nType)
993  {
994  case XML_SD_TYPE_STROKE :
995  {
996  pHdl = new XMLEnumPropertyHdl( aXML_LineStyle_EnumMap);
997  break;
998  }
999  case XML_SD_TYPE_LINEJOIN :
1000  {
1001  pHdl = new XMLEnumPropertyHdl( aXML_LineJoint_EnumMap);
1002  break;
1003  }
1004  case XML_SD_TYPE_LINECAP :
1005  {
1006  pHdl = new XMLEnumPropertyHdl( aXML_LineCap_EnumMap );
1007  break;
1008  }
1009  case XML_SD_TYPE_FILLSTYLE :
1010  {
1011  pHdl = new XMLEnumPropertyHdl( aXML_FillStyle_EnumMap );
1012  break;
1013  }
1015  {
1016  pHdl = new XMLEnumPropertyHdl( aXML_PresChange_EnumMap );
1017  break;
1018  }
1020  {
1022  break;
1023  }
1024  case XML_TYPE_SD_MIRROR:
1025  {
1027  break;
1028  }
1030  {
1031  pHdl = new XMLEnumPropertyHdl( aXML_FadeEffect_EnumMap );
1032  break;
1033  }
1035  {
1036  pHdl = new XMLEnumPropertyHdl( aXML_TransSpeed_EnumMap );
1037  break;
1038  }
1040  {
1041  pHdl = new XMLDurationPropertyHdl;
1042  break;
1043  }
1045  {
1047  break;
1048  }
1049  case XML_SD_TYPE_OPACITY :
1050  {
1051  pHdl = new XMLOpacityPropertyHdl(mpImport);
1052  break;
1053  }
1055  {
1056  pHdl = new XMLEnumPropertyHdl( aXML_WritingMode_EnumMap );
1057  break;
1058  }
1060  {
1062  break;
1063  }
1065  {
1067  break;
1068  }
1069 
1070  // 3D Properties
1071 
1073  {
1074  // #87922# DoubleSided -> BackfaceCulling
1075  // This sal_Bool needs to be flipped, DoubleSided sal_True -> NO Backface culling
1076  // and vice versa.
1078  break;
1079  }
1080 
1082  {
1083  pHdl = new XMLEnumPropertyHdl( aXML_NormalsKind_EnumMap );
1084  break;
1085  }
1087  {
1089  break;
1090  }
1092  {
1093  pHdl = new XMLEnumPropertyHdl( aXML_TexGenerationX_EnumMap );
1094  break;
1095  }
1097  {
1098  pHdl = new XMLEnumPropertyHdl( aXML_TexGenerationY_EnumMap );
1099  break;
1100  }
1101  case XML_SD_TYPE_TEX_KIND:
1102  {
1103  pHdl = new XMLEnumPropertyHdl( aXML_TexKind_EnumMap );
1104  break;
1105  }
1106  case XML_SD_TYPE_TEX_MODE:
1107  {
1108  pHdl = new XMLEnumPropertyHdl( aXML_TexMode_EnumMap );
1109  break;
1110  }
1111  case XML_SD_TYPE_NUMBULLET:
1112  {
1113  uno::Reference<ucb::XAnyCompareFactory> xCompareFac( mxModel, uno::UNO_QUERY );
1114  uno::Reference<ucb::XAnyCompare> xCompare;
1115  if( xCompareFac.is() )
1116  xCompare = xCompareFac->createAnyCompareByName( "NumberingRules" );
1117 
1118  pHdl = new XMLNumRulePropHdl( xCompare );
1119  break;
1120  }
1122  {
1123  pHdl = new XMLEnumPropertyHdl( aXML_BitmapMode_EnumMap );
1124  break;
1125  }
1128  {
1130  break;
1131  }
1133  {
1134  pHdl = new XMLFillBitmapSizePropertyHandler();
1135  break;
1136  }
1138  {
1140  break;
1141  }
1143  {
1144  pHdl = new XMLEnumPropertyHdl( aXML_RefPoint_EnumMap);
1145  break;
1146  }
1148  pHdl = new XMLEnumPropertyHdl( pXML_TextAnimation_Enum);
1149  break;
1151  pHdl = new XMLEnumPropertyHdl( pXML_TextAnimation_Blinking_Enum);
1152  break;
1154  pHdl = new XMLEnumPropertyHdl( pXML_TextAnimationDirection_Enum);
1155  break;
1158  break;
1160  pHdl = new XMLEnumPropertyHdl( pXML_TextAlign_Enum);
1161  break;
1163  pHdl = new XMLEnumPropertyHdl( pXML_VerticalAlign_Enum);
1164  break;
1165  case XML_SD_TYPE_FITTOSIZE:
1166  {
1167  if (mpExport
1168  && (mpExport->getSaneDefaultVersion() // tdf#97630
1170  {
1171  pHdl = new XMLFitToSizeEnumPropertyHdl(pXML_FitToSize_Enum_Odf12);
1172  }
1173  else
1174  { // import all values written by old LO
1175  pHdl = new XMLFitToSizeEnumPropertyHdl(pXML_FitToSize_Enum);
1176  }
1177  }
1178  break;
1180  {
1181  pHdl = new XMLFitToSizeEnumPropertyHdl(pXML_ShrinkToFit_Enum);
1182  }
1183  break;
1185  pHdl = new XMLEnumPropertyHdl( pXML_MeasureUnit_Enum );
1186  break;
1188  pHdl = new XMLEnumPropertyHdl( pXML_Measure_HAlign_Enum);
1189  break;
1191  pHdl = new XMLEnumPropertyHdl( pXML_Measure_VAlign_Enum);
1192  break;
1194  {
1196  }
1197  break;
1198  case XML_TYPE_TEXT_CLIP11:
1199  pHdl = new XMLClipPropertyHandler( true );
1200  break;
1201  case XML_TYPE_TEXT_CLIP:
1202  pHdl = new XMLClipPropertyHandler( false );
1203  break;
1204 
1205  // #FontWork#
1207  pHdl = new XMLEnumPropertyHdl( pXML_Fontwork_Style_Enum );
1208  break;
1210  pHdl = new XMLEnumPropertyHdl( pXML_Fontwork_Adjust_Enum );
1211  break;
1213  pHdl = new XMLEnumPropertyHdl( pXML_Fontwork_Shadow_Enum );
1214  break;
1216  pHdl = new XMLEnumPropertyHdl( pXML_Fontwork_Form_Enum );
1217  break;
1218 
1220  pHdl = new ::xmloff::OControlBorderHandler( ::xmloff::OControlBorderHandler::STYLE );
1221  break;
1223  pHdl = new ::xmloff::OControlBorderHandler( ::xmloff::OControlBorderHandler::COLOR );
1224  break;
1226  pHdl = new ::xmloff::ImageScaleModeHandler;
1227  break;
1229  pHdl = new ::xmloff::OControlTextEmphasisHandler;
1230  break;
1231 
1233  {
1235  break;
1236  }
1238  pHdl = new XMLIsPercentagePropertyHandler;
1239  break;
1241  pHdl = new XMLCaptionEscapeRelative;
1242  break;
1245  break;
1247  pHdl = new XMLEnumPropertyHdl( pXML_Caption_Esc_Dir_Enum );
1248  break;
1250  pHdl = new XMLEnumPropertyHdl( pXML_Caption_Type_Enum );
1251  break;
1254  break;
1256  pHdl = new XMLDateTimeFormatHdl( mpExport );
1257  break;
1260  break;
1263  break;
1266  break;
1267  case XML_TYPE_WRAP_OPTION:
1268  pHdl = new XMLWordWrapPropertyHdl( mpImport );
1269  break;
1270 
1273  pHdl = new XMLMoveSizeProtectHdl( nType );
1274  break;
1276  pHdl = new XMLSdHeaderFooterVisibilityTypeHdl;
1277  break;
1279  pHdl = new XMLSdRotationAngleTypeHdl;
1280  break;
1281  case XML_TYPE_TEXT_COLUMNS:
1282  pHdl = new XMLTextColumnsPropertyHandler;
1283  break;
1284  }
1285 
1286  if(pHdl)
1287  PutHdlCache(nType, pHdl);
1288  }
1289 
1290  return pHdl;
1291 }
1292 
1294  bool bForExport)
1295 : XMLPropertySetMapper( aXMLSDProperties, rFactoryRef, bForExport )
1296 {
1297 }
1298 
1300 {
1301 }
1302 
1304 : SvXMLExportPropertyMapper( rMapper )
1305 , maNumRuleExp( rExport )
1306 , mbIsInAutoStyles( true )
1307 {
1308 }
1309 
1311 {
1312 }
1313 
1315  bool bEnableFoFontFamily,
1316  std::vector< XMLPropertyState >& rProperties,
1317  const uno::Reference< beans::XPropertySet >& rPropSet ) const
1318 {
1319  XMLPropertyState* pRepeatOffsetX = nullptr;
1320  XMLPropertyState* pRepeatOffsetY = nullptr;
1321  XMLPropertyState* pTextAnimationBlinking = nullptr;
1322  XMLPropertyState* pTextAnimationKind = nullptr;
1323 
1324  // #FontWork#
1325  XMLPropertyState* pFontWorkStyle = nullptr;
1326  XMLPropertyState* pFontWorkAdjust = nullptr;
1327  XMLPropertyState* pFontWorkDistance = nullptr;
1328  XMLPropertyState* pFontWorkStart = nullptr;
1329  XMLPropertyState* pFontWorkMirror = nullptr;
1330  XMLPropertyState* pFontWorkOutline = nullptr;
1331  XMLPropertyState* pFontWorkShadow = nullptr;
1332  XMLPropertyState* pFontWorkShadowColor = nullptr;
1333  XMLPropertyState* pFontWorkShadowOffsetx = nullptr;
1334  XMLPropertyState* pFontWorkShadowOffsety = nullptr;
1335  XMLPropertyState* pFontWorkForm = nullptr;
1336  XMLPropertyState* pFontWorkHideform = nullptr;
1337  XMLPropertyState* pFontWorkShadowTransparence = nullptr;
1338 
1339  // OLE
1340  XMLPropertyState* pOLEVisAreaLeft = nullptr;
1341  XMLPropertyState* pOLEVisAreaTop = nullptr;
1342  XMLPropertyState* pOLEVisAreaWidth = nullptr;
1343  XMLPropertyState* pOLEVisAreaHeight = nullptr;
1344  XMLPropertyState* pOLEIsInternal = nullptr;
1345 
1346  // caption
1347  XMLPropertyState* pCaptionIsEscRel = nullptr;
1348  XMLPropertyState* pCaptionEscRel = nullptr;
1349  XMLPropertyState* pCaptionEscAbs = nullptr;
1350 
1351  // filter fo:clip
1352  XMLPropertyState* pClip11State = nullptr;
1353  XMLPropertyState* pClipState = nullptr;
1354 
1355  XMLPropertyState* pShapeWritingMode = nullptr;
1356  XMLPropertyState* pTextWritingMode = nullptr;
1357  XMLPropertyState* pControlWritingMode = nullptr;
1358 
1359  // filter properties
1360  for( auto& rProp : rProperties )
1361  {
1362  XMLPropertyState *property = &rProp;
1363  if( property->mnIndex == -1 )
1364  continue;
1365 
1366  // find properties with context
1367  // to prevent writing this property set mnIndex member to -1
1368  switch( getPropertySetMapper()->GetEntryContextId( property->mnIndex ))
1369  {
1370  case CTF_NUMBERINGRULES:
1371  {
1372  if( mbIsInAutoStyles )
1373  property->mnIndex = -1;
1374  }
1375  break;
1377  {
1378  // this property is not exported in the style:properties element
1379  // because it's an XIndexAccess and not a string.
1380  // This will be handled in SvXMLAutoStylePoolP::exportStyleAttributes
1381  // This is suboptimal
1382  if( !mbIsInAutoStyles )
1383  property->mnIndex = -1;
1384  }
1385  break;
1386  case CTF_WRITINGMODE:
1387  pShapeWritingMode = property;
1388  break;
1390  pControlWritingMode = property;
1391  break;
1392  case CTF_TEXTWRITINGMODE:
1393  pTextWritingMode = property;
1394  break;
1395  case CTF_REPEAT_OFFSET_X:
1396  pRepeatOffsetX = property;
1397  break;
1398 
1399  case CTF_REPEAT_OFFSET_Y:
1400  pRepeatOffsetY = property;
1401  break;
1402 
1403  case CTF_DASHNAME:
1404  case CTF_FILLGRADIENTNAME:
1405  case CTF_FILLHATCHNAME:
1406  case CTF_FILLBITMAPNAME:
1407  {
1408  OUString aStr;
1409  if( (property->maValue >>= aStr) && aStr.isEmpty() )
1410  property->mnIndex = -1;
1411  }
1412  break;
1414  pTextAnimationBlinking = property;
1415  break;
1417  pTextAnimationKind = property;
1418  break;
1419 
1420  // #FontWork#
1421  case CTF_FONTWORK_STYLE: pFontWorkStyle = property; break;
1422  case CTF_FONTWORK_ADJUST: pFontWorkAdjust = property; break;
1423  case CTF_FONTWORK_DISTANCE: pFontWorkDistance = property; break;
1424  case CTF_FONTWORK_START: pFontWorkStart = property; break;
1425  case CTF_FONTWORK_MIRROR: pFontWorkMirror = property; break;
1426  case CTF_FONTWORK_OUTLINE: pFontWorkOutline = property; break;
1427  case CTF_FONTWORK_SHADOW: pFontWorkShadow = property; break;
1428  case CTF_FONTWORK_SHADOWCOLOR: pFontWorkShadowColor = property; break;
1429  case CTF_FONTWORK_SHADOWOFFSETX: pFontWorkShadowOffsetx = property; break;
1430  case CTF_FONTWORK_SHADOWOFFSETY: pFontWorkShadowOffsety = property; break;
1431  case CTF_FONTWORK_FORM: pFontWorkForm = property; break;
1432  case CTF_FONTWORK_HIDEFORM: pFontWorkHideform = property; break;
1433  case CTF_FONTWORK_SHADOWTRANSPARENCE: pFontWorkShadowTransparence = property; break;
1434 
1435  // OLE
1436  case CTF_SD_OLE_VIS_AREA_EXPORT_LEFT: pOLEVisAreaLeft = property; break;
1437  case CTF_SD_OLE_VIS_AREA_EXPORT_TOP: pOLEVisAreaTop = property; break;
1438  case CTF_SD_OLE_VIS_AREA_EXPORT_WIDTH: pOLEVisAreaWidth = property; break;
1439  case CTF_SD_OLE_VIS_AREA_EXPORT_HEIGHT: pOLEVisAreaHeight = property; break;
1440  case CTF_SD_OLE_ISINTERNAL: pOLEIsInternal = property; break;
1441 
1443  {
1444  if( !property->maValue.hasValue() )
1445  property->mnIndex = -1;
1446  }
1447  break;
1448  case CTF_FRAME_MARGIN_HORI:
1449  case CTF_FRAME_MARGIN_VERT:
1450  {
1451  sal_Int32 nValue = 0;
1452  if( (property->maValue >>= nValue) && (nValue < 0) )
1453  property->mnIndex = -1;
1454  }
1455  break;
1456 
1457  case CTF_SD_MOVE_PROTECT:
1458  {
1459  bool bProtected;
1460  if( (property->maValue >>= bProtected) && !bProtected )
1461  property->mnIndex = -1;
1462  }
1463  break;
1464  case CTF_SD_SIZE_PROTECT:
1465  {
1466  bool bProtected;
1467  if( (property->maValue >>= bProtected) && !bProtected )
1468  property->mnIndex = -1;
1469  }
1470  break;
1471  case CTF_CAPTION_ISESCREL: pCaptionIsEscRel = property; break;
1472  case CTF_CAPTION_ESCREL: pCaptionEscRel = property; break;
1473  case CTF_CAPTION_ESCABS: pCaptionEscAbs = property; break;
1474  case CTF_TEXT_CLIP11: pClip11State = property; break;
1475  case CTF_TEXT_CLIP: pClipState = property; break;
1476  }
1477  }
1478 
1479  // check for duplicate writing mode
1480  if( pShapeWritingMode && (pTextWritingMode || pControlWritingMode) )
1481  {
1482  if( pTextWritingMode )
1483  pTextWritingMode->mnIndex = -1;
1484  if( pControlWritingMode )
1485  pControlWritingMode->mnIndex = -1;
1486 
1487  text::WritingMode eWritingMode;
1488  if( pShapeWritingMode->maValue >>= eWritingMode )
1489  {
1490  if( text::WritingMode_LR_TB == eWritingMode )
1491  {
1492  pShapeWritingMode->mnIndex = -1;
1493  pShapeWritingMode = nullptr;
1494  }
1495  }
1496  }
1497  else if( pTextWritingMode && pControlWritingMode )
1498  {
1499  pControlWritingMode->mnIndex = -1;
1500 
1501  sal_Int32 eWritingMode;
1502  if (pTextWritingMode->maValue >>= eWritingMode)
1503  {
1504  if (text::WritingMode2::LR_TB == eWritingMode)
1505  {
1506  pTextWritingMode->mnIndex = -1;
1507  pTextWritingMode = nullptr;
1508  }
1509  }
1510  }
1511 
1512  // do not export visual area for internal ole objects
1513  if( pOLEIsInternal )
1514  {
1515  bool bInternal;
1516  if( (pOLEIsInternal->maValue >>= bInternal) && !bInternal )
1517  {
1518  try
1519  {
1520  awt::Rectangle aRect;
1521  if( rPropSet->getPropertyValue( "VisibleArea" ) >>= aRect )
1522  {
1523  if( pOLEVisAreaLeft )
1524  {
1525  pOLEVisAreaLeft->mnIndex = getPropertySetMapper()->FindEntryIndex( CTF_SD_OLE_VIS_AREA_IMPORT_LEFT );
1526  pOLEVisAreaLeft->maValue <<= aRect;
1527  }
1528  if( pOLEVisAreaTop )
1529  {
1530  pOLEVisAreaTop->mnIndex = getPropertySetMapper()->FindEntryIndex( CTF_SD_OLE_VIS_AREA_IMPORT_TOP );
1531  pOLEVisAreaTop->maValue <<= aRect;
1532  }
1533  if( pOLEVisAreaWidth )
1534  {
1535  pOLEVisAreaWidth->mnIndex = getPropertySetMapper()->FindEntryIndex( CTF_SD_OLE_VIS_AREA_IMPORT_WIDTH );
1536  pOLEVisAreaWidth->maValue <<= aRect;
1537  }
1538  if( pOLEVisAreaHeight )
1539  {
1540  pOLEVisAreaHeight->mnIndex = getPropertySetMapper()->FindEntryIndex( CTF_SD_OLE_VIS_AREA_IMPORT_HEIGHT );
1541  pOLEVisAreaHeight->maValue <<= aRect;
1542  }
1543  }
1544  }
1545  catch( uno::Exception& )
1546  {
1547  }
1548  }
1549  else
1550  {
1551  if( pOLEVisAreaLeft ) pOLEVisAreaLeft->mnIndex = -1;
1552  if( pOLEVisAreaTop ) pOLEVisAreaTop->mnIndex = -1;
1553  if( pOLEVisAreaWidth ) pOLEVisAreaWidth->mnIndex = -1;
1554  if( pOLEVisAreaHeight ) pOLEVisAreaHeight->mnIndex = -1;
1555  }
1556 
1557  pOLEIsInternal->mnIndex = -1;
1558  }
1559 
1560  if( pTextAnimationBlinking && pTextAnimationKind )
1561  {
1562  drawing::TextAnimationKind eKind;
1563  if( (pTextAnimationKind->maValue >>= eKind) && eKind != drawing::TextAnimationKind_BLINK )
1564  {
1565  pTextAnimationBlinking->mnIndex = -1;
1566  }
1567  else
1568  {
1569  pTextAnimationKind->mnIndex = -1;
1570  }
1571  }
1572 
1573  if( pRepeatOffsetX && pRepeatOffsetY )
1574  {
1575  sal_Int32 nOffset = 0;
1576  if( ( pRepeatOffsetX->maValue >>= nOffset ) && ( nOffset == 0 ) )
1577  pRepeatOffsetX->mnIndex = -1;
1578  else
1579  pRepeatOffsetY->mnIndex = -1;
1580  }
1581 
1582  if(pFontWorkStyle)
1583  {
1584  // #FontWork#
1585  sal_Int32 nStyle = 0;
1586 
1587  if(pFontWorkStyle->maValue >>= nStyle)
1588  {
1589  if(/*XFormTextStyle::NONE*/4 == nStyle)
1590  {
1591  pFontWorkStyle->mnIndex = -1;
1592  if(pFontWorkAdjust)
1593  pFontWorkAdjust->mnIndex = -1;
1594  if(pFontWorkDistance)
1595  pFontWorkDistance->mnIndex = -1;
1596  if(pFontWorkStart)
1597  pFontWorkStart->mnIndex = -1;
1598  if(pFontWorkMirror)
1599  pFontWorkMirror->mnIndex = -1;
1600  if(pFontWorkOutline)
1601  pFontWorkOutline->mnIndex = -1;
1602  if(pFontWorkShadow)
1603  pFontWorkShadow->mnIndex = -1;
1604  if(pFontWorkShadowColor)
1605  pFontWorkShadowColor->mnIndex = -1;
1606  if(pFontWorkShadowOffsetx)
1607  pFontWorkShadowOffsetx->mnIndex = -1;
1608  if(pFontWorkShadowOffsety)
1609  pFontWorkShadowOffsety->mnIndex = -1;
1610  if(pFontWorkForm)
1611  pFontWorkForm->mnIndex = -1;
1612  if(pFontWorkHideform)
1613  pFontWorkHideform->mnIndex = -1;
1614  if(pFontWorkShadowTransparence)
1615  pFontWorkShadowTransparence->mnIndex = -1;
1616  }
1617  }
1618  }
1619 
1620  if( pCaptionIsEscRel )
1621  {
1622  bool bIsRel = false;
1623  pCaptionIsEscRel->maValue >>= bIsRel;
1624 
1625  if( bIsRel )
1626  {
1627  if( pCaptionEscAbs )
1628  pCaptionEscAbs->mnIndex = -1;
1629  }
1630  else
1631  {
1632  if( pCaptionEscRel )
1633  pCaptionEscRel->mnIndex = -1;
1634  }
1635 
1636  pCaptionIsEscRel->mnIndex = -1;
1637  }
1638 
1639  if( pClipState != nullptr && pClip11State != nullptr )
1640  pClip11State->mnIndex = -1;
1641 
1642  SvXMLExportPropertyMapper::ContextFilter(bEnableFoFontFamily, rProperties, rPropSet);
1643 }
1644 
1646  SvXMLAttributeList& rAttrList,
1647  const XMLPropertyState& rProperty,
1648  const SvXMLUnitConverter& rUnitConverter,
1649  const SvXMLNamespaceMap& rNamespaceMap,
1650  const ::std::vector< XMLPropertyState > *pProperties,
1651  sal_uInt32 nIdx ) const
1652 {
1653  switch( getPropertySetMapper()->GetEntryContextId( rProperty.mnIndex ) )
1654  {
1656  // not to be handled by the base class
1657  break;
1658 
1659  default:
1660  SvXMLExportPropertyMapper::handleSpecialItem( rAttrList, rProperty, rUnitConverter, rNamespaceMap, pProperties, nIdx );
1661  break;
1662  }
1663 }
1664 
1666  SvXMLExport& rExport,
1667  const XMLPropertyState& rProperty,
1668  SvXmlExportFlags nFlags,
1669  const ::std::vector< XMLPropertyState > *pProperties,
1670  sal_uInt32 nIdx) const
1671 {
1672  switch( getPropertySetMapper()->GetEntryContextId( rProperty.mnIndex ) )
1673  {
1674  case CTF_NUMBERINGRULES:
1675  {
1676  // only export list-styles as elements in styles section
1677  if( !mbIsInAutoStyles )
1678  {
1679  uno::Reference< container::XIndexReplace > xNumRule( rProperty.maValue, uno::UNO_QUERY );
1680  if( xNumRule.is() )
1681  const_cast<XMLShapeExportPropertyMapper*>(this)->maNumRuleExp.exportNumberingRule(GetStyleName(), false, xNumRule);
1682  }
1683  }
1684  break;
1685  default:
1686  SvXMLExportPropertyMapper::handleElementItem( rExport, rProperty, nFlags, pProperties, nIdx );
1687  break;
1688  }
1689 }
1690 
1692  SvXMLExportPropertyMapper( rMapper ),
1693  mrExport( rExport )
1694 {
1695 }
1696 
1698 {
1699 }
1700 
1702  bool bEnableFoFontFamily,
1703  std::vector< XMLPropertyState >& rProperties,
1704  const uno::Reference< beans::XPropertySet >& rPropSet ) const
1705 {
1706  XMLPropertyState* pRepeatOffsetX = nullptr;
1707  XMLPropertyState* pRepeatOffsetY = nullptr;
1708  XMLPropertyState* pTransType = nullptr;
1709  XMLPropertyState* pTransDuration = nullptr;
1710  XMLPropertyState* pDateTimeUpdate = nullptr;
1711  XMLPropertyState* pDateTimeFormat = nullptr;
1712  XMLPropertyState* pTransitionFadeColor = nullptr;
1713 
1714  sal_Int16 nTransitionType = 0;
1715 
1716  // filter properties
1717  for( auto& rProp : rProperties )
1718  {
1719  XMLPropertyState *property = &rProp;
1720  if( property->mnIndex == -1 )
1721  continue;
1722 
1723  // find properties with context
1724  // to prevent writing this property set mnIndex member to -1
1725  switch( getPropertySetMapper()->GetEntryContextId( property->mnIndex ))
1726  {
1727 
1728  case CTF_REPEAT_OFFSET_X:
1729  pRepeatOffsetX = property;
1730  break;
1731 
1732  case CTF_REPEAT_OFFSET_Y:
1733  pRepeatOffsetY = property;
1734  break;
1735  case CTF_PAGE_TRANS_TYPE:
1736  pTransType = property;
1737  break;
1738  case CTF_PAGE_TRANS_STYLE:
1740  (*property).mnIndex = -1;
1741  break;
1743  {
1745  (((*property).maValue >>= nTransitionType) && (nTransitionType == 0)) )
1746  (*property).mnIndex = -1;
1747  }
1748  break;
1750  {
1751  sal_Int16 nTransitionSubtype = sal_Int16();
1753  (((*property).maValue >>= nTransitionSubtype) && (nTransitionSubtype == 0)) )
1754  (*property).mnIndex = -1;
1755 
1756  }
1757  break;
1759  {
1760  bool bDirection;
1762  (((*property).maValue >>= bDirection) && bDirection) )
1763  (*property).mnIndex = -1;
1764  }
1765  break;
1768  (*property).mnIndex = -1;
1769  else
1770  pTransitionFadeColor = property;
1771  break;
1772  case CTF_PAGE_TRANS_SPEED:
1773  {
1774  presentation::AnimationSpeed aEnum;
1775  if( ((*property).maValue >>= aEnum) && aEnum == presentation::AnimationSpeed_MEDIUM )
1776  (*property).mnIndex = -1;
1777  }
1778  break;
1779  case CTF_PAGE_VISIBLE:
1780  {
1781  bool bVisible = false;
1782  (*property).maValue >>= bVisible;
1783  if( bVisible )
1784  (*property).mnIndex = -1;
1785  }
1786  break;
1788  pTransDuration = property;
1789  break;
1790  case CTF_HEADER_TEXT:
1791  case CTF_FOOTER_TEXT:
1792  case CTF_DATE_TIME_TEXT:
1793  {
1794  OUString aValue;
1795  (*property).maValue >>= aValue;
1796  if( aValue.isEmpty() )
1797  (*property).mnIndex = -1;
1798  }
1799  break;
1800 
1801  case CTF_DATE_TIME_UPDATE:
1802  pDateTimeUpdate = property;
1803  break;
1804 
1805  case CTF_DATE_TIME_FORMAT:
1806  pDateTimeFormat = property;
1807  break;
1808  }
1809  }
1810 
1811  if( pTransitionFadeColor && nTransitionType != css::animations::TransitionType::FADE )
1812  pTransitionFadeColor->mnIndex = -1;
1813 
1814  if( pDateTimeFormat && pDateTimeUpdate )
1815  {
1816  bool bIsFixed = false;
1817  pDateTimeUpdate->maValue >>= bIsFixed;
1818  if( bIsFixed )
1819  pDateTimeFormat->mnIndex = -1;
1820  }
1821 
1822  if( pRepeatOffsetX && pRepeatOffsetY )
1823  {
1824  sal_Int32 nOffset = 0;
1825  if( ( pRepeatOffsetX->maValue >>= nOffset ) && ( nOffset == 0 ) )
1826  pRepeatOffsetX->mnIndex = -1;
1827  else
1828  pRepeatOffsetY->mnIndex = -1;
1829  }
1830 
1831  if( pTransType && pTransDuration )
1832  {
1833  sal_Int32 nChange = 0;
1834  pTransType->maValue >>= nChange;
1835 
1836  // only export duration for automatic
1837  if( nChange != 1 )
1838  pTransDuration->mnIndex = -1;
1839 
1840  // do not export default transition change
1841  if( nChange == 0 )
1842  pTransType->mnIndex = -1;
1843  }
1844 
1845  SvXMLExportPropertyMapper::ContextFilter(bEnableFoFontFamily, rProperties, rPropSet);
1846 }
1847 
1849  SvXMLExport& rExport,
1850  const XMLPropertyState& rProperty,
1851  SvXmlExportFlags nFlags,
1852  const ::std::vector< XMLPropertyState > *pProperties,
1853  sal_uInt32 nIdx) const
1854 {
1855  switch( getPropertySetMapper()->GetEntryContextId( rProperty.mnIndex ) )
1856  {
1857  case CTF_PAGE_SOUND_URL:
1858  {
1859  OUString aSoundURL;
1860  if( (rProperty.maValue >>= aSoundURL) && !aSoundURL.isEmpty() )
1861  {
1867  }
1868  }
1869  break;
1870  default:
1871  SvXMLExportPropertyMapper::handleElementItem( rExport, rProperty, nFlags, pProperties, nIdx );
1872  break;
1873  }
1874 }
1875 
1876 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SvXMLEnumMapEntry< drawing::TextAnimationKind > const pXML_TextAnimation_Blinking_Enum[]
Definition: sdpropls.cxx:597
#define XML_TYPE_TEXT_CLIP11
Definition: xmltypes.hxx:217
#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:437
#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:625
SvXMLEnumMapEntry< drawing::LineStyle > const aXML_LineStyle_EnumMap[]
Definition: sdpropls.cxx:384
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:741
#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:715
#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
const OUString & GetStyleName() const
Definition: xmlexppr.cxx:1123
virtual ~XMLShapeExportPropertyMapper() override
Definition: sdpropls.cxx:1310
#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:987
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:499
#define XML_TYPE_PERCENT16
Definition: xmltypes.hxx:131
const XMLPropertyMapEntry aXMLSDProperties[]
Definition: sdpropls.cxx:83
virtual ~XMLSdPropHdlFactory() override
Definition: sdpropls.cxx:983
#define CTF_LINEENDNAME
Definition: xmlsdtypes.hxx:136
SvXMLEnumMapEntry< drawing::RectanglePoint > const aXML_RefPoint_EnumMap[]
Definition: sdpropls.cxx:557
#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:1299
#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:264
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:587
#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:124
#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:1665
#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:534
SvXMLEnumMapEntry< drawing::TextFitToSizeType > const pXML_FitToSize_Enum_Odf12[]
Definition: sdpropls.cxx:635
#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:3510
#define CTF_FRAME_DISPLAY_SCROLLBAR
Definition: txtprmap.hxx:130
SvXMLEnumMapEntry< drawing::TextureKind > const aXML_TexKind_EnumMap[]
Definition: sdpropls.cxx:542
#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:321
#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:1645
#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:411
#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:250
#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:272
void AddAttribute(sal_uInt16 nPrefix, const OUString &rName, const OUString &rValue)
Definition: xmlexp.cxx:909
#define XML_TYPE_RECTANGLE_HEIGHT
Definition: xmltypes.hxx:161
#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:749
SvXMLEnumMapEntry< drawing::NormalsKind > const aXML_NormalsKind_EnumMap[]
Definition: sdpropls.cxx:518
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:677
#define CTF_PAGE_TRANS_SPEED
Definition: xmlsdtypes.hxx:131
SvXMLEnumMapEntry< sal_Int32 > const pXML_MeasureUnit_Enum[]
Definition: sdpropls.cxx:662
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:429
#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:371
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:723
#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:218
#define XML_SD_TYPE_BITMAPREPOFFSETX
Definition: xmlsdtypes.hxx:50
#define XML_TYPE_CONTROL_TEXT_EMPHASIZE
Definition: xmltypes.hxx:246
#define XML_TYPE_TEXT_ANIMATION_DIRECTION
Definition: xmltypes.hxx:238
#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:237
#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:607
XMLShapeExportPropertyMapper(const rtl::Reference< XMLPropertySetMapper > &rMapper, SvXMLExport &rExport)
Definition: sdpropls.cxx:1303
SvXMLEnumMapEntry< drawing::LineCap > const aXML_LineCap_EnumMap[]
Definition: sdpropls.cxx:402
#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:245
#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:1314
#define XML_SD_TYPE_FILLBITMAPSIZE
Definition: xmlsdtypes.hxx:52
SvXMLEnumMapEntry< drawing::TextFitToSizeType > const pXML_ShrinkToFit_Enum[]
Definition: sdpropls.cxx:653
#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:160
#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:526
#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:696
css::uno::Any maValue
Definition: maptype.hxx:125
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:508
#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:3454
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:1691
#define XML_TYPE_TEXT_COLUMNS
Definition: xmltypes.hxx:203
Smart struct to transport an Any with an index to the appropriate property-name.
Definition: maptype.hxx:122
#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:644
#define XML_SD_TYPE_CAPTION_ANGLE_TYPE
Definition: xmlsdtypes.hxx:90
Abstract base-class for different XML-types.
#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:549
SvXMLEnumMapEntry< sal_Int32 > const pXML_Fontwork_Adjust_Enum[]
Definition: sdpropls.cxx:706
SvXMLEnumMapEntry< drawing::LineJoint > const aXML_LineJoint_EnumMap[]
Definition: sdpropls.cxx:392
#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:616
#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:580
#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:1701
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
#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:571
XMLShapePropertySetMapper(const rtl::Reference< XMLPropertyHandlerFactory > &rFactoryRef, bool bForExport)
Definition: sdpropls.cxx:1293
#define CTF_PAGE_TRANSITION_SUBTYPE
Definition: xmlsdtypes.hxx:145
constexpr sal_uInt16 XML_NAMESPACE_STYLE
#define XML_TYPE_RECTANGLE_TOP
Definition: xmltypes.hxx:159
#define XML_TYPE_RECTANGLE_LEFT
Definition: xmltypes.hxx:158
SvXMLEnumMapEntry< drawing::MeasureTextVertPos > const pXML_Measure_VAlign_Enum[]
Definition: sdpropls.cxx:686
#define XML_TYPE_COLOR
Definition: xmltypes.hxx:133
#define CTF_SD_NUMBERINGRULES_NAME
Definition: contextid.hxx:36
virtual ~XMLPageExportPropertyMapper() override
Definition: sdpropls.cxx:1697
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:1848
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:421
#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