LCOV - code coverage report
Current view: top level - xmloff/source/draw - sdpropls.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 357 502 71.1 %
Date: 2015-06-13 12:38:46 Functions: 32 34 94.1 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.11