LCOV - code coverage report
Current view: top level - drawinglayer/source/dumper - XShapeDumper.cxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 899 1071 83.9 %
Date: 2014-11-03 Functions: 106 111 95.5 %
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             : 
      10             : #include <drawinglayer/XShapeDumper.hxx>
      11             : #include "EnhancedShapeDumper.hxx"
      12             : #include <com/sun/star/drawing/XShapes.hpp>
      13             : #include <com/sun/star/drawing/XShape.hpp>
      14             : #include <com/sun/star/lang/XServiceInfo.hpp>
      15             : #include <com/sun/star/beans/XPropertySet.hpp>
      16             : #include <com/sun/star/text/XText.hpp>
      17             : #include <rtl/strbuf.hxx>
      18             : #include <libxml/xmlwriter.h>
      19             : #include <iostream>
      20             : #include <rtl/ustring.hxx>
      21             : 
      22             : #define DEBUG_DUMPER 0
      23             : 
      24             : using namespace com::sun::star;
      25             : //class XShapeDumper
      26             : 
      27          18 : XShapeDumper::XShapeDumper()
      28             : {
      29             : 
      30          18 : }
      31             : 
      32             : namespace {
      33             : 
      34             : // FUNCTION DECLARATIONS
      35             : 
      36             : // auxiliary functions
      37             : void dumpGradientProperty(com::sun::star::awt::Gradient aGradient, xmlTextWriterPtr xmlWriter);
      38             : void dumpPolyPolygonBezierCoords(com::sun::star::drawing::PolyPolygonBezierCoords aPolyPolygonBezierCoords, xmlTextWriterPtr xmlWriter);
      39             : void dumpPointSequenceSequence(const com::sun::star::drawing::PointSequenceSequence& aPointSequenceSequence, uno::Sequence<uno::Sequence<drawing::PolygonFlags> >*, xmlTextWriterPtr xmlWriter);
      40             : void dumpPropertyValueAsElement(const beans::PropertyValue& rPropertyValue, xmlTextWriterPtr xmlWriter);
      41             : 
      42             : // FillProperties.idl
      43             : void dumpFillStyleAsAttribute(com::sun::star::drawing::FillStyle eFillStyle, xmlTextWriterPtr xmlWriter);
      44             : void dumpFillColorAsAttribute(sal_Int32 aColor, xmlTextWriterPtr xmlWriter);
      45             : void dumpFillTransparenceAsAttribute(sal_Int32 aTransparence, xmlTextWriterPtr xmlWriter);
      46             : void dumpFillTransparenceGradientNameAsAttribute(const OUString& sTranspGradName, xmlTextWriterPtr xmlWriter);
      47             : void dumpFillTransparenceGradientAsElement(com::sun::star::awt::Gradient aTranspGrad, xmlTextWriterPtr xmlWriter);
      48             : void dumpFillGradientNameAsAttribute(const OUString& sGradName, xmlTextWriterPtr xmlWriter);
      49             : void dumpFillGradientAsElement(com::sun::star::awt::Gradient aGradient, xmlTextWriterPtr xmlWriter);
      50             : void dumpFillHatchAsElement(com::sun::star::drawing::Hatch aHatch, xmlTextWriterPtr xmlWriter);
      51             : void dumpFillBackgroundAsAttribute(bool bBackground, xmlTextWriterPtr xmlWriter);
      52             : void dumpFillBitmapAsElement(com::sun::star::uno::Reference<com::sun::star::awt::XBitmap> xBitmap, xmlTextWriterPtr xmlWriter);
      53             : void dumpFillBitmapURLAsAttribute(const OUString& sBitmapURL, xmlTextWriterPtr xmlWriter);
      54             : void dumpFillBitmapPositionOffsetXAsAttribute(sal_Int32 aBitmapPositionOffsetX, xmlTextWriterPtr xmlWriter);
      55             : void dumpFillBitmapPositionOffsetYAsAttribute(sal_Int32 aBitmapPositionOffsetY, xmlTextWriterPtr xmlWriter);
      56             : void dumpFillBitmapOffsetXAsAttribute(sal_Int32 aBitmapOffsetX, xmlTextWriterPtr xmlWriter);
      57             : void dumpFillBitmapOffsetYAsAttribute(sal_Int32 aBitmapOffsetY, xmlTextWriterPtr xmlWriter);
      58             : void dumpFillBitmapRectanglePointAsAttribute(com::sun::star::drawing::RectanglePoint eBitmapRectanglePoint, xmlTextWriterPtr xmlWriter);
      59             : void dumpFillBitmapLogicalSizeAsAttribute(bool bBitmapLogicalSize, xmlTextWriterPtr xmlWriter);
      60             : void dumpFillBitmapSizeXAsAttribute(sal_Int32 aBitmapSizeX, xmlTextWriterPtr xmlWriter);
      61             : void dumpFillBitmapSizeYAsAttribute(sal_Int32 aBitmapSizeY, xmlTextWriterPtr xmlWriter);
      62             : void dumpFillBitmapModeAsAttribute(com::sun::star::drawing::BitmapMode eBitmapMode, xmlTextWriterPtr xmlWriter);
      63             : void dumpFillBitmapStretchAsAttribute(bool bBitmapStretch, xmlTextWriterPtr xmlWriter);
      64             : void dumpFillBitmapTileAsAttribute(bool bBitmapTile, xmlTextWriterPtr xmlWriter);
      65             : 
      66             : // LineProperties.idl
      67             : void dumpLineStyleAsAttribute(com::sun::star::drawing::LineStyle eLineStyle, xmlTextWriterPtr xmlWriter);
      68             : void dumpLineDashAsElement(com::sun::star::drawing::LineDash aLineDash, xmlTextWriterPtr xmlWriter);
      69             : void dumpLineDashNameAsAttribute(const OUString& sLineDashName, xmlTextWriterPtr xmlWriter);
      70             : void dumpLineColorAsAttribute(sal_Int32 aLineColor, xmlTextWriterPtr xmlWriter);
      71             : void dumpLineTransparenceAsAttribute(sal_Int32 aLineTransparence, xmlTextWriterPtr xmlWriter);
      72             : void dumpLineWidthAsAttribute(sal_Int32 aLineWidth, xmlTextWriterPtr xmlWriter);
      73             : void dumpLineJointAsAttribute(com::sun::star::drawing::LineJoint eLineJoint, xmlTextWriterPtr xmlWriter);
      74             : void dumpLineStartNameAsAttribute(const OUString& sLineStartName, xmlTextWriterPtr xmlWriter);
      75             : void dumpLineEndNameAsAttribute(const OUString& sLineEndName, xmlTextWriterPtr xmlWriter);
      76             : void dumpLineStartAsElement(com::sun::star::drawing::PolyPolygonBezierCoords aLineStart, xmlTextWriterPtr xmlWriter);
      77             : void dumpLineEndAsElement(com::sun::star::drawing::PolyPolygonBezierCoords aLineEnd, xmlTextWriterPtr xmlWriter);
      78             : void dumpLineStartCenterAsAttribute(bool bLineStartCenter, xmlTextWriterPtr xmlWriter);
      79             : void dumpLineStartWidthAsAttribute(sal_Int32 aLineStartWidth, xmlTextWriterPtr xmlWriter);
      80             : void dumpLineEndCenterAsAttribute(bool bLineEndCenter, xmlTextWriterPtr xmlWriter);
      81             : void dumpLineEndWidthAsAttribute(sal_Int32 aLineEndWidth, xmlTextWriterPtr xmlWriter);
      82             : 
      83             : // PolyPolygonDescriptor.idl
      84             : void dumpPolygonKindAsAttribute(com::sun::star::drawing::PolygonKind ePolygonKind, xmlTextWriterPtr xmlWriter);
      85             : void dumpPolyPolygonAsElement(const com::sun::star::drawing::PointSequenceSequence& aPolyPolygon, xmlTextWriterPtr xmlWriter);
      86             : void dumpGeometryAsElement(const com::sun::star::drawing::PointSequenceSequence& aGeometry, xmlTextWriterPtr xmlWriter);
      87             : 
      88             : // CharacterProperties.idl
      89             : void dumpCharHeightAsAttribute(float fHeight, xmlTextWriterPtr xmlWriter);
      90             : void dumpCharColorAsAttribute(sal_Int32 aColor, xmlTextWriterPtr xmlWriter);
      91             : 
      92             : // TextProperties.idl
      93             : void dumpIsNumberingAsAttribute(bool bIsNumbering, xmlTextWriterPtr xmlWriter);
      94             : void dumpTextAutoGrowHeightAsAttribute(bool bTextAutoGrowHeight, xmlTextWriterPtr xmlWriter);
      95             : void dumpTextAutoGrowWidthAsAttribute(bool bTextAutoGrowWidth, xmlTextWriterPtr xmlWriter);
      96             : void dumpTextContourFrameAsAttribute(bool bTextContourFrame, xmlTextWriterPtr xmlWriter);
      97             : void dumpTextFitToSizeAsAttribute(com::sun::star::drawing::TextFitToSizeType eTextFitToSize, xmlTextWriterPtr xmlWriter);
      98             : void dumpTextHorizontalAdjustAsAttribute(com::sun::star::drawing::TextHorizontalAdjust eTextHorizontalAdjust, xmlTextWriterPtr xmlWriter);
      99             : void dumpTextVerticalAdjustAsAttribute(com::sun::star::drawing::TextVerticalAdjust eTextVerticalAdjust, xmlTextWriterPtr xmlWriter);
     100             : void dumpTextLeftDistanceAsAttribute(sal_Int32 aTextLeftDistance, xmlTextWriterPtr xmlWriter);
     101             : void dumpTextRightDistanceAsAttribute(sal_Int32 aTextRightDistance, xmlTextWriterPtr xmlWriter);
     102             : void dumpTextUpperDistanceAsAttribute(sal_Int32 aTextUpperDistance, xmlTextWriterPtr xmlWriter);
     103             : void dumpTextLowerDistanceAsAttribute(sal_Int32 aTextLowerDistance, xmlTextWriterPtr xmlWriter);
     104             : void dumpTextMaximumFrameHeightAsAttribute(sal_Int32 aTextMaximumFrameHeight, xmlTextWriterPtr xmlWriter);
     105             : void dumpTextMaximumFrameWidthAsAttribute(sal_Int32 aTextMaximumFrameWidth, xmlTextWriterPtr xmlWriter);
     106             : void dumpTextMinimumFrameHeightAsAttribute(sal_Int32 aTextMinimumFrameHeight, xmlTextWriterPtr xmlWriter);
     107             : void dumpTextMinimumFrameWidthAsAttribute(sal_Int32 aTextMinimumFrameWidth, xmlTextWriterPtr xmlWriter);
     108             : void dumpTextAnimationAmountAsAttribute(sal_Int32 aTextAnimationAmount, xmlTextWriterPtr xmlWriter);
     109             : void dumpTextAnimationCountAsAttribute(sal_Int32 aTextAnimationCount, xmlTextWriterPtr xmlWriter);
     110             : void dumpTextAnimationDelayAsAttribute(sal_Int32 aTextAnimationDelay, xmlTextWriterPtr xmlWriter);
     111             : void dumpTextAnimationDirectionAsAttribute(com::sun::star::drawing::TextAnimationDirection eTextAnimationDirection, xmlTextWriterPtr xmlWriter);
     112             : void dumpTextAnimationKindAsAttribute(com::sun::star::drawing::TextAnimationKind eTextAnimationKind, xmlTextWriterPtr xmlWriter);
     113             : void dumpTextAnimationStartInsideAsAttribute(bool bTextAnimationStartInside, xmlTextWriterPtr xmlWriter);
     114             : void dumpTextAnimationStopInsideAsAttribute(bool bTextAnimationStopInside, xmlTextWriterPtr xmlWriter);
     115             : void dumpTextWritingModeAsAttribute(com::sun::star::text::WritingMode eWritingMode, xmlTextWriterPtr xmlWriter);
     116             : 
     117             : // ShadowProperties.idl
     118             : void dumpShadowAsAttribute(bool bShadow, xmlTextWriterPtr xmlWriter);
     119             : void dumpShadowColorAsAttribute(sal_Int32 aShadowColor, xmlTextWriterPtr xmlWriter);
     120             : void dumpShadowTransparenceAsAttribute(sal_Int32 aShadowTransparence, xmlTextWriterPtr xmlWriter);
     121             : void dumpShadowXDistanceAsAttribute(sal_Int32 aShadowXDistance, xmlTextWriterPtr xmlWriter);
     122             : void dumpShadowYDistanceAsAttribute(sal_Int32 aShadowYDistance, xmlTextWriterPtr xmlWriter);
     123             : 
     124             : //Shape.idl
     125             : void dumpZOrderAsAttribute(sal_Int32 aZOrder, xmlTextWriterPtr xmlWriter);
     126             : void dumpLayerIDAsAttribute(sal_Int32 aLayerID, xmlTextWriterPtr xmlWriter);
     127             : void dumpLayerNameAsAttribute(const OUString& sLayerName, xmlTextWriterPtr xmlWriter);
     128             : void dumpVisibleAsAttribute(bool bVisible, xmlTextWriterPtr xmlWriter);
     129             : void dumpPrintableAsAttribute(bool bPrintable, xmlTextWriterPtr xmlWriter);
     130             : void dumpMoveProtectAsAttribute(bool bMoveProtect, xmlTextWriterPtr xmlWriter);
     131             : void dumpNameAsAttribute(const OUString& sName, xmlTextWriterPtr xmlWriter);
     132             : void dumpSizeProtectAsAttribute(bool bSizeProtect, xmlTextWriterPtr xmlWriter);
     133             : void dumpHomogenMatrixLine3(com::sun::star::drawing::HomogenMatrixLine3 aLine, xmlTextWriterPtr xmlWriter);
     134             : void dumpTransformationAsElement(com::sun::star::drawing::HomogenMatrix3 aTransformation, xmlTextWriterPtr xmlWriter);
     135             : void dumpNavigationOrderAsAttribute(sal_Int32 aNavigationOrder, xmlTextWriterPtr xmlWriter);
     136             : void dumpHyperlinkAsAttribute(const OUString& sHyperlink, xmlTextWriterPtr xmlWriter);
     137             : void dumpInteropGrabBagAsElement(const uno::Sequence< beans::PropertyValue>& aInteropGrabBag, xmlTextWriterPtr xmlWriter);
     138             : 
     139             : // CustomShape.idl
     140             : void dumpCustomShapeEngineAsAttribute(const OUString& sCustomShapeEngine, xmlTextWriterPtr xmlWriter);
     141             : void dumpCustomShapeDataAsAttribute(const OUString& sCustomShapeData, xmlTextWriterPtr xmlWriter);
     142             : void dumpCustomShapeGeometryAsElement(const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue>& aCustomShapeGeometry, xmlTextWriterPtr xmlWriter);
     143             : void dumpCustomShapeReplacementURLAsAttribute(const OUString& sCustomShapeReplacementURL, xmlTextWriterPtr xmlWriter);
     144             : 
     145             : // XShape.idl
     146             : void dumpPositionAsAttribute(const com::sun::star::awt::Point& rPoint, xmlTextWriterPtr xmlWriter);
     147             : void dumpSizeAsAttribute(const com::sun::star::awt::Size& rSize, xmlTextWriterPtr xmlWriter);
     148             : 
     149             : // the rest
     150             : void dumpShapeDescriptorAsAttribute( com::sun::star::uno::Reference< com::sun::star::drawing::XShapeDescriptor > xDescr, xmlTextWriterPtr xmlWriter );
     151             : void dumpXShape(com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xShape, xmlTextWriterPtr xmlWriter, bool bDumpInteropProperties);
     152             : void dumpXShapes( com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > xShapes, xmlTextWriterPtr xmlWriter, bool bDumpInteropProperties );
     153             : void dumpTextPropertiesService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter);
     154             : void dumpFillPropertiesService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter);
     155             : void dumpLinePropertiesService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter);
     156             : void dumpShadowPropertiesService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter);
     157             : void dumpPolyPolygonDescriptorService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter);
     158             : void dumpShapeService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter, bool bDumpInteropProperties);
     159             : void dumpPolyPolygonBezierDescriptorService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter);
     160             : void dumpCustomShapeService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter);
     161             : 
     162             : 
     163         628 : int writeCallback(void* pContext, const char* sBuffer, int nLen)
     164             : {
     165         628 :     OStringBuffer* pBuffer = static_cast<OStringBuffer*>(pContext);
     166         628 :     pBuffer->append(sBuffer);
     167         628 :     return nLen;
     168             : }
     169             : 
     170          36 : int closeCallback(void* )
     171             : {
     172          36 :     return 0;
     173             : }
     174             : 
     175             : bool m_bNameDumped;
     176             : 
     177             : 
     178             : // ---------- FillProperties.idl ----------
     179             : 
     180         500 : void dumpFillStyleAsAttribute(drawing::FillStyle eFillStyle, xmlTextWriterPtr xmlWriter)
     181             : {
     182         500 :     switch(eFillStyle)
     183             :     {
     184             :         case drawing::FillStyle_NONE:
     185         156 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillStyle"), "%s", "NONE");
     186         156 :             break;
     187             :         case drawing::FillStyle_SOLID:
     188         112 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillStyle"), "%s", "SOLID");
     189         112 :             break;
     190             :         case drawing::FillStyle_GRADIENT:
     191         122 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillStyle"), "%s", "GRADIENT");
     192         122 :             break;
     193             :         case drawing::FillStyle_HATCH:
     194         110 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillStyle"), "%s", "HATCH");
     195         110 :             break;
     196             :         case drawing::FillStyle_BITMAP:
     197           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillStyle"), "%s", "BITMAP");
     198           0 :             break;
     199             :         default:
     200           0 :             break;
     201             :     }
     202         500 : }
     203             : 
     204         500 : void dumpFillColorAsAttribute(sal_Int32 aColor, xmlTextWriterPtr xmlWriter)
     205             : {
     206         500 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillColor"), "%06x", (unsigned int) aColor);
     207         500 : }
     208             : 
     209         500 : void dumpFillTransparenceAsAttribute(sal_Int32 aTransparence, xmlTextWriterPtr xmlWriter)
     210             : {
     211         500 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillTransparence"), "%" SAL_PRIdINT32, aTransparence);
     212         500 : }
     213             : 
     214         500 : void dumpFillTransparenceGradientNameAsAttribute(const OUString& sTranspGradName, xmlTextWriterPtr xmlWriter)
     215             : {
     216             :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillTransparenceGradientName"), "%s",
     217         500 :         OUStringToOString(sTranspGradName, RTL_TEXTENCODING_UTF8).getStr());
     218         500 : }
     219             : 
     220             : //because there's more awt::Gradient properties to dump
     221        1000 : void dumpGradientProperty(awt::Gradient aGradient, xmlTextWriterPtr xmlWriter)
     222             : {
     223        1000 :     switch(aGradient.Style)   //enum GradientStyle
     224             :     {
     225             :         case awt::GradientStyle_LINEAR:
     226         994 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("style"), "%s", "LINEAR");
     227         994 :             break;
     228             :         case awt::GradientStyle_AXIAL:
     229           2 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("style"), "%s", "AXIAL");
     230           2 :             break;
     231             :         case awt::GradientStyle_RADIAL:
     232           2 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("style"), "%s", "RADIAL");
     233           2 :             break;
     234             :         case awt::GradientStyle_ELLIPTICAL:
     235           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("style"), "%s", "ELLIPTICAL");
     236           0 :             break;
     237             :         case awt::GradientStyle_SQUARE:
     238           2 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("style"), "%s", "SQUARE");
     239           2 :             break;
     240             :         case awt::GradientStyle_RECT:
     241           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("style"), "%s", "RECT");
     242           0 :             break;
     243             :         default:
     244           0 :             break;
     245             :     }
     246        1000 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("startColor"), "%06x", (unsigned int) aGradient.StartColor);
     247        1000 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("endColor"), "%06x", (unsigned int) aGradient.EndColor);
     248        1000 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("angle"), "%" SAL_PRIdINT32, (sal_Int32) aGradient.Angle);
     249        1000 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("border"), "%" SAL_PRIdINT32, (sal_Int32) aGradient.Border);
     250        1000 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("xOffset"), "%" SAL_PRIdINT32, (sal_Int32) aGradient.XOffset);
     251        1000 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("yOffset"), "%" SAL_PRIdINT32, (sal_Int32) aGradient.YOffset);
     252        1000 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("startIntensity"), "%" SAL_PRIdINT32, (sal_Int32) aGradient.StartIntensity);
     253        1000 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("endIntensity"), "%" SAL_PRIdINT32, (sal_Int32) aGradient.EndIntensity);
     254        1000 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("stepCount"), "%" SAL_PRIdINT32, (sal_Int32) aGradient.StepCount);
     255        1000 : }
     256             : 
     257         500 : void dumpFillTransparenceGradientAsElement(awt::Gradient aTranspGrad, xmlTextWriterPtr xmlWriter)
     258             : {
     259         500 :     xmlTextWriterStartElement(xmlWriter, BAD_CAST( "FillTransparenceGradient" ));
     260         500 :     dumpGradientProperty(aTranspGrad, xmlWriter);
     261         500 :     xmlTextWriterEndElement( xmlWriter );
     262         500 : }
     263             : 
     264        1500 : void dumpFillGradientNameAsAttribute(const OUString& sGradName, xmlTextWriterPtr xmlWriter)
     265             : {
     266             :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillGradientName"), "%s",
     267        1500 :         OUStringToOString(sGradName, RTL_TEXTENCODING_UTF8).getStr());
     268        1500 : }
     269             : 
     270         500 : void dumpFillGradientAsElement(awt::Gradient aGradient, xmlTextWriterPtr xmlWriter)
     271             : {
     272         500 :     xmlTextWriterStartElement(xmlWriter, BAD_CAST( "FillGradient" ));
     273         500 :     dumpGradientProperty(aGradient, xmlWriter);
     274         500 :     xmlTextWriterEndElement( xmlWriter );
     275         500 : }
     276             : 
     277         500 : void dumpFillHatchAsElement(drawing::Hatch aHatch, xmlTextWriterPtr xmlWriter)
     278             : {
     279         500 :     xmlTextWriterStartElement(xmlWriter, BAD_CAST( "FillHatch" ));
     280         500 :     switch(aHatch.Style)
     281             :     {
     282             :         case drawing::HatchStyle_SINGLE:
     283         444 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("style"), "%s", "SINGLE");
     284         444 :             break;
     285             :         case drawing::HatchStyle_DOUBLE:
     286          38 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("style"), "%s", "DOUBLE");
     287          38 :             break;
     288             :         case drawing::HatchStyle_TRIPLE:
     289          18 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("style"), "%s", "TRIPLE");
     290          18 :             break;
     291             :         default:
     292           0 :             break;
     293             :     }
     294         500 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("color"), "%06x", (unsigned int) aHatch.Color);
     295         500 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("distance"), "%" SAL_PRIdINT32, (sal_Int32) aHatch.Distance);
     296         500 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("angle"), "%" SAL_PRIdINT32, (sal_Int32) aHatch.Angle);
     297         500 :     xmlTextWriterEndElement( xmlWriter );
     298         500 : }
     299             : 
     300         500 : void dumpFillBackgroundAsAttribute(bool bBackground, xmlTextWriterPtr xmlWriter)
     301             : {
     302         500 :     if(bBackground)
     303           0 :         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBackground"), "%s", "true");
     304             :     else
     305         500 :         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBackground"), "%s", "false");
     306         500 : }
     307             : 
     308         500 : void dumpFillBitmapAsElement(uno::Reference<awt::XBitmap> xBitmap, xmlTextWriterPtr xmlWriter)
     309             : {
     310         500 :     xmlTextWriterStartElement(xmlWriter, BAD_CAST( "FillBitmap" ));
     311         500 :     if (xBitmap.is())
     312             :     {
     313         486 :         awt::Size const aSize = xBitmap->getSize();
     314         486 :         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("width"), "%" SAL_PRIdINT32, aSize.Width);
     315         486 :         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("height"), "%" SAL_PRIdINT32, aSize.Height);
     316             :     }
     317         500 :     xmlTextWriterEndElement( xmlWriter );
     318         500 : }
     319             : 
     320         500 : void dumpFillBitmapURLAsAttribute(const OUString& sBitmapURL, xmlTextWriterPtr xmlWriter)
     321             : {
     322             :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillBitmapURL"), "%s",
     323         500 :         OUStringToOString(sBitmapURL, RTL_TEXTENCODING_UTF8).getStr());
     324         500 : }
     325             : 
     326         500 : void dumpFillBitmapPositionOffsetXAsAttribute(sal_Int32 aBitmapPositionOffsetX, xmlTextWriterPtr xmlWriter)
     327             : {
     328         500 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillBitmapPositionOffsetX"), "%" SAL_PRIdINT32, aBitmapPositionOffsetX);
     329         500 : }
     330             : 
     331         500 : void dumpFillBitmapPositionOffsetYAsAttribute(sal_Int32 aBitmapPositionOffsetY, xmlTextWriterPtr xmlWriter)
     332             : {
     333         500 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillBitmapPositionOffsetY"), "%" SAL_PRIdINT32, aBitmapPositionOffsetY);
     334         500 : }
     335             : 
     336         500 : void dumpFillBitmapOffsetXAsAttribute(sal_Int32 aBitmapOffsetX, xmlTextWriterPtr xmlWriter)
     337             : {
     338         500 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillBitmapOffsetX"), "%" SAL_PRIdINT32, aBitmapOffsetX);
     339         500 : }
     340             : 
     341         500 : void dumpFillBitmapOffsetYAsAttribute(sal_Int32 aBitmapOffsetY, xmlTextWriterPtr xmlWriter)
     342             : {
     343         500 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillBitmapOffsetY"), "%" SAL_PRIdINT32, aBitmapOffsetY);
     344         500 : }
     345             : 
     346         500 : void dumpFillBitmapRectanglePointAsAttribute(drawing::RectanglePoint eBitmapRectanglePoint, xmlTextWriterPtr xmlWriter)
     347             : {
     348         500 :     switch(eBitmapRectanglePoint)
     349             :     {
     350             :         case drawing::RectanglePoint_LEFT_TOP:
     351           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapRectanglePoint"), "%s", "LEFT_TOP");
     352           0 :             break;
     353             :         case drawing::RectanglePoint_MIDDLE_TOP:
     354           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapRectanglePoint"), "%s", "MIDDLE_TOP");
     355           0 :             break;
     356             :         case drawing::RectanglePoint_RIGHT_TOP:
     357           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapRectanglePoint"), "%s", "RIGHT_TOP");
     358           0 :             break;
     359             :         case drawing::RectanglePoint_LEFT_MIDDLE:
     360           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapRectanglePoint"), "%s", "LEFT_MIDDLE");
     361           0 :             break;
     362             :         case drawing::RectanglePoint_MIDDLE_MIDDLE:
     363         500 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapRectanglePoint"), "%s", "MIDDLE_MIDDLE");
     364         500 :             break;
     365             :         case drawing::RectanglePoint_RIGHT_MIDDLE:
     366           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapRectanglePoint"), "%s", "RIGHT_MIDDLE");
     367           0 :             break;
     368             :         case drawing::RectanglePoint_LEFT_BOTTOM:
     369           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapRectanglePoint"), "%s", "LEFT_BOTTOM");
     370           0 :             break;
     371             :         case drawing::RectanglePoint_MIDDLE_BOTTOM:
     372           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapRectanglePoint"), "%s", "MIDDLE_BOTTOM");
     373           0 :             break;
     374             :         case drawing::RectanglePoint_RIGHT_BOTTOM:
     375           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapRectanglePoint"), "%s", "RIGHT_BOTTOM");
     376           0 :             break;
     377             :         default:
     378           0 :             break;
     379             :     }
     380         500 : }
     381             : 
     382         500 : void dumpFillBitmapLogicalSizeAsAttribute(bool bBitmapLogicalSize, xmlTextWriterPtr xmlWriter)
     383             : {
     384         500 :     if(bBitmapLogicalSize)
     385         500 :         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapLogicalSize"), "%s", "true");
     386             :     else
     387           0 :         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapLogicalSize"), "%s", "false");
     388         500 : }
     389             : 
     390         500 : void dumpFillBitmapSizeXAsAttribute(sal_Int32 aBitmapSizeX, xmlTextWriterPtr xmlWriter)
     391             : {
     392         500 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillBitmapSizeX"), "%" SAL_PRIdINT32, aBitmapSizeX);
     393         500 : }
     394             : 
     395         500 : void dumpFillBitmapSizeYAsAttribute(sal_Int32 aBitmapSizeY, xmlTextWriterPtr xmlWriter)
     396             : {
     397         500 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillBitmapSizeY"), "%" SAL_PRIdINT32, aBitmapSizeY);
     398         500 : }
     399             : 
     400         500 : void dumpFillBitmapModeAsAttribute(drawing::BitmapMode eBitmapMode, xmlTextWriterPtr xmlWriter)
     401             : {
     402         500 :     switch(eBitmapMode)
     403             :     {
     404             :         case drawing::BitmapMode_REPEAT:
     405         500 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapMode"), "%s", "REPEAT");
     406         500 :             break;
     407             :         case drawing::BitmapMode_STRETCH:
     408           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapMode"), "%s", "STRETCH");
     409           0 :             break;
     410             :         case drawing::BitmapMode_NO_REPEAT:
     411           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapMode"), "%s", "NO_REPEAT");
     412           0 :             break;
     413             :         default:
     414           0 :             break;
     415             :     }
     416         500 : }
     417             : 
     418         500 : void dumpFillBitmapStretchAsAttribute(bool bBitmapStretch, xmlTextWriterPtr xmlWriter)
     419             : {
     420         500 :     if(bBitmapStretch)
     421         500 :         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapStretch"), "%s", "true");
     422             :     else
     423           0 :         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapStretch"), "%s", "false");
     424         500 : }
     425             : 
     426         500 : void dumpFillBitmapTileAsAttribute(bool bBitmapTile, xmlTextWriterPtr xmlWriter)
     427             : {
     428         500 :     if(bBitmapTile)
     429         500 :         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapTile"), "%s", "true");
     430             :     else
     431           0 :         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapTile"), "%s", "false");
     432         500 : }
     433             : 
     434             : 
     435             : // ---------- LineProperties.idl ----------
     436             : 
     437             : 
     438         508 : void dumpLineStyleAsAttribute(drawing::LineStyle eLineStyle, xmlTextWriterPtr xmlWriter)
     439             : {
     440         508 :     switch(eLineStyle)
     441             :     {
     442             :         case drawing::LineStyle_NONE:
     443         132 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("lineStyle"), "%s", "NONE");
     444         132 :             break;
     445             :         case drawing::LineStyle_SOLID:
     446         376 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("lineStyle"), "%s", "SOLID");
     447         376 :             break;
     448             :         case drawing::LineStyle_DASH:
     449           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("lineStyle"), "%s", "DASH");
     450           0 :             break;
     451             :         default:
     452           0 :             break;
     453             :     }
     454         508 : }
     455             : 
     456         508 : void dumpLineDashAsElement(drawing::LineDash aLineDash, xmlTextWriterPtr xmlWriter)
     457             : {
     458         508 :     xmlTextWriterStartElement(xmlWriter, BAD_CAST( "LineDash" ));
     459         508 :     switch(aLineDash.Style)
     460             :     {
     461             :         case drawing::DashStyle_RECT:
     462         508 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("style"), "%s", "RECT");
     463         508 :             break;
     464             :         case drawing::DashStyle_ROUND:
     465           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("style"), "%s", "ROUND");
     466           0 :             break;
     467             :         case drawing::DashStyle_RECTRELATIVE:
     468           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("style"), "%s", "RECTRELATIVE");
     469           0 :             break;
     470             :         case drawing::DashStyle_ROUNDRELATIVE:
     471           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("style"), "%s", "ROUNDRELATIVE");
     472           0 :             break;
     473             :         default:
     474           0 :             break;
     475             :     }
     476         508 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("dots"), "%" SAL_PRIdINT32, (sal_Int32) aLineDash.Dots);
     477         508 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("dotLen"), "%" SAL_PRIdINT32, (sal_Int32) aLineDash.DotLen);
     478         508 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("dashes"), "%" SAL_PRIdINT32, (sal_Int32) aLineDash.Dashes);
     479         508 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("dashLen"), "%" SAL_PRIdINT32, (sal_Int32) aLineDash.DashLen);
     480         508 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("distance"), "%" SAL_PRIdINT32, (sal_Int32) aLineDash.Distance);
     481         508 :     xmlTextWriterEndElement( xmlWriter );
     482         508 : }
     483             : 
     484         508 : void dumpLineDashNameAsAttribute(const OUString& sLineDashName, xmlTextWriterPtr xmlWriter)
     485             : {
     486             :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("lineDashName"), "%s",
     487         508 :         OUStringToOString(sLineDashName, RTL_TEXTENCODING_UTF8).getStr());
     488         508 : }
     489             : 
     490         508 : void dumpLineColorAsAttribute(sal_Int32 aLineColor, xmlTextWriterPtr xmlWriter)
     491             : {
     492         508 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("lineColor"), "%06x", (unsigned int) aLineColor);
     493         508 : }
     494             : 
     495         508 : void dumpLineTransparenceAsAttribute(sal_Int32 aLineTransparence, xmlTextWriterPtr xmlWriter)
     496             : {
     497         508 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("lineTransparence"), "%" SAL_PRIdINT32, aLineTransparence);
     498         508 : }
     499             : 
     500         508 : void dumpLineWidthAsAttribute(sal_Int32 aLineWidth, xmlTextWriterPtr xmlWriter)
     501             : {
     502         508 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("lineWidth"), "%" SAL_PRIdINT32, aLineWidth);
     503         508 : }
     504             : 
     505         508 : void dumpLineJointAsAttribute(drawing::LineJoint eLineJoint, xmlTextWriterPtr xmlWriter)
     506             : {
     507         508 :     switch(eLineJoint)
     508             :     {
     509             :         case drawing::LineJoint_NONE:
     510           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("lineJoint"), "%s", "NONE");
     511           0 :             break;
     512             :         case drawing::LineJoint_MIDDLE:
     513           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("lineJoint"), "%s", "MIDDLE");
     514           0 :             break;
     515             :         case drawing::LineJoint_BEVEL:
     516           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("lineJoint"), "%s", "BEVEL");
     517           0 :             break;
     518             :         case drawing::LineJoint_MITER:
     519         108 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("lineJoint"), "%s", "MITER");
     520         108 :             break;
     521             :         case drawing::LineJoint_ROUND:
     522         400 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("lineJoint"), "%s", "ROUND");
     523         400 :             break;
     524             :         default:
     525           0 :             break;
     526             :     }
     527         508 : }
     528             : 
     529         508 : void dumpLineStartNameAsAttribute(const OUString& sLineStartName, xmlTextWriterPtr xmlWriter)
     530             : {
     531             :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("lineStartName"), "%s",
     532         508 :     OUStringToOString(sLineStartName, RTL_TEXTENCODING_UTF8).getStr());
     533         508 : }
     534             : 
     535         508 : void dumpLineEndNameAsAttribute(const OUString& sLineEndName, xmlTextWriterPtr xmlWriter)
     536             : {
     537             :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("lineEndName"), "%s",
     538         508 :     OUStringToOString(sLineEndName, RTL_TEXTENCODING_UTF8).getStr());
     539         508 : }
     540             : 
     541        1032 : void dumpPolyPolygonBezierCoords(drawing::PolyPolygonBezierCoords aPolyPolygonBezierCoords, xmlTextWriterPtr xmlWriter)
     542             : {
     543        1032 :     dumpPointSequenceSequence(aPolyPolygonBezierCoords.Coordinates, &aPolyPolygonBezierCoords.Flags, xmlWriter);
     544        1032 : }
     545             : 
     546         508 : void dumpLineStartAsElement(drawing::PolyPolygonBezierCoords aLineStart, xmlTextWriterPtr xmlWriter)
     547             : {
     548         508 :     xmlTextWriterStartElement(xmlWriter, BAD_CAST( "LineStart" ));
     549         508 :     dumpPolyPolygonBezierCoords(aLineStart, xmlWriter);
     550         508 :     xmlTextWriterEndElement( xmlWriter );
     551         508 : }
     552             : 
     553         508 : void dumpLineEndAsElement(drawing::PolyPolygonBezierCoords aLineEnd, xmlTextWriterPtr xmlWriter)
     554             : {
     555         508 :     xmlTextWriterStartElement(xmlWriter, BAD_CAST( "LineEnd" ));
     556         508 :     dumpPolyPolygonBezierCoords(aLineEnd, xmlWriter);
     557         508 :     xmlTextWriterEndElement( xmlWriter );
     558         508 : }
     559             : 
     560         508 : void dumpLineStartCenterAsAttribute(bool bLineStartCenter, xmlTextWriterPtr xmlWriter)
     561             : {
     562         508 :     if(bLineStartCenter)
     563           0 :         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("lineStartCenter"), "%s", "true");
     564             :     else
     565         508 :         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("lineStartCenter"), "%s", "false");
     566         508 : }
     567             : 
     568         508 : void dumpLineStartWidthAsAttribute(sal_Int32 aLineStartWidth, xmlTextWriterPtr xmlWriter)
     569             : {
     570         508 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("lineStartWidth"), "%" SAL_PRIdINT32, aLineStartWidth);
     571         508 : }
     572             : 
     573         508 : void dumpLineEndCenterAsAttribute(bool bLineEndCenter, xmlTextWriterPtr xmlWriter)
     574             : {
     575         508 :     if(bLineEndCenter)
     576           0 :         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("lineEndCenter"), "%s", "true");
     577             :     else
     578         508 :         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("lineEndCenter"), "%s", "false");
     579         508 : }
     580             : 
     581         508 : void dumpLineEndWidthAsAttribute(sal_Int32 aLineEndWidth, xmlTextWriterPtr xmlWriter)
     582             : {
     583         508 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("lineEndWidth"), "%" SAL_PRIdINT32, aLineEndWidth);
     584         508 : }
     585             : 
     586             : 
     587             : // ---------- PolyPolygonDescriptor.idl ----------
     588             : 
     589             : 
     590          22 : void dumpPolygonKindAsAttribute(drawing::PolygonKind ePolygonKind, xmlTextWriterPtr xmlWriter)
     591             : {
     592          22 :     switch(ePolygonKind)
     593             :     {
     594             :         case drawing::PolygonKind_LINE:
     595           6 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("polygonKind"), "%s", "LINE");
     596           6 :             break;
     597             :         case drawing::PolygonKind_POLY:
     598           6 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("polygonKind"), "%s", "POLY");
     599           6 :             break;
     600             :         case drawing::PolygonKind_PLIN:
     601           2 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("polygonKind"), "%s", "PLIN");
     602           2 :             break;
     603             :         case drawing::PolygonKind_PATHLINE:
     604           4 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("polygonKind"), "%s", "PATHLINE");
     605           4 :             break;
     606             :         case drawing::PolygonKind_PATHFILL:
     607           4 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("polygonKind"), "%s", "PATHFILL");
     608           4 :             break;
     609             :         case drawing::PolygonKind_FREELINE:
     610           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("polygonKind"), "%s", "FREELINE");
     611           0 :             break;
     612             :         case drawing::PolygonKind_FREEFILL:
     613           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("polygonKind"), "%s", "FREEFILL");
     614           0 :             break;
     615             :         case drawing::PolygonKind_PATHPOLY:
     616           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("polygonKind"), "%s", "PATHPOLY");
     617           0 :             break;
     618             :         case drawing::PolygonKind_PATHPLIN:
     619           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("polygonKind"), "%s", "PATHPLIN");
     620           0 :             break;
     621             :         default:
     622           0 :             break;
     623             :     }
     624          22 : }
     625             : 
     626        1060 : void dumpPointSequenceSequence(const drawing::PointSequenceSequence& aPointSequenceSequence, uno::Sequence<uno::Sequence< drawing::PolygonFlags > >* pFlags, xmlTextWriterPtr xmlWriter)
     627             : {
     628             :     // LibreOffice proudly presents - The Sequenception
     629        1060 :     uno::Sequence<uno::Sequence< awt::Point > > pointSequenceSequence = aPointSequenceSequence;
     630        1060 :     sal_Int32 nPointsSequence = pointSequenceSequence.getLength();
     631             : 
     632        1114 :     for (sal_Int32 i = 0; i < nPointsSequence; ++i)
     633             :     {
     634          54 :         uno::Sequence< awt::Point > pointSequence = pointSequenceSequence[i];
     635          54 :         sal_Int32 nPoints = pointSequence.getLength();
     636             : 
     637         108 :         uno::Sequence< drawing::PolygonFlags> flagsSequence;
     638          54 :         if(pFlags)
     639          26 :             flagsSequence = (*pFlags)[i];
     640             : 
     641          54 :         xmlTextWriterStartElement(xmlWriter, BAD_CAST( "pointSequence" ));
     642             : 
     643        1106 :         for(sal_Int32 j = 0; j < nPoints; ++j)
     644             :         {
     645        1052 :             xmlTextWriterStartElement(xmlWriter, BAD_CAST( "point" ));
     646        1052 :             xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("positionX"), "%" SAL_PRIdINT32, pointSequence[j].X);
     647        1052 :             xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("positionY"), "%" SAL_PRIdINT32, pointSequence[j].Y);
     648             : 
     649        1052 :             if(pFlags)
     650             :             {
     651         856 :                 switch(flagsSequence[j])
     652             :                 {
     653             :                     case drawing::PolygonFlags_NORMAL:
     654         316 :                         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("polygonFlags"), "%s", "NORMAL");
     655         316 :                         break;
     656             :                     case drawing::PolygonFlags_SMOOTH:
     657           4 :                         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("polygonFlags"), "%s", "SMOOTH");
     658           4 :                         break;
     659             :                     case drawing::PolygonFlags_CONTROL:
     660         504 :                         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("polygonFlags"), "%s", "CONTROL");
     661         504 :                         break;
     662             :                     case drawing::PolygonFlags_SYMMETRIC:
     663          32 :                         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("polygonFlags"), "%s", "SYMMETRIC");
     664          32 :                         break;
     665             :                     default:
     666           0 :                         break;
     667             :                 }
     668             :             }
     669             : 
     670        1052 :             xmlTextWriterEndElement( xmlWriter );
     671             :         }
     672          54 :         xmlTextWriterEndElement( xmlWriter );
     673        1114 :     }
     674        1060 : }
     675             : 
     676          14 : void dumpPolyPolygonAsElement(const drawing::PointSequenceSequence& aPolyPolygon, xmlTextWriterPtr xmlWriter)
     677             : {
     678          14 :     xmlTextWriterStartElement(xmlWriter, BAD_CAST( "PolyPolygon" ));
     679          14 :     dumpPointSequenceSequence(aPolyPolygon, NULL, xmlWriter);
     680          14 :     xmlTextWriterEndElement( xmlWriter );
     681          14 : }
     682             : 
     683          14 : void dumpGeometryAsElement(const drawing::PointSequenceSequence& aGeometry, xmlTextWriterPtr xmlWriter)
     684             : {
     685          14 :     xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Geometry" ));
     686          14 :     dumpPointSequenceSequence(aGeometry, NULL, xmlWriter);
     687          14 :     xmlTextWriterEndElement( xmlWriter );
     688          14 : }
     689             : 
     690             : // CharacterProperties.idl
     691         512 : void dumpCharHeightAsAttribute(float fHeight, xmlTextWriterPtr xmlWriter)
     692             : {
     693         512 :     xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fontHeight"), "%f", fHeight );
     694         512 : }
     695             : 
     696         512 : void dumpCharColorAsAttribute(sal_Int32 aColor, xmlTextWriterPtr xmlWriter)
     697             : {
     698         512 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fontColor"), "%06x", (unsigned int) aColor);
     699         512 : }
     700             : 
     701             : 
     702             : // ---------- TextProperties.idl ----------
     703             : 
     704             : 
     705           0 : void dumpIsNumberingAsAttribute(bool bIsNumbering, xmlTextWriterPtr xmlWriter)
     706             : {
     707           0 :     if(bIsNumbering)
     708           0 :         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("isNumbering"), "%s", "true");
     709             :     else
     710           0 :         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("isNumbering"), "%s", "false");
     711           0 : }
     712             : 
     713         512 : void dumpTextAutoGrowHeightAsAttribute(bool bTextAutoGrowHeight, xmlTextWriterPtr xmlWriter)
     714             : {
     715         512 :     if(bTextAutoGrowHeight)
     716          36 :         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAutoGrowHeight"), "%s", "true");
     717             :     else
     718         476 :         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAutoGrowHeight"), "%s", "false");
     719         512 : }
     720             : 
     721         512 : void dumpTextAutoGrowWidthAsAttribute(bool bTextAutoGrowWidth, xmlTextWriterPtr xmlWriter)
     722             : {
     723         512 :     if(bTextAutoGrowWidth)
     724           0 :         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAutoGrowWidth"), "%s", "true");
     725             :     else
     726         512 :         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAutoGrowWidth"), "%s", "false");
     727         512 : }
     728             : 
     729         512 : void dumpTextContourFrameAsAttribute(bool bTextContourFrame, xmlTextWriterPtr xmlWriter)
     730             : {
     731         512 :     if(bTextContourFrame)
     732           0 :         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textContourFrame"), "%s", "true");
     733             :     else
     734         512 :         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textContourFrame"), "%s", "false");
     735         512 : }
     736             : 
     737         512 : void dumpTextFitToSizeAsAttribute(drawing::TextFitToSizeType eTextFitToSize, xmlTextWriterPtr xmlWriter)
     738             : {
     739         512 :     switch(eTextFitToSize)
     740             :     {
     741             :         case drawing::TextFitToSizeType_NONE:
     742         508 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textFitToSize"), "%s", "NONE");
     743         508 :             break;
     744             :         case drawing::TextFitToSizeType_PROPORTIONAL:
     745           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textFitToSize"), "%s", "PROPORTIONAL");
     746           0 :             break;
     747             :         case drawing::TextFitToSizeType_ALLLINES:
     748           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textFitToSize"), "%s", "ALLLINES");
     749           0 :             break;
     750             :         case drawing::TextFitToSizeType_AUTOFIT:
     751           4 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textFitToSize"), "%s", "AUTOFIT");
     752           4 :             break;
     753             :         default:
     754           0 :             break;
     755             :     }
     756         512 : }
     757             : 
     758         512 : void dumpTextHorizontalAdjustAsAttribute(drawing::TextHorizontalAdjust eTextHorizontalAdjust, xmlTextWriterPtr xmlWriter)
     759             : {
     760         512 :     switch(eTextHorizontalAdjust)
     761             :     {
     762             :         case drawing::TextHorizontalAdjust_LEFT:
     763           4 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textHorizontalAdjust"), "%s", "LEFT");
     764           4 :             break;
     765             :         case drawing::TextHorizontalAdjust_CENTER:
     766           4 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textHorizontalAdjust"), "%s", "CENTER");
     767           4 :             break;
     768             :         case drawing::TextHorizontalAdjust_RIGHT:
     769           4 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textHorizontalAdjust"), "%s", "RIGHT");
     770           4 :             break;
     771             :         case drawing::TextHorizontalAdjust_BLOCK:
     772         500 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textHorizontalAdjust"), "%s", "BLOCK");
     773         500 :             break;
     774             :         default:
     775           0 :             break;
     776             :     }
     777         512 : }
     778             : 
     779         512 : void dumpTextVerticalAdjustAsAttribute(drawing::TextVerticalAdjust eTextVerticalAdjust, xmlTextWriterPtr xmlWriter)
     780             : {
     781         512 :     switch(eTextVerticalAdjust)
     782             :     {
     783             :         case drawing::TextVerticalAdjust_TOP:
     784         132 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textVerticalAdjust"), "%s", "TOP");
     785         132 :             break;
     786             :         case drawing::TextVerticalAdjust_CENTER:
     787         380 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textVerticalAdjust"), "%s", "CENTER");
     788         380 :             break;
     789             :         case drawing::TextVerticalAdjust_BOTTOM:
     790           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textVerticalAdjust"), "%s", "BOTTOM");
     791           0 :             break;
     792             :         case drawing::TextVerticalAdjust_BLOCK:
     793           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textVerticalAdjust"), "%s", "BLOCK");
     794           0 :             break;
     795             :         default:
     796           0 :             break;
     797             :     }
     798         512 : }
     799             : 
     800         512 : void dumpTextLeftDistanceAsAttribute(sal_Int32 aTextLeftDistance, xmlTextWriterPtr xmlWriter)
     801             : {
     802         512 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textLeftDistance"), "%" SAL_PRIdINT32, aTextLeftDistance);
     803         512 : }
     804             : 
     805         512 : void dumpTextRightDistanceAsAttribute(sal_Int32 aTextRightDistance, xmlTextWriterPtr xmlWriter)
     806             : {
     807         512 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textRightDistance"), "%" SAL_PRIdINT32, aTextRightDistance);
     808         512 : }
     809             : 
     810         512 : void dumpTextUpperDistanceAsAttribute(sal_Int32 aTextUpperDistance, xmlTextWriterPtr xmlWriter)
     811             : {
     812         512 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textUpperDistance"), "%" SAL_PRIdINT32, aTextUpperDistance);
     813         512 : }
     814             : 
     815         512 : void dumpTextLowerDistanceAsAttribute(sal_Int32 aTextLowerDistance, xmlTextWriterPtr xmlWriter)
     816             : {
     817         512 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textLowerDistance"), "%" SAL_PRIdINT32, aTextLowerDistance);
     818         512 : }
     819             : 
     820         512 : void dumpTextMaximumFrameHeightAsAttribute(sal_Int32 aTextMaximumFrameHeight, xmlTextWriterPtr xmlWriter)
     821             : {
     822         512 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textMaximumFrameHeight"), "%" SAL_PRIdINT32, aTextMaximumFrameHeight);
     823         512 : }
     824             : 
     825         512 : void dumpTextMaximumFrameWidthAsAttribute(sal_Int32 aTextMaximumFrameWidth, xmlTextWriterPtr xmlWriter)
     826             : {
     827         512 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textMaximumFrameWidth"), "%" SAL_PRIdINT32, aTextMaximumFrameWidth);
     828         512 : }
     829             : 
     830         512 : void dumpTextMinimumFrameHeightAsAttribute(sal_Int32 aTextMinimumFrameHeight, xmlTextWriterPtr xmlWriter)
     831             : {
     832         512 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textMinimumFrameHeight"), "%" SAL_PRIdINT32, aTextMinimumFrameHeight);
     833         512 : }
     834             : 
     835         512 : void dumpTextMinimumFrameWidthAsAttribute(sal_Int32 aTextMinimumFrameWidth, xmlTextWriterPtr xmlWriter)
     836             : {
     837         512 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textMinimumFrameWidth"), "%" SAL_PRIdINT32, aTextMinimumFrameWidth);
     838         512 : }
     839             : 
     840         512 : void dumpTextAnimationAmountAsAttribute(sal_Int32 aTextAnimationAmount, xmlTextWriterPtr xmlWriter)
     841             : {
     842         512 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textAnimationAmount"), "%" SAL_PRIdINT32, aTextAnimationAmount);
     843         512 : }
     844             : 
     845         512 : void dumpTextAnimationCountAsAttribute(sal_Int32 aTextAnimationCount, xmlTextWriterPtr xmlWriter)
     846             : {
     847         512 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textAnimationCount"), "%" SAL_PRIdINT32, aTextAnimationCount);
     848         512 : }
     849             : 
     850         512 : void dumpTextAnimationDelayAsAttribute(sal_Int32 aTextAnimationDelay, xmlTextWriterPtr xmlWriter)
     851             : {
     852         512 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textAnimationDelay"), "%" SAL_PRIdINT32, aTextAnimationDelay);
     853         512 : }
     854             : 
     855         512 : void dumpTextAnimationDirectionAsAttribute(drawing::TextAnimationDirection eTextAnimationDirection, xmlTextWriterPtr xmlWriter)
     856             : {
     857         512 :     switch(eTextAnimationDirection)
     858             :     {
     859             :         case drawing::TextAnimationDirection_LEFT:
     860         512 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAnimationDirection"), "%s", "LEFT");
     861         512 :             break;
     862             :         case drawing::TextAnimationDirection_RIGHT:
     863           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAnimationDirection"), "%s", "RIGHT");
     864           0 :             break;
     865             :         case drawing::TextAnimationDirection_UP:
     866           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAnimationDirection"), "%s", "UP");
     867           0 :             break;
     868             :         case drawing::TextAnimationDirection_DOWN:
     869           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAnimationDirection"), "%s", "DOWN");
     870           0 :             break;
     871             :         default:
     872           0 :             break;
     873             :     }
     874         512 : }
     875             : 
     876         512 : void dumpTextAnimationKindAsAttribute(drawing::TextAnimationKind eTextAnimationKind, xmlTextWriterPtr xmlWriter)
     877             : {
     878         512 :     switch(eTextAnimationKind)
     879             :     {
     880             :         case drawing::TextAnimationKind_NONE:
     881         512 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAnimationKind"), "%s", "NONE");
     882         512 :             break;
     883             :         case drawing::TextAnimationKind_BLINK:
     884           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAnimationKind"), "%s", "BLINK");
     885           0 :             break;
     886             :         case drawing::TextAnimationKind_SCROLL:
     887           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAnimationKind"), "%s", "SCROLL");
     888           0 :             break;
     889             :         case drawing::TextAnimationKind_ALTERNATE:
     890           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAnimationKind"), "%s", "ALTERNATE");
     891           0 :             break;
     892             :         case drawing::TextAnimationKind_SLIDE:
     893           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAnimationKind"), "%s", "SLIDE");
     894           0 :             break;
     895             :         default:
     896           0 :             break;
     897             :     }
     898         512 : }
     899             : 
     900         512 : void dumpTextAnimationStartInsideAsAttribute(bool bTextAnimationStartInside, xmlTextWriterPtr xmlWriter)
     901             : {
     902         512 :     if(bTextAnimationStartInside)
     903           0 :         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAnimationStartInside"), "%s", "true");
     904             :     else
     905         512 :         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAnimationStartInside"), "%s", "false");
     906         512 : }
     907             : 
     908         512 : void dumpTextAnimationStopInsideAsAttribute(bool bTextAnimationStopInside, xmlTextWriterPtr xmlWriter)
     909             : {
     910         512 :     if(bTextAnimationStopInside)
     911           0 :         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAnimationStopInside"), "%s", "true");
     912             :     else
     913         512 :         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAnimationStopInside"), "%s", "false");
     914         512 : }
     915             : 
     916         512 : void dumpTextWritingModeAsAttribute(text::WritingMode eTextWritingMode, xmlTextWriterPtr xmlWriter)
     917             : {
     918         512 :     switch(eTextWritingMode)
     919             :     {
     920             :         case text::WritingMode_LR_TB:
     921         512 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textWritingMode"), "%s", "LR_TB");
     922         512 :             break;
     923             :         case text::WritingMode_RL_TB:
     924           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textWritingMode"), "%s", "RL_TB");
     925           0 :             break;
     926             :         case text::WritingMode_TB_RL:
     927           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textWritingMode"), "%s", "TB_RL");
     928           0 :             break;
     929             :         default:
     930           0 :             break;
     931             :     }
     932         512 : }
     933             : 
     934             : 
     935             : // ---------- ShadowProperties.idl ----------
     936             : 
     937             : 
     938          40 : void dumpShadowAsAttribute(bool bShadow, xmlTextWriterPtr xmlWriter)
     939             : {
     940          40 :     if(bShadow)
     941           0 :         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("shadow"), "%s", "true");
     942             :     else
     943          40 :         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("shadow"), "%s", "false");
     944          40 : }
     945             : 
     946          40 : void dumpShadowColorAsAttribute(sal_Int32 aShadowColor, xmlTextWriterPtr xmlWriter)
     947             : {
     948          40 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("shadowColor"), "%06x", (unsigned int) aShadowColor);
     949          40 : }
     950             : 
     951          40 : void dumpShadowTransparenceAsAttribute(sal_Int32 aShadowTransparence, xmlTextWriterPtr xmlWriter)
     952             : {
     953          40 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("shadowTransparence"), "%" SAL_PRIdINT32, aShadowTransparence);
     954          40 : }
     955             : 
     956          40 : void dumpShadowXDistanceAsAttribute(sal_Int32 aShadowXDistance, xmlTextWriterPtr xmlWriter)
     957             : {
     958          40 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("shadowXDistance"), "%" SAL_PRIdINT32, aShadowXDistance);
     959          40 : }
     960             : 
     961          40 : void dumpShadowYDistanceAsAttribute(sal_Int32 aShadowYDistance, xmlTextWriterPtr xmlWriter)
     962             : {
     963          40 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("shadowYDistance"), "%" SAL_PRIdINT32, aShadowYDistance);
     964          40 : }
     965             : 
     966             : 
     967             : // ---------- Shape.idl ----------
     968             : 
     969             : 
     970         518 : void dumpZOrderAsAttribute(sal_Int32 aZOrder, xmlTextWriterPtr xmlWriter)
     971             : {
     972         518 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("zOrder"), "%" SAL_PRIdINT32, aZOrder);
     973         518 : }
     974             : 
     975         518 : void dumpLayerIDAsAttribute(sal_Int32 aLayerID, xmlTextWriterPtr xmlWriter)
     976             : {
     977         518 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("layerID"), "%" SAL_PRIdINT32, aLayerID);
     978         518 : }
     979             : 
     980         518 : void dumpLayerNameAsAttribute(const OUString& sLayerName, xmlTextWriterPtr xmlWriter)
     981             : {
     982             :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("layerName"), "%s",
     983         518 :         OUStringToOString(sLayerName, RTL_TEXTENCODING_UTF8).getStr());
     984         518 : }
     985             : 
     986         518 : void dumpVisibleAsAttribute(bool bVisible, xmlTextWriterPtr xmlWriter)
     987             : {
     988         518 :     if(bVisible)
     989         518 :         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("visible"), "%s", "true");
     990             :     else
     991           0 :         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("visible"), "%s", "false");
     992         518 : }
     993             : 
     994         518 : void dumpPrintableAsAttribute(bool bPrintable, xmlTextWriterPtr xmlWriter)
     995             : {
     996         518 :     if(bPrintable)
     997         518 :         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("printable"), "%s", "true");
     998             :     else
     999           0 :         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("printable"), "%s", "false");
    1000         518 : }
    1001             : 
    1002         518 : void dumpMoveProtectAsAttribute(bool bMoveProtect, xmlTextWriterPtr xmlWriter)
    1003             : {
    1004         518 :     if(bMoveProtect)
    1005           0 :         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("moveProtect"), "%s", "true");
    1006             :     else
    1007         518 :         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("moveProtect"), "%s", "false");
    1008         518 : }
    1009             : 
    1010         518 : void dumpNameAsAttribute(const OUString& sName, xmlTextWriterPtr xmlWriter)
    1011             : {
    1012         518 :     if(!sName.isEmpty() && !m_bNameDumped)
    1013             :     {
    1014           0 :         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("name"), "%s", OUStringToOString(sName, RTL_TEXTENCODING_UTF8).getStr());
    1015           0 :         m_bNameDumped = true;
    1016             :     }
    1017         518 : }
    1018             : 
    1019         518 : void dumpSizeProtectAsAttribute(bool bSizeProtect, xmlTextWriterPtr xmlWriter)
    1020             : {
    1021         518 :     if(bSizeProtect)
    1022           0 :         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("sizeProtect"), "%s", "true");
    1023             :     else
    1024         518 :         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("sizeProtect"), "%s", "false");
    1025         518 : }
    1026             : 
    1027        1554 : void dumpHomogenMatrixLine3(drawing::HomogenMatrixLine3 aHomogenMatrixLine3, xmlTextWriterPtr xmlWriter)
    1028             : {
    1029        1554 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("column1"), "%f", aHomogenMatrixLine3.Column1);
    1030        1554 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("column2"), "%f", aHomogenMatrixLine3.Column2);
    1031        1554 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("column3"), "%f", aHomogenMatrixLine3.Column3);
    1032        1554 : }
    1033             : 
    1034         518 : void dumpTransformationAsElement(drawing::HomogenMatrix3 aTransformation, xmlTextWriterPtr xmlWriter)
    1035             : {
    1036         518 :     xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Transformation" ));
    1037             :     {
    1038         518 :     xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Line1" ));
    1039         518 :     dumpHomogenMatrixLine3(aTransformation.Line1, xmlWriter);
    1040         518 :     xmlTextWriterEndElement( xmlWriter );
    1041         518 :     xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Line2" ));
    1042         518 :     dumpHomogenMatrixLine3(aTransformation.Line2, xmlWriter);
    1043         518 :     xmlTextWriterEndElement( xmlWriter );
    1044         518 :     xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Line3" ));
    1045         518 :     dumpHomogenMatrixLine3(aTransformation.Line3, xmlWriter);
    1046         518 :     xmlTextWriterEndElement( xmlWriter );
    1047             :     }
    1048         518 :     xmlTextWriterEndElement( xmlWriter );
    1049         518 : }
    1050             : 
    1051         518 : void dumpNavigationOrderAsAttribute(sal_Int32 aNavigationOrder, xmlTextWriterPtr xmlWriter)
    1052             : {
    1053         518 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("navigationOrder"), "%" SAL_PRIdINT32, aNavigationOrder);
    1054         518 : }
    1055             : 
    1056           0 : void dumpHyperlinkAsAttribute(const OUString& sHyperlink, xmlTextWriterPtr xmlWriter)
    1057             : {
    1058             :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("hyperlink"), "%s",
    1059           0 :         OUStringToOString(sHyperlink, RTL_TEXTENCODING_UTF8).getStr());
    1060           0 : }
    1061             : 
    1062           0 : void dumpInteropGrabBagAsElement(const uno::Sequence< beans::PropertyValue>& aInteropGrabBag, xmlTextWriterPtr xmlWriter)
    1063             : {
    1064           0 :     xmlTextWriterStartElement(xmlWriter, BAD_CAST( "InteropGrabBag" ));
    1065             : 
    1066           0 :     sal_Int32 nLength = aInteropGrabBag.getLength();
    1067           0 :     for (sal_Int32 i = 0; i < nLength; ++i)
    1068           0 :         dumpPropertyValueAsElement(aInteropGrabBag[i], xmlWriter);
    1069             : 
    1070           0 :     xmlTextWriterEndElement( xmlWriter );
    1071           0 : }
    1072             : 
    1073             : 
    1074             : // ---------- XShape.idl ----------
    1075             : 
    1076             : 
    1077         522 : void dumpPositionAsAttribute(const awt::Point& rPoint, xmlTextWriterPtr xmlWriter)
    1078             : {
    1079         522 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("positionX"), "%" SAL_PRIdINT32, rPoint.X);
    1080         522 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("positionY"), "%" SAL_PRIdINT32, rPoint.Y);
    1081         522 : }
    1082             : 
    1083         522 : void dumpSizeAsAttribute(const awt::Size& rSize, xmlTextWriterPtr xmlWriter)
    1084             : {
    1085         522 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("sizeX"), "%" SAL_PRIdINT32, rSize.Width);
    1086         522 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("sizeY"), "%" SAL_PRIdINT32, rSize.Height);
    1087         522 : }
    1088             : 
    1089         522 : void dumpShapeDescriptorAsAttribute( uno::Reference< drawing::XShapeDescriptor > xDescr, xmlTextWriterPtr xmlWriter )
    1090             : {
    1091             :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("type"), "%s",
    1092         522 :         OUStringToOString(xDescr->getShapeType(), RTL_TEXTENCODING_UTF8).getStr());
    1093         522 : }
    1094             : 
    1095             : 
    1096             : // ---------- CustomShape.idl ----------
    1097             : 
    1098             : 
    1099         472 : void dumpCustomShapeEngineAsAttribute(const OUString& sCustomShapeEngine, xmlTextWriterPtr xmlWriter)
    1100             : {
    1101             :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("customShapeEngine"), "%s",
    1102         472 :         OUStringToOString(sCustomShapeEngine, RTL_TEXTENCODING_UTF8).getStr());
    1103         472 : }
    1104             : 
    1105         472 : void dumpCustomShapeDataAsAttribute(const OUString& sCustomShapeData, xmlTextWriterPtr xmlWriter)
    1106             : {
    1107             :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("customShapeData"), "%s",
    1108         472 :         OUStringToOString(sCustomShapeData, RTL_TEXTENCODING_UTF8).getStr());
    1109         472 : }
    1110             : 
    1111        5466 : void dumpPropertyValueAsElement(const beans::PropertyValue& rPropertyValue, xmlTextWriterPtr xmlWriter)
    1112             : {
    1113        5466 :     xmlTextWriterStartElement(xmlWriter, BAD_CAST( "PropertyValue" ));
    1114             : 
    1115             :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("name"), "%s",
    1116        5466 :             OUStringToOString(rPropertyValue.Name, RTL_TEXTENCODING_UTF8).getStr());
    1117             : 
    1118        5466 :     uno::Any aAny = rPropertyValue.Value;
    1119       10932 :     OUString sValue;
    1120             :     float fValue;
    1121             :     sal_Int32 nValue;
    1122             :     bool bValue;
    1123        5466 :     awt::Rectangle aRectangleValue;
    1124       10932 :     uno::Sequence< drawing::EnhancedCustomShapeAdjustmentValue> aAdjustmentValues;
    1125       10932 :     uno::Sequence< drawing::EnhancedCustomShapeParameterPair > aCoordinates;
    1126       10932 :     uno::Sequence< drawing::EnhancedCustomShapeSegment > aSegments;
    1127       10932 :     uno::Sequence< beans::PropertyValue > aPropSeq;
    1128        5466 :     if(aAny >>= sValue)
    1129             :     {
    1130             :         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("value"), "%s",
    1131         472 :                 OUStringToOString(sValue, RTL_TEXTENCODING_UTF8).getStr());
    1132             :     }
    1133        4994 :     else if(aAny >>= nValue)
    1134             :     {
    1135         306 :         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("value"), "%" SAL_PRIdINT32, nValue);
    1136             :     }
    1137        4688 :     else if(aAny >>= fValue)
    1138             :     {
    1139           0 :         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("value"), "%f", fValue);
    1140             :     }
    1141        4688 :     else if(aAny >>= bValue)
    1142             :     {
    1143         944 :         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("value"), "%s", (bValue? "true": "false"));
    1144             :     }
    1145        3744 :     else if(rPropertyValue.Name == "ViewBox" && (aAny >>= aRectangleValue))
    1146             :     {
    1147         470 :         EnhancedShapeDumper enhancedDumper(xmlWriter);
    1148         470 :         enhancedDumper.dumpViewBoxAsElement(aRectangleValue);
    1149             :     }
    1150        3274 :     else if(rPropertyValue.Name == "AdjustmentValues" && (aAny >>= aAdjustmentValues))
    1151             :     {
    1152         472 :         EnhancedShapeDumper enhancedDumper(xmlWriter);
    1153         472 :         enhancedDumper.dumpAdjustmentValuesAsElement(aAdjustmentValues);
    1154             :     }
    1155        2802 :     else if(rPropertyValue.Name == "Coordinates" && (aAny >>= aCoordinates))
    1156             :     {
    1157         472 :         EnhancedShapeDumper enhancedDumper(xmlWriter);
    1158         472 :         enhancedDumper.dumpCoordinatesAsElement(aCoordinates);
    1159             :     }
    1160        2330 :     else if(rPropertyValue.Name == "Segments" && (aAny >>= aSegments))
    1161             :     {
    1162         472 :         EnhancedShapeDumper enhancedDumper(xmlWriter);
    1163         472 :         enhancedDumper.dumpSegmentsAsElement(aSegments);
    1164             :     }
    1165        1858 :     else if(aAny >>= aPropSeq)
    1166             :     {
    1167         916 :         xmlTextWriterStartElement(xmlWriter, BAD_CAST( OUStringToOString(rPropertyValue.Name, RTL_TEXTENCODING_UTF8).getStr() ));
    1168             : 
    1169         916 :         sal_Int32 i = 0, nCount = aPropSeq.getLength();
    1170        2460 :         for ( ; i < nCount; i++ )
    1171        1544 :             dumpPropertyValueAsElement(aPropSeq[ i ], xmlWriter);
    1172             : 
    1173         916 :         xmlTextWriterEndElement(xmlWriter);
    1174             :     }
    1175             : 
    1176             :     // TODO: Add here dumping of XDocument for future OOX Smart-Art
    1177             :     // properties.
    1178             : 
    1179             :     // TODO more, if necessary
    1180             : 
    1181        5466 :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("handle"), "%" SAL_PRIdINT32, rPropertyValue.Handle);
    1182             : 
    1183        5466 :     switch(rPropertyValue.State)
    1184             :     {
    1185             :         case beans::PropertyState_DIRECT_VALUE:
    1186        5466 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("propertyState"), "%s", "DIRECT_VALUE");
    1187        5466 :             break;
    1188             :         case beans::PropertyState_DEFAULT_VALUE:
    1189           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("propertyState"), "%s", "DEFAULT_VALUE");
    1190           0 :             break;
    1191             :         case beans::PropertyState_AMBIGUOUS_VALUE:
    1192           0 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("propertyState"), "%s", "AMBIGUOUS_VALUE");
    1193           0 :             break;
    1194             :         default:
    1195           0 :             break;
    1196             :     }
    1197       10932 :     xmlTextWriterEndElement( xmlWriter );
    1198        5466 : }
    1199             : 
    1200         472 : void dumpCustomShapeGeometryAsElement(const uno::Sequence< beans::PropertyValue>& aCustomShapeGeometry, xmlTextWriterPtr xmlWriter)
    1201             : {
    1202         472 :     xmlTextWriterStartElement(xmlWriter, BAD_CAST( "CustomShapeGeometry" ));
    1203             : 
    1204         472 :     sal_Int32 nLength = aCustomShapeGeometry.getLength();
    1205        4394 :     for (sal_Int32 i = 0; i < nLength; ++i)
    1206        3922 :         dumpPropertyValueAsElement(aCustomShapeGeometry[i], xmlWriter);
    1207             : 
    1208         472 :     xmlTextWriterEndElement( xmlWriter );
    1209         472 : }
    1210             : 
    1211           0 : void dumpCustomShapeReplacementURLAsAttribute(const OUString& sCustomShapeReplacementURL, xmlTextWriterPtr xmlWriter)
    1212             : {
    1213             :     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("customShapeReplacementURL"), "%s",
    1214           0 :         OUStringToOString(sCustomShapeReplacementURL, RTL_TEXTENCODING_UTF8).getStr());
    1215           0 : }
    1216             : 
    1217             : // methods dumping whole services
    1218             : 
    1219         512 : void dumpTextPropertiesService(uno::Reference< beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter)
    1220             : {
    1221         512 :     uno::Reference< beans::XPropertySetInfo> xInfo = xPropSet->getPropertySetInfo();
    1222         512 :     if(xInfo->hasPropertyByName("CharHeight"))
    1223             :     {
    1224         512 :         uno::Any anotherAny = xPropSet->getPropertyValue("CharHeight");
    1225             :         float fHeight;
    1226         512 :         if(anotherAny >>= fHeight)
    1227         512 :             dumpCharHeightAsAttribute(fHeight, xmlWriter);
    1228             :     }
    1229         512 :     if(xInfo->hasPropertyByName("CharColor"))
    1230             :     {
    1231         512 :         uno::Any anotherAny = xPropSet->getPropertyValue("CharColor");
    1232         512 :         sal_Int32 aColor = sal_Int32();
    1233         512 :         if(anotherAny >>= aColor)
    1234         512 :             dumpCharColorAsAttribute(aColor, xmlWriter);
    1235             :     }
    1236             :     // TODO - more properties from CharacterProperties.idl (similar to above)
    1237             : 
    1238         512 :     if(xInfo->hasPropertyByName("IsNumbering"))
    1239             :     {
    1240           0 :         uno::Any anotherAny = xPropSet->getPropertyValue("IsNumbering");
    1241             :         bool bIsNumbering;
    1242           0 :         if(anotherAny >>= bIsNumbering)
    1243           0 :             dumpIsNumberingAsAttribute(bIsNumbering, xmlWriter);
    1244             :     }
    1245             :     {
    1246         512 :         uno::Any anotherAny = xPropSet->getPropertyValue("TextAutoGrowHeight");
    1247             :         bool bTextAutoGrowHeight;
    1248         512 :         if(anotherAny >>= bTextAutoGrowHeight)
    1249         512 :             dumpTextAutoGrowHeightAsAttribute(bTextAutoGrowHeight, xmlWriter);
    1250             :     }
    1251             :     {
    1252         512 :         uno::Any anotherAny = xPropSet->getPropertyValue("TextAutoGrowWidth");
    1253             :         bool bTextAutoGrowWidth;
    1254         512 :         if(anotherAny >>= bTextAutoGrowWidth)
    1255         512 :             dumpTextAutoGrowWidthAsAttribute(bTextAutoGrowWidth, xmlWriter);
    1256             :     }
    1257             :     {
    1258         512 :         uno::Any anotherAny = xPropSet->getPropertyValue("TextContourFrame");
    1259             :         bool bTextContourFrame;
    1260         512 :         if(anotherAny >>= bTextContourFrame)
    1261         512 :             dumpTextContourFrameAsAttribute(bTextContourFrame, xmlWriter);
    1262             :     }
    1263             :     {
    1264         512 :         uno::Any anotherAny = xPropSet->getPropertyValue("TextFitToSize");
    1265             :         drawing::TextFitToSizeType eTextFitToSize;
    1266         512 :         if(anotherAny >>= eTextFitToSize)
    1267         512 :             dumpTextFitToSizeAsAttribute(eTextFitToSize, xmlWriter);
    1268             :     }
    1269             :     {
    1270         512 :         uno::Any anotherAny = xPropSet->getPropertyValue("TextHorizontalAdjust");
    1271             :         drawing::TextHorizontalAdjust eTextHorizontalAdjust;
    1272         512 :         if(anotherAny >>= eTextHorizontalAdjust)
    1273         512 :             dumpTextHorizontalAdjustAsAttribute(eTextHorizontalAdjust, xmlWriter);
    1274             :     }
    1275             :     {
    1276         512 :         uno::Any anotherAny = xPropSet->getPropertyValue("TextVerticalAdjust");
    1277             :         drawing::TextVerticalAdjust eTextVerticalAdjust;
    1278         512 :         if(anotherAny >>= eTextVerticalAdjust)
    1279         512 :             dumpTextVerticalAdjustAsAttribute(eTextVerticalAdjust, xmlWriter);
    1280             :     }
    1281             :     {
    1282         512 :         uno::Any anotherAny = xPropSet->getPropertyValue("TextLeftDistance");
    1283         512 :         sal_Int32 aTextLeftDistance = sal_Int32();
    1284         512 :         if(anotherAny >>= aTextLeftDistance)
    1285         512 :             dumpTextLeftDistanceAsAttribute(aTextLeftDistance, xmlWriter);
    1286             :     }
    1287             :     {
    1288         512 :         uno::Any anotherAny = xPropSet->getPropertyValue("TextRightDistance");
    1289         512 :         sal_Int32 aTextRightDistance = sal_Int32();
    1290         512 :         if(anotherAny >>= aTextRightDistance)
    1291         512 :             dumpTextRightDistanceAsAttribute(aTextRightDistance, xmlWriter);
    1292             :     }
    1293             :     {
    1294         512 :         uno::Any anotherAny = xPropSet->getPropertyValue("TextUpperDistance");
    1295         512 :         sal_Int32 aTextUpperDistance = sal_Int32();
    1296         512 :         if(anotherAny >>= aTextUpperDistance)
    1297         512 :             dumpTextUpperDistanceAsAttribute(aTextUpperDistance, xmlWriter);
    1298             :     }
    1299             :     {
    1300         512 :         uno::Any anotherAny = xPropSet->getPropertyValue("TextLowerDistance");
    1301         512 :         sal_Int32 aTextLowerDistance = sal_Int32();
    1302         512 :         if(anotherAny >>= aTextLowerDistance)
    1303         512 :             dumpTextLowerDistanceAsAttribute(aTextLowerDistance, xmlWriter);
    1304             :     }
    1305             :     {
    1306         512 :         uno::Any anotherAny = xPropSet->getPropertyValue("TextMaximumFrameHeight");
    1307         512 :         sal_Int32 aTextMaximumFrameHeight = sal_Int32();
    1308         512 :         if(anotherAny >>= aTextMaximumFrameHeight)
    1309         512 :             dumpTextMaximumFrameHeightAsAttribute(aTextMaximumFrameHeight, xmlWriter);
    1310             :     }
    1311             :     {
    1312         512 :         uno::Any anotherAny = xPropSet->getPropertyValue("TextMaximumFrameWidth");
    1313         512 :         sal_Int32 aTextMaximumFrameWidth = sal_Int32();
    1314         512 :         if(anotherAny >>= aTextMaximumFrameWidth)
    1315         512 :             dumpTextMaximumFrameWidthAsAttribute(aTextMaximumFrameWidth, xmlWriter);
    1316             :     }
    1317             :     {
    1318         512 :         uno::Any anotherAny = xPropSet->getPropertyValue("TextMinimumFrameHeight");
    1319         512 :         sal_Int32 aTextMinimumFrameHeight = sal_Int32();
    1320         512 :         if(anotherAny >>= aTextMinimumFrameHeight)
    1321         512 :             dumpTextMinimumFrameHeightAsAttribute(aTextMinimumFrameHeight, xmlWriter);
    1322             :     }
    1323             :     {
    1324         512 :         uno::Any anotherAny = xPropSet->getPropertyValue("TextMinimumFrameWidth");
    1325         512 :         sal_Int32 aTextMinimumFrameWidth = sal_Int32();
    1326         512 :         if(anotherAny >>= aTextMinimumFrameWidth)
    1327         512 :             dumpTextMinimumFrameWidthAsAttribute(aTextMinimumFrameWidth, xmlWriter);
    1328             :     }
    1329             :     {
    1330         512 :         uno::Any anotherAny = xPropSet->getPropertyValue("TextAnimationAmount");
    1331         512 :         sal_Int32 aTextAnimationAmount = sal_Int32();
    1332         512 :         if(anotherAny >>= aTextAnimationAmount)
    1333         512 :             dumpTextAnimationAmountAsAttribute(aTextAnimationAmount, xmlWriter);
    1334             :     }
    1335             :     {
    1336         512 :         uno::Any anotherAny = xPropSet->getPropertyValue("TextAnimationCount");
    1337         512 :         sal_Int32 aTextAnimationCount = sal_Int32();
    1338         512 :         if(anotherAny >>= aTextAnimationCount)
    1339         512 :             dumpTextAnimationCountAsAttribute(aTextAnimationCount, xmlWriter);
    1340             :     }
    1341             :     {
    1342         512 :         uno::Any anotherAny = xPropSet->getPropertyValue("TextAnimationDelay");
    1343         512 :         sal_Int32 aTextAnimationDelay = sal_Int32();
    1344         512 :         if(anotherAny >>= aTextAnimationDelay)
    1345         512 :             dumpTextAnimationDelayAsAttribute(aTextAnimationDelay, xmlWriter);
    1346             :     }
    1347             :     {
    1348         512 :         uno::Any anotherAny = xPropSet->getPropertyValue("TextAnimationDirection");
    1349             :         drawing::TextAnimationDirection eTextAnimationDirection;
    1350         512 :         if(anotherAny >>= eTextAnimationDirection)
    1351         512 :             dumpTextAnimationDirectionAsAttribute(eTextAnimationDirection, xmlWriter);
    1352             :     }
    1353             :     {
    1354         512 :         uno::Any anotherAny = xPropSet->getPropertyValue("TextAnimationKind");
    1355             :         drawing::TextAnimationKind eTextAnimationKind;
    1356         512 :         if(anotherAny >>= eTextAnimationKind)
    1357         512 :             dumpTextAnimationKindAsAttribute(eTextAnimationKind, xmlWriter);
    1358             :     }
    1359             :     {
    1360         512 :         uno::Any anotherAny = xPropSet->getPropertyValue("TextAnimationStartInside");
    1361             :         bool bTextAnimationStartInside;
    1362         512 :         if(anotherAny >>= bTextAnimationStartInside)
    1363         512 :             dumpTextAnimationStartInsideAsAttribute(bTextAnimationStartInside, xmlWriter);
    1364             :     }
    1365             :     {
    1366         512 :         uno::Any anotherAny = xPropSet->getPropertyValue("TextAnimationStopInside");
    1367             :         bool bTextAnimationStopInside;
    1368         512 :         if(anotherAny >>= bTextAnimationStopInside)
    1369         512 :             dumpTextAnimationStopInsideAsAttribute(bTextAnimationStopInside, xmlWriter);
    1370             :     }
    1371             :     {
    1372         512 :         uno::Any anotherAny = xPropSet->getPropertyValue("TextWritingMode");
    1373             :         text::WritingMode eTextWritingMode;
    1374         512 :         if(anotherAny >>= eTextWritingMode)
    1375         512 :             dumpTextWritingModeAsAttribute(eTextWritingMode, xmlWriter);
    1376         512 :     }
    1377         512 : }
    1378             : 
    1379         500 : void dumpFillPropertiesService(uno::Reference< beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter)
    1380             : {
    1381             :     {
    1382         500 :         uno::Any anotherAny = xPropSet->getPropertyValue("FillStyle");
    1383             :         drawing::FillStyle eFillStyle;
    1384         500 :         if(anotherAny >>= eFillStyle)
    1385         500 :             dumpFillStyleAsAttribute(eFillStyle, xmlWriter);
    1386             :     }
    1387             :     {
    1388         500 :         uno::Any anotherAny = xPropSet->getPropertyValue("FillColor");
    1389         500 :         sal_Int32 aColor = sal_Int32();
    1390         500 :         if(anotherAny >>= aColor)
    1391         500 :             dumpFillColorAsAttribute(aColor, xmlWriter);
    1392             :     }
    1393             :     {
    1394         500 :         uno::Any anotherAny = xPropSet->getPropertyValue("FillTransparence");
    1395         500 :         sal_Int32 aTransparence = sal_Int32();
    1396         500 :         if(anotherAny >>= aTransparence)
    1397         500 :             dumpFillTransparenceAsAttribute(aTransparence, xmlWriter);
    1398             :     }
    1399             :     {
    1400         500 :         uno::Any anotherAny = xPropSet->getPropertyValue("FillTransparenceGradientName");
    1401        1000 :         OUString sTranspGradName;
    1402         500 :         if(anotherAny >>= sTranspGradName)
    1403        1000 :             dumpFillTransparenceGradientNameAsAttribute(sTranspGradName, xmlWriter);
    1404             :     }
    1405             :     {
    1406         500 :         uno::Any anotherAny = xPropSet->getPropertyValue("FillTransparenceGradient");
    1407         500 :         awt::Gradient aTranspGrad;
    1408         500 :         if(anotherAny >>= aTranspGrad)
    1409         500 :             dumpFillTransparenceGradientAsElement(aTranspGrad, xmlWriter);
    1410             :     }
    1411             :     {
    1412         500 :         uno::Any anotherAny = xPropSet->getPropertyValue("FillGradientName");
    1413        1000 :         OUString sGradName;
    1414         500 :         if(anotherAny >>= sGradName)
    1415        1000 :             dumpFillGradientNameAsAttribute(sGradName, xmlWriter);
    1416             :     }
    1417             :     {
    1418         500 :         uno::Any anotherAny = xPropSet->getPropertyValue("FillGradient");
    1419         500 :         awt::Gradient aGradient;
    1420         500 :         if(anotherAny >>= aGradient)
    1421         500 :             dumpFillGradientAsElement(aGradient, xmlWriter);
    1422             :     }
    1423             :     {
    1424         500 :         uno::Any anotherAny = xPropSet->getPropertyValue("FillHatchName");
    1425        1000 :         OUString sHatchName;
    1426         500 :         if(anotherAny >>= sHatchName)
    1427        1000 :             dumpFillGradientNameAsAttribute(sHatchName, xmlWriter);
    1428             :     }
    1429             :     {
    1430         500 :         uno::Any anotherAny = xPropSet->getPropertyValue("FillHatch");
    1431         500 :         drawing::Hatch aHatch;
    1432         500 :         if(anotherAny >>= aHatch)
    1433         500 :             dumpFillHatchAsElement(aHatch, xmlWriter);
    1434             :     }
    1435             :     {
    1436         500 :         uno::Any anotherAny = xPropSet->getPropertyValue("FillBackground");
    1437             :         bool bFillBackground;
    1438         500 :         if(anotherAny >>= bFillBackground)
    1439         500 :             dumpFillBackgroundAsAttribute(bFillBackground, xmlWriter);
    1440             :     }
    1441             :     {
    1442         500 :         uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapName");
    1443        1000 :         OUString sBitmapName;
    1444         500 :         if(anotherAny >>= sBitmapName)
    1445        1000 :             dumpFillGradientNameAsAttribute(sBitmapName, xmlWriter);
    1446             :     }
    1447             :     {
    1448         500 :         uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmap");
    1449        1000 :         uno::Reference<awt::XBitmap> xBitmap;
    1450         500 :         if(anotherAny >>= xBitmap)
    1451        1000 :             dumpFillBitmapAsElement(xBitmap, xmlWriter);
    1452             :     }
    1453             :     {
    1454         500 :         uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapURL");
    1455        1000 :         OUString sBitmapURL;
    1456         500 :         if(anotherAny >>= sBitmapURL)
    1457        1000 :             dumpFillBitmapURLAsAttribute(sBitmapURL, xmlWriter);
    1458             :     }
    1459             :     {
    1460         500 :         uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapPositionOffsetX");
    1461         500 :         sal_Int32 aBitmapPositionOffsetX = sal_Int32();
    1462         500 :         if(anotherAny >>= aBitmapPositionOffsetX)
    1463         500 :             dumpFillBitmapPositionOffsetXAsAttribute(aBitmapPositionOffsetX, xmlWriter);
    1464             :     }
    1465             :     {
    1466         500 :         uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapPositionOffsetY");
    1467         500 :         sal_Int32 aBitmapPositionOffsetY = sal_Int32();
    1468         500 :         if(anotherAny >>= aBitmapPositionOffsetY)
    1469         500 :             dumpFillBitmapPositionOffsetYAsAttribute(aBitmapPositionOffsetY, xmlWriter);
    1470             :     }
    1471             :     {
    1472         500 :         uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapOffsetX");
    1473         500 :         sal_Int32 aBitmapOffsetX = sal_Int32();
    1474         500 :         if(anotherAny >>= aBitmapOffsetX)
    1475         500 :             dumpFillBitmapOffsetXAsAttribute(aBitmapOffsetX, xmlWriter);
    1476             :     }
    1477             :     {
    1478         500 :         uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapOffsetY");
    1479         500 :         sal_Int32 aBitmapOffsetY = sal_Int32();
    1480         500 :         if(anotherAny >>= aBitmapOffsetY)
    1481         500 :             dumpFillBitmapOffsetYAsAttribute(aBitmapOffsetY, xmlWriter);
    1482             :     }
    1483             :     {
    1484         500 :         uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapRectanglePoint");
    1485             :         drawing::RectanglePoint eBitmapRectanglePoint;
    1486         500 :         if(anotherAny >>= eBitmapRectanglePoint)
    1487         500 :             dumpFillBitmapRectanglePointAsAttribute(eBitmapRectanglePoint, xmlWriter);
    1488             :     }
    1489             :     {
    1490         500 :         uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapLogicalSize");
    1491             :         bool bBitmapLogicalSize;
    1492         500 :         if(anotherAny >>= bBitmapLogicalSize)
    1493         500 :             dumpFillBitmapLogicalSizeAsAttribute(bBitmapLogicalSize, xmlWriter);
    1494             :     }
    1495             :     {
    1496         500 :         uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapSizeX");
    1497         500 :         sal_Int32 aBitmapSizeX = sal_Int32();
    1498         500 :         if(anotherAny >>= aBitmapSizeX)
    1499         500 :             dumpFillBitmapSizeXAsAttribute(aBitmapSizeX, xmlWriter);
    1500             :     }
    1501             :     {
    1502         500 :         uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapSizeY");
    1503         500 :         sal_Int32 aBitmapSizeY = sal_Int32();
    1504         500 :         if(anotherAny >>= aBitmapSizeY)
    1505         500 :             dumpFillBitmapSizeYAsAttribute(aBitmapSizeY, xmlWriter);
    1506             :     }
    1507             :     {
    1508         500 :         uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapMode");
    1509             :         drawing::BitmapMode eBitmapMode;
    1510         500 :         if(anotherAny >>= eBitmapMode)
    1511         500 :             dumpFillBitmapModeAsAttribute(eBitmapMode, xmlWriter);
    1512             :     }
    1513             :     {
    1514         500 :         uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapStretch");
    1515             :         bool bBitmapStretch;
    1516         500 :         if(anotherAny >>= bBitmapStretch)
    1517         500 :             dumpFillBitmapStretchAsAttribute(bBitmapStretch, xmlWriter);
    1518             :     }
    1519             :     {
    1520         500 :         uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapTile");
    1521             :         bool bBitmapTile;
    1522         500 :         if(anotherAny >>= bBitmapTile)
    1523         500 :             dumpFillBitmapTileAsAttribute(bBitmapTile, xmlWriter);
    1524             :     }
    1525         500 : }
    1526             : 
    1527         508 : void dumpLinePropertiesService(uno::Reference< beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter)
    1528             : {
    1529             :     {
    1530         508 :         uno::Any anotherAny = xPropSet->getPropertyValue("LineStyle");
    1531             :         drawing::LineStyle eLineStyle;
    1532         508 :         if(anotherAny >>= eLineStyle)
    1533         508 :             dumpLineStyleAsAttribute(eLineStyle, xmlWriter);
    1534             :     }
    1535             :     {
    1536         508 :         uno::Any anotherAny = xPropSet->getPropertyValue("LineDash");
    1537         508 :         drawing::LineDash aLineDash;
    1538         508 :         if(anotherAny >>= aLineDash)
    1539         508 :             dumpLineDashAsElement(aLineDash, xmlWriter);
    1540             :     }
    1541             :     {
    1542         508 :         uno::Any anotherAny = xPropSet->getPropertyValue("LineDashName");
    1543        1016 :         OUString sLineDashName;
    1544         508 :         if(anotherAny >>= sLineDashName)
    1545        1016 :             dumpLineDashNameAsAttribute(sLineDashName, xmlWriter);
    1546             :     }
    1547             :     {
    1548         508 :         uno::Any anotherAny = xPropSet->getPropertyValue("LineColor");
    1549         508 :         sal_Int32 aLineColor = sal_Int32();
    1550         508 :         if(anotherAny >>= aLineColor)
    1551         508 :             dumpLineColorAsAttribute(aLineColor, xmlWriter);
    1552             :     }
    1553             :     {
    1554         508 :         uno::Any anotherAny = xPropSet->getPropertyValue("LineTransparence");
    1555         508 :         sal_Int32 aLineTransparence = sal_Int32();
    1556         508 :         if(anotherAny >>= aLineTransparence)
    1557         508 :             dumpLineTransparenceAsAttribute(aLineTransparence, xmlWriter);
    1558             :     }
    1559             :     {
    1560         508 :         uno::Any anotherAny = xPropSet->getPropertyValue("LineWidth");
    1561         508 :         sal_Int32 aLineWidth = sal_Int32();
    1562         508 :         if(anotherAny >>= aLineWidth)
    1563         508 :             dumpLineWidthAsAttribute(aLineWidth, xmlWriter);
    1564             :     }
    1565             :     {
    1566         508 :         uno::Any anotherAny = xPropSet->getPropertyValue("LineJoint");
    1567             :         drawing::LineJoint eLineJoint;
    1568         508 :         if(anotherAny >>= eLineJoint)
    1569         508 :             dumpLineJointAsAttribute(eLineJoint, xmlWriter);
    1570             :     }
    1571             :     {
    1572         508 :         uno::Any anotherAny = xPropSet->getPropertyValue("LineStartName");
    1573        1016 :         OUString sLineStartName;
    1574         508 :         if(anotherAny >>= sLineStartName)
    1575        1016 :             dumpLineStartNameAsAttribute(sLineStartName, xmlWriter);
    1576             :     }
    1577             :     {
    1578         508 :         uno::Any anotherAny = xPropSet->getPropertyValue("LineEndName");
    1579        1016 :         OUString sLineEndName;
    1580         508 :         if(anotherAny >>= sLineEndName)
    1581        1016 :             dumpLineEndNameAsAttribute(sLineEndName, xmlWriter);
    1582             :     }
    1583             :     {
    1584         508 :         uno::Any anotherAny = xPropSet->getPropertyValue("LineStart");
    1585        1016 :         drawing::PolyPolygonBezierCoords aLineStart;
    1586         508 :         if(anotherAny >>= aLineStart)
    1587        1016 :             dumpLineStartAsElement(aLineStart, xmlWriter);
    1588             :     }
    1589             :     {
    1590         508 :         uno::Any anotherAny = xPropSet->getPropertyValue("LineEnd");
    1591        1016 :         drawing::PolyPolygonBezierCoords aLineEnd;
    1592         508 :         if(anotherAny >>= aLineEnd)
    1593        1016 :             dumpLineEndAsElement(aLineEnd, xmlWriter);
    1594             :     }
    1595             :     {
    1596         508 :         uno::Any anotherAny = xPropSet->getPropertyValue("LineStartCenter");
    1597             :         bool bLineStartCenter;
    1598         508 :         if(anotherAny >>= bLineStartCenter)
    1599         508 :             dumpLineStartCenterAsAttribute(bLineStartCenter, xmlWriter);
    1600             :     }
    1601             :     {
    1602         508 :         uno::Any anotherAny = xPropSet->getPropertyValue("LineStartWidth");
    1603         508 :         sal_Int32 aLineStartWidth = sal_Int32();
    1604         508 :         if(anotherAny >>= aLineStartWidth)
    1605         508 :             dumpLineStartWidthAsAttribute(aLineStartWidth, xmlWriter);
    1606             :     }
    1607             :     {
    1608         508 :         uno::Any anotherAny = xPropSet->getPropertyValue("LineEndCenter");
    1609             :         bool bLineEndCenter;
    1610         508 :         if(anotherAny >>= bLineEndCenter)
    1611         508 :             dumpLineEndCenterAsAttribute(bLineEndCenter, xmlWriter);
    1612             :     }
    1613             :     {
    1614         508 :         uno::Any anotherAny = xPropSet->getPropertyValue("LineEndWidth");
    1615         508 :         sal_Int32 aLineEndWidth = sal_Int32();
    1616         508 :         if(anotherAny >>= aLineEndWidth)
    1617         508 :             dumpLineEndWidthAsAttribute(aLineEndWidth, xmlWriter);
    1618             :     }
    1619         508 : }
    1620             : 
    1621          40 : void dumpShadowPropertiesService(uno::Reference< beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter)
    1622             : {
    1623             :     {
    1624          40 :         uno::Any anotherAny = xPropSet->getPropertyValue("Shadow");
    1625             :         bool bShadow;
    1626          40 :         if(anotherAny >>= bShadow)
    1627          40 :             dumpShadowAsAttribute(bShadow, xmlWriter);
    1628             :     }
    1629             :     {
    1630          40 :         uno::Any anotherAny = xPropSet->getPropertyValue("ShadowColor");
    1631          40 :         sal_Int32 aShadowColor = sal_Int32();
    1632          40 :         if(anotherAny >>= aShadowColor)
    1633          40 :             dumpShadowColorAsAttribute(aShadowColor, xmlWriter);
    1634             :     }
    1635             :     {
    1636          40 :         uno::Any anotherAny = xPropSet->getPropertyValue("ShadowTransparence");
    1637          40 :         sal_Int32 aShadowTransparence = sal_Int32();
    1638          40 :         if(anotherAny >>= aShadowTransparence)
    1639          40 :             dumpShadowTransparenceAsAttribute(aShadowTransparence, xmlWriter);
    1640             :     }
    1641             :     {
    1642          40 :         uno::Any anotherAny = xPropSet->getPropertyValue("ShadowXDistance");
    1643          40 :         sal_Int32 aShadowXDistance = sal_Int32();
    1644          40 :         if(anotherAny >>= aShadowXDistance)
    1645          40 :             dumpShadowXDistanceAsAttribute(aShadowXDistance, xmlWriter);
    1646             :     }
    1647             :     {
    1648          40 :         uno::Any anotherAny = xPropSet->getPropertyValue("ShadowYDistance");
    1649          40 :         sal_Int32 aShadowYDistance = sal_Int32();
    1650          40 :         if(anotherAny >>= aShadowYDistance)
    1651          40 :             dumpShadowYDistanceAsAttribute(aShadowYDistance, xmlWriter);
    1652             :     }
    1653          40 : }
    1654             : 
    1655          14 : void dumpPolyPolygonDescriptorService(uno::Reference< beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter)
    1656             : {
    1657             :     {
    1658          14 :         uno::Any anotherAny = xPropSet->getPropertyValue("PolygonKind");
    1659             :         drawing::PolygonKind ePolygonKind;
    1660          14 :         if(anotherAny >>= ePolygonKind)
    1661          14 :             dumpPolygonKindAsAttribute(ePolygonKind, xmlWriter);
    1662             :     }
    1663             :     {
    1664          14 :         uno::Any anotherAny = xPropSet->getPropertyValue("PolyPolygon");
    1665          28 :         drawing::PointSequenceSequence aPolyPolygon;
    1666          14 :         if(anotherAny >>= aPolyPolygon)
    1667          28 :             dumpPolyPolygonAsElement(aPolyPolygon, xmlWriter);
    1668             :     }
    1669             :     {
    1670          14 :         uno::Any anotherAny = xPropSet->getPropertyValue("Geometry");
    1671          28 :         drawing::PointSequenceSequence aGeometry;
    1672          14 :         if(anotherAny >>= aGeometry)
    1673          28 :             dumpGeometryAsElement(aGeometry, xmlWriter);
    1674             :     }
    1675          14 : }
    1676             : 
    1677         518 : void dumpShapeService(uno::Reference< beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter, bool bDumpInteropProperties)
    1678             : {
    1679         518 :     uno::Reference< beans::XPropertySetInfo> xInfo = xPropSet->getPropertySetInfo();
    1680             :     {
    1681         518 :         uno::Any anotherAny = xPropSet->getPropertyValue("ZOrder");
    1682         518 :         sal_Int32 aZOrder = sal_Int32();
    1683         518 :         if(anotherAny >>= aZOrder)
    1684         518 :             dumpZOrderAsAttribute(aZOrder, xmlWriter);
    1685             :     }
    1686             :     {
    1687         518 :         uno::Any anotherAny = xPropSet->getPropertyValue("LayerID");
    1688         518 :         sal_Int32 aLayerID = sal_Int32();
    1689         518 :         if(anotherAny >>= aLayerID)
    1690         518 :             dumpLayerIDAsAttribute(aLayerID, xmlWriter);
    1691             :     }
    1692             :     {
    1693         518 :         uno::Any anotherAny = xPropSet->getPropertyValue("LayerName");
    1694        1036 :         OUString sLayerName;
    1695         518 :         if(anotherAny >>= sLayerName)
    1696        1036 :             dumpLayerNameAsAttribute(sLayerName, xmlWriter);
    1697             :     }
    1698             :     {
    1699         518 :         uno::Any anotherAny = xPropSet->getPropertyValue("Visible");
    1700             :         bool bVisible;
    1701         518 :         if(anotherAny >>= bVisible)
    1702         518 :             dumpVisibleAsAttribute(bVisible, xmlWriter);
    1703             :     }
    1704             :     {
    1705         518 :         uno::Any anotherAny = xPropSet->getPropertyValue("Printable");
    1706             :         bool bPrintable;
    1707         518 :         if(anotherAny >>= bPrintable)
    1708         518 :             dumpPrintableAsAttribute(bPrintable, xmlWriter);
    1709             :     }
    1710             :     {
    1711         518 :         uno::Any anotherAny = xPropSet->getPropertyValue("MoveProtect");
    1712             :         bool bMoveProtect;
    1713         518 :         if(anotherAny >>= bMoveProtect)
    1714         518 :             dumpMoveProtectAsAttribute(bMoveProtect, xmlWriter);
    1715             :     }
    1716             :     {
    1717         518 :         uno::Any anotherAny = xPropSet->getPropertyValue("Name");
    1718        1036 :         OUString sName;
    1719         518 :         if(anotherAny >>= sName)
    1720        1036 :             dumpNameAsAttribute(sName, xmlWriter);
    1721             :     }
    1722             :     {
    1723         518 :         uno::Any anotherAny = xPropSet->getPropertyValue("SizeProtect");
    1724             :         bool bSizeProtect;
    1725         518 :         if(anotherAny >>= bSizeProtect)
    1726         518 :             dumpSizeProtectAsAttribute(bSizeProtect, xmlWriter);
    1727             :     }
    1728             :     {
    1729         518 :         uno::Any anotherAny = xPropSet->getPropertyValue("Transformation");
    1730         518 :         drawing::HomogenMatrix3 aTransformation;
    1731         518 :         if(anotherAny >>= aTransformation)
    1732         518 :             dumpTransformationAsElement(aTransformation, xmlWriter);
    1733             :     }
    1734             :     {
    1735         518 :         uno::Any anotherAny = xPropSet->getPropertyValue("NavigationOrder");
    1736         518 :         sal_Int32 aNavigationOrder = sal_Int32();
    1737         518 :         if(anotherAny >>= aNavigationOrder)
    1738         518 :             dumpNavigationOrderAsAttribute(aNavigationOrder, xmlWriter);
    1739             :     }
    1740         518 :     if(xInfo->hasPropertyByName("Hyperlink"))
    1741             :     {
    1742           0 :         uno::Any anotherAny = xPropSet->getPropertyValue("Hyperlink");
    1743           0 :         OUString sHyperlink;
    1744           0 :         if(anotherAny >>= sHyperlink)
    1745           0 :             dumpHyperlinkAsAttribute(sHyperlink, xmlWriter);
    1746             :     }
    1747         518 :     if(xInfo->hasPropertyByName("InteropGrabBag") && bDumpInteropProperties)
    1748             :     {
    1749           0 :         uno::Any anotherAny = xPropSet->getPropertyValue("InteropGrabBag");
    1750           0 :         uno::Sequence< beans::PropertyValue> aInteropGrabBag;
    1751           0 :         if(anotherAny >>= aInteropGrabBag)
    1752           0 :             dumpInteropGrabBagAsElement(aInteropGrabBag, xmlWriter);
    1753         518 :     }
    1754         518 : }
    1755             : 
    1756           8 : void dumpPolyPolygonBezierDescriptorService(uno::Reference< beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter)
    1757             : {
    1758             :     {
    1759           8 :         uno::Any anotherAny = xPropSet->getPropertyValue("PolygonKind");
    1760             :         drawing::PolygonKind ePolygonKind;
    1761           8 :         if(anotherAny >>= ePolygonKind)
    1762           8 :             dumpPolygonKindAsAttribute(ePolygonKind, xmlWriter);
    1763             :     }
    1764             :     {
    1765           8 :         uno::Any anotherAny = xPropSet->getPropertyValue("PolyPolygonBezier");
    1766          16 :         drawing::PolyPolygonBezierCoords aPolyPolygonBezier;
    1767           8 :         if(anotherAny >>= aPolyPolygonBezier)
    1768          16 :             dumpPolyPolygonBezierCoords(aPolyPolygonBezier, xmlWriter);
    1769             :     }
    1770             :     {
    1771           8 :         uno::Any anotherAny = xPropSet->getPropertyValue("Geometry");
    1772          16 :         drawing::PolyPolygonBezierCoords aGeometry;
    1773           8 :         if(anotherAny >>= aGeometry)
    1774          16 :             dumpPolyPolygonBezierCoords(aGeometry, xmlWriter);
    1775             :     }
    1776           8 : }
    1777             : 
    1778         472 : void dumpCustomShapeService(uno::Reference< beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter)
    1779             : {
    1780         472 :     uno::Reference< beans::XPropertySetInfo> xInfo = xPropSet->getPropertySetInfo();
    1781             :     {
    1782         472 :         uno::Any anotherAny = xPropSet->getPropertyValue("CustomShapeEngine");
    1783         944 :         OUString sCustomShapeEngine;
    1784         472 :         if(anotherAny >>= sCustomShapeEngine)
    1785         944 :             dumpCustomShapeEngineAsAttribute(sCustomShapeEngine, xmlWriter);
    1786             :     }
    1787             :     {
    1788         472 :         uno::Any anotherAny = xPropSet->getPropertyValue("CustomShapeData");
    1789         944 :         OUString sCustomShapeData;
    1790         472 :         if(anotherAny >>= sCustomShapeData)
    1791         944 :             dumpCustomShapeDataAsAttribute(sCustomShapeData, xmlWriter);
    1792             :     }
    1793             :     {
    1794         472 :         uno::Any anotherAny = xPropSet->getPropertyValue("CustomShapeGeometry");
    1795         944 :         uno::Sequence< beans::PropertyValue> aCustomShapeGeometry;
    1796         472 :         if(anotherAny >>= aCustomShapeGeometry)
    1797         944 :             dumpCustomShapeGeometryAsElement(aCustomShapeGeometry, xmlWriter);
    1798             :     }
    1799         472 :     if(xInfo->hasPropertyByName("CustomShapeReplacementURL"))
    1800             :     {
    1801           0 :         uno::Any anotherAny = xPropSet->getPropertyValue("CustomShapeReplacementURL");
    1802           0 :         OUString sCustomShapeReplacementURL;
    1803           0 :         if(anotherAny >>= sCustomShapeReplacementURL)
    1804           0 :             dumpCustomShapeReplacementURLAsAttribute(sCustomShapeReplacementURL, xmlWriter);
    1805         472 :     }
    1806         472 : }
    1807             : 
    1808         522 : void dumpXShape(uno::Reference< drawing::XShape > xShape, xmlTextWriterPtr xmlWriter, bool bDumpInteropProperties)
    1809             : {
    1810         522 :     xmlTextWriterStartElement( xmlWriter, BAD_CAST( "XShape" ) );
    1811         522 :     uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY_THROW);
    1812        1044 :     uno::Reference<beans::XPropertySetInfo> xPropSetInfo = xPropSet->getPropertySetInfo();
    1813        1044 :     OUString aName;
    1814         522 :     m_bNameDumped = false;
    1815             : 
    1816         522 :     dumpPositionAsAttribute(xShape->getPosition(), xmlWriter);
    1817         522 :     dumpSizeAsAttribute(xShape->getSize(), xmlWriter);
    1818        1044 :     uno::Reference< drawing::XShapeDescriptor > xDescr(xShape, uno::UNO_QUERY_THROW);
    1819         522 :     dumpShapeDescriptorAsAttribute(xDescr, xmlWriter);
    1820             : 
    1821             :     // uno::Sequence<beans::Property> aProperties = xPropSetInfo->getProperties();
    1822             : 
    1823        1044 :     uno::Reference< lang::XServiceInfo > xServiceInfo( xShape, uno::UNO_QUERY_THROW );
    1824             : 
    1825        1044 :     uno::Reference< beans::XPropertySetInfo> xInfo = xPropSet->getPropertySetInfo();
    1826         522 :     if(xInfo->hasPropertyByName("Name"))
    1827             :     {
    1828         522 :         uno::Any aAny = xPropSet->getPropertyValue("Name");
    1829         522 :         if (aAny >>= aName)
    1830             :         {
    1831         522 :             if (!aName.isEmpty())
    1832             :             {
    1833         136 :                 xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("name"), "%s", OUStringToOString(aName, RTL_TEXTENCODING_UTF8).getStr());
    1834         136 :                 m_bNameDumped = true;
    1835             :             }
    1836         522 :         }
    1837             :     }
    1838             : 
    1839             :     try
    1840             :     {
    1841         522 :     if (xServiceInfo->supportsService("com.sun.star.drawing.Text"))
    1842             :     {
    1843         512 :         uno::Reference< text::XText > xText(xShape, uno::UNO_QUERY_THROW);
    1844        1024 :         OUString aText = xText->getString();
    1845         512 :         if(!aText.isEmpty())
    1846         628 :             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("text"), "%s", OUStringToOString(aText, RTL_TEXTENCODING_UTF8).getStr());
    1847             :     }
    1848         522 :     if(xServiceInfo->supportsService("com.sun.star.drawing.TextProperties"))
    1849         512 :         dumpTextPropertiesService(xPropSet, xmlWriter);
    1850             : 
    1851         522 :     if(xServiceInfo->supportsService("com.sun.star.drawing.GroupShape"))
    1852             :     {
    1853           6 :         uno::Reference< drawing::XShapes > xShapes(xShape, uno::UNO_QUERY_THROW);
    1854           6 :         dumpXShapes(xShapes, xmlWriter, bDumpInteropProperties);
    1855             :     }
    1856         522 :     if(xServiceInfo->supportsService("com.sun.star.drawing.FillProperties"))
    1857         500 :         dumpFillPropertiesService(xPropSet, xmlWriter);
    1858             : 
    1859         522 :     if(xServiceInfo->supportsService("com.sun.star.drawing.LineProperties"))
    1860         508 :         dumpLinePropertiesService(xPropSet, xmlWriter);
    1861             : 
    1862         522 :     if(xServiceInfo->supportsService("com.sun.star.drawing.PolyPolygonDescriptor"))
    1863          14 :         dumpPolyPolygonDescriptorService(xPropSet, xmlWriter);
    1864             : 
    1865         522 :     if(xServiceInfo->supportsService("com.sun.star.drawing.ShadowProperties"))
    1866          40 :         dumpShadowPropertiesService(xPropSet, xmlWriter);
    1867             : 
    1868         522 :     if(xServiceInfo->supportsService("com.sun.star.drawing.Shape"))
    1869         518 :         dumpShapeService(xPropSet, xmlWriter, bDumpInteropProperties);
    1870             : 
    1871         522 :     if(xServiceInfo->supportsService("com.sun.star.drawing.PolyPolygonBezierDescriptor"))
    1872           8 :         dumpPolyPolygonBezierDescriptorService(xPropSet, xmlWriter);
    1873             : 
    1874         522 :     if(xServiceInfo->supportsService("com.sun.star.drawing.CustomShape"))
    1875         472 :         dumpCustomShapeService(xPropSet, xmlWriter);
    1876             : 
    1877             :     // EnhancedShapeDumper used
    1878             : 
    1879         522 :     if(xServiceInfo->supportsService("com.sun.star.drawing.EnhancedCustomShapeExtrusion"))
    1880             :     {
    1881           0 :         EnhancedShapeDumper enhancedDumper(xmlWriter);
    1882           0 :         enhancedDumper.dumpEnhancedCustomShapeExtrusionService(xPropSet);
    1883             :     }
    1884         522 :     if(xServiceInfo->supportsService("com.sun.star.drawing.EnhancedCustomShapeGeometry"))
    1885             :     {
    1886           0 :         EnhancedShapeDumper enhancedDumper(xmlWriter);
    1887           0 :         enhancedDumper.dumpEnhancedCustomShapeGeometryService(xPropSet);
    1888             :     }
    1889         522 :     if(xServiceInfo->supportsService("com.sun.star.drawing.EnhancedCustomShapeHandle"))
    1890             :     {
    1891           0 :         EnhancedShapeDumper enhancedDumper(xmlWriter);
    1892           0 :         enhancedDumper.dumpEnhancedCustomShapeHandleService(xPropSet);
    1893             :     }
    1894         522 :     if(xServiceInfo->supportsService("com.sun.star.drawing.EnhancedCustomShapePath"))
    1895             :     {
    1896           0 :         EnhancedShapeDumper enhancedDumper(xmlWriter);
    1897           0 :         enhancedDumper.dumpEnhancedCustomShapePathService(xPropSet);
    1898             :     }
    1899         522 :     if(xServiceInfo->supportsService("com.sun.star.drawing.EnhancedCustomShapeTextPath"))
    1900             :     {
    1901           0 :         EnhancedShapeDumper enhancedDumper(xmlWriter);
    1902           0 :         enhancedDumper.dumpEnhancedCustomShapeTextPathService(xPropSet);
    1903             :     }
    1904             :     }   // end of the 'try' block
    1905           0 :     catch (const beans::UnknownPropertyException& e)
    1906             :     {
    1907           0 :         std::cout << "Exception caught in XShapeDumper.cxx: " << e.Message << std::endl;
    1908             :     }
    1909             : 
    1910             :     #if DEBUG_DUMPER
    1911             :         uno::Sequence< OUString > aServiceNames = xServiceInfo->getSupportedServiceNames();
    1912             :         sal_Int32 nServices = aServiceNames.getLength();
    1913             :         for (sal_Int32 i = 0; i < nServices; ++i)
    1914             :         {
    1915             :             xmlTextWriterStartElement(xmlWriter, BAD_CAST( "ServiceName" ));
    1916             :             xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST( "name" ), "%s", OUStringToOString(aServiceNames[i], RTL_TEXTENCODING_UTF8).getStr());
    1917             :             xmlTextWriterEndElement( xmlWriter );
    1918             :         }
    1919             :     #endif
    1920             : 
    1921        1044 :     xmlTextWriterEndElement( xmlWriter );
    1922         522 : }
    1923             : 
    1924          42 : void dumpXShapes( uno::Reference< drawing::XShapes > xShapes, xmlTextWriterPtr xmlWriter, bool bDumpInteropProperties )
    1925             : {
    1926          42 :     xmlTextWriterStartElement( xmlWriter, BAD_CAST( "XShapes" ) );
    1927          42 :     uno::Reference< container::XIndexAccess > xIA( xShapes, uno::UNO_QUERY_THROW);
    1928          42 :     sal_Int32 nLength = xIA->getCount();
    1929         564 :     for (sal_Int32 i = 0; i < nLength; ++i)
    1930             :     {
    1931         522 :         uno::Reference< drawing::XShape > xShape( xIA->getByIndex( i ), uno::UNO_QUERY_THROW );
    1932         522 :         dumpXShape( xShape, xmlWriter, bDumpInteropProperties );
    1933         522 :     }
    1934             : 
    1935          42 :     xmlTextWriterEndElement( xmlWriter );
    1936          42 : }
    1937             : } //end of namespace
    1938             : 
    1939          36 : OUString XShapeDumper::dump(uno::Reference<drawing::XShapes> xPageShapes, bool bDumpInteropProperties)
    1940             : {
    1941          36 :     OStringBuffer aString;
    1942          36 :     xmlOutputBufferPtr xmlOutBuffer = xmlOutputBufferCreateIO( writeCallback, closeCallback, &aString, NULL );
    1943          36 :     xmlTextWriterPtr xmlWriter = xmlNewTextWriter( xmlOutBuffer );
    1944          36 :     xmlTextWriterSetIndent( xmlWriter, 1 );
    1945             : 
    1946          36 :     xmlTextWriterStartDocument( xmlWriter, NULL, NULL, NULL );
    1947             : 
    1948             :     try
    1949             :     {
    1950          36 :         dumpXShapes( xPageShapes, xmlWriter, bDumpInteropProperties );
    1951             :     }
    1952           0 :     catch (const beans::UnknownPropertyException& e)
    1953             :     {
    1954           0 :         std::cout << "Exception caught in XShapeDumper: " << e.Message << std::endl;
    1955             :     }
    1956             : 
    1957          36 :     xmlTextWriterEndDocument( xmlWriter );
    1958          36 :     xmlFreeTextWriter( xmlWriter );
    1959             : 
    1960          36 :     return OStringToOUString(aString.makeStringAndClear(), RTL_TEXTENCODING_UTF8);
    1961             : }
    1962             : 
    1963           0 : OUString XShapeDumper::dump(uno::Reference<drawing::XShape> xPageShapes, bool bDumpInteropProperties)
    1964             : {
    1965           0 :     OStringBuffer aString;
    1966           0 :     xmlOutputBufferPtr xmlOutBuffer = xmlOutputBufferCreateIO( writeCallback, closeCallback, &aString, NULL );
    1967           0 :     xmlTextWriterPtr xmlWriter = xmlNewTextWriter( xmlOutBuffer );
    1968           0 :     xmlTextWriterSetIndent( xmlWriter, 1 );
    1969             : 
    1970           0 :     xmlTextWriterStartDocument( xmlWriter, NULL, NULL, NULL );
    1971             : 
    1972             :     try
    1973             :     {
    1974           0 :         dumpXShape( xPageShapes, xmlWriter, bDumpInteropProperties );
    1975             :     }
    1976           0 :     catch (const beans::UnknownPropertyException& e)
    1977             :     {
    1978           0 :         std::cout << "Exception caught in XShapeDumper: " << e.Message << std::endl;
    1979             :     }
    1980             : 
    1981           0 :     xmlTextWriterEndDocument( xmlWriter );
    1982           0 :     xmlFreeTextWriter( xmlWriter );
    1983             : 
    1984           0 :     return OStringToOUString(aString.makeStringAndClear(), RTL_TEXTENCODING_UTF8);
    1985        1143 : }
    1986             : 
    1987             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10