LCOV - code coverage report
Current view: top level - xmloff/source/draw - sdpropls.cxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 510 0.0 %
Date: 2014-04-14 Functions: 0 34 0.0 %
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             : 
     120             :     GMAP( "FillBitmapSizeX",                    XML_NAMESPACE_DRAW, XML_FILL_IMAGE_WIDTH,       XML_SD_TYPE_FILLBITMAPSIZE|MID_FLAG_MULTI_PROPERTY, 0 ),
     121             :     GMAP( "FillBitmapLogicalSize",          XML_NAMESPACE_DRAW, XML_FILL_IMAGE_WIDTH,       XML_SD_TYPE_LOGICAL_SIZE|MID_FLAG_MULTI_PROPERTY, 0 ),
     122             :     GMAP( "FillBitmapSizeY",                    XML_NAMESPACE_DRAW, XML_FILL_IMAGE_HEIGHT,      XML_SD_TYPE_FILLBITMAPSIZE|MID_FLAG_MULTI_PROPERTY, 0 ),
     123             :     GMAP( "FillBitmapLogicalSize",          XML_NAMESPACE_DRAW, XML_FILL_IMAGE_HEIGHT,      XML_SD_TYPE_LOGICAL_SIZE|MID_FLAG_MULTI_PROPERTY, 0 ),
     124             :     GMAP( "FillBitmapMode",                 XML_NAMESPACE_STYLE,XML_REPEAT,                 XML_SD_TYPE_BITMAP_MODE|MID_FLAG_MULTI_PROPERTY, 0 ),
     125             :     GMAP( "FillBitmapPositionOffsetX",      XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT_X, XML_TYPE_PERCENT, 0 ),
     126             :     GMAP( "FillBitmapPositionOffsetY",      XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT_Y, XML_TYPE_PERCENT, 0 ),
     127             :     GMAP( "FillBitmapRectanglePoint",       XML_NAMESPACE_DRAW, XML_FILL_IMAGE_REF_POINT,   XML_SD_TYPE_BITMAP_REFPOINT, 0 ),
     128             :     GMAP( "FillBitmapOffsetX",              XML_NAMESPACE_DRAW, XML_TILE_REPEAT_OFFSET,     XML_SD_TYPE_BITMAPREPOFFSETX|MID_FLAG_MULTI_PROPERTY, CTF_REPEAT_OFFSET_X ),
     129             :     GMAP( "FillBitmapOffsetY",              XML_NAMESPACE_DRAW, XML_TILE_REPEAT_OFFSET,     XML_SD_TYPE_BITMAPREPOFFSETY|MID_FLAG_MULTI_PROPERTY, CTF_REPEAT_OFFSET_Y ),
     130             : 
     131             :     // text frame attributes
     132             :     GMAP( "TextHorizontalAdjust",           XML_NAMESPACE_DRAW, XML_TEXTAREA_HORIZONTAL_ALIGN,  XML_SD_TYPE_TEXT_ALIGN, 0 ),
     133             :     GMAP( "TextVerticalAdjust",             XML_NAMESPACE_DRAW, XML_TEXTAREA_VERTICAL_ALIGN,    XML_SD_TYPE_VERTICAL_ALIGN, 0 ),
     134             :     GMAP( "TextAutoGrowHeight",             XML_NAMESPACE_DRAW, XML_AUTO_GROW_HEIGHT,       XML_TYPE_BOOL, 0 ),
     135             :     GMAP( "TextAutoGrowWidth",              XML_NAMESPACE_DRAW, XML_AUTO_GROW_WIDTH,        XML_TYPE_BOOL, 0 ),
     136             :     GMAP( "TextFitToSize",                  XML_NAMESPACE_DRAW, XML_FIT_TO_SIZE,            XML_SD_TYPE_FITTOSIZE, 0 ),
     137             :     GMAP( "TextContourFrame",               XML_NAMESPACE_DRAW, XML_FIT_TO_CONTOUR,         XML_TYPE_BOOL, 0 ),
     138             :     GMAP( "TextMaximumFrameHeight",         XML_NAMESPACE_FO,   XML_MAX_HEIGHT,             XML_TYPE_MEASURE, 0 ),
     139             :     GMAP( "TextMaximumFrameWidth",          XML_NAMESPACE_FO,   XML_MAX_WIDTH,              XML_TYPE_MEASURE, 0 ),
     140             :     GMAP( "TextMinimumFrameHeight",         XML_NAMESPACE_FO,   XML_MIN_HEIGHT,             XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, 0 ),  // exists in SW, too
     141             :     GMAP( "TextMinimumFrameWidth",          XML_NAMESPACE_FO,   XML_MIN_WIDTH,              XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, 0 ),
     142             :     GMAP( "TextUpperDistance",              XML_NAMESPACE_FO,   XML_PADDING_TOP,            XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, 0 ),  // exists in SW, too
     143             :     GMAP( "TextLowerDistance",              XML_NAMESPACE_FO,   XML_PADDING_BOTTOM,         XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, 0 ),  // exists in SW, too
     144             :     GMAP( "TextLeftDistance",               XML_NAMESPACE_FO,   XML_PADDING_LEFT,           XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, 0 ),  // exists in SW, too
     145             :     GMAP( "TextRightDistance",              XML_NAMESPACE_FO,   XML_PADDING_RIGHT,          XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, 0 ),  // exists in SW, too
     146             :     PMAP( "TextWritingMode",                XML_NAMESPACE_STYLE,XML_WRITING_MODE,           XML_SD_TYPE_WRITINGMODE|MID_FLAG_MULTI_PROPERTY, CTF_WRITINGMODE ),
     147             :     GMAP( "NumberingRules",                 XML_NAMESPACE_TEXT, XML_LIST_STYLE,             XML_SD_TYPE_NUMBULLET|MID_FLAG_ELEMENT_ITEM, CTF_NUMBERINGRULES ),
     148             :     GMAP( "NumberingRules",                 XML_NAMESPACE_TEXT, XML_LIST_STYLE_NAME,        XML_TYPE_STRING, CTF_SD_NUMBERINGRULES_NAME ),
     149             :     GMAP( "TextWordWrap",                   XML_NAMESPACE_FO,   XML_WRAP_OPTION,            XML_TYPE_WRAP_OPTION, 0 ),
     150             : 
     151             :     // shadow attributes
     152             :     GMAP( "Shadow",                         XML_NAMESPACE_DRAW, XML_SHADOW,                 XML_SD_TYPE_SHADOW, 0 ),
     153             :     GMAP( "ShadowXDistance",                    XML_NAMESPACE_DRAW, XML_SHADOW_OFFSET_X,        XML_TYPE_MEASURE, 0 ),
     154             :     GMAP( "ShadowYDistance",                    XML_NAMESPACE_DRAW, XML_SHADOW_OFFSET_Y,        XML_TYPE_MEASURE, 0 ),
     155             :     GMAP( "ShadowColor",                        XML_NAMESPACE_DRAW, XML_SHADOW_COLOR,           XML_TYPE_COLOR, 0 ),
     156             :     GMAP( "ShadowTransparence",             XML_NAMESPACE_DRAW, XML_SHADOW_OPACITY, XML_TYPE_NEG_PERCENT, 0 ),
     157             : 
     158             :     // graphic attributes
     159             :     GMAP( "GraphicColorMode",               XML_NAMESPACE_DRAW, XML_COLOR_MODE,             XML_TYPE_COLOR_MODE, 0 ), // exists in SW, too, with same property name
     160             :     GMAP( "AdjustLuminance",                XML_NAMESPACE_DRAW, XML_LUMINANCE,              XML_TYPE_PERCENT16, 0 ), // signed? exists in SW, too, with same property name
     161             :     GMAP( "AdjustContrast",                 XML_NAMESPACE_DRAW, XML_CONTRAST,               XML_TYPE_PERCENT16, 0 ), // signed? exists in SW, too, with same property name
     162             :     GMAP( "Gamma",                          XML_NAMESPACE_DRAW, XML_GAMMA,                  XML_TYPE_DOUBLE_PERCENT, 0 ), // signed? exists in SW, too, with same property name
     163             :     GMAP( "AdjustRed",                      XML_NAMESPACE_DRAW, XML_RED,                    XML_TYPE_PERCENT16, 0 ), // signed? exists in SW, too, with same property name
     164             :     GMAP( "AdjustGreen",                    XML_NAMESPACE_DRAW, XML_GREEN,                  XML_TYPE_PERCENT16, 0 ), // signed? exists in SW, too, with same property name
     165             :     GMAP( "AdjustBlue",                     XML_NAMESPACE_DRAW, XML_BLUE,                   XML_TYPE_PERCENT16, 0 ), // signed? exists in SW, too, with same property name
     166             :     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
     167             :     GMAP( "GraphicCrop",                    XML_NAMESPACE_FO,   XML_CLIP,                   XML_TYPE_TEXT_CLIP11, CTF_TEXT_CLIP11 ), // exists in SW, too, with same property name
     168             :     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#
     169             :     GMAP( "IsMirrored",                     XML_NAMESPACE_STYLE,    XML_MIRROR,             XML_TYPE_SD_MIRROR|MID_FLAG_MULTI_PROPERTY, 0 ),  // exists in SW, too // #i40214#
     170             : 
     171             :     // animation text attributes
     172             :     TMAP( "TextAnimationKind",              XML_NAMESPACE_STYLE,XML_TEXT_BLINKING,          XML_TYPE_TEXT_ANIMATION_BLINKING, CTF_TEXTANIMATION_BLINKING ),
     173             :     GMAP( "TextAnimationKind",              XML_NAMESPACE_TEXT, XML_ANIMATION,              XML_TYPE_TEXT_ANIMATION, CTF_TEXTANIMATION_KIND ),
     174             :     GMAP( "TextAnimationDirection",         XML_NAMESPACE_TEXT, XML_ANIMATION_DIRECTION,    XML_TYPE_TEXT_ANIMATION_DIRECTION, 0 ),
     175             :     GMAP( "TextAnimationStartInside",       XML_NAMESPACE_TEXT, XML_ANIMATION_START_INSIDE, XML_TYPE_BOOL, 0 ),
     176             :     GMAP( "TextAnimationStopInside",            XML_NAMESPACE_TEXT, XML_ANIMATION_STOP_INSIDE,  XML_TYPE_BOOL, 0 ),
     177             :     GMAP( "TextAnimationCount",             XML_NAMESPACE_TEXT, XML_ANIMATION_REPEAT,       XML_TYPE_NUMBER16, 0 ),
     178             :     GMAP( "TextAnimationDelay",             XML_NAMESPACE_TEXT, XML_ANIMATION_DELAY,        XML_TYPE_DURATION16_MS, 0 ),
     179             :     GMAP( "TextAnimationAmount",                XML_NAMESPACE_TEXT, XML_ANIMATION_STEPS,        XML_TYPE_TEXT_ANIMATION_STEPS, 0 ),
     180             : 
     181             :     // connector attributes
     182             :     GMAP( "EdgeNode1HorzDist",              XML_NAMESPACE_DRAW, XML_START_LINE_SPACING_HORIZONTAL,  XML_TYPE_MEASURE, 0 ),
     183             :     GMAP( "EdgeNode1VertDist",              XML_NAMESPACE_DRAW, XML_START_LINE_SPACING_VERTICAL,    XML_TYPE_MEASURE, 0 ),
     184             :     GMAP( "EdgeNode2HorzDist",              XML_NAMESPACE_DRAW, XML_END_LINE_SPACING_HORIZONTAL,    XML_TYPE_MEASURE, 0 ),
     185             :     GMAP( "EdgeNode2VertDist",              XML_NAMESPACE_DRAW, XML_END_LINE_SPACING_VERTICAL,      XML_TYPE_MEASURE, 0 ),
     186             : 
     187             :     // measure attributes
     188             :     GMAP( "MeasureLineDistance",                XML_NAMESPACE_DRAW, XML_LINE_DISTANCE,          XML_TYPE_MEASURE, 0 ),
     189             :     GMAP( "MeasureHelpLineOverhang",            XML_NAMESPACE_DRAW, XML_GUIDE_OVERHANG,         XML_TYPE_MEASURE, 0 ),
     190             :     GMAP( "MeasureHelpLineDistance",            XML_NAMESPACE_DRAW, XML_GUIDE_DISTANCE,         XML_TYPE_MEASURE, 0 ),
     191             :     GMAP( "MeasureHelpLine1Length",         XML_NAMESPACE_DRAW, XML_START_GUIDE,            XML_TYPE_MEASURE, 0 ),
     192             :     GMAP( "MeasureHelpLine2Length",         XML_NAMESPACE_DRAW, XML_END_GUIDE,              XML_TYPE_MEASURE, 0 ),
     193             :     GMAP( "MeasureTextHorizontalPosition",  XML_NAMESPACE_DRAW, XML_MEASURE_ALIGN,          XML_SD_TYPE_MEASURE_HALIGN, 0 ),
     194             :     GMAP( "MeasureTextVerticalPosition",    XML_NAMESPACE_DRAW, XML_MEASURE_VERTICAL_ALIGN, XML_SD_TYPE_MEASURE_VALIGN, 0 ),
     195             :     GMAP( "MeasureUnit",                        XML_NAMESPACE_DRAW, XML_UNIT,                   XML_SD_TYPE_MEASURE_UNIT, 0 ),
     196             :     GMAP( "MeasureShowUnit",                    XML_NAMESPACE_DRAW, XML_SHOW_UNIT,              XML_TYPE_BOOL, 0 ),
     197             :     GMAP( "MeasureBelowReferenceEdge",      XML_NAMESPACE_DRAW, XML_PLACING,                XML_SD_TYPE_MEASURE_PLACING, 0 ),
     198             :     GMAP( "MeasureTextRotate90",                XML_NAMESPACE_DRAW, XML_PARALLEL,               XML_TYPE_BOOL, 0 ),
     199             :     GMAP( "MeasureDecimalPlaces",           XML_NAMESPACE_DRAW, XML_DECIMAL_PLACES,         XML_TYPE_NUMBER16, 0 ),
     200             : 
     201             :     // 3D geometry attributes
     202             :     GMAP( "D3DHorizontalSegments",          XML_NAMESPACE_DR3D, XML_HORIZONTAL_SEGMENTS,    XML_TYPE_NUMBER, 0 ),
     203             :     GMAP( "D3DVerticalSegments",                XML_NAMESPACE_DR3D, XML_VERTICAL_SEGMENTS,      XML_TYPE_NUMBER, 0 ),
     204             :     GMAP( "D3DPercentDiagonal",             XML_NAMESPACE_DR3D, XML_EDGE_ROUNDING,          XML_TYPE_PERCENT, 0 ),
     205             :     GMAP( "D3DBackscale",                   XML_NAMESPACE_DR3D, XML_BACK_SCALE,             XML_TYPE_PERCENT, 0 ),
     206             :     GMAP( "D3DEndAngle",                        XML_NAMESPACE_DR3D, XML_END_ANGLE,              XML_TYPE_NUMBER, 0 ),
     207             :     GMAP( "D3DDepth",                       XML_NAMESPACE_DR3D, XML_DEPTH,                  XML_TYPE_MEASURE, 0 ),
     208             :     GMAP( "D3DDoubleSided",                 XML_NAMESPACE_DR3D, XML_BACKFACE_CULLING,       XML_SD_TYPE_BACKFACE_CULLING, 0 ),
     209             : 
     210             :     // #107245# New 3D properties which are possible for lathe and extrude 3d objects
     211             :     GMAP( "D3DCloseFront",                  XML_NAMESPACE_DR3D, XML_CLOSE_FRONT,            XML_TYPE_BOOL, 0 ),
     212             :     GMAP( "D3DCloseBack",                   XML_NAMESPACE_DR3D, XML_CLOSE_BACK,             XML_TYPE_BOOL, 0 ),
     213             : 
     214             :     // 3D lighting attributes
     215             :     GMAP( "D3DNormalsKind",                 XML_NAMESPACE_DR3D, XML_NORMALS_KIND,           XML_SD_TYPE_NORMALS_KIND, 0 ),
     216             :     GMAP( "D3DNormalsInvert",               XML_NAMESPACE_DR3D, XML_NORMALS_DIRECTION,      XML_SD_TYPE_NORMALS_DIRECTION, 0 ),
     217             : 
     218             :     // 3D texture attributes
     219             :     GMAP( "D3DTextureProjectionX",          XML_NAMESPACE_DR3D, XML_TEX_GENERATION_MODE_X,  XML_SD_TYPE_TEX_GENERATION_MODE_X, 0 ),
     220             :     GMAP( "D3DTextureProjectionY",          XML_NAMESPACE_DR3D, XML_TEX_GENERATION_MODE_Y,  XML_SD_TYPE_TEX_GENERATION_MODE_Y, 0 ),
     221             :     GMAP( "D3DTextureKind",                 XML_NAMESPACE_DR3D, XML_TEX_KIND,               XML_SD_TYPE_TEX_KIND, 0 ),
     222             :     GMAP( "D3DTextureMode",                 XML_NAMESPACE_DR3D, XML_TEX_MODE,               XML_SD_TYPE_TEX_MODE, 0 ),
     223             :     GMAP( "D3DTextureFilter",               XML_NAMESPACE_DR3D, XML_TEX_FILTER,             XML_SD_TYPE_BACKFACE_CULLING, 0 ),
     224             : 
     225             :     // 3D material attributes
     226             :     GMAP( "D3DMaterialColor",               XML_NAMESPACE_DR3D, XML_DIFFUSE_COLOR,          XML_TYPE_COLOR, 0 ),
     227             :     GMAP( "D3DMaterialEmission",                XML_NAMESPACE_DR3D, XML_EMISSIVE_COLOR,         XML_TYPE_COLOR, 0 ),
     228             :     GMAP( "D3DMaterialSpecular",                XML_NAMESPACE_DR3D, XML_SPECULAR_COLOR,         XML_TYPE_COLOR, 0 ),
     229             :     GMAP( "D3DMaterialSpecularIntensity",   XML_NAMESPACE_DR3D, XML_SHININESS,              XML_TYPE_PERCENT, 0 ),
     230             : 
     231             :     // 3D shadow attributes
     232             :     GMAP( "D3DShadow3D",                        XML_NAMESPACE_DR3D, XML_SHADOW,                 XML_SD_TYPE_SHADOW, 0 ),
     233             : 
     234             :     // #FontWork# attributes
     235             :     GMAP( "FontWorkStyle",                  XML_NAMESPACE_DRAW, XML_FONTWORK_STYLE,             XML_SD_TYPE_FONTWORK_STYLE, CTF_FONTWORK_STYLE  ),
     236             :     GMAP( "FontWorkAdjust",                 XML_NAMESPACE_DRAW, XML_FONTWORK_ADJUST,                XML_SD_TYPE_FONTWORK_ADJUST,CTF_FONTWORK_ADJUST ),
     237             :     GMAP( "FontWorkDistance",               XML_NAMESPACE_DRAW, XML_FONTWORK_DISTANCE,              XML_TYPE_MEASURE,           CTF_FONTWORK_DISTANCE   ),
     238             :     GMAP( "FontWorkStart",                  XML_NAMESPACE_DRAW, XML_FONTWORK_START,                 XML_TYPE_MEASURE,           CTF_FONTWORK_START  ),
     239             :     GMAP( "FontWorkMirror",                 XML_NAMESPACE_DRAW, XML_FONTWORK_MIRROR,                XML_TYPE_BOOL,              CTF_FONTWORK_MIRROR ),
     240             :     GMAP( "FontWorkOutline",                    XML_NAMESPACE_DRAW, XML_FONTWORK_OUTLINE,               XML_TYPE_BOOL,              CTF_FONTWORK_OUTLINE    ),
     241             :     GMAP( "FontWorkShadow",                 XML_NAMESPACE_DRAW, XML_FONTWORK_SHADOW,                XML_SD_TYPE_FONTWORK_SHADOW,CTF_FONTWORK_SHADOW ),
     242             :     GMAP( "FontWorkShadowColor",                XML_NAMESPACE_DRAW, XML_FONTWORK_SHADOW_COLOR,          XML_TYPE_COLOR,             CTF_FONTWORK_SHADOWCOLOR    ),
     243             :     GMAP( "FontWorkShadowOffsetX",          XML_NAMESPACE_DRAW, XML_FONTWORK_SHADOW_OFFSET_X,       XML_TYPE_MEASURE,           CTF_FONTWORK_SHADOWOFFSETX  ),
     244             :     GMAP( "FontWorkShadowOffsetY",          XML_NAMESPACE_DRAW, XML_FONTWORK_SHADOW_OFFSET_Y,       XML_TYPE_MEASURE,           CTF_FONTWORK_SHADOWOFFSETY  ),
     245             :     GMAP( "FontWorkForm",                   XML_NAMESPACE_DRAW, XML_FONTWORK_FORM,                  XML_SD_TYPE_FONTWORK_FORM,  CTF_FONTWORK_FORM   ),
     246             :     GMAP( "FontWorkHideForm",               XML_NAMESPACE_DRAW, XML_FONTWORK_HIDE_FORM,             XML_TYPE_BOOL,              CTF_FONTWORK_HIDEFORM   ),
     247             :     GMAP( "FontWorkShadowTransparence",     XML_NAMESPACE_DRAW, XML_FONTWORK_SHADOW_TRANSPARENCE,   XML_TYPE_PERCENT,           CTF_FONTWORK_SHADOWTRANSPARENCE ),
     248             : 
     249             :     // control attributes (border exists one mor time for the text additions of shapes)
     250             :     GMAP( "ControlSymbolColor",             XML_NAMESPACE_DRAW, XML_SYMBOL_COLOR,           XML_TYPE_COLOR, 0 ),
     251             :     GMAP( "ControlBackground",              XML_NAMESPACE_FO,   XML_BACKGROUND_COLOR,       XML_TYPE_COLOR|MID_FLAG_MULTI_PROPERTY, 0 ),
     252             :     GMAP( "ControlBorder",                  XML_NAMESPACE_FO,   XML_BORDER,                 XML_SD_TYPE_CONTROL_BORDER|MID_FLAG_MULTI_PROPERTY|MID_FLAG_MERGE_ATTRIBUTE, 0 ),
     253             :     GMAP( "ControlBorderColor",             XML_NAMESPACE_FO,   XML_BORDER,                 XML_SD_TYPE_CONTROL_BORDER_COLOR|MID_FLAG_MULTI_PROPERTY|MID_FLAG_MERGE_ATTRIBUTE, 0 ),
     254             :     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 ),
     255             :     GMAP( "ControlTextEmphasis",            XML_NAMESPACE_STYLE,XML_TEXT_EMPHASIZE,         XML_TYPE_CONTROL_TEXT_EMPHASIZE, 0 ),
     256             :     GMAP( "ImageScaleMode",                 XML_NAMESPACE_STYLE,XML_REPEAT,                 XML_SD_TYPE_IMAGE_SCALE_MODE|MID_FLAG_MULTI_PROPERTY, 0 ),
     257             :     GMAP( "ControlWritingMode",             XML_NAMESPACE_STYLE,XML_WRITING_MODE,           XML_TYPE_TEXT_WRITING_MODE_WITH_DEFAULT|MID_FLAG_MULTI_PROPERTY, CTF_CONTROLWRITINGMODE ),
     258             : 
     259             :     // special entries for floating frames
     260             :     GMAP( "FrameIsAutoScroll",          XML_NAMESPACE_DRAW, XML_FRAME_DISPLAY_SCROLLBAR,    XML_TYPE_BOOL|MID_FLAG_MULTI_PROPERTY,              CTF_FRAME_DISPLAY_SCROLLBAR ),
     261             :     GMAP( "FrameIsBorder",              XML_NAMESPACE_DRAW, XML_FRAME_DISPLAY_BORDER,       XML_TYPE_BOOL|MID_FLAG_MULTI_PROPERTY,              CTF_FRAME_DISPLAY_BORDER ),
     262             :     GMAP( "FrameMarginWidth",           XML_NAMESPACE_DRAW, XML_FRAME_MARGIN_HORIZONTAL,    XML_TYPE_MEASURE_PX|MID_FLAG_MULTI_PROPERTY,        CTF_FRAME_MARGIN_HORI ),
     263             :     GMAP( "FrameMarginHeight",          XML_NAMESPACE_DRAW, XML_FRAME_MARGIN_VERTICAL,      XML_TYPE_MEASURE_PX|MID_FLAG_MULTI_PROPERTY,        CTF_FRAME_MARGIN_VERT ),
     264             :     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 ),
     265             :     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 ),
     266             :     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 ),
     267             :     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 ),
     268             :     GMAP( "IsInternal",                 XML_NAMESPACE_DRAW, XML__EMPTY,                     XML_TYPE_BUILDIN_CMP_ONLY,                          CTF_SD_OLE_ISINTERNAL ),
     269             :     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 ),
     270             :     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 ),
     271             :     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 ),
     272             :     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 ),
     273             : 
     274             :     GMAP( "Aspect",                     XML_NAMESPACE_DRAW, XML_DRAW_ASPECT,                XML_TYPE_TEXT_DRAW_ASPECT|MID_FLAG_MULTI_PROPERTY,  CTF_SD_OLE_ASPECT ),
     275             : 
     276             :     // caption properties
     277             :     GMAP( "CaptionType",                    XML_NAMESPACE_DRAW, XML_CAPTION_TYPE,               XML_SD_TYPE_CAPTION_TYPE, 0 ),
     278             :     GMAP( "CaptionIsFixedAngle",            XML_NAMESPACE_DRAW, XML_CAPTION_ANGLE_TYPE,         XML_SD_TYPE_CAPTION_ANGLE_TYPE, 0 ),
     279             :     GMAP( "CaptionAngle",               XML_NAMESPACE_DRAW, XML_CAPTION_ANGLE,              XML_TYPE_NUMBER, 0 ),
     280             :     GMAP( "CaptionGap",                 XML_NAMESPACE_DRAW, XML_CAPTION_GAP,                XML_TYPE_MEASURE, 0 ),
     281             :     GMAP( "CaptionEscapeDirection",     XML_NAMESPACE_DRAW, XML_CAPTION_ESCAPE_DIRECTION,   XML_SD_TYPE_CAPTION_ESC_DIR, 0 ),
     282             :     GMAP( "CaptionIsEscapeRelative",    XML_NAMESPACE_DRAW, XML_CAPTION_ESCAPE,             XML_SD_TYPE_CAPTION_IS_ESC_REL|MID_FLAG_MULTI_PROPERTY, CTF_CAPTION_ISESCREL ),
     283             :     GMAP( "CaptionEscapeRelative",      XML_NAMESPACE_DRAW, XML_CAPTION_ESCAPE,             XML_SD_TYPE_CAPTION_ESC_REL|MID_FLAG_MULTI_PROPERTY, CTF_CAPTION_ESCREL ),
     284             :     GMAP( "CaptionEscapeAbsolute",      XML_NAMESPACE_DRAW, XML_CAPTION_ESCAPE,             XML_SD_TYPE_CAPTION_ESC_ABS|MID_FLAG_MULTI_PROPERTY, CTF_CAPTION_ESCABS ),
     285             :     GMAP( "CaptionLineLength",          XML_NAMESPACE_DRAW, XML_CAPTION_LINE_LENGTH,        XML_TYPE_MEASURE, 0 ),
     286             :     GMAP( "CaptionIsFitLineLength",     XML_NAMESPACE_DRAW, XML_CAPTION_FIT_LINE_LENGTH,    XML_TYPE_BOOL, 0 ),
     287             : 
     288             :     // misc object properties
     289             :     GMAP( "MoveProtect",                    XML_NAMESPACE_STYLE, XML_PROTECT,               XML_SD_TYPE_MOVE_PROTECT|MID_FLAG_MULTI_PROPERTY|MID_FLAG_MERGE_ATTRIBUTE, CTF_SD_MOVE_PROTECT ),
     290             :     GMAP( "SizeProtect",                    XML_NAMESPACE_STYLE, XML_PROTECT,               XML_SD_TYPE_SIZE_PROTECT|MID_FLAG_MULTI_PROPERTY|MID_FLAG_MERGE_ATTRIBUTE, CTF_SD_SIZE_PROTECT ),
     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           0 : 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           0 : class XMLMoveSizeProtectHdl : public XMLPropertyHandler
     770             : {
     771             : public:
     772           0 :     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           0 : bool XMLMoveSizeProtectHdl::importXML( const OUString& rStrImpValue, Any& rValue, const SvXMLUnitConverter& ) const
     787             : {
     788           0 :     const sal_Bool bValue = rStrImpValue.indexOf( GetXMLToken( mnType == XML_SD_TYPE_MOVE_PROTECT ? XML_POSITION : XML_SIZE ) ) != -1;
     789           0 :     rValue <<= bValue;
     790           0 :     return true;
     791             : }
     792             : 
     793           0 : bool XMLMoveSizeProtectHdl::exportXML( OUString& rStrExpValue, const Any& rValue, const SvXMLUnitConverter& ) const
     794             : {
     795           0 :     sal_Bool bValue = sal_Bool();
     796           0 :     if( !(rValue >>= bValue ) )
     797           0 :         return false;
     798             : 
     799           0 :     if( bValue )
     800             :     {
     801           0 :         if( !rStrExpValue.isEmpty() )
     802           0 :             rStrExpValue += " ";
     803             : 
     804           0 :         rStrExpValue += GetXMLToken( mnType == XML_SD_TYPE_MOVE_PROTECT ? XML_POSITION : XML_SIZE );
     805             :     }
     806             : 
     807           0 :     return true;
     808             : }
     809             : 
     810           0 : 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           0 : XMLSdHeaderFooterVisibilityTypeHdl::~XMLSdHeaderFooterVisibilityTypeHdl()
     820             : {
     821           0 : }
     822             : 
     823           0 : 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           0 :     const sal_Bool bBool = IsXMLToken(rStrImpValue, XML_TRUE) || IsXMLToken(rStrImpValue, XML_VISIBLE);
     832           0 :     rValue <<= bBool;
     833           0 :     return bBool || IsXMLToken(rStrImpValue, XML_FALSE) || IsXMLToken(rStrImpValue, XML_HIDDEN);
     834             : }
     835             : 
     836           0 : bool XMLSdHeaderFooterVisibilityTypeHdl::exportXML(
     837             :         OUString& rStrExpValue,
     838             :         const Any& rValue,
     839             :         const SvXMLUnitConverter& ) const
     840             : {
     841           0 :     bool bRet = false;
     842           0 :       OUStringBuffer aOut;
     843           0 :     sal_Bool bValue = sal_Bool();
     844             : 
     845           0 :     if (rValue >>= bValue)
     846             :     {
     847           0 :         ::sax::Converter::convertBool( aOut, bValue );
     848           0 :         rStrExpValue = aOut.makeStringAndClear();
     849             : 
     850           0 :         bRet = true;
     851             :     }
     852             : 
     853           0 :     return bRet;
     854             : }
     855             : 
     856           0 : XMLSdPropHdlFactory::XMLSdPropHdlFactory( uno::Reference< frame::XModel > xModel, SvXMLImport& rImport )
     857           0 : : mxModel( xModel ), mpExport(0), mpImport( &rImport )
     858             : {
     859           0 : }
     860             : 
     861           0 : XMLSdPropHdlFactory::XMLSdPropHdlFactory( uno::Reference< frame::XModel > xModel, SvXMLExport& rExport )
     862           0 : : mxModel( xModel ), mpExport( &rExport ), mpImport(0)
     863             : {
     864           0 : }
     865             : 
     866           0 : XMLSdPropHdlFactory::~XMLSdPropHdlFactory()
     867             : {
     868           0 : }
     869             : 
     870           0 : const XMLPropertyHandler* XMLSdPropHdlFactory::GetPropertyHandler( sal_Int32 nType ) const
     871             : {
     872           0 :     const XMLPropertyHandler* pHdl = XMLPropertyHandlerFactory::GetPropertyHandler( nType );
     873           0 :     if(!pHdl)
     874             :     {
     875           0 :         switch(nType)
     876             :         {
     877             :             case XML_SD_TYPE_STROKE :
     878             :             {
     879           0 :                 pHdl = new XMLEnumPropertyHdl( aXML_LineStyle_EnumMap, ::getCppuType((const drawing::LineStyle*)0) );
     880           0 :                 break;
     881             :             }
     882             :             case XML_SD_TYPE_LINEJOIN :
     883             :             {
     884           0 :                 pHdl = new XMLEnumPropertyHdl( aXML_LineJoint_EnumMap, ::getCppuType((const drawing::LineJoint*)0) );
     885           0 :                 break;
     886             :             }
     887             :             case XML_SD_TYPE_LINECAP :
     888             :             {
     889           0 :                 pHdl = new XMLEnumPropertyHdl( aXML_LineCap_EnumMap, ::getCppuType((const drawing::LineCap*)0) );
     890           0 :                 break;
     891             :             }
     892             :             case XML_SD_TYPE_FILLSTYLE :
     893             :             {
     894           0 :                 pHdl = new XMLEnumPropertyHdl( aXML_FillStyle_EnumMap, ::getCppuType((const drawing::FillStyle*)0) );
     895           0 :                 break;
     896             :             }
     897             :             case XML_SD_TYPE_PRESPAGE_TYPE :
     898             :             {
     899           0 :                 pHdl = new XMLEnumPropertyHdl( aXML_PresChange_EnumMap, ::getCppuType((const sal_Int32*)0) );
     900           0 :                 break;
     901             :             }
     902             :             case XML_SD_TYPE_SHADOW :
     903             :             {
     904           0 :                 pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken(XML_VISIBLE), GetXMLToken(XML_HIDDEN) );
     905           0 :                 break;
     906             :             }
     907             :             case XML_TYPE_SD_MIRROR:
     908             :             {
     909           0 :                 pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken(XML_HORIZONTAL), GetXMLToken(XML_NONE) );
     910           0 :                 break;
     911             :             }
     912             :             case XML_SD_TYPE_PRESPAGE_STYLE :
     913             :             {
     914           0 :                 pHdl = new XMLEnumPropertyHdl( aXML_FadeEffect_EnumMap, ::getCppuType((const presentation::FadeEffect*)0) );
     915           0 :                 break;
     916             :             }
     917             :             case XML_SD_TYPE_PRESPAGE_SPEED :
     918             :             {
     919           0 :                 pHdl = new XMLEnumPropertyHdl( aXML_TransSpeed_EnumMap, ::getCppuType((const presentation::AnimationSpeed*)0) );
     920           0 :                 break;
     921             :             }
     922             :             case XML_SD_TYPE_PRESPAGE_DURATION :
     923             :             {
     924           0 :                 pHdl = new XMLDurationPropertyHdl();
     925           0 :                 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           0 :                 pHdl = new XMLOpacityPropertyHdl(mpImport);
     935           0 :                 break;
     936             :             }
     937             :             case XML_SD_TYPE_WRITINGMODE :
     938             :             {
     939           0 :                 pHdl = new XMLEnumPropertyHdl( aXML_WritingMode_EnumMap, ::getCppuType((const text::WritingMode*)0) );
     940           0 :                 break;
     941             :             }
     942             :             case XML_SD_TYPE_PRESPAGE_VISIBILITY :
     943             :             {
     944           0 :                 pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken(XML_VISIBLE), GetXMLToken(XML_HIDDEN) );
     945           0 :                 break;
     946             :             }
     947             :             case XML_SD_TYPE_PRESPAGE_BACKSIZE:
     948             :             {
     949           0 :                 pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken(XML_FULL), GetXMLToken(XML_BORDER) );
     950           0 :                 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           0 :                 pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken(XML_DISABLED), GetXMLToken(XML_ENABLED) );
     961           0 :                 break;
     962             :             }
     963             : 
     964             :             case XML_SD_TYPE_NORMALS_KIND:
     965             :             {
     966           0 :                 pHdl = new XMLEnumPropertyHdl( aXML_NormalsKind_EnumMap, ::getCppuType((const drawing::NormalsKind*)0) );
     967           0 :                 break;
     968             :             }
     969             :             case XML_SD_TYPE_NORMALS_DIRECTION:
     970             :             {
     971           0 :                 pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken(XML_NORMAL), GetXMLToken(XML_INVERSE) );
     972           0 :                 break;
     973             :             }
     974             :             case XML_SD_TYPE_TEX_GENERATION_MODE_X:
     975             :             {
     976           0 :                 pHdl = new XMLEnumPropertyHdl( aXML_TexGenerationX_EnumMap, ::getCppuType((const drawing::TextureProjectionMode*)0) );
     977           0 :                 break;
     978             :             }
     979             :             case XML_SD_TYPE_TEX_GENERATION_MODE_Y:
     980             :             {
     981           0 :                 pHdl = new XMLEnumPropertyHdl( aXML_TexGenerationY_EnumMap, ::getCppuType((const drawing::TextureProjectionMode*)0) );
     982           0 :                 break;
     983             :             }
     984             :             case XML_SD_TYPE_TEX_KIND:
     985             :             {
     986           0 :                 pHdl = new XMLEnumPropertyHdl( aXML_TexKind_EnumMap, ::getCppuType((const drawing::TextureKind*)0) );
     987           0 :                 break;
     988             :             }
     989             :             case XML_SD_TYPE_TEX_MODE:
     990             :             {
     991           0 :                 pHdl = new XMLEnumPropertyHdl( aXML_TexMode_EnumMap, ::getCppuType((const drawing::TextureMode*)0) );
     992           0 :                 break;
     993             :             }
     994             :             case XML_SD_TYPE_NUMBULLET:
     995             :             {
     996           0 :                 uno::Reference<ucb::XAnyCompareFactory> xCompareFac( mxModel, uno::UNO_QUERY );
     997           0 :                 uno::Reference<ucb::XAnyCompare> xCompare;
     998           0 :                 if( xCompareFac.is() )
     999           0 :                     xCompare = xCompareFac->createAnyCompareByName( OUString( "NumberingRules" ) );
    1000             : 
    1001           0 :                 pHdl = new XMLNumRulePropHdl( xCompare );
    1002           0 :                 break;
    1003             :             }
    1004             :             case XML_SD_TYPE_BITMAP_MODE:
    1005             :             {
    1006           0 :                 pHdl = new XMLEnumPropertyHdl( aXML_BitmapMode_EnumMap, getCppuType((const drawing::BitmapMode*)0) );
    1007           0 :                 break;
    1008             :             }
    1009             :             case XML_SD_TYPE_BITMAPREPOFFSETX:
    1010             :             case XML_SD_TYPE_BITMAPREPOFFSETY:
    1011             :             {
    1012           0 :                 pHdl = new XMLBitmapRepeatOffsetPropertyHandler( nType == XML_SD_TYPE_BITMAPREPOFFSETX );
    1013           0 :                 break;
    1014             :             }
    1015             :             case XML_SD_TYPE_FILLBITMAPSIZE:
    1016             :             {
    1017           0 :                 pHdl = new XMLFillBitmapSizePropertyHandler();
    1018           0 :                 break;
    1019             :             }
    1020             :             case XML_SD_TYPE_LOGICAL_SIZE:
    1021             :             {
    1022           0 :                 pHdl = new XMLBitmapLogicalSizePropertyHandler();
    1023           0 :                 break;
    1024             :             }
    1025             :             case XML_SD_TYPE_BITMAP_REFPOINT:
    1026             :             {
    1027           0 :                 pHdl = new XMLEnumPropertyHdl( aXML_RefPoint_EnumMap, getCppuType((const ::com::sun::star::drawing::RectanglePoint*)0) );
    1028           0 :                 break;
    1029             :             }
    1030             :             case XML_TYPE_TEXT_ANIMATION:
    1031           0 :                 pHdl = new XMLEnumPropertyHdl( pXML_TextAnimation_Enum, ::getCppuType((const com::sun::star::drawing::TextAnimationKind*)0) );
    1032           0 :                 break;
    1033             :             case XML_TYPE_TEXT_ANIMATION_BLINKING:
    1034           0 :                 pHdl = new XMLEnumPropertyHdl( pXML_TextAnimation_Blinking_Enum, ::getCppuType((const com::sun::star::drawing::TextAnimationKind*)0) );
    1035           0 :                 break;
    1036             :             case XML_TYPE_TEXT_ANIMATION_DIRECTION:
    1037           0 :                 pHdl = new XMLEnumPropertyHdl( pXML_TextAnimationDirection_Enum, ::getCppuType((const com::sun::star::drawing::TextAnimationDirection*)0) );
    1038           0 :                 break;
    1039             :             case XML_TYPE_TEXT_ANIMATION_STEPS:
    1040           0 :                 pHdl = new XMLTextAnimationStepPropertyHdl;
    1041           0 :                 break;
    1042             :             case XML_SD_TYPE_TEXT_ALIGN:
    1043           0 :                 pHdl = new XMLEnumPropertyHdl( pXML_TextAlign_Enum, ::getCppuType((const com::sun::star::drawing::TextHorizontalAdjust*)0) );
    1044           0 :                 break;
    1045             :             case XML_SD_TYPE_VERTICAL_ALIGN:
    1046           0 :                 pHdl = new XMLEnumPropertyHdl( pXML_VerticalAlign_Enum, ::getCppuType((const com::sun::star::drawing::TextVerticalAdjust*)0) );
    1047           0 :                 break;
    1048             :             case XML_SD_TYPE_FITTOSIZE:
    1049             :                 {
    1050           0 :                     if (mpExport && (mpExport->getDefaultVersion()
    1051           0 :                                         <= SvtSaveOptions::ODFVER_012))
    1052             :                     {
    1053             :                         pHdl = new XMLEnumPropertyHdl(pXML_FitToSize_Enum_Odf12,
    1054           0 :                             ::getCppuType(static_cast<const com::sun::star::drawing::TextFitToSizeType*>(0)));
    1055             :                     }
    1056             :                     else
    1057             :                     {
    1058             :                         pHdl = new XMLEnumPropertyHdl(pXML_FitToSize_Enum,
    1059           0 :                             ::getCppuType(static_cast<const com::sun::star::drawing::TextFitToSizeType*>(0)));
    1060             :                     }
    1061             :                 }
    1062           0 :                 break;
    1063             :             case XML_SD_TYPE_MEASURE_UNIT:
    1064           0 :                 pHdl = new XMLEnumPropertyHdl( pXML_MeasureUnit_Enum, ::getCppuType((const sal_Int32*)0) );
    1065           0 :                 break;
    1066             :             case XML_SD_TYPE_MEASURE_HALIGN:
    1067           0 :                 pHdl = new XMLEnumPropertyHdl( pXML_Measure_HAlign_Enum, ::getCppuType((const com::sun::star::drawing::MeasureTextHorzPos*)0) );
    1068           0 :                 break;
    1069             :             case XML_SD_TYPE_MEASURE_VALIGN:
    1070           0 :                 pHdl = new XMLEnumPropertyHdl( pXML_Measure_VAlign_Enum, ::getCppuType((const com::sun::star::drawing::MeasureTextVertPos*)0) );
    1071           0 :                 break;
    1072             :             case XML_SD_TYPE_MEASURE_PLACING:
    1073             :                 {
    1074           0 :                     pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken(XML_BELOW), GetXMLToken(XML_ABOVE) );
    1075             :                 }
    1076           0 :                 break;
    1077             :             case XML_TYPE_TEXT_CLIP11:
    1078           0 :                 pHdl = new XMLClipPropertyHandler( true );
    1079           0 :                 break;
    1080             :             case XML_TYPE_TEXT_CLIP:
    1081           0 :                 pHdl = new XMLClipPropertyHandler( false );
    1082           0 :                 break;
    1083             : 
    1084             :             // #FontWork#
    1085             :             case XML_SD_TYPE_FONTWORK_STYLE     :
    1086           0 :                 pHdl = new XMLEnumPropertyHdl( pXML_Fontwork_Style_Enum , ::getCppuType((const sal_Int32*)0));
    1087           0 :                 break;
    1088             :             case XML_SD_TYPE_FONTWORK_ADJUST        :
    1089           0 :                 pHdl = new XMLEnumPropertyHdl( pXML_Fontwork_Adjust_Enum , ::getCppuType((const sal_Int32*)0));
    1090           0 :                 break;
    1091             :             case XML_SD_TYPE_FONTWORK_SHADOW        :
    1092           0 :                 pHdl = new XMLEnumPropertyHdl( pXML_Fontwork_Shadow_Enum , ::getCppuType((const sal_Int32*)0));
    1093           0 :                 break;
    1094             :             case XML_SD_TYPE_FONTWORK_FORM      :
    1095           0 :                 pHdl = new XMLEnumPropertyHdl( pXML_Fontwork_Form_Enum , ::getCppuType((const sal_Int32*)0));
    1096           0 :                 break;
    1097             : 
    1098             :             case XML_SD_TYPE_CONTROL_BORDER:
    1099           0 :                 pHdl = new ::xmloff::OControlBorderHandler( ::xmloff::OControlBorderHandler::STYLE );
    1100           0 :                 break;
    1101             :             case XML_SD_TYPE_CONTROL_BORDER_COLOR:
    1102           0 :                 pHdl = new ::xmloff::OControlBorderHandler( ::xmloff::OControlBorderHandler::COLOR );
    1103           0 :                 break;
    1104             :             case XML_SD_TYPE_IMAGE_SCALE_MODE:
    1105           0 :                 pHdl = new ::xmloff::ImageScaleModeHandler;
    1106           0 :                 break;
    1107             :             case XML_TYPE_CONTROL_TEXT_EMPHASIZE:
    1108           0 :                 pHdl = new ::xmloff::OControlTextEmphasisHandler;
    1109           0 :                 break;
    1110             : 
    1111             :             case XML_SD_TYPE_CAPTION_ANGLE_TYPE:
    1112             :             {
    1113           0 :                 pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken(XML_FIXED), GetXMLToken(XML_FREE) );
    1114           0 :                 break;
    1115             :             }
    1116             :             case XML_SD_TYPE_CAPTION_IS_ESC_REL:
    1117           0 :                 pHdl = new XMLIsPercentagePropertyHandler();
    1118           0 :                 break;
    1119             :             case XML_SD_TYPE_CAPTION_ESC_REL:
    1120           0 :                 pHdl = new XMLCaptionEscapeRelative();
    1121           0 :                 break;
    1122             :             case XML_SD_TYPE_CAPTION_ESC_ABS:
    1123           0 :                 pHdl = new XMLPercentOrMeasurePropertyHandler( false );
    1124           0 :                 break;
    1125             :             case XML_SD_TYPE_CAPTION_ESC_DIR:
    1126           0 :                 pHdl = new XMLEnumPropertyHdl( pXML_Caption_Esc_Dir_Enum , ::getCppuType((const sal_Int32*)0));
    1127           0 :                 break;
    1128             :             case XML_SD_TYPE_CAPTION_TYPE:
    1129           0 :                 pHdl = new XMLEnumPropertyHdl( pXML_Caption_Type_Enum , ::getCppuType((const sal_Int32*)0));
    1130           0 :                 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           0 :                 pHdl = new XMLEnumPropertyHdl( xmloff::getAnimationsEnumMap(xmloff::Animations_EnumMap_TransitionType) , ::getCppuType((const sal_Int16*)0));
    1139           0 :                 break;
    1140             :             case XML_SD_TYPE_TRANSTIION_SUBTYPE:
    1141           0 :                 pHdl = new XMLEnumPropertyHdl( xmloff::getAnimationsEnumMap(xmloff::Animations_EnumMap_TransitionSubType) , ::getCppuType((const sal_Int16*)0));
    1142           0 :                 break;
    1143             :             case XML_SD_TYPE_TRANSTIION_DIRECTION:
    1144           0 :                 pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken(XML_FORWARD), GetXMLToken(XML_REVERSE) );
    1145           0 :                 break;
    1146             :             case XML_TYPE_WRAP_OPTION:
    1147           0 :                 pHdl = new XMLWordWrapPropertyHdl( mpImport );
    1148           0 :                 break;
    1149             : 
    1150             :             case XML_SD_TYPE_MOVE_PROTECT:
    1151             :             case XML_SD_TYPE_SIZE_PROTECT:
    1152           0 :                 pHdl = new XMLMoveSizeProtectHdl( nType );
    1153           0 :                 break;
    1154             :             case XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE:
    1155           0 :                 pHdl = new XMLSdHeaderFooterVisibilityTypeHdl();
    1156           0 :                 break;
    1157             :         }
    1158             : 
    1159           0 :         if(pHdl)
    1160           0 :             PutHdlCache(nType, pHdl);
    1161             :     }
    1162             : 
    1163           0 :     return pHdl;
    1164             : }
    1165             : 
    1166           0 : XMLShapePropertySetMapper::XMLShapePropertySetMapper(const UniReference< XMLPropertyHandlerFactory >& rFactoryRef,
    1167             :         bool bForExport)
    1168           0 : : XMLPropertySetMapper( aXMLSDProperties, rFactoryRef, bForExport )
    1169             : {
    1170           0 : }
    1171             : 
    1172           0 : XMLShapePropertySetMapper::~XMLShapePropertySetMapper()
    1173             : {
    1174           0 : }
    1175             : 
    1176           0 : XMLShapeExportPropertyMapper::XMLShapeExportPropertyMapper( const UniReference< XMLPropertySetMapper >& rMapper, SvXMLExport& rExport )
    1177             : : SvXMLExportPropertyMapper( rMapper )
    1178             : , maNumRuleExp( rExport )
    1179             : , mbIsInAutoStyles( sal_True )
    1180           0 : , msCDATA( GetXMLToken(XML_CDATA))
    1181           0 : , msTrue( GetXMLToken(XML_TRUE))
    1182           0 : , msFalse( GetXMLToken(XML_FALSE))
    1183             : {
    1184           0 : }
    1185             : 
    1186           0 : XMLShapeExportPropertyMapper::~XMLShapeExportPropertyMapper()
    1187             : {
    1188           0 : }
    1189             : 
    1190           0 : void XMLShapeExportPropertyMapper::ContextFilter(
    1191             :     bool bEnableFoFontFamily,
    1192             :     std::vector< XMLPropertyState >& rProperties,
    1193             :     uno::Reference< beans::XPropertySet > rPropSet ) const
    1194             : {
    1195           0 :     XMLPropertyState* pRepeatOffsetX = NULL;
    1196           0 :     XMLPropertyState* pRepeatOffsetY = NULL;
    1197           0 :     XMLPropertyState* pTextAnimationBlinking = NULL;
    1198           0 :     XMLPropertyState* pTextAnimationKind = NULL;
    1199             : 
    1200             :     // #FontWork#
    1201           0 :     XMLPropertyState* pFontWorkStyle = NULL;
    1202           0 :     XMLPropertyState* pFontWorkAdjust = NULL;
    1203           0 :     XMLPropertyState* pFontWorkDistance = NULL;
    1204           0 :     XMLPropertyState* pFontWorkStart = NULL;
    1205           0 :     XMLPropertyState* pFontWorkMirror = NULL;
    1206           0 :     XMLPropertyState* pFontWorkOutline = NULL;
    1207           0 :     XMLPropertyState* pFontWorkShadow = NULL;
    1208           0 :     XMLPropertyState* pFontWorkShadowColor = NULL;
    1209           0 :     XMLPropertyState* pFontWorkShadowOffsetx = NULL;
    1210           0 :     XMLPropertyState* pFontWorkShadowOffsety = NULL;
    1211           0 :     XMLPropertyState* pFontWorkForm = NULL;
    1212           0 :     XMLPropertyState* pFontWorkHideform = NULL;
    1213           0 :     XMLPropertyState* pFontWorkShadowTransparence = NULL;
    1214             : 
    1215             :     // OLE
    1216           0 :     XMLPropertyState* pOLEVisAreaLeft = NULL;
    1217           0 :     XMLPropertyState* pOLEVisAreaTop = NULL;
    1218           0 :     XMLPropertyState* pOLEVisAreaWidth = NULL;
    1219           0 :     XMLPropertyState* pOLEVisAreaHeight = NULL;
    1220           0 :     XMLPropertyState* pOLEIsInternal = NULL;
    1221             : 
    1222             :     // caption
    1223           0 :     XMLPropertyState* pCaptionIsEscRel = NULL;
    1224           0 :     XMLPropertyState* pCaptionEscRel = NULL;
    1225           0 :     XMLPropertyState* pCaptionEscAbs = NULL;
    1226             : 
    1227             :     // filter fo:clip
    1228           0 :     XMLPropertyState* pClip11State = NULL;
    1229           0 :     XMLPropertyState* pClipState = NULL;
    1230             : 
    1231           0 :     XMLPropertyState* pShapeWritingMode = NULL;
    1232           0 :     XMLPropertyState* pTextWritingMode = NULL;
    1233           0 :     XMLPropertyState* pControlWritingMode = NULL;
    1234             : 
    1235             :     // filter properties
    1236           0 :     for( std::vector< XMLPropertyState >::iterator aIter = rProperties.begin();
    1237           0 :          aIter != rProperties.end();
    1238             :          ++aIter )
    1239             :     {
    1240           0 :             XMLPropertyState *property = &(*aIter);
    1241           0 :         if( property->mnIndex == -1 )
    1242           0 :             continue;
    1243             : 
    1244             :         // find properties with context
    1245             :         // to prevent writing this property set mnIndex member to -1
    1246           0 :         switch( getPropertySetMapper()->GetEntryContextId( property->mnIndex ))
    1247             :         {
    1248             :             case CTF_NUMBERINGRULES:
    1249             :                 {
    1250           0 :                     if( mbIsInAutoStyles )
    1251           0 :                         property->mnIndex = -1;
    1252             :                 }
    1253           0 :                 break;
    1254             :             case CTF_SD_NUMBERINGRULES_NAME:
    1255             :                 {
    1256             :                     // this property is not exported in the style:properties element
    1257             :                     // because its an XIndexAccess and not a string.
    1258             :                     // This will be handled in SvXMLAutoStylePoolP::exportStyleAttributes
    1259             :                     // This is suboptimal
    1260           0 :                     if( !mbIsInAutoStyles )
    1261           0 :                         property->mnIndex = -1;
    1262             :                 }
    1263           0 :                 break;
    1264             :             case CTF_WRITINGMODE:
    1265             :                 {
    1266           0 :                     pShapeWritingMode = property;
    1267             :                     text::WritingMode eWritingMode;
    1268           0 :                     if( property->maValue >>= eWritingMode )
    1269             :                     {
    1270           0 :                         if( text::WritingMode_LR_TB == eWritingMode )
    1271             :                         {
    1272           0 :                             property->mnIndex = -1;
    1273           0 :                             pShapeWritingMode = 0;
    1274             :                         }
    1275             :                     }
    1276             :                 }
    1277           0 :                 break;
    1278             :             case CTF_CONTROLWRITINGMODE:
    1279           0 :                 pControlWritingMode = property;
    1280           0 :                 break;
    1281             :             case CTF_TEXTWRITINGMODE:
    1282           0 :                 pTextWritingMode = property;
    1283           0 :                 break;
    1284             :             case CTF_REPEAT_OFFSET_X:
    1285           0 :                 pRepeatOffsetX = property;
    1286           0 :                 break;
    1287             : 
    1288             :             case CTF_REPEAT_OFFSET_Y:
    1289           0 :                 pRepeatOffsetY = property;
    1290           0 :                 break;
    1291             : 
    1292             :             case CTF_DASHNAME:
    1293             :             case CTF_FILLGRADIENTNAME:
    1294             :             case CTF_FILLHATCHNAME:
    1295             :             case CTF_FILLBITMAPNAME:
    1296             :                 {
    1297           0 :                     OUString aStr;
    1298           0 :                     if( (property->maValue >>= aStr) && aStr.isEmpty() )
    1299           0 :                         property->mnIndex = -1;
    1300             :                 }
    1301           0 :                 break;
    1302             :             case CTF_TEXTANIMATION_BLINKING:
    1303           0 :                 pTextAnimationBlinking = property;
    1304           0 :                 break;
    1305             :             case CTF_TEXTANIMATION_KIND:
    1306           0 :                 pTextAnimationKind = property;
    1307           0 :                 break;
    1308             : 
    1309             :             // #FontWork#
    1310           0 :             case CTF_FONTWORK_STYLE:                pFontWorkStyle = property;              break;
    1311           0 :             case CTF_FONTWORK_ADJUST:               pFontWorkAdjust = property;             break;
    1312           0 :             case CTF_FONTWORK_DISTANCE:             pFontWorkDistance = property;           break;
    1313           0 :             case CTF_FONTWORK_START:                pFontWorkStart = property;              break;
    1314           0 :             case CTF_FONTWORK_MIRROR:               pFontWorkMirror = property;             break;
    1315           0 :             case CTF_FONTWORK_OUTLINE:              pFontWorkOutline = property;            break;
    1316           0 :             case CTF_FONTWORK_SHADOW:               pFontWorkShadow = property;             break;
    1317           0 :             case CTF_FONTWORK_SHADOWCOLOR:          pFontWorkShadowColor = property;        break;
    1318           0 :             case CTF_FONTWORK_SHADOWOFFSETX:        pFontWorkShadowOffsetx = property;      break;
    1319           0 :             case CTF_FONTWORK_SHADOWOFFSETY:        pFontWorkShadowOffsety = property;      break;
    1320           0 :             case CTF_FONTWORK_FORM:                 pFontWorkForm = property;               break;
    1321           0 :             case CTF_FONTWORK_HIDEFORM:             pFontWorkHideform = property;           break;
    1322           0 :             case CTF_FONTWORK_SHADOWTRANSPARENCE:   pFontWorkShadowTransparence = property; break;
    1323             : 
    1324             :             // OLE
    1325           0 :             case CTF_SD_OLE_VIS_AREA_EXPORT_LEFT:           pOLEVisAreaLeft = property;     break;
    1326           0 :             case CTF_SD_OLE_VIS_AREA_EXPORT_TOP:            pOLEVisAreaTop = property;      break;
    1327           0 :             case CTF_SD_OLE_VIS_AREA_EXPORT_WIDTH:          pOLEVisAreaWidth = property;    break;
    1328           0 :             case CTF_SD_OLE_VIS_AREA_EXPORT_HEIGHT:     pOLEVisAreaHeight = property;   break;
    1329           0 :             case CTF_SD_OLE_ISINTERNAL:             pOLEIsInternal = property;      break;
    1330             : 
    1331             :             case CTF_FRAME_DISPLAY_SCROLLBAR:
    1332             :                 {
    1333           0 :                     if( !property->maValue.hasValue() )
    1334           0 :                         property->mnIndex = -1;
    1335             :                 }
    1336           0 :                 break;
    1337             :             case CTF_FRAME_MARGIN_HORI:
    1338             :             case CTF_FRAME_MARGIN_VERT:
    1339             :                 {
    1340           0 :                     sal_Int32 nValue = 0;
    1341           0 :                     if( (property->maValue >>= nValue) && (nValue < 0) )
    1342           0 :                         property->mnIndex = -1;
    1343             :                 }
    1344           0 :                 break;
    1345             : 
    1346             :             case CTF_SD_MOVE_PROTECT:
    1347             :                 {
    1348           0 :                     sal_Bool bProtected = sal_Bool();
    1349           0 :                     if( (property->maValue >>= bProtected) && !bProtected )
    1350           0 :                         property->mnIndex = -1;
    1351             :                 }
    1352           0 :                 break;
    1353             :             case CTF_SD_SIZE_PROTECT:
    1354             :                 {
    1355           0 :                     sal_Bool bProtected = sal_Bool();
    1356           0 :                     if( (property->maValue >>= bProtected) && !bProtected )
    1357           0 :                         property->mnIndex = -1;
    1358             :                 }
    1359           0 :                 break;
    1360           0 :             case CTF_CAPTION_ISESCREL:              pCaptionIsEscRel = property;    break;
    1361           0 :             case CTF_CAPTION_ESCREL:                pCaptionEscRel = property;      break;
    1362           0 :             case CTF_CAPTION_ESCABS:                pCaptionEscAbs = property;      break;
    1363           0 :             case CTF_TEXT_CLIP11:           pClip11State = property; break;
    1364           0 :             case CTF_TEXT_CLIP:             pClipState = property; break;
    1365             :         }
    1366             :     }
    1367             : 
    1368             :     // check for duplicate writing mode
    1369           0 :     if( pShapeWritingMode && (pTextWritingMode || pControlWritingMode) )
    1370             :     {
    1371           0 :         if( pTextWritingMode )
    1372           0 :             pTextWritingMode->mnIndex = -1;
    1373           0 :         if( pControlWritingMode )
    1374           0 :             pControlWritingMode->mnIndex = -1;
    1375             :     }
    1376           0 :     else if( pTextWritingMode && pControlWritingMode )
    1377             :     {
    1378           0 :         pControlWritingMode->mnIndex = -1;
    1379             :     }
    1380             : 
    1381             :     // do not export visual area for internal ole objects
    1382           0 :     if( pOLEIsInternal )
    1383             :     {
    1384           0 :         sal_Bool bInternal = sal_Bool();
    1385           0 :         if( (pOLEIsInternal->maValue >>= bInternal) && !bInternal )
    1386             :         {
    1387             :             try
    1388             :             {
    1389           0 :                 const OUString sVisibleArea( "VisibleArea" );
    1390           0 :                 awt::Rectangle aRect;
    1391           0 :                 if( rPropSet->getPropertyValue( sVisibleArea ) >>= aRect )
    1392             :                 {
    1393           0 :                     if( pOLEVisAreaLeft )
    1394             :                     {
    1395           0 :                         pOLEVisAreaLeft->mnIndex = getPropertySetMapper()->FindEntryIndex( CTF_SD_OLE_VIS_AREA_IMPORT_LEFT );
    1396           0 :                         pOLEVisAreaLeft->maValue <<= aRect;
    1397             :                     }
    1398           0 :                     if( pOLEVisAreaTop )
    1399             :                     {
    1400           0 :                         pOLEVisAreaTop->mnIndex = getPropertySetMapper()->FindEntryIndex( CTF_SD_OLE_VIS_AREA_IMPORT_TOP );
    1401           0 :                         pOLEVisAreaTop->maValue <<=  aRect;
    1402             :                     }
    1403           0 :                     if( pOLEVisAreaWidth )
    1404             :                     {
    1405           0 :                         pOLEVisAreaWidth->mnIndex = getPropertySetMapper()->FindEntryIndex( CTF_SD_OLE_VIS_AREA_IMPORT_WIDTH );
    1406           0 :                         pOLEVisAreaWidth->maValue <<= aRect;
    1407             :                     }
    1408           0 :                     if( pOLEVisAreaHeight )
    1409             :                     {
    1410           0 :                         pOLEVisAreaHeight->mnIndex = getPropertySetMapper()->FindEntryIndex( CTF_SD_OLE_VIS_AREA_IMPORT_HEIGHT );
    1411           0 :                         pOLEVisAreaHeight->maValue <<= aRect;
    1412             :                     }
    1413           0 :                 }
    1414             :             }
    1415           0 :             catch( uno::Exception& )
    1416             :             {
    1417             :             }
    1418             :         }
    1419             :         else
    1420             :         {
    1421           0 :             if( pOLEVisAreaLeft )   pOLEVisAreaLeft->mnIndex = -1;
    1422           0 :             if( pOLEVisAreaTop )    pOLEVisAreaTop->mnIndex = -1;
    1423           0 :             if( pOLEVisAreaWidth )  pOLEVisAreaWidth->mnIndex = -1;
    1424           0 :             if( pOLEVisAreaHeight ) pOLEVisAreaHeight->mnIndex = -1;
    1425             :         }
    1426             : 
    1427           0 :         pOLEIsInternal->mnIndex = -1;
    1428             :     }
    1429             : 
    1430           0 :     if( pTextAnimationBlinking && pTextAnimationKind )
    1431             :     {
    1432             :         drawing::TextAnimationKind eKind;
    1433           0 :         if( (pTextAnimationKind->maValue >>= eKind) && eKind != drawing::TextAnimationKind_BLINK )
    1434             :         {
    1435           0 :             pTextAnimationBlinking->mnIndex = -1;
    1436             :         }
    1437             :         else
    1438             :         {
    1439           0 :             pTextAnimationKind->mnIndex = -1;
    1440             :         }
    1441             :     }
    1442             : 
    1443           0 :     if( pRepeatOffsetX && pRepeatOffsetY )
    1444             :     {
    1445           0 :         sal_Int32 nOffset = 0;
    1446           0 :         if( ( pRepeatOffsetX->maValue >>= nOffset ) && ( nOffset == 0 ) )
    1447           0 :             pRepeatOffsetX->mnIndex = -1;
    1448             :         else
    1449           0 :             pRepeatOffsetY->mnIndex = -1;
    1450             :     }
    1451             : 
    1452           0 :     if(pFontWorkStyle)
    1453             :     {
    1454             :         // #FontWork#
    1455           0 :         sal_Int32 nStyle = 0;
    1456             : 
    1457           0 :         if(pFontWorkStyle->maValue >>= nStyle)
    1458             :         {
    1459           0 :             if(/*XFT_NONE*/4 == nStyle)
    1460             :             {
    1461           0 :                 pFontWorkStyle->mnIndex = -1;
    1462           0 :                 if(pFontWorkAdjust)
    1463           0 :                     pFontWorkAdjust->mnIndex = -1;
    1464           0 :                 if(pFontWorkDistance)
    1465           0 :                     pFontWorkDistance->mnIndex = -1;
    1466           0 :                 if(pFontWorkStart)
    1467           0 :                     pFontWorkStart->mnIndex = -1;
    1468           0 :                 if(pFontWorkMirror)
    1469           0 :                     pFontWorkMirror->mnIndex = -1;
    1470           0 :                 if(pFontWorkOutline)
    1471           0 :                     pFontWorkOutline->mnIndex = -1;
    1472           0 :                 if(pFontWorkShadow)
    1473           0 :                     pFontWorkShadow->mnIndex = -1;
    1474           0 :                 if(pFontWorkShadowColor)
    1475           0 :                     pFontWorkShadowColor->mnIndex = -1;
    1476           0 :                 if(pFontWorkShadowOffsetx)
    1477           0 :                     pFontWorkShadowOffsetx->mnIndex = -1;
    1478           0 :                 if(pFontWorkShadowOffsety)
    1479           0 :                     pFontWorkShadowOffsety->mnIndex = -1;
    1480           0 :                 if(pFontWorkForm)
    1481           0 :                     pFontWorkForm->mnIndex = -1;
    1482           0 :                 if(pFontWorkHideform)
    1483           0 :                     pFontWorkHideform->mnIndex = -1;
    1484           0 :                 if(pFontWorkShadowTransparence)
    1485           0 :                     pFontWorkShadowTransparence->mnIndex = -1;
    1486             :             }
    1487             :         }
    1488             :     }
    1489             : 
    1490           0 :     if( pCaptionIsEscRel )
    1491             :     {
    1492           0 :         sal_Bool bIsRel = false;
    1493           0 :         pCaptionIsEscRel->maValue >>= bIsRel;
    1494             : 
    1495           0 :         if( bIsRel )
    1496             :         {
    1497           0 :             if( pCaptionEscAbs )
    1498           0 :                 pCaptionEscAbs->mnIndex = -1;
    1499             :         }
    1500             :         else
    1501             :         {
    1502           0 :             if( pCaptionEscRel )
    1503           0 :                 pCaptionEscRel->mnIndex = -1;
    1504             :         }
    1505             : 
    1506           0 :         pCaptionIsEscRel->mnIndex = -1;
    1507             :     }
    1508             : 
    1509           0 :     if( pClipState != NULL && pClip11State != NULL  )
    1510           0 :         pClip11State->mnIndex = -1;
    1511             : 
    1512           0 :     SvXMLExportPropertyMapper::ContextFilter(bEnableFoFontFamily, rProperties, rPropSet);
    1513           0 : }
    1514             : 
    1515           0 : void XMLShapeExportPropertyMapper::handleSpecialItem(
    1516             :         SvXMLAttributeList& rAttrList,
    1517             :         const XMLPropertyState& rProperty,
    1518             :         const SvXMLUnitConverter& rUnitConverter,
    1519             :         const SvXMLNamespaceMap& rNamespaceMap,
    1520             :         const ::std::vector< XMLPropertyState > *pProperties,
    1521             :         sal_uInt32 nIdx ) const
    1522             : {
    1523           0 :     switch( getPropertySetMapper()->GetEntryContextId( rProperty.mnIndex ) )
    1524             :     {
    1525             :         case CTF_SD_CONTROL_SHAPE_DATA_STYLE:
    1526             :             // not to be handled by the base class
    1527           0 :             break;
    1528             : 
    1529             :         default:
    1530           0 :             SvXMLExportPropertyMapper::handleSpecialItem( rAttrList, rProperty, rUnitConverter, rNamespaceMap, pProperties, nIdx );
    1531           0 :             break;
    1532             :     }
    1533           0 : }
    1534             : 
    1535           0 : void XMLShapeExportPropertyMapper::handleElementItem(
    1536             :     SvXMLExport& rExport,
    1537             :     const XMLPropertyState& rProperty,
    1538             :     sal_uInt16 nFlags,
    1539             :     const ::std::vector< XMLPropertyState > *pProperties,
    1540             :     sal_uInt32 nIdx) const
    1541             : {
    1542           0 :     switch( getPropertySetMapper()->GetEntryContextId( rProperty.mnIndex ) )
    1543             :     {
    1544             :         case CTF_NUMBERINGRULES:
    1545             :             {
    1546             :                 // only export list-styles as elements in styles section
    1547           0 :                 if( !mbIsInAutoStyles )
    1548             :                 {
    1549           0 :                     uno::Reference< container::XIndexReplace > xNumRule( rProperty.maValue, uno::UNO_QUERY );
    1550           0 :                     if( xNumRule.is() )
    1551           0 :                         const_cast<XMLShapeExportPropertyMapper*>(this)->maNumRuleExp.exportNumberingRule(GetStyleName(), false, xNumRule);
    1552             :                 }
    1553             :             }
    1554           0 :             break;
    1555             :         default:
    1556           0 :             SvXMLExportPropertyMapper::handleElementItem( rExport, rProperty, nFlags, pProperties, nIdx );
    1557           0 :             break;
    1558             :     }
    1559           0 : }
    1560             : 
    1561           0 : XMLPageExportPropertyMapper::XMLPageExportPropertyMapper( const UniReference< XMLPropertySetMapper >& rMapper, SvXMLExport& rExport ) :
    1562             :         SvXMLExportPropertyMapper( rMapper ),
    1563             :         mrExport( rExport ),
    1564           0 :         msCDATA( GetXMLToken(XML_CDATA))
    1565             : {
    1566           0 : }
    1567             : 
    1568           0 : XMLPageExportPropertyMapper::~XMLPageExportPropertyMapper()
    1569             : {
    1570           0 : }
    1571             : 
    1572           0 : void XMLPageExportPropertyMapper::ContextFilter(
    1573             :     bool bEnableFoFontFamily,
    1574             :     std::vector< XMLPropertyState >& rProperties,
    1575             :     uno::Reference< beans::XPropertySet > rPropSet ) const
    1576             : {
    1577           0 :     XMLPropertyState* pRepeatOffsetX = NULL;
    1578           0 :     XMLPropertyState* pRepeatOffsetY = NULL;
    1579           0 :     XMLPropertyState* pTransType = NULL;
    1580           0 :     XMLPropertyState* pTransDuration = NULL;
    1581           0 :     XMLPropertyState* pDateTimeUpdate = NULL;
    1582           0 :     XMLPropertyState* pDateTimeFormat = NULL;
    1583           0 :     XMLPropertyState* pTransitionFadeColor = NULL;
    1584             : 
    1585           0 :     sal_Int16 nTransitionType = 0;
    1586             : 
    1587             :     // filter properties
    1588           0 :     for( std::vector< XMLPropertyState >::iterator aIter = rProperties.begin();
    1589           0 :          aIter != rProperties.end();
    1590             :          ++aIter )
    1591             :     {
    1592           0 :         XMLPropertyState *property = &(*aIter);
    1593           0 :         if( property->mnIndex == -1 )
    1594           0 :             continue;
    1595             : 
    1596             :         // find properties with context
    1597             :         // to prevent writing this property set mnIndex member to -1
    1598           0 :         switch( getPropertySetMapper()->GetEntryContextId( property->mnIndex ))
    1599             :         {
    1600             : 
    1601             :             case CTF_REPEAT_OFFSET_X:
    1602           0 :                 pRepeatOffsetX = property;
    1603           0 :                 break;
    1604             : 
    1605             :             case CTF_REPEAT_OFFSET_Y:
    1606           0 :                 pRepeatOffsetY = property;
    1607           0 :                 break;
    1608             :             case CTF_PAGE_TRANS_TYPE:
    1609           0 :                 pTransType = property;
    1610           0 :                 break;
    1611             :             case CTF_PAGE_TRANS_STYLE:
    1612           0 :                 if( mrExport.getExportFlags() & EXPORT_OASIS )
    1613           0 :                     (*property).mnIndex = -1;
    1614           0 :                 break;
    1615             :             case CTF_PAGE_TRANSITION_TYPE:
    1616             :                 {
    1617           0 :                     if( ((mrExport.getExportFlags() & EXPORT_OASIS) == 0) ||
    1618           0 :                         (((*property).maValue >>= nTransitionType) && (nTransitionType == 0)) )
    1619           0 :                             (*property).mnIndex = -1;
    1620             :                 }
    1621           0 :                 break;
    1622             :             case CTF_PAGE_TRANSITION_SUBTYPE:
    1623             :                 {
    1624           0 :                     sal_Int16 nTransitionSubtype = sal_Int16();
    1625           0 :                     if( ((mrExport.getExportFlags() & EXPORT_OASIS) == 0) ||
    1626           0 :                         (((*property).maValue >>= nTransitionSubtype) && (nTransitionSubtype == 0)) )
    1627           0 :                             (*property).mnIndex = -1;
    1628             : 
    1629             :                 }
    1630           0 :                 break;
    1631             :             case CTF_PAGE_TRANSITION_DIRECTION:
    1632             :                 {
    1633           0 :                     sal_Bool bDirection = sal_Bool();
    1634           0 :                     if( ((mrExport.getExportFlags() & EXPORT_OASIS) == 0) ||
    1635           0 :                         (((*property).maValue >>= bDirection) && bDirection) )
    1636           0 :                             (*property).mnIndex = -1;
    1637             :                 }
    1638           0 :                 break;
    1639             :             case CTF_PAGE_TRANSITION_FADECOLOR:
    1640           0 :                 if( ((mrExport.getExportFlags() & EXPORT_OASIS) == 0) )
    1641           0 :                     (*property).mnIndex = -1;
    1642             :                 else
    1643           0 :                     pTransitionFadeColor = property;
    1644           0 :                 break;
    1645             :             case CTF_PAGE_TRANS_SPEED:
    1646             :                 {
    1647             :                     presentation::AnimationSpeed aEnum;
    1648           0 :                     if( ((*property).maValue >>= aEnum) && aEnum == presentation::AnimationSpeed_MEDIUM )
    1649           0 :                         (*property).mnIndex = -1;
    1650             :                 }
    1651           0 :                 break;
    1652             :             case CTF_PAGE_VISIBLE:
    1653             :                 {
    1654           0 :                     sal_Bool bVisible = false;
    1655           0 :                     (*property).maValue >>= bVisible;
    1656           0 :                     if( bVisible )
    1657           0 :                         (*property).mnIndex = -1;
    1658             :                 }
    1659           0 :                 break;
    1660             :             case CTF_PAGE_TRANS_DURATION:
    1661           0 :                 pTransDuration = property;
    1662           0 :                 break;
    1663             :             case CTF_HEADER_TEXT:
    1664             :             case CTF_FOOTER_TEXT:
    1665             :             case CTF_DATE_TIME_TEXT:
    1666             :                 {
    1667           0 :                     OUString aValue;
    1668           0 :                     (*property).maValue >>= aValue;
    1669           0 :                     if( aValue.isEmpty() )
    1670           0 :                         (*property).mnIndex = -1;
    1671             :                 }
    1672           0 :                 break;
    1673             : 
    1674             :             case CTF_DATE_TIME_UPDATE:
    1675           0 :                 pDateTimeUpdate = property;
    1676           0 :                 break;
    1677             : 
    1678             :             case CTF_DATE_TIME_FORMAT:
    1679           0 :                 pDateTimeFormat = property;
    1680           0 :                 break;
    1681             :         }
    1682             :     }
    1683             : 
    1684           0 :     if( pTransitionFadeColor && nTransitionType != ::com::sun::star::animations::TransitionType::FADE )
    1685           0 :         pTransitionFadeColor->mnIndex = -1;
    1686             : 
    1687           0 :     if( pDateTimeFormat && pDateTimeUpdate )
    1688             :     {
    1689           0 :         sal_Bool bIsFixed = false;
    1690           0 :         pDateTimeUpdate->maValue >>= bIsFixed;
    1691           0 :         if( bIsFixed )
    1692           0 :             pDateTimeFormat->mnIndex = -1;
    1693             :     }
    1694             : 
    1695           0 :     if( pRepeatOffsetX && pRepeatOffsetY )
    1696             :     {
    1697           0 :         sal_Int32 nOffset = 0;
    1698           0 :         if( ( pRepeatOffsetX->maValue >>= nOffset ) && ( nOffset == 0 ) )
    1699           0 :             pRepeatOffsetX->mnIndex = -1;
    1700             :         else
    1701           0 :             pRepeatOffsetY->mnIndex = -1;
    1702             :     }
    1703             : 
    1704           0 :     if( pTransType && pTransDuration )
    1705             :     {
    1706           0 :         sal_Int32 nChange = 0;
    1707           0 :         pTransType->maValue >>= nChange;
    1708             : 
    1709             :         // only export duration for automatic
    1710           0 :         if( nChange != 1 )
    1711           0 :             pTransDuration->mnIndex = -1;
    1712             : 
    1713             :         // do not export default transition change
    1714           0 :         if( nChange == 0 )
    1715           0 :             pTransType->mnIndex = -1;
    1716             :     }
    1717             : 
    1718           0 :     SvXMLExportPropertyMapper::ContextFilter(bEnableFoFontFamily, rProperties, rPropSet);
    1719           0 : }
    1720             : 
    1721           0 : void XMLPageExportPropertyMapper::handleElementItem(
    1722             :     SvXMLExport& rExport,
    1723             :     const XMLPropertyState& rProperty,
    1724             :     sal_uInt16 nFlags,
    1725             :     const ::std::vector< XMLPropertyState > *pProperties,
    1726             :     sal_uInt32 nIdx) const
    1727             : {
    1728           0 :     switch( getPropertySetMapper()->GetEntryContextId( rProperty.mnIndex ) )
    1729             :     {
    1730             :         case CTF_PAGE_SOUND_URL:
    1731             :             {
    1732           0 :                 OUString aSoundURL;
    1733           0 :                 if( (rProperty.maValue >>= aSoundURL) && !aSoundURL.isEmpty() )
    1734             :                 {
    1735           0 :                     mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, mrExport.GetRelativeReference(aSoundURL) );
    1736           0 :                     mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
    1737           0 :                     mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_SHOW, XML_NEW );
    1738           0 :                     mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONREQUEST );
    1739           0 :                     SvXMLElementExport aElem( mrExport, XML_NAMESPACE_PRESENTATION, XML_SOUND, true, true );
    1740           0 :                 }
    1741             :             }
    1742           0 :             break;
    1743             :         default:
    1744           0 :             SvXMLExportPropertyMapper::handleElementItem( rExport, rProperty, nFlags, pProperties, nIdx );
    1745           0 :             break;
    1746             :     }
    1747           0 : }
    1748             : 
    1749             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10