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

Generated by: LCOV version 1.10