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

Generated by: LCOV version 1.10