Branch data 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/oustringostreaminserter.hxx>
40 : :
41 : : #define DEBUG_DUMPER 0
42 : :
43 : : using namespace com::sun::star;
44 : : //class XShapeDumper
45 : :
46 : 6 : XShapeDumper::XShapeDumper()
47 : : {
48 : :
49 : 6 : }
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 : 186 : int writeCallback(void* pContext, const char* sBuffer, int nLen)
177 : : {
178 : 186 : rtl::OStringBuffer* pBuffer = static_cast<rtl::OStringBuffer*>(pContext);
179 : 186 : pBuffer->append(sBuffer);
180 : 186 : return nLen;
181 : : }
182 : :
183 : 27 : int closeCallback(void* )
184 : : {
185 : 27 : return 0;
186 : : }
187 : :
188 : : // ----------------------------------------
189 : : // ---------- FillProperties.idl ----------
190 : : // ----------------------------------------
191 : 216 : void dumpFillStyleAsAttribute(drawing::FillStyle eFillStyle, xmlTextWriterPtr xmlWriter)
192 : : {
193 [ + + + + : 216 : switch(eFillStyle)
- - ]
194 : : {
195 : : case drawing::FillStyle_NONE:
196 : 39 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillStyle"), "%s", "NONE");
197 : 39 : break;
198 : : case drawing::FillStyle_SOLID:
199 : 150 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillStyle"), "%s", "SOLID");
200 : 150 : break;
201 : : case drawing::FillStyle_GRADIENT:
202 : 15 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillStyle"), "%s", "GRADIENT");
203 : 15 : break;
204 : : case drawing::FillStyle_HATCH:
205 : 12 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillStyle"), "%s", "HATCH");
206 : 12 : 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 : 216 : }
214 : :
215 : 216 : void dumpFillColorAsAttribute(sal_Int32 aColor, xmlTextWriterPtr xmlWriter)
216 : : {
217 : 216 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillColor"), "%" SAL_PRIdINT32, aColor);
218 : 216 : }
219 : :
220 : 216 : void dumpFillTransparenceAsAttribute(sal_Int32 aTransparence, xmlTextWriterPtr xmlWriter)
221 : : {
222 : 216 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillTransparence"), "%" SAL_PRIdINT32, aTransparence);
223 : 216 : }
224 : :
225 : 216 : void dumpFillTransparenceGradientNameAsAttribute(rtl::OUString sTranspGradName, xmlTextWriterPtr xmlWriter)
226 : : {
227 : : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillTransparenceGradientName"), "%s",
228 [ + - ]: 216 : rtl::OUStringToOString(sTranspGradName, RTL_TEXTENCODING_UTF8).getStr());
229 : 216 : }
230 : :
231 : : //because there's more awt::Gradient properties to dump
232 : 432 : void dumpGradientProperty(awt::Gradient aGradient, xmlTextWriterPtr xmlWriter)
233 : : {
234 [ + + + - : 432 : switch(aGradient.Style) //enum GradientStyle
+ - - ]
235 : : {
236 : : case awt::GradientStyle_LINEAR:
237 : 423 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("style"), "%s", "LINEAR");
238 : 423 : break;
239 : : case awt::GradientStyle_AXIAL:
240 : 3 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("style"), "%s", "AXIAL");
241 : 3 : break;
242 : : case awt::GradientStyle_RADIAL:
243 : 3 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("style"), "%s", "RADIAL");
244 : 3 : break;
245 : : case awt::GradientStyle_ELLIPTICAL:
246 : 0 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("style"), "%s", "ELLIPTICAL");
247 : 0 : break;
248 : : case awt::GradientStyle_SQUARE:
249 : 3 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("style"), "%s", "SQUARE");
250 : 3 : 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 : 432 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("startColor"), "%" SAL_PRIdINT32, (sal_Int32) aGradient.StartColor);
258 : 432 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("endColor"), "%" SAL_PRIdINT32, (sal_Int32) aGradient.EndColor);
259 : 432 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("angle"), "%" SAL_PRIdINT32, (sal_Int32) aGradient.Angle);
260 : 432 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("border"), "%" SAL_PRIdINT32, (sal_Int32) aGradient.Border);
261 : 432 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("xOffset"), "%" SAL_PRIdINT32, (sal_Int32) aGradient.XOffset);
262 : 432 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("yOffset"), "%" SAL_PRIdINT32, (sal_Int32) aGradient.YOffset);
263 : 432 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("startIntensity"), "%" SAL_PRIdINT32, (sal_Int32) aGradient.StartIntensity);
264 : 432 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("endIntensity"), "%" SAL_PRIdINT32, (sal_Int32) aGradient.EndIntensity);
265 : 432 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("stepCount"), "%" SAL_PRIdINT32, (sal_Int32) aGradient.StepCount);
266 : 432 : }
267 : :
268 : 216 : void dumpFillTransparenceGradientAsElement(awt::Gradient aTranspGrad, xmlTextWriterPtr xmlWriter)
269 : : {
270 : 216 : xmlTextWriterStartElement(xmlWriter, BAD_CAST( "FillTransparenceGradient" ));
271 : 216 : dumpGradientProperty(aTranspGrad, xmlWriter);
272 : 216 : xmlTextWriterEndElement( xmlWriter );
273 : 216 : }
274 : :
275 : 648 : void dumpFillGradientNameAsAttribute(rtl::OUString sGradName, xmlTextWriterPtr xmlWriter)
276 : : {
277 : : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillGradientName"), "%s",
278 [ + - ]: 648 : rtl::OUStringToOString(sGradName, RTL_TEXTENCODING_UTF8).getStr());
279 : 648 : }
280 : :
281 : 216 : void dumpFillGradientAsElement(awt::Gradient aGradient, xmlTextWriterPtr xmlWriter)
282 : : {
283 : 216 : xmlTextWriterStartElement(xmlWriter, BAD_CAST( "FillGradient" ));
284 : 216 : dumpGradientProperty(aGradient, xmlWriter);
285 : 216 : xmlTextWriterEndElement( xmlWriter );
286 : 216 : }
287 : :
288 : 216 : void dumpFillHatchAsElement(drawing::Hatch aHatch, xmlTextWriterPtr xmlWriter)
289 : : {
290 : 216 : xmlTextWriterStartElement(xmlWriter, BAD_CAST( "FillHatch" ));
291 [ + + + - ]: 216 : switch(aHatch.Style)
292 : : {
293 : : case drawing::HatchStyle_SINGLE:
294 : 210 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("style"), "%s", "SINGLE");
295 : 210 : break;
296 : : case drawing::HatchStyle_DOUBLE:
297 : 3 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("style"), "%s", "DOUBLE");
298 : 3 : break;
299 : : case drawing::HatchStyle_TRIPLE:
300 : 3 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("style"), "%s", "TRIPLE");
301 : 3 : break;
302 : : default:
303 : 0 : break;
304 : : }
305 : 216 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("color"), "%" SAL_PRIdINT32, (sal_Int32) aHatch.Color);
306 : 216 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("distance"), "%" SAL_PRIdINT32, (sal_Int32) aHatch.Distance);
307 : 216 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("angle"), "%" SAL_PRIdINT32, (sal_Int32) aHatch.Angle);
308 : 216 : xmlTextWriterEndElement( xmlWriter );
309 : 216 : }
310 : :
311 : 216 : void dumpFillBackgroundAsAttribute(sal_Bool bBackground, xmlTextWriterPtr xmlWriter)
312 : : {
313 [ - + ]: 216 : if(bBackground)
314 : 0 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBackground"), "%s", "true");
315 : : else
316 : 216 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBackground"), "%s", "false");
317 : 216 : }
318 : :
319 : 216 : void dumpFillBitmapAsElement(uno::Reference<awt::XBitmap> xBitmap, xmlTextWriterPtr xmlWriter)
320 : : {
321 : 216 : xmlTextWriterStartElement(xmlWriter, BAD_CAST( "FillBitmap" ));
322 [ + - ]: 216 : if (xBitmap.is())
323 : : {
324 [ + - ][ + - ]: 216 : awt::Size const aSize = xBitmap->getSize();
325 [ + - ]: 216 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("width"), "%" SAL_PRIdINT32, aSize.Width);
326 [ + - ]: 216 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("height"), "%" SAL_PRIdINT32, aSize.Height);
327 : : }
328 : 216 : xmlTextWriterEndElement( xmlWriter );
329 : 216 : }
330 : :
331 : 216 : void dumpFillBitmapURLAsAttribute(rtl::OUString sBitmapURL, xmlTextWriterPtr xmlWriter)
332 : : {
333 : : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillBitmapURL"), "%s",
334 [ + - ]: 216 : rtl::OUStringToOString(sBitmapURL, RTL_TEXTENCODING_UTF8).getStr());
335 : 216 : }
336 : :
337 : 216 : void dumpFillBitmapPositionOffsetXAsAttribute(sal_Int32 aBitmapPositionOffsetX, xmlTextWriterPtr xmlWriter)
338 : : {
339 : 216 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillBitmapPositionOffsetX"), "%" SAL_PRIdINT32, aBitmapPositionOffsetX);
340 : 216 : }
341 : :
342 : 216 : void dumpFillBitmapPositionOffsetYAsAttribute(sal_Int32 aBitmapPositionOffsetY, xmlTextWriterPtr xmlWriter)
343 : : {
344 : 216 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillBitmapPositionOffsetY"), "%" SAL_PRIdINT32, aBitmapPositionOffsetY);
345 : 216 : }
346 : :
347 : 216 : void dumpFillBitmapOffsetXAsAttribute(sal_Int32 aBitmapOffsetX, xmlTextWriterPtr xmlWriter)
348 : : {
349 : 216 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillBitmapOffsetX"), "%" SAL_PRIdINT32, aBitmapOffsetX);
350 : 216 : }
351 : :
352 : 216 : void dumpFillBitmapOffsetYAsAttribute(sal_Int32 aBitmapOffsetY, xmlTextWriterPtr xmlWriter)
353 : : {
354 : 216 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillBitmapOffsetY"), "%" SAL_PRIdINT32, aBitmapOffsetY);
355 : 216 : }
356 : :
357 : 216 : void dumpFillBitmapRectanglePointAsAttribute(drawing::RectanglePoint eBitmapRectanglePoint, xmlTextWriterPtr xmlWriter)
358 : : {
359 [ - - - - : 216 : 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 : 216 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapRectanglePoint"), "%s", "MIDDLE_MIDDLE");
375 : 216 : 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 : 216 : }
392 : :
393 : 216 : void dumpFillBitmapLogicalSizeAsAttribute(sal_Bool bBitmapLogicalSize, xmlTextWriterPtr xmlWriter)
394 : : {
395 [ + - ]: 216 : if(bBitmapLogicalSize)
396 : 216 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapLogicalSize"), "%s", "true");
397 : : else
398 : 0 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapLogicalSize"), "%s", "false");
399 : 216 : }
400 : :
401 : 216 : void dumpFillBitmapSizeXAsAttribute(sal_Int32 aBitmapSizeX, xmlTextWriterPtr xmlWriter)
402 : : {
403 : 216 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillBitmapSizeX"), "%" SAL_PRIdINT32, aBitmapSizeX);
404 : 216 : }
405 : :
406 : 216 : void dumpFillBitmapSizeYAsAttribute(sal_Int32 aBitmapSizeY, xmlTextWriterPtr xmlWriter)
407 : : {
408 : 216 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillBitmapSizeY"), "%" SAL_PRIdINT32, aBitmapSizeY);
409 : 216 : }
410 : :
411 : 216 : void dumpFillBitmapModeAsAttribute(drawing::BitmapMode eBitmapMode, xmlTextWriterPtr xmlWriter)
412 : : {
413 [ + - - - ]: 216 : switch(eBitmapMode)
414 : : {
415 : : case drawing::BitmapMode_REPEAT:
416 : 216 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapMode"), "%s", "REPEAT");
417 : 216 : 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 : 216 : }
428 : :
429 : 216 : void dumpFillBitmapStretchAsAttribute(sal_Bool bBitmapStretch, xmlTextWriterPtr xmlWriter)
430 : : {
431 [ + - ]: 216 : if(bBitmapStretch)
432 : 216 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapStretch"), "%s", "true");
433 : : else
434 : 0 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapStretch"), "%s", "false");
435 : 216 : }
436 : :
437 : 216 : void dumpFillBitmapTileAsAttribute(sal_Bool bBitmapTile, xmlTextWriterPtr xmlWriter)
438 : : {
439 [ + - ]: 216 : if(bBitmapTile)
440 : 216 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapTile"), "%s", "true");
441 : : else
442 : 0 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapTile"), "%s", "false");
443 : 216 : }
444 : :
445 : : // ----------------------------------------
446 : : // ---------- LineProperties.idl ----------
447 : : // ----------------------------------------
448 : :
449 : 228 : void dumpLineStyleAsAttribute(drawing::LineStyle eLineStyle, xmlTextWriterPtr xmlWriter)
450 : : {
451 [ - + - - ]: 228 : 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 : 228 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("lineStyle"), "%s", "SOLID");
458 : 228 : 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 : 228 : }
466 : :
467 : 228 : void dumpLineDashAsElement(drawing::LineDash aLineDash, xmlTextWriterPtr xmlWriter)
468 : : {
469 : 228 : xmlTextWriterStartElement(xmlWriter, BAD_CAST( "LineDash" ));
470 [ + - - - : 228 : switch(aLineDash.Style)
- ]
471 : : {
472 : : case drawing::DashStyle_RECT:
473 : 228 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("style"), "%s", "RECT");
474 : 228 : 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 : 228 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("dots"), "%" SAL_PRIdINT32, (sal_Int32) aLineDash.Dots);
488 : 228 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("dotLen"), "%" SAL_PRIdINT32, (sal_Int32) aLineDash.DotLen);
489 : 228 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("dashes"), "%" SAL_PRIdINT32, (sal_Int32) aLineDash.Dashes);
490 : 228 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("dashLen"), "%" SAL_PRIdINT32, (sal_Int32) aLineDash.DashLen);
491 : 228 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("distance"), "%" SAL_PRIdINT32, (sal_Int32) aLineDash.Distance);
492 : 228 : xmlTextWriterEndElement( xmlWriter );
493 : 228 : }
494 : :
495 : 228 : void dumpLineDashNameAsAttribute(rtl::OUString sLineDashName, xmlTextWriterPtr xmlWriter)
496 : : {
497 : : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("lineDashName"), "%s",
498 [ + - ]: 228 : rtl::OUStringToOString(sLineDashName, RTL_TEXTENCODING_UTF8).getStr());
499 : 228 : }
500 : :
501 : 228 : void dumpLineColorAsAttribute(sal_Int32 aLineColor, xmlTextWriterPtr xmlWriter)
502 : : {
503 : 228 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("lineColor"), "%" SAL_PRIdINT32, aLineColor);
504 : 228 : }
505 : :
506 : 228 : void dumpLineTransparenceAsAttribute(sal_Int32 aLineTransparence, xmlTextWriterPtr xmlWriter)
507 : : {
508 : 228 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("lineTransparence"), "%" SAL_PRIdINT32, aLineTransparence);
509 : 228 : }
510 : :
511 : 228 : void dumpLineWidthAsAttribute(sal_Int32 aLineWidth, xmlTextWriterPtr xmlWriter)
512 : : {
513 : 228 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("lineWidth"), "%" SAL_PRIdINT32, aLineWidth);
514 : 228 : }
515 : :
516 : 228 : void dumpLineJointAsAttribute(drawing::LineJoint eLineJoint, xmlTextWriterPtr xmlWriter)
517 : : {
518 [ - - - - : 228 : 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 : 228 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("lineJoint"), "%s", "ROUND");
534 : 228 : break;
535 : : default:
536 : 0 : break;
537 : : }
538 : 228 : }
539 : :
540 : 228 : void dumpLineStartNameAsAttribute(rtl::OUString sLineStartName, xmlTextWriterPtr xmlWriter)
541 : : {
542 : : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("lineStartName"), "%s",
543 [ + - ]: 228 : rtl::OUStringToOString(sLineStartName, RTL_TEXTENCODING_UTF8).getStr());
544 : 228 : }
545 : :
546 : 228 : void dumpLineEndNameAsAttribute(rtl::OUString sLineEndName, xmlTextWriterPtr xmlWriter)
547 : : {
548 : : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("lineEndName"), "%s",
549 [ + - ]: 228 : rtl::OUStringToOString(sLineEndName, RTL_TEXTENCODING_UTF8).getStr());
550 : 228 : }
551 : :
552 : 480 : void dumpPolyPolygonBezierCoords(drawing::PolyPolygonBezierCoords aPolyPolygonBezierCoords, xmlTextWriterPtr xmlWriter)
553 : : {
554 [ + - ]: 480 : dumpPointSequenceSequence(aPolyPolygonBezierCoords.Coordinates, &aPolyPolygonBezierCoords.Flags, xmlWriter);
555 : 480 : }
556 : :
557 : 228 : void dumpLineStartAsElement(drawing::PolyPolygonBezierCoords aLineStart, xmlTextWriterPtr xmlWriter)
558 : : {
559 : 228 : xmlTextWriterStartElement(xmlWriter, BAD_CAST( "LineStart" ));
560 [ + - ]: 228 : dumpPolyPolygonBezierCoords(aLineStart, xmlWriter);
561 : 228 : xmlTextWriterEndElement( xmlWriter );
562 : 228 : }
563 : :
564 : 228 : void dumpLineEndAsElement(drawing::PolyPolygonBezierCoords aLineEnd, xmlTextWriterPtr xmlWriter)
565 : : {
566 : 228 : xmlTextWriterStartElement(xmlWriter, BAD_CAST( "LineEnd" ));
567 [ + - ]: 228 : dumpPolyPolygonBezierCoords(aLineEnd, xmlWriter);
568 : 228 : xmlTextWriterEndElement( xmlWriter );
569 : 228 : }
570 : :
571 : 228 : void dumpLineStartCenterAsAttribute(sal_Bool bLineStartCenter, xmlTextWriterPtr xmlWriter)
572 : : {
573 [ - + ]: 228 : if(bLineStartCenter)
574 : 0 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("lineStartCenter"), "%s", "true");
575 : : else
576 : 228 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("lineStartCenter"), "%s", "false");
577 : 228 : }
578 : :
579 : 228 : void dumpLineStartWidthAsAttribute(sal_Int32 aLineStartWidth, xmlTextWriterPtr xmlWriter)
580 : : {
581 : 228 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("lineStartWidth"), "%" SAL_PRIdINT32, aLineStartWidth);
582 : 228 : }
583 : :
584 : 228 : void dumpLineEndCenterAsAttribute(sal_Bool bLineEndCenter, xmlTextWriterPtr xmlWriter)
585 : : {
586 [ - + ]: 228 : if(bLineEndCenter)
587 : 0 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("lineEndCenter"), "%s", "true");
588 : : else
589 : 228 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("lineEndCenter"), "%s", "false");
590 : 228 : }
591 : :
592 : 228 : void dumpLineEndWidthAsAttribute(sal_Int32 aLineEndWidth, xmlTextWriterPtr xmlWriter)
593 : : {
594 : 228 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("lineEndWidth"), "%" SAL_PRIdINT32, aLineEndWidth);
595 : 228 : }
596 : :
597 : : // -----------------------------------------------
598 : : // ---------- PolyPolygonDescriptor.idl ----------
599 : : // -----------------------------------------------
600 : :
601 : 33 : void dumpPolygonKindAsAttribute(drawing::PolygonKind ePolygonKind, xmlTextWriterPtr xmlWriter)
602 : : {
603 [ + + + + : 33 : switch(ePolygonKind)
+ - - - -
- ]
604 : : {
605 : : case drawing::PolygonKind_LINE:
606 : 9 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("polygonKind"), "%s", "LINE");
607 : 9 : break;
608 : : case drawing::PolygonKind_POLY:
609 : 9 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("polygonKind"), "%s", "POLY");
610 : 9 : break;
611 : : case drawing::PolygonKind_PLIN:
612 : 3 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("polygonKind"), "%s", "PLIN");
613 : 3 : break;
614 : : case drawing::PolygonKind_PATHLINE:
615 : 6 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("polygonKind"), "%s", "PATHLINE");
616 : 6 : break;
617 : : case drawing::PolygonKind_PATHFILL:
618 : 6 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("polygonKind"), "%s", "PATHFILL");
619 : 6 : 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 : 33 : }
636 : :
637 : 522 : void dumpPointSequenceSequence(drawing::PointSequenceSequence aPointSequenceSequence, uno::Sequence<uno::Sequence< drawing::PolygonFlags > >* pFlags, xmlTextWriterPtr xmlWriter)
638 : : {
639 : : // LibreOffice proudly presents - The Sequenception
640 [ + - ]: 522 : uno::Sequence<uno::Sequence< awt::Point > > pointSequenceSequence = aPointSequenceSequence;
641 : 522 : sal_Int32 nPointsSequence = pointSequenceSequence.getLength();
642 : :
643 [ + + ]: 603 : for (sal_Int32 i = 0; i < nPointsSequence; ++i)
644 : : {
645 [ + - ][ + - ]: 81 : uno::Sequence< awt::Point > pointSequence = pointSequenceSequence[i];
646 : 81 : sal_Int32 nPoints = pointSequence.getLength();
647 : :
648 [ + - ]: 81 : uno::Sequence< drawing::PolygonFlags> flagsSequence;
649 [ + + ]: 81 : if(pFlags)
650 [ + - ][ + - ]: 39 : flagsSequence = (*pFlags)[i];
651 : :
652 [ + - ]: 81 : xmlTextWriterStartElement(xmlWriter, BAD_CAST( "pointSequence" ));
653 : :
654 [ + + ]: 1659 : for(sal_Int32 j = 0; j < nPoints; ++j)
655 : : {
656 [ + - ]: 1578 : xmlTextWriterStartElement(xmlWriter, BAD_CAST( "point" ));
657 [ + - ][ + - ]: 1578 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("positionX"), "%" SAL_PRIdINT32, pointSequence[j].X);
658 [ + - ][ + - ]: 1578 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("positionY"), "%" SAL_PRIdINT32, pointSequence[j].Y);
659 : :
660 [ + + ]: 1578 : if(pFlags)
661 : : {
662 [ + - ][ + + : 1284 : switch(flagsSequence[j])
+ + - ]
663 : : {
664 : : case drawing::PolygonFlags_NORMAL:
665 [ + - ]: 474 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("polygonFlags"), "%s", "NORMAL");
666 : 474 : break;
667 : : case drawing::PolygonFlags_SMOOTH:
668 [ + - ]: 6 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("polygonFlags"), "%s", "SMOOTH");
669 : 6 : break;
670 : : case drawing::PolygonFlags_CONTROL:
671 [ + - ]: 756 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("polygonFlags"), "%s", "CONTROL");
672 : 756 : break;
673 : : case drawing::PolygonFlags_SYMMETRIC:
674 [ + - ]: 48 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("polygonFlags"), "%s", "SYMMETRIC");
675 : 48 : break;
676 : : default:
677 : 1284 : break;
678 : : }
679 : : }
680 : :
681 [ + - ]: 1578 : xmlTextWriterEndElement( xmlWriter );
682 : : }
683 [ + - ]: 81 : xmlTextWriterEndElement( xmlWriter );
684 [ + - ][ + - ]: 603 : }
[ + - ]
685 : 522 : }
686 : :
687 : 21 : void dumpPolyPolygonAsElement(drawing::PointSequenceSequence aPolyPolygon, xmlTextWriterPtr xmlWriter)
688 : : {
689 : 21 : xmlTextWriterStartElement(xmlWriter, BAD_CAST( "PolyPolygon" ));
690 [ + - ]: 21 : dumpPointSequenceSequence(aPolyPolygon, NULL, xmlWriter);
691 : 21 : xmlTextWriterEndElement( xmlWriter );
692 : 21 : }
693 : :
694 : 21 : void dumpGeometryAsElement(drawing::PointSequenceSequence aGeometry, xmlTextWriterPtr xmlWriter)
695 : : {
696 : 21 : xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Geometry" ));
697 [ + - ]: 21 : dumpPointSequenceSequence(aGeometry, NULL, xmlWriter);
698 : 21 : xmlTextWriterEndElement( xmlWriter );
699 : 21 : }
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 : 231 : void dumpTextAutoGrowHeightAsAttribute(sal_Bool bTextAutoGrowHeight, xmlTextWriterPtr xmlWriter)
714 : : {
715 [ + + ]: 231 : if(bTextAutoGrowHeight)
716 : 39 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAutoGrowHeight"), "%s", "true");
717 : : else
718 : 192 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAutoGrowHeight"), "%s", "false");
719 : 231 : }
720 : :
721 : 231 : void dumpTextAutoGrowWidthAsAttribute(sal_Bool bTextAutoGrowWidth, xmlTextWriterPtr xmlWriter)
722 : : {
723 [ - + ]: 231 : if(bTextAutoGrowWidth)
724 : 0 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAutoGrowWidth"), "%s", "true");
725 : : else
726 : 231 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAutoGrowWidth"), "%s", "false");
727 : 231 : }
728 : :
729 : 231 : void dumpTextContourFrameAsAttribute(sal_Bool bTextContourFrame, xmlTextWriterPtr xmlWriter)
730 : : {
731 [ - + ]: 231 : if(bTextContourFrame)
732 : 0 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textContourFrame"), "%s", "true");
733 : : else
734 : 231 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textContourFrame"), "%s", "false");
735 : 231 : }
736 : :
737 : 231 : void dumpTextFitToSizeAsAttribute(drawing::TextFitToSizeType eTextFitToSize, xmlTextWriterPtr xmlWriter)
738 : : {
739 [ + - - - : 231 : switch(eTextFitToSize)
- ]
740 : : {
741 : : case drawing::TextFitToSizeType_NONE:
742 : 231 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textFitToSize"), "%s", "NONE");
743 : 231 : 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 : 231 : }
757 : :
758 : 231 : void dumpTextHorizontalAdjustAsAttribute(drawing::TextHorizontalAdjust eTextHorizontalAdjust, xmlTextWriterPtr xmlWriter)
759 : : {
760 [ - + - + : 231 : 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 : 3 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textHorizontalAdjust"), "%s", "CENTER");
767 : 3 : break;
768 : : case drawing::TextHorizontalAdjust_RIGHT:
769 : 0 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textHorizontalAdjust"), "%s", "RIGHT");
770 : 0 : break;
771 : : case drawing::TextHorizontalAdjust_BLOCK:
772 : 228 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textHorizontalAdjust"), "%s", "BLOCK");
773 : 228 : break;
774 : : default:
775 : 0 : break;
776 : : }
777 : 231 : }
778 : :
779 : 231 : void dumpTextVerticalAdjustAsAttribute(drawing::TextVerticalAdjust eTextVerticalAdjust, xmlTextWriterPtr xmlWriter)
780 : : {
781 [ + + - - : 231 : switch(eTextVerticalAdjust)
- ]
782 : : {
783 : : case drawing::TextVerticalAdjust_TOP:
784 : 21 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textVerticalAdjust"), "%s", "TOP");
785 : 21 : break;
786 : : case drawing::TextVerticalAdjust_CENTER:
787 : 210 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textVerticalAdjust"), "%s", "CENTER");
788 : 210 : 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 : 231 : }
799 : :
800 : 231 : void dumpTextLeftDistanceAsAttribute(sal_Int32 aTextLeftDistance, xmlTextWriterPtr xmlWriter)
801 : : {
802 : 231 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textLeftDistance"), "%" SAL_PRIdINT32, aTextLeftDistance);
803 : 231 : }
804 : :
805 : 231 : void dumpTextRightDistanceAsAttribute(sal_Int32 aTextRightDistance, xmlTextWriterPtr xmlWriter)
806 : : {
807 : 231 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textRightDistance"), "%" SAL_PRIdINT32, aTextRightDistance);
808 : 231 : }
809 : :
810 : 231 : void dumpTextUpperDistanceAsAttribute(sal_Int32 aTextUpperDistance, xmlTextWriterPtr xmlWriter)
811 : : {
812 : 231 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textUpperDistance"), "%" SAL_PRIdINT32, aTextUpperDistance);
813 : 231 : }
814 : :
815 : 231 : void dumpTextLowerDistanceAsAttribute(sal_Int32 aTextLowerDistance, xmlTextWriterPtr xmlWriter)
816 : : {
817 : 231 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textLowerDistance"), "%" SAL_PRIdINT32, aTextLowerDistance);
818 : 231 : }
819 : :
820 : 231 : void dumpTextMaximumFrameHeightAsAttribute(sal_Int32 aTextMaximumFrameHeight, xmlTextWriterPtr xmlWriter)
821 : : {
822 : 231 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textMaximumFrameHeight"), "%" SAL_PRIdINT32, aTextMaximumFrameHeight);
823 : 231 : }
824 : :
825 : 231 : void dumpTextMaximumFrameWidthAsAttribute(sal_Int32 aTextMaximumFrameWidth, xmlTextWriterPtr xmlWriter)
826 : : {
827 : 231 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textMaximumFrameWidth"), "%" SAL_PRIdINT32, aTextMaximumFrameWidth);
828 : 231 : }
829 : :
830 : 231 : void dumpTextMinimumFrameHeightAsAttribute(sal_Int32 aTextMinimumFrameHeight, xmlTextWriterPtr xmlWriter)
831 : : {
832 : 231 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textMinimumFrameHeight"), "%" SAL_PRIdINT32, aTextMinimumFrameHeight);
833 : 231 : }
834 : :
835 : 231 : void dumpTextMinimumFrameWidthAsAttribute(sal_Int32 aTextMinimumFrameWidth, xmlTextWriterPtr xmlWriter)
836 : : {
837 : 231 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textMinimumFrameWidth"), "%" SAL_PRIdINT32, aTextMinimumFrameWidth);
838 : 231 : }
839 : :
840 : 231 : void dumpTextAnimationAmountAsAttribute(sal_Int32 aTextAnimationAmount, xmlTextWriterPtr xmlWriter)
841 : : {
842 : 231 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textAnimationAmount"), "%" SAL_PRIdINT32, aTextAnimationAmount);
843 : 231 : }
844 : :
845 : 231 : void dumpTextAnimationCountAsAttribute(sal_Int32 aTextAnimationCount, xmlTextWriterPtr xmlWriter)
846 : : {
847 : 231 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textAnimationCount"), "%" SAL_PRIdINT32, aTextAnimationCount);
848 : 231 : }
849 : :
850 : 231 : void dumpTextAnimationDelayAsAttribute(sal_Int32 aTextAnimationDelay, xmlTextWriterPtr xmlWriter)
851 : : {
852 : 231 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textAnimationDelay"), "%" SAL_PRIdINT32, aTextAnimationDelay);
853 : 231 : }
854 : :
855 : 231 : void dumpTextAnimationDirectionAsAttribute(drawing::TextAnimationDirection eTextAnimationDirection, xmlTextWriterPtr xmlWriter)
856 : : {
857 [ + - - - : 231 : switch(eTextAnimationDirection)
- ]
858 : : {
859 : : case drawing::TextAnimationDirection_LEFT:
860 : 231 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAnimationDirection"), "%s", "LEFT");
861 : 231 : 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 : 231 : }
875 : :
876 : 231 : void dumpTextAnimationKindAsAttribute(drawing::TextAnimationKind eTextAnimationKind, xmlTextWriterPtr xmlWriter)
877 : : {
878 [ + - - - : 231 : switch(eTextAnimationKind)
- - ]
879 : : {
880 : : case drawing::TextAnimationKind_NONE:
881 : 231 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAnimationKind"), "%s", "NONE");
882 : 231 : 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 : 231 : }
899 : :
900 : 231 : void dumpTextAnimationStartInsideAsAttribute(sal_Bool bTextAnimationStartInside, xmlTextWriterPtr xmlWriter)
901 : : {
902 [ - + ]: 231 : if(bTextAnimationStartInside)
903 : 0 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAnimationStartInside"), "%s", "true");
904 : : else
905 : 231 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAnimationStartInside"), "%s", "false");
906 : 231 : }
907 : :
908 : 231 : void dumpTextAnimationStopInsideAsAttribute(sal_Bool bTextAnimationStopInside, xmlTextWriterPtr xmlWriter)
909 : : {
910 [ - + ]: 231 : if(bTextAnimationStopInside)
911 : 0 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAnimationStopInside"), "%s", "true");
912 : : else
913 : 231 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAnimationStopInside"), "%s", "false");
914 : 231 : }
915 : :
916 : 231 : void dumpTextWritingModeAsAttribute(text::WritingMode eTextWritingMode, xmlTextWriterPtr xmlWriter)
917 : : {
918 [ + - - - ]: 231 : switch(eTextWritingMode)
919 : : {
920 : : case text::WritingMode_LR_TB:
921 : 231 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textWritingMode"), "%s", "LR_TB");
922 : 231 : 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 : 231 : }
933 : :
934 : : // ------------------------------------------
935 : : // ---------- ShadowProperties.idl ----------
936 : : // ------------------------------------------
937 : :
938 : 36 : void dumpShadowAsAttribute(sal_Bool bShadow, xmlTextWriterPtr xmlWriter)
939 : : {
940 [ - + ]: 36 : if(bShadow)
941 : 0 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("shadow"), "%s", "true");
942 : : else
943 : 36 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("shadow"), "%s", "false");
944 : 36 : }
945 : :
946 : 36 : void dumpShadowColorAsAttribute(sal_Int32 aShadowColor, xmlTextWriterPtr xmlWriter)
947 : : {
948 : 36 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("shadowColor"), "%" SAL_PRIdINT32, aShadowColor);
949 : 36 : }
950 : :
951 : 36 : void dumpShadowTransparenceAsAttribute(sal_Int32 aShadowTransparence, xmlTextWriterPtr xmlWriter)
952 : : {
953 : 36 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("shadowTransparence"), "%" SAL_PRIdINT32, aShadowTransparence);
954 : 36 : }
955 : :
956 : 36 : void dumpShadowXDistanceAsAttribute(sal_Int32 aShadowXDistance, xmlTextWriterPtr xmlWriter)
957 : : {
958 : 36 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("shadowXDistance"), "%" SAL_PRIdINT32, aShadowXDistance);
959 : 36 : }
960 : :
961 : 36 : void dumpShadowYDistanceAsAttribute(sal_Int32 aShadowYDistance, xmlTextWriterPtr xmlWriter)
962 : : {
963 : 36 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("shadowYDistance"), "%" SAL_PRIdINT32, aShadowYDistance);
964 : 36 : }
965 : :
966 : : // -------------------------------
967 : : // ---------- Shape.idl ----------
968 : : // -------------------------------
969 : :
970 : 231 : void dumpZOrderAsAttribute(sal_Int32 aZOrder, xmlTextWriterPtr xmlWriter)
971 : : {
972 : 231 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("zOrder"), "%" SAL_PRIdINT32, aZOrder);
973 : 231 : }
974 : :
975 : 231 : void dumpLayerIDAsAttribute(sal_Int32 aLayerID, xmlTextWriterPtr xmlWriter)
976 : : {
977 : 231 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("layerID"), "%" SAL_PRIdINT32, aLayerID);
978 : 231 : }
979 : :
980 : 231 : void dumpLayerNameAsAttribute(rtl::OUString sLayerName, xmlTextWriterPtr xmlWriter)
981 : : {
982 : : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("layerName"), "%s",
983 [ + - ]: 231 : rtl::OUStringToOString(sLayerName, RTL_TEXTENCODING_UTF8).getStr());
984 : 231 : }
985 : :
986 : 231 : void dumpVisibleAsAttribute(sal_Bool bVisible, xmlTextWriterPtr xmlWriter)
987 : : {
988 [ + - ]: 231 : if(bVisible)
989 : 231 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("visible"), "%s", "true");
990 : : else
991 : 0 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("visible"), "%s", "false");
992 : 231 : }
993 : :
994 : 231 : void dumpPrintableAsAttribute(sal_Bool bPrintable, xmlTextWriterPtr xmlWriter)
995 : : {
996 [ + - ]: 231 : if(bPrintable)
997 : 231 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("printable"), "%s", "true");
998 : : else
999 : 0 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("printable"), "%s", "false");
1000 : 231 : }
1001 : :
1002 : 231 : void dumpMoveProtectAsAttribute(sal_Bool bMoveProtect, xmlTextWriterPtr xmlWriter)
1003 : : {
1004 [ - + ]: 231 : if(bMoveProtect)
1005 : 0 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("moveProtect"), "%s", "true");
1006 : : else
1007 : 231 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("moveProtect"), "%s", "false");
1008 : 231 : }
1009 : :
1010 : 231 : void dumpNameAsAttribute(rtl::OUString sName, xmlTextWriterPtr xmlWriter)
1011 : : {
1012 : : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("name"), "%s",
1013 [ + - ]: 231 : rtl::OUStringToOString(sName, RTL_TEXTENCODING_UTF8).getStr());
1014 : 231 : }
1015 : :
1016 : 231 : void dumpSizeProtectAsAttribute(sal_Bool bSizeProtect, xmlTextWriterPtr xmlWriter)
1017 : : {
1018 [ - + ]: 231 : if(bSizeProtect)
1019 : 0 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("sizeProtect"), "%s", "true");
1020 : : else
1021 : 231 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("sizeProtect"), "%s", "false");
1022 : 231 : }
1023 : :
1024 : 693 : void dumpHomogenMatrixLine3(drawing::HomogenMatrixLine3 aHomogenMatrixLine3, xmlTextWriterPtr xmlWriter)
1025 : : {
1026 : 693 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("column1"), "%f", aHomogenMatrixLine3.Column1);
1027 : 693 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("column2"), "%f", aHomogenMatrixLine3.Column2);
1028 : 693 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("column3"), "%f", aHomogenMatrixLine3.Column3);
1029 : 693 : }
1030 : :
1031 : 231 : void dumpTransformationAsElement(drawing::HomogenMatrix3 aTransformation, xmlTextWriterPtr xmlWriter)
1032 : : {
1033 : 231 : xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Transformation" ));
1034 : : {
1035 : 231 : xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Line1" ));
1036 : 231 : dumpHomogenMatrixLine3(aTransformation.Line1, xmlWriter);
1037 : 231 : xmlTextWriterEndElement( xmlWriter );
1038 : 231 : xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Line2" ));
1039 : 231 : dumpHomogenMatrixLine3(aTransformation.Line2, xmlWriter);
1040 : 231 : xmlTextWriterEndElement( xmlWriter );
1041 : 231 : xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Line3" ));
1042 : 231 : dumpHomogenMatrixLine3(aTransformation.Line3, xmlWriter);
1043 : 231 : xmlTextWriterEndElement( xmlWriter );
1044 : : }
1045 : 231 : xmlTextWriterEndElement( xmlWriter );
1046 : 231 : }
1047 : :
1048 : 231 : void dumpNavigationOrderAsAttribute(sal_Int32 aNavigationOrder, xmlTextWriterPtr xmlWriter)
1049 : : {
1050 : 231 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("navigationOrder"), "%" SAL_PRIdINT32, aNavigationOrder);
1051 : 231 : }
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 : 237 : void dumpPositionAsAttribute(const awt::Point& rPoint, xmlTextWriterPtr xmlWriter)
1064 : : {
1065 : 237 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("positionX"), "%" SAL_PRIdINT32, rPoint.X);
1066 : 237 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("positionY"), "%" SAL_PRIdINT32, rPoint.Y);
1067 : 237 : }
1068 : :
1069 : 237 : void dumpSizeAsAttribute(const awt::Size& rSize, xmlTextWriterPtr xmlWriter)
1070 : : {
1071 : 237 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("sizeX"), "%" SAL_PRIdINT32, rSize.Width);
1072 : 237 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("sizeY"), "%" SAL_PRIdINT32, rSize.Height);
1073 : 237 : }
1074 : :
1075 : 237 : void dumpShapeDescriptorAsAttribute( uno::Reference< drawing::XShapeDescriptor > xDescr, xmlTextWriterPtr xmlWriter )
1076 : : {
1077 : : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("type"), "%s",
1078 [ + - ][ + - ]: 237 : rtl::OUStringToOString(xDescr->getShapeType(), RTL_TEXTENCODING_UTF8).getStr());
1079 : 237 : }
1080 : :
1081 : : // -------------------------------------
1082 : : // ---------- CustomShape.idl ----------
1083 : : // -------------------------------------
1084 : :
1085 : 195 : void dumpCustomShapeEngineAsAttribute(rtl::OUString sCustomShapeEngine, xmlTextWriterPtr xmlWriter)
1086 : : {
1087 : : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("customShapeEngine"), "%s",
1088 [ + - ]: 195 : rtl::OUStringToOString(sCustomShapeEngine, RTL_TEXTENCODING_UTF8).getStr());
1089 : 195 : }
1090 : :
1091 : 195 : void dumpCustomShapeDataAsAttribute(rtl::OUString sCustomShapeData, xmlTextWriterPtr xmlWriter)
1092 : : {
1093 : : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("customShapeData"), "%s",
1094 [ + - ]: 195 : rtl::OUStringToOString(sCustomShapeData, RTL_TEXTENCODING_UTF8).getStr());
1095 : 195 : }
1096 : :
1097 : 195 : void dumpCustomShapeGeometryAsElement(uno::Sequence< beans::PropertyValue> aCustomShapeGeometry, xmlTextWriterPtr xmlWriter)
1098 : : {
1099 : 195 : xmlTextWriterStartElement(xmlWriter, BAD_CAST( "CustomShapeGeometry" ));
1100 : 195 : sal_Int32 nLength = aCustomShapeGeometry.getLength();
1101 [ + + ]: 1296 : for (sal_Int32 i = 0; i < nLength; ++i)
1102 : : {
1103 [ + - ]: 1101 : xmlTextWriterStartElement(xmlWriter, BAD_CAST( "PropertyValue" ));
1104 : :
1105 : : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("name"), "%s",
1106 [ + - ][ + - ]: 1101 : rtl::OUStringToOString(aCustomShapeGeometry[i].Name, RTL_TEXTENCODING_UTF8).getStr());
[ + - ]
1107 [ + - ][ + - ]: 1101 : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("handle"), "%" SAL_PRIdINT32, aCustomShapeGeometry[i].Handle);
1108 : :
1109 [ + - ]: 1101 : uno::Any aAny = aCustomShapeGeometry[i].Value;
1110 : 1101 : rtl::OUString sValue;
1111 [ + + ]: 1101 : if(aAny >>= sValue)
1112 : : {
1113 : : xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("value"), "%s",
1114 [ + - ][ + - ]: 195 : rtl::OUStringToOString(sValue, RTL_TEXTENCODING_UTF8).getStr());
1115 : : }
1116 [ + - ]: 1101 : switch(aCustomShapeGeometry[i].State)
[ + - - - ]
1117 : : {
1118 : : case beans::PropertyState_DIRECT_VALUE:
1119 [ + - ]: 1101 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("propertyState"), "%s", "DIRECT_VALUE");
1120 : 1101 : 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 [ + - ]: 1101 : xmlTextWriterEndElement( xmlWriter );
1131 : 1101 : }
1132 : 195 : xmlTextWriterEndElement( xmlWriter );
1133 : 195 : }
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 : 231 : void dumpTextPropertiesService(uno::Reference< beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter)
1144 : : {
1145 [ + - ][ + - ]: 231 : uno::Reference< beans::XPropertySetInfo> xInfo = xPropSet->getPropertySetInfo();
1146 [ + - ][ + - ]: 231 : 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 [ + - ][ + - ]: 231 : uno::Any anotherAny = xPropSet->getPropertyValue("TextAutoGrowHeight");
1155 : 231 : sal_Bool bTextAutoGrowHeight = sal_Bool();
1156 [ + - ]: 231 : if(anotherAny >>= bTextAutoGrowHeight)
1157 [ + - ]: 231 : dumpTextAutoGrowHeightAsAttribute(bTextAutoGrowHeight, xmlWriter);
1158 : : }
1159 : : {
1160 [ + - ][ + - ]: 231 : uno::Any anotherAny = xPropSet->getPropertyValue("TextAutoGrowWidth");
1161 : 231 : sal_Bool bTextAutoGrowWidth = sal_Bool();
1162 [ + - ]: 231 : if(anotherAny >>= bTextAutoGrowWidth)
1163 [ + - ]: 231 : dumpTextAutoGrowWidthAsAttribute(bTextAutoGrowWidth, xmlWriter);
1164 : : }
1165 : : {
1166 [ + - ][ + - ]: 231 : uno::Any anotherAny = xPropSet->getPropertyValue("TextContourFrame");
1167 : 231 : sal_Bool bTextContourFrame = sal_Bool();
1168 [ + - ]: 231 : if(anotherAny >>= bTextContourFrame)
1169 [ + - ]: 231 : dumpTextContourFrameAsAttribute(bTextContourFrame, xmlWriter);
1170 : : }
1171 : : {
1172 [ + - ][ + - ]: 231 : uno::Any anotherAny = xPropSet->getPropertyValue("TextFitToSize");
1173 : : drawing::TextFitToSizeType eTextFitToSize;
1174 [ + - ][ + - ]: 231 : if(anotherAny >>= eTextFitToSize)
1175 [ + - ]: 231 : dumpTextFitToSizeAsAttribute(eTextFitToSize, xmlWriter);
1176 : : }
1177 : : {
1178 [ + - ][ + - ]: 231 : uno::Any anotherAny = xPropSet->getPropertyValue("TextHorizontalAdjust");
1179 : : drawing::TextHorizontalAdjust eTextHorizontalAdjust;
1180 [ + - ][ + - ]: 231 : if(anotherAny >>= eTextHorizontalAdjust)
1181 [ + - ]: 231 : dumpTextHorizontalAdjustAsAttribute(eTextHorizontalAdjust, xmlWriter);
1182 : : }
1183 : : {
1184 [ + - ][ + - ]: 231 : uno::Any anotherAny = xPropSet->getPropertyValue("TextVerticalAdjust");
1185 : : drawing::TextVerticalAdjust eTextVerticalAdjust;
1186 [ + - ][ + - ]: 231 : if(anotherAny >>= eTextVerticalAdjust)
1187 [ + - ]: 231 : dumpTextVerticalAdjustAsAttribute(eTextVerticalAdjust, xmlWriter);
1188 : : }
1189 : : {
1190 [ + - ][ + - ]: 231 : uno::Any anotherAny = xPropSet->getPropertyValue("TextLeftDistance");
1191 : 231 : sal_Int32 aTextLeftDistance = sal_Int32();
1192 [ + - ]: 231 : if(anotherAny >>= aTextLeftDistance)
1193 [ + - ]: 231 : dumpTextLeftDistanceAsAttribute(aTextLeftDistance, xmlWriter);
1194 : : }
1195 : : {
1196 [ + - ][ + - ]: 231 : uno::Any anotherAny = xPropSet->getPropertyValue("TextRightDistance");
1197 : 231 : sal_Int32 aTextRightDistance = sal_Int32();
1198 [ + - ]: 231 : if(anotherAny >>= aTextRightDistance)
1199 [ + - ]: 231 : dumpTextRightDistanceAsAttribute(aTextRightDistance, xmlWriter);
1200 : : }
1201 : : {
1202 [ + - ][ + - ]: 231 : uno::Any anotherAny = xPropSet->getPropertyValue("TextUpperDistance");
1203 : 231 : sal_Int32 aTextUpperDistance = sal_Int32();
1204 [ + - ]: 231 : if(anotherAny >>= aTextUpperDistance)
1205 [ + - ]: 231 : dumpTextUpperDistanceAsAttribute(aTextUpperDistance, xmlWriter);
1206 : : }
1207 : : {
1208 [ + - ][ + - ]: 231 : uno::Any anotherAny = xPropSet->getPropertyValue("TextLowerDistance");
1209 : 231 : sal_Int32 aTextLowerDistance = sal_Int32();
1210 [ + - ]: 231 : if(anotherAny >>= aTextLowerDistance)
1211 [ + - ]: 231 : dumpTextLowerDistanceAsAttribute(aTextLowerDistance, xmlWriter);
1212 : : }
1213 : : {
1214 [ + - ][ + - ]: 231 : uno::Any anotherAny = xPropSet->getPropertyValue("TextMaximumFrameHeight");
1215 : 231 : sal_Int32 aTextMaximumFrameHeight = sal_Int32();
1216 [ + - ]: 231 : if(anotherAny >>= aTextMaximumFrameHeight)
1217 [ + - ]: 231 : dumpTextMaximumFrameHeightAsAttribute(aTextMaximumFrameHeight, xmlWriter);
1218 : : }
1219 : : {
1220 [ + - ][ + - ]: 231 : uno::Any anotherAny = xPropSet->getPropertyValue("TextMaximumFrameWidth");
1221 : 231 : sal_Int32 aTextMaximumFrameWidth = sal_Int32();
1222 [ + - ]: 231 : if(anotherAny >>= aTextMaximumFrameWidth)
1223 [ + - ]: 231 : dumpTextMaximumFrameWidthAsAttribute(aTextMaximumFrameWidth, xmlWriter);
1224 : : }
1225 : : {
1226 [ + - ][ + - ]: 231 : uno::Any anotherAny = xPropSet->getPropertyValue("TextMinimumFrameHeight");
1227 : 231 : sal_Int32 aTextMinimumFrameHeight = sal_Int32();
1228 [ + - ]: 231 : if(anotherAny >>= aTextMinimumFrameHeight)
1229 [ + - ]: 231 : dumpTextMinimumFrameHeightAsAttribute(aTextMinimumFrameHeight, xmlWriter);
1230 : : }
1231 : : {
1232 [ + - ][ + - ]: 231 : uno::Any anotherAny = xPropSet->getPropertyValue("TextMinimumFrameWidth");
1233 : 231 : sal_Int32 aTextMinimumFrameWidth = sal_Int32();
1234 [ + - ]: 231 : if(anotherAny >>= aTextMinimumFrameWidth)
1235 [ + - ]: 231 : dumpTextMinimumFrameWidthAsAttribute(aTextMinimumFrameWidth, xmlWriter);
1236 : : }
1237 : : {
1238 [ + - ][ + - ]: 231 : uno::Any anotherAny = xPropSet->getPropertyValue("TextAnimationAmount");
1239 : 231 : sal_Int32 aTextAnimationAmount = sal_Int32();
1240 [ + - ]: 231 : if(anotherAny >>= aTextAnimationAmount)
1241 [ + - ]: 231 : dumpTextAnimationAmountAsAttribute(aTextAnimationAmount, xmlWriter);
1242 : : }
1243 : : {
1244 [ + - ][ + - ]: 231 : uno::Any anotherAny = xPropSet->getPropertyValue("TextAnimationCount");
1245 : 231 : sal_Int32 aTextAnimationCount = sal_Int32();
1246 [ + - ]: 231 : if(anotherAny >>= aTextAnimationCount)
1247 [ + - ]: 231 : dumpTextAnimationCountAsAttribute(aTextAnimationCount, xmlWriter);
1248 : : }
1249 : : {
1250 [ + - ][ + - ]: 231 : uno::Any anotherAny = xPropSet->getPropertyValue("TextAnimationDelay");
1251 : 231 : sal_Int32 aTextAnimationDelay = sal_Int32();
1252 [ + - ]: 231 : if(anotherAny >>= aTextAnimationDelay)
1253 [ + - ]: 231 : dumpTextAnimationDelayAsAttribute(aTextAnimationDelay, xmlWriter);
1254 : : }
1255 : : {
1256 [ + - ][ + - ]: 231 : uno::Any anotherAny = xPropSet->getPropertyValue("TextAnimationDirection");
1257 : : drawing::TextAnimationDirection eTextAnimationDirection;
1258 [ + - ][ + - ]: 231 : if(anotherAny >>= eTextAnimationDirection)
1259 [ + - ]: 231 : dumpTextAnimationDirectionAsAttribute(eTextAnimationDirection, xmlWriter);
1260 : : }
1261 : : {
1262 [ + - ][ + - ]: 231 : uno::Any anotherAny = xPropSet->getPropertyValue("TextAnimationKind");
1263 : : drawing::TextAnimationKind eTextAnimationKind;
1264 [ + - ][ + - ]: 231 : if(anotherAny >>= eTextAnimationKind)
1265 [ + - ]: 231 : dumpTextAnimationKindAsAttribute(eTextAnimationKind, xmlWriter);
1266 : : }
1267 : : {
1268 [ + - ][ + - ]: 231 : uno::Any anotherAny = xPropSet->getPropertyValue("TextAnimationStartInside");
1269 : 231 : sal_Bool bTextAnimationStartInside = sal_Bool();
1270 [ + - ]: 231 : if(anotherAny >>= bTextAnimationStartInside)
1271 [ + - ]: 231 : dumpTextAnimationStartInsideAsAttribute(bTextAnimationStartInside, xmlWriter);
1272 : : }
1273 : : {
1274 [ + - ][ + - ]: 231 : uno::Any anotherAny = xPropSet->getPropertyValue("TextAnimationStopInside");
1275 : 231 : sal_Bool bTextAnimationStopInside = sal_Bool();
1276 [ + - ]: 231 : if(anotherAny >>= bTextAnimationStopInside)
1277 [ + - ]: 231 : dumpTextAnimationStopInsideAsAttribute(bTextAnimationStopInside, xmlWriter);
1278 : : }
1279 : : {
1280 [ + - ][ + - ]: 231 : uno::Any anotherAny = xPropSet->getPropertyValue("TextWritingMode");
1281 : : text::WritingMode eTextWritingMode;
1282 [ + - ][ + - ]: 231 : if(anotherAny >>= eTextWritingMode)
1283 [ + - ]: 231 : dumpTextWritingModeAsAttribute(eTextWritingMode, xmlWriter);
1284 : 231 : }
1285 : 231 : }
1286 : :
1287 : 216 : void dumpFillPropertiesService(uno::Reference< beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter)
1288 : : {
1289 : : {
1290 [ + - ][ + - ]: 216 : uno::Any anotherAny = xPropSet->getPropertyValue("FillStyle");
1291 : : drawing::FillStyle eFillStyle;
1292 [ + - ][ + - ]: 216 : if(anotherAny >>= eFillStyle)
1293 [ + - ]: 216 : dumpFillStyleAsAttribute(eFillStyle, xmlWriter);
1294 : : }
1295 : : {
1296 [ + - ][ + - ]: 216 : uno::Any anotherAny = xPropSet->getPropertyValue("FillColor");
1297 : 216 : sal_Int32 aColor = sal_Int32();
1298 [ + - ]: 216 : if(anotherAny >>= aColor)
1299 [ + - ]: 216 : dumpFillColorAsAttribute(aColor, xmlWriter);
1300 : : }
1301 : : {
1302 [ + - ][ + - ]: 216 : uno::Any anotherAny = xPropSet->getPropertyValue("FillTransparence");
1303 : 216 : sal_Int32 aTransparence = sal_Int32();
1304 [ + - ]: 216 : if(anotherAny >>= aTransparence)
1305 [ + - ]: 216 : dumpFillTransparenceAsAttribute(aTransparence, xmlWriter);
1306 : : }
1307 : : {
1308 [ + - ][ + - ]: 216 : uno::Any anotherAny = xPropSet->getPropertyValue("FillTransparenceGradientName");
1309 : 216 : rtl::OUString sTranspGradName;
1310 [ + - ]: 216 : if(anotherAny >>= sTranspGradName)
1311 [ + - ]: 216 : dumpFillTransparenceGradientNameAsAttribute(sTranspGradName, xmlWriter);
1312 : : }
1313 : : {
1314 [ + - ][ + - ]: 216 : uno::Any anotherAny = xPropSet->getPropertyValue("FillTransparenceGradient");
1315 : 216 : awt::Gradient aTranspGrad;
1316 [ + - ][ + - ]: 216 : if(anotherAny >>= aTranspGrad)
1317 [ + - ]: 216 : dumpFillTransparenceGradientAsElement(aTranspGrad, xmlWriter);
1318 : : }
1319 : : {
1320 [ + - ][ + - ]: 216 : uno::Any anotherAny = xPropSet->getPropertyValue("FillGradientName");
1321 : 216 : rtl::OUString sGradName;
1322 [ + - ]: 216 : if(anotherAny >>= sGradName)
1323 [ + - ]: 216 : dumpFillGradientNameAsAttribute(sGradName, xmlWriter);
1324 : : }
1325 : : {
1326 [ + - ][ + - ]: 216 : uno::Any anotherAny = xPropSet->getPropertyValue("FillGradient");
1327 : 216 : awt::Gradient aGradient;
1328 [ + - ][ + - ]: 216 : if(anotherAny >>= aGradient)
1329 [ + - ]: 216 : dumpFillGradientAsElement(aGradient, xmlWriter);
1330 : : }
1331 : : {
1332 [ + - ][ + - ]: 216 : uno::Any anotherAny = xPropSet->getPropertyValue("FillHatchName");
1333 : 216 : rtl::OUString sHatchName;
1334 [ + - ]: 216 : if(anotherAny >>= sHatchName)
1335 [ + - ]: 216 : dumpFillGradientNameAsAttribute(sHatchName, xmlWriter);
1336 : : }
1337 : : {
1338 [ + - ][ + - ]: 216 : uno::Any anotherAny = xPropSet->getPropertyValue("FillHatch");
1339 : 216 : drawing::Hatch aHatch;
1340 [ + - ][ + - ]: 216 : if(anotherAny >>= aHatch)
1341 [ + - ]: 216 : dumpFillHatchAsElement(aHatch, xmlWriter);
1342 : : }
1343 : : {
1344 [ + - ][ + - ]: 216 : uno::Any anotherAny = xPropSet->getPropertyValue("FillBackground");
1345 : 216 : sal_Bool bFillBackground = sal_Bool();
1346 [ + - ]: 216 : if(anotherAny >>= bFillBackground)
1347 [ + - ]: 216 : dumpFillBackgroundAsAttribute(bFillBackground, xmlWriter);
1348 : : }
1349 : : {
1350 [ + - ][ + - ]: 216 : uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapName");
1351 : 216 : rtl::OUString sBitmapName;
1352 [ + - ]: 216 : if(anotherAny >>= sBitmapName)
1353 [ + - ]: 216 : dumpFillGradientNameAsAttribute(sBitmapName, xmlWriter);
1354 : : }
1355 : : {
1356 [ + - ][ + - ]: 216 : uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmap");
1357 : 216 : uno::Reference<awt::XBitmap> xBitmap;
1358 [ + - ][ + - ]: 216 : if(anotherAny >>= xBitmap)
1359 [ + - ]: 216 : dumpFillBitmapAsElement(xBitmap, xmlWriter);
1360 : : }
1361 : : {
1362 [ + - ][ + - ]: 216 : uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapURL");
1363 : 216 : rtl::OUString sBitmapURL;
1364 [ + - ]: 216 : if(anotherAny >>= sBitmapURL)
1365 [ + - ]: 216 : dumpFillBitmapURLAsAttribute(sBitmapURL, xmlWriter);
1366 : : }
1367 : : {
1368 [ + - ][ + - ]: 216 : uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapPositionOffsetX");
1369 : 216 : sal_Int32 aBitmapPositionOffsetX = sal_Int32();
1370 [ + - ]: 216 : if(anotherAny >>= aBitmapPositionOffsetX)
1371 [ + - ]: 216 : dumpFillBitmapPositionOffsetXAsAttribute(aBitmapPositionOffsetX, xmlWriter);
1372 : : }
1373 : : {
1374 [ + - ][ + - ]: 216 : uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapPositionOffsetY");
1375 : 216 : sal_Int32 aBitmapPositionOffsetY = sal_Int32();
1376 [ + - ]: 216 : if(anotherAny >>= aBitmapPositionOffsetY)
1377 [ + - ]: 216 : dumpFillBitmapPositionOffsetYAsAttribute(aBitmapPositionOffsetY, xmlWriter);
1378 : : }
1379 : : {
1380 [ + - ][ + - ]: 216 : uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapOffsetX");
1381 : 216 : sal_Int32 aBitmapOffsetX = sal_Int32();
1382 [ + - ]: 216 : if(anotherAny >>= aBitmapOffsetX)
1383 [ + - ]: 216 : dumpFillBitmapOffsetXAsAttribute(aBitmapOffsetX, xmlWriter);
1384 : : }
1385 : : {
1386 [ + - ][ + - ]: 216 : uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapOffsetY");
1387 : 216 : sal_Int32 aBitmapOffsetY = sal_Int32();
1388 [ + - ]: 216 : if(anotherAny >>= aBitmapOffsetY)
1389 [ + - ]: 216 : dumpFillBitmapOffsetYAsAttribute(aBitmapOffsetY, xmlWriter);
1390 : : }
1391 : : {
1392 [ + - ][ + - ]: 216 : uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapRectanglePoint");
1393 : : drawing::RectanglePoint eBitmapRectanglePoint;
1394 [ + - ][ + - ]: 216 : if(anotherAny >>= eBitmapRectanglePoint)
1395 [ + - ]: 216 : dumpFillBitmapRectanglePointAsAttribute(eBitmapRectanglePoint, xmlWriter);
1396 : : }
1397 : : {
1398 [ + - ][ + - ]: 216 : uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapLogicalSize");
1399 : 216 : sal_Bool bBitmapLogicalSize = sal_Bool();
1400 [ + - ]: 216 : if(anotherAny >>= bBitmapLogicalSize)
1401 [ + - ]: 216 : dumpFillBitmapLogicalSizeAsAttribute(bBitmapLogicalSize, xmlWriter);
1402 : : }
1403 : : {
1404 [ + - ][ + - ]: 216 : uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapSizeX");
1405 : 216 : sal_Int32 aBitmapSizeX = sal_Int32();
1406 [ + - ]: 216 : if(anotherAny >>= aBitmapSizeX)
1407 [ + - ]: 216 : dumpFillBitmapSizeXAsAttribute(aBitmapSizeX, xmlWriter);
1408 : : }
1409 : : {
1410 [ + - ][ + - ]: 216 : uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapSizeY");
1411 : 216 : sal_Int32 aBitmapSizeY = sal_Int32();
1412 [ + - ]: 216 : if(anotherAny >>= aBitmapSizeY)
1413 [ + - ]: 216 : dumpFillBitmapSizeYAsAttribute(aBitmapSizeY, xmlWriter);
1414 : : }
1415 : : {
1416 [ + - ][ + - ]: 216 : uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapMode");
1417 : : drawing::BitmapMode eBitmapMode;
1418 [ + - ][ + - ]: 216 : if(anotherAny >>= eBitmapMode)
1419 [ + - ]: 216 : dumpFillBitmapModeAsAttribute(eBitmapMode, xmlWriter);
1420 : : }
1421 : : {
1422 [ + - ][ + - ]: 216 : uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapStretch");
1423 : 216 : sal_Bool bBitmapStretch = sal_Bool();
1424 [ + - ]: 216 : if(anotherAny >>= bBitmapStretch)
1425 [ + - ]: 216 : dumpFillBitmapStretchAsAttribute(bBitmapStretch, xmlWriter);
1426 : : }
1427 : : {
1428 [ + - ][ + - ]: 216 : uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapTile");
1429 : 216 : sal_Bool bBitmapTile = sal_Bool();
1430 [ + - ]: 216 : if(anotherAny >>= bBitmapTile)
1431 [ + - ]: 216 : dumpFillBitmapTileAsAttribute(bBitmapTile, xmlWriter);
1432 : : }
1433 : 216 : }
1434 : :
1435 : 228 : void dumpLinePropertiesService(uno::Reference< beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter)
1436 : : {
1437 : : {
1438 [ + - ][ + - ]: 228 : uno::Any anotherAny = xPropSet->getPropertyValue("LineStyle");
1439 : : drawing::LineStyle eLineStyle;
1440 [ + - ][ + - ]: 228 : if(anotherAny >>= eLineStyle)
1441 [ + - ]: 228 : dumpLineStyleAsAttribute(eLineStyle, xmlWriter);
1442 : : }
1443 : : {
1444 [ + - ][ + - ]: 228 : uno::Any anotherAny = xPropSet->getPropertyValue("LineDash");
1445 : 228 : drawing::LineDash aLineDash;
1446 [ + - ][ + - ]: 228 : if(anotherAny >>= aLineDash)
1447 [ + - ]: 228 : dumpLineDashAsElement(aLineDash, xmlWriter);
1448 : : }
1449 : : {
1450 [ + - ][ + - ]: 228 : uno::Any anotherAny = xPropSet->getPropertyValue("LineDashName");
1451 : 228 : rtl::OUString sLineDashName;
1452 [ + - ]: 228 : if(anotherAny >>= sLineDashName)
1453 [ + - ]: 228 : dumpLineDashNameAsAttribute(sLineDashName, xmlWriter);
1454 : : }
1455 : : {
1456 [ + - ][ + - ]: 228 : uno::Any anotherAny = xPropSet->getPropertyValue("LineColor");
1457 : 228 : sal_Int32 aLineColor = sal_Int32();
1458 [ + - ]: 228 : if(anotherAny >>= aLineColor)
1459 [ + - ]: 228 : dumpLineColorAsAttribute(aLineColor, xmlWriter);
1460 : : }
1461 : : {
1462 [ + - ][ + - ]: 228 : uno::Any anotherAny = xPropSet->getPropertyValue("LineTransparence");
1463 : 228 : sal_Int32 aLineTransparence = sal_Int32();
1464 [ + - ]: 228 : if(anotherAny >>= aLineTransparence)
1465 [ + - ]: 228 : dumpLineTransparenceAsAttribute(aLineTransparence, xmlWriter);
1466 : : }
1467 : : {
1468 [ + - ][ + - ]: 228 : uno::Any anotherAny = xPropSet->getPropertyValue("LineWidth");
1469 : 228 : sal_Int32 aLineWidth = sal_Int32();
1470 [ + - ]: 228 : if(anotherAny >>= aLineWidth)
1471 [ + - ]: 228 : dumpLineWidthAsAttribute(aLineWidth, xmlWriter);
1472 : : }
1473 : : {
1474 [ + - ][ + - ]: 228 : uno::Any anotherAny = xPropSet->getPropertyValue("LineJoint");
1475 : : drawing::LineJoint eLineJoint;
1476 [ + - ][ + - ]: 228 : if(anotherAny >>= eLineJoint)
1477 [ + - ]: 228 : dumpLineJointAsAttribute(eLineJoint, xmlWriter);
1478 : : }
1479 : : {
1480 [ + - ][ + - ]: 228 : uno::Any anotherAny = xPropSet->getPropertyValue("LineStartName");
1481 : 228 : rtl::OUString sLineStartName;
1482 [ + - ]: 228 : if(anotherAny >>= sLineStartName)
1483 [ + - ]: 228 : dumpLineStartNameAsAttribute(sLineStartName, xmlWriter);
1484 : : }
1485 : : {
1486 [ + - ][ + - ]: 228 : uno::Any anotherAny = xPropSet->getPropertyValue("LineEndName");
1487 : 228 : rtl::OUString sLineEndName;
1488 [ + - ]: 228 : if(anotherAny >>= sLineEndName)
1489 [ + - ]: 228 : dumpLineEndNameAsAttribute(sLineEndName, xmlWriter);
1490 : : }
1491 : : {
1492 [ + - ][ + - ]: 228 : uno::Any anotherAny = xPropSet->getPropertyValue("LineStart");
1493 [ + - ]: 228 : drawing::PolyPolygonBezierCoords aLineStart;
1494 [ + - ][ + - ]: 228 : if(anotherAny >>= aLineStart)
1495 [ + - ][ + - ]: 228 : dumpLineStartAsElement(aLineStart, xmlWriter);
[ + - ][ + - ]
1496 : : }
1497 : : {
1498 [ + - ][ + - ]: 228 : uno::Any anotherAny = xPropSet->getPropertyValue("LineEnd");
1499 [ + - ]: 228 : drawing::PolyPolygonBezierCoords aLineEnd;
1500 [ + - ][ + - ]: 228 : if(anotherAny >>= aLineEnd)
1501 [ + - ][ + - ]: 228 : dumpLineEndAsElement(aLineEnd, xmlWriter);
[ + - ][ + - ]
1502 : : }
1503 : : {
1504 [ + - ][ + - ]: 228 : uno::Any anotherAny = xPropSet->getPropertyValue("LineStartCenter");
1505 : 228 : sal_Bool bLineStartCenter = sal_Bool();
1506 [ + - ]: 228 : if(anotherAny >>= bLineStartCenter)
1507 [ + - ]: 228 : dumpLineStartCenterAsAttribute(bLineStartCenter, xmlWriter);
1508 : : }
1509 : : {
1510 [ + - ][ + - ]: 228 : uno::Any anotherAny = xPropSet->getPropertyValue("LineStartWidth");
1511 : 228 : sal_Int32 aLineStartWidth = sal_Int32();
1512 [ + - ]: 228 : if(anotherAny >>= aLineStartWidth)
1513 [ + - ]: 228 : dumpLineStartWidthAsAttribute(aLineStartWidth, xmlWriter);
1514 : : }
1515 : : {
1516 [ + - ][ + - ]: 228 : uno::Any anotherAny = xPropSet->getPropertyValue("LineEndCenter");
1517 : 228 : sal_Bool bLineEndCenter = sal_Bool();
1518 [ + - ]: 228 : if(anotherAny >>= bLineEndCenter)
1519 [ + - ]: 228 : dumpLineEndCenterAsAttribute(bLineEndCenter, xmlWriter);
1520 : : }
1521 : : {
1522 [ + - ][ + - ]: 228 : uno::Any anotherAny = xPropSet->getPropertyValue("LineEndWidth");
1523 : 228 : sal_Int32 aLineEndWidth = sal_Int32();
1524 [ + - ]: 228 : if(anotherAny >>= aLineEndWidth)
1525 [ + - ]: 228 : dumpLineEndWidthAsAttribute(aLineEndWidth, xmlWriter);
1526 : : }
1527 : 228 : }
1528 : :
1529 : 36 : void dumpShadowPropertiesService(uno::Reference< beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter)
1530 : : {
1531 : : {
1532 [ + - ][ + - ]: 36 : uno::Any anotherAny = xPropSet->getPropertyValue("Shadow");
1533 : 36 : sal_Bool bShadow = sal_Bool();
1534 [ + - ]: 36 : if(anotherAny >>= bShadow)
1535 [ + - ]: 36 : dumpShadowAsAttribute(bShadow, xmlWriter);
1536 : : }
1537 : : {
1538 [ + - ][ + - ]: 36 : uno::Any anotherAny = xPropSet->getPropertyValue("ShadowColor");
1539 : 36 : sal_Int32 aShadowColor = sal_Int32();
1540 [ + - ]: 36 : if(anotherAny >>= aShadowColor)
1541 [ + - ]: 36 : dumpShadowColorAsAttribute(aShadowColor, xmlWriter);
1542 : : }
1543 : : {
1544 [ + - ][ + - ]: 36 : uno::Any anotherAny = xPropSet->getPropertyValue("ShadowTransparence");
1545 : 36 : sal_Int32 aShadowTransparence = sal_Int32();
1546 [ + - ]: 36 : if(anotherAny >>= aShadowTransparence)
1547 [ + - ]: 36 : dumpShadowTransparenceAsAttribute(aShadowTransparence, xmlWriter);
1548 : : }
1549 : : {
1550 [ + - ][ + - ]: 36 : uno::Any anotherAny = xPropSet->getPropertyValue("ShadowXDistance");
1551 : 36 : sal_Int32 aShadowXDistance = sal_Int32();
1552 [ + - ]: 36 : if(anotherAny >>= aShadowXDistance)
1553 [ + - ]: 36 : dumpShadowXDistanceAsAttribute(aShadowXDistance, xmlWriter);
1554 : : }
1555 : : {
1556 [ + - ][ + - ]: 36 : uno::Any anotherAny = xPropSet->getPropertyValue("ShadowYDistance");
1557 : 36 : sal_Int32 aShadowYDistance = sal_Int32();
1558 [ + - ]: 36 : if(anotherAny >>= aShadowYDistance)
1559 [ + - ]: 36 : dumpShadowYDistanceAsAttribute(aShadowYDistance, xmlWriter);
1560 : : }
1561 : 36 : }
1562 : :
1563 : 21 : void dumpPolyPolygonDescriptorService(uno::Reference< beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter)
1564 : : {
1565 : : {
1566 [ + - ][ + - ]: 21 : uno::Any anotherAny = xPropSet->getPropertyValue("PolygonKind");
1567 : : drawing::PolygonKind ePolygonKind;
1568 [ + - ][ + - ]: 21 : if(anotherAny >>= ePolygonKind)
1569 [ + - ]: 21 : dumpPolygonKindAsAttribute(ePolygonKind, xmlWriter);
1570 : : }
1571 : : {
1572 [ + - ][ + - ]: 21 : uno::Any anotherAny = xPropSet->getPropertyValue("PolyPolygon");
1573 [ + - ]: 21 : drawing::PointSequenceSequence aPolyPolygon;
1574 [ + - ][ + - ]: 21 : if(anotherAny >>= aPolyPolygon)
1575 [ + - ][ + - ]: 21 : dumpPolyPolygonAsElement(aPolyPolygon, xmlWriter);
[ + - ][ + - ]
1576 : : }
1577 : : {
1578 [ + - ][ + - ]: 21 : uno::Any anotherAny = xPropSet->getPropertyValue("Geometry");
1579 [ + - ]: 21 : drawing::PointSequenceSequence aGeometry;
1580 [ + - ][ + - ]: 21 : if(anotherAny >>= aGeometry)
1581 [ + - ][ + - ]: 21 : dumpGeometryAsElement(aGeometry, xmlWriter);
[ + - ][ + - ]
1582 : : }
1583 : 21 : }
1584 : :
1585 : 231 : void dumpShapeService(uno::Reference< beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter)
1586 : : {
1587 [ + - ][ + - ]: 231 : uno::Reference< beans::XPropertySetInfo> xInfo = xPropSet->getPropertySetInfo();
1588 : : {
1589 [ + - ][ + - ]: 231 : uno::Any anotherAny = xPropSet->getPropertyValue("ZOrder");
1590 : 231 : sal_Int32 aZOrder = sal_Int32();
1591 [ + - ]: 231 : if(anotherAny >>= aZOrder)
1592 [ + - ]: 231 : dumpZOrderAsAttribute(aZOrder, xmlWriter);
1593 : : }
1594 : : {
1595 [ + - ][ + - ]: 231 : uno::Any anotherAny = xPropSet->getPropertyValue("LayerID");
1596 : 231 : sal_Int32 aLayerID = sal_Int32();
1597 [ + - ]: 231 : if(anotherAny >>= aLayerID)
1598 [ + - ]: 231 : dumpLayerIDAsAttribute(aLayerID, xmlWriter);
1599 : : }
1600 : : {
1601 [ + - ][ + - ]: 231 : uno::Any anotherAny = xPropSet->getPropertyValue("LayerName");
1602 : 231 : rtl::OUString sLayerName;
1603 [ + - ]: 231 : if(anotherAny >>= sLayerName)
1604 [ + - ]: 231 : dumpLayerNameAsAttribute(sLayerName, xmlWriter);
1605 : : }
1606 : : {
1607 [ + - ][ + - ]: 231 : uno::Any anotherAny = xPropSet->getPropertyValue("Visible");
1608 : 231 : sal_Bool bVisible = sal_Bool();
1609 [ + - ]: 231 : if(anotherAny >>= bVisible)
1610 [ + - ]: 231 : dumpVisibleAsAttribute(bVisible, xmlWriter);
1611 : : }
1612 : : {
1613 [ + - ][ + - ]: 231 : uno::Any anotherAny = xPropSet->getPropertyValue("Printable");
1614 : 231 : sal_Bool bPrintable = sal_Bool();
1615 [ + - ]: 231 : if(anotherAny >>= bPrintable)
1616 [ + - ]: 231 : dumpPrintableAsAttribute(bPrintable, xmlWriter);
1617 : : }
1618 : : {
1619 [ + - ][ + - ]: 231 : uno::Any anotherAny = xPropSet->getPropertyValue("MoveProtect");
1620 : 231 : sal_Bool bMoveProtect = sal_Bool();
1621 [ + - ]: 231 : if(anotherAny >>= bMoveProtect)
1622 [ + - ]: 231 : dumpMoveProtectAsAttribute(bMoveProtect, xmlWriter);
1623 : : }
1624 : : {
1625 [ + - ][ + - ]: 231 : uno::Any anotherAny = xPropSet->getPropertyValue("Name");
1626 : 231 : rtl::OUString sName;
1627 [ + - ]: 231 : if(anotherAny >>= sName)
1628 [ + - ]: 231 : dumpNameAsAttribute(sName, xmlWriter);
1629 : : }
1630 : : {
1631 [ + - ][ + - ]: 231 : uno::Any anotherAny = xPropSet->getPropertyValue("SizeProtect");
1632 : 231 : sal_Bool bSizeProtect = sal_Bool();
1633 [ + - ]: 231 : if(anotherAny >>= bSizeProtect)
1634 [ + - ]: 231 : dumpSizeProtectAsAttribute(bSizeProtect, xmlWriter);
1635 : : }
1636 : : {
1637 [ + - ][ + - ]: 231 : uno::Any anotherAny = xPropSet->getPropertyValue("Transformation");
1638 : 231 : drawing::HomogenMatrix3 aTransformation;
1639 [ + - ][ + - ]: 231 : if(anotherAny >>= aTransformation)
1640 [ + - ]: 231 : dumpTransformationAsElement(aTransformation, xmlWriter);
1641 : : }
1642 : : {
1643 [ + - ][ + - ]: 231 : uno::Any anotherAny = xPropSet->getPropertyValue("NavigationOrder");
1644 : 231 : sal_Int32 aNavigationOrder = sal_Int32();
1645 [ + - ]: 231 : if(anotherAny >>= aNavigationOrder)
1646 [ + - ]: 231 : dumpNavigationOrderAsAttribute(aNavigationOrder, xmlWriter);
1647 : : }
1648 [ + - ][ - + ]: 231 : 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 : 231 : }
1655 : 231 : }
1656 : :
1657 : 12 : void dumpPolyPolygonBezierDescriptorService(uno::Reference< beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter)
1658 : : {
1659 : : {
1660 [ + - ][ + - ]: 12 : uno::Any anotherAny = xPropSet->getPropertyValue("PolygonKind");
1661 : : drawing::PolygonKind ePolygonKind;
1662 [ + - ][ + - ]: 12 : if(anotherAny >>= ePolygonKind)
1663 [ + - ]: 12 : dumpPolygonKindAsAttribute(ePolygonKind, xmlWriter);
1664 : : }
1665 : : {
1666 [ + - ][ + - ]: 12 : uno::Any anotherAny = xPropSet->getPropertyValue("PolyPolygonBezier");
1667 [ + - ]: 12 : drawing::PolyPolygonBezierCoords aPolyPolygonBezier;
1668 [ + - ][ + - ]: 12 : if(anotherAny >>= aPolyPolygonBezier)
1669 [ + - ][ + - ]: 12 : dumpPolyPolygonBezierCoords(aPolyPolygonBezier, xmlWriter);
[ + - ][ + - ]
1670 : : }
1671 : : {
1672 [ + - ][ + - ]: 12 : uno::Any anotherAny = xPropSet->getPropertyValue("Geometry");
1673 [ + - ]: 12 : drawing::PolyPolygonBezierCoords aGeometry;
1674 [ + - ][ + - ]: 12 : if(anotherAny >>= aGeometry)
1675 [ + - ][ + - ]: 12 : dumpPolyPolygonBezierCoords(aGeometry, xmlWriter);
[ + - ][ + - ]
1676 : : }
1677 : 12 : }
1678 : :
1679 : 195 : void dumpCustomShapeService(uno::Reference< beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter)
1680 : : {
1681 [ + - ][ + - ]: 195 : uno::Reference< beans::XPropertySetInfo> xInfo = xPropSet->getPropertySetInfo();
1682 : : {
1683 [ + - ][ + - ]: 195 : uno::Any anotherAny = xPropSet->getPropertyValue("CustomShapeEngine");
1684 : 195 : rtl::OUString sCustomShapeEngine;
1685 [ + - ]: 195 : if(anotherAny >>= sCustomShapeEngine)
1686 [ + - ]: 195 : dumpCustomShapeEngineAsAttribute(sCustomShapeEngine, xmlWriter);
1687 : : }
1688 : : {
1689 [ + - ][ + - ]: 195 : uno::Any anotherAny = xPropSet->getPropertyValue("CustomShapeData");
1690 : 195 : rtl::OUString sCustomShapeData;
1691 [ + - ]: 195 : if(anotherAny >>= sCustomShapeData)
1692 [ + - ]: 195 : dumpCustomShapeDataAsAttribute(sCustomShapeData, xmlWriter);
1693 : : }
1694 : : {
1695 [ + - ][ + - ]: 195 : uno::Any anotherAny = xPropSet->getPropertyValue("CustomShapeGeometry");
1696 [ + - ]: 195 : uno::Sequence< beans::PropertyValue> aCustomShapeGeometry;
1697 [ + - ][ + - ]: 195 : if(anotherAny >>= aCustomShapeGeometry)
1698 [ + - ][ + - ]: 195 : dumpCustomShapeGeometryAsElement(aCustomShapeGeometry, xmlWriter);
[ + - ][ + - ]
1699 : : }
1700 [ + - ][ - + ]: 195 : 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 : 195 : }
1707 : 195 : }
1708 : :
1709 : 237 : void dumpXShape(uno::Reference< drawing::XShape > xShape, xmlTextWriterPtr xmlWriter)
1710 : : {
1711 [ + - ]: 237 : xmlTextWriterStartElement( xmlWriter, BAD_CAST( "XShape" ) );
1712 [ + - ]: 237 : uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY_THROW);
1713 [ + - ][ + - ]: 237 : uno::Reference<beans::XPropertySetInfo> xPropSetInfo = xPropSet->getPropertySetInfo();
1714 : 237 : rtl::OUString aName;
1715 : :
1716 [ + - ][ + - ]: 237 : dumpPositionAsAttribute(xShape->getPosition(), xmlWriter);
[ + - ]
1717 [ + - ][ + - ]: 237 : dumpSizeAsAttribute(xShape->getSize(), xmlWriter);
[ + - ]
1718 [ + - ]: 237 : uno::Reference< drawing::XShapeDescriptor > xDescr(xShape, uno::UNO_QUERY_THROW);
1719 [ + - ]: 237 : dumpShapeDescriptorAsAttribute(xDescr, xmlWriter);
1720 : :
1721 : : // uno::Sequence<beans::Property> aProperties = xPropSetInfo->getProperties();
1722 : :
1723 [ + - ]: 237 : uno::Reference< lang::XServiceInfo > xServiceInfo( xShape, uno::UNO_QUERY_THROW );
1724 [ + - ][ + - ]: 237 : uno::Sequence< rtl::OUString > aServiceNames = xServiceInfo->getSupportedServiceNames();
1725 : :
1726 [ + - ][ + - ]: 237 : uno::Reference< beans::XPropertySetInfo> xInfo = xPropSet->getPropertySetInfo();
1727 [ + - ][ + - ]: 237 : if(xInfo->hasPropertyByName("Name"))
[ + + ]
1728 : : {
1729 [ + - ][ + - ]: 231 : uno::Any aAny = xPropSet->getPropertyValue("Name");
1730 [ + - ]: 231 : if (aAny >>= aName)
1731 : : {
1732 [ + + ]: 231 : if (!aName.isEmpty())
1733 [ + - ][ + - ]: 12 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("name"), "%s", rtl::OUStringToOString(aName, RTL_TEXTENCODING_UTF8).getStr());
1734 : 231 : }
1735 : : }
1736 : :
1737 : : try
1738 : : {
1739 [ + - ][ + - ]: 237 : if (xServiceInfo->supportsService("com.sun.star.drawing.Text"))
[ + + ]
1740 : : {
1741 [ + - ]: 231 : uno::Reference< text::XText > xText(xShape, uno::UNO_QUERY_THROW);
1742 [ + - ][ + - ]: 231 : rtl::OUString aText = xText->getString();
1743 [ - + ]: 231 : if(!aText.isEmpty())
1744 [ # # ][ # # ]: 231 : xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("text"), "%s", rtl::OUStringToOString(aText, RTL_TEXTENCODING_UTF8).getStr());
1745 : : }
1746 [ + - ][ + - ]: 237 : if(xServiceInfo->supportsService("com.sun.star.drawing.TextProperties"))
[ + + ]
1747 [ + - ]: 231 : dumpTextPropertiesService(xPropSet, xmlWriter);
1748 : :
1749 [ + - ][ + - ]: 237 : 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 [ + - ][ + - ]: 237 : if(xServiceInfo->supportsService("com.sun.star.drawing.FillProperties"))
[ + + ]
1755 [ + - ]: 216 : dumpFillPropertiesService(xPropSet, xmlWriter);
1756 : :
1757 [ + - ][ + - ]: 237 : if(xServiceInfo->supportsService("com.sun.star.drawing.LineProperties"))
[ + + ]
1758 [ + - ]: 228 : dumpLinePropertiesService(xPropSet, xmlWriter);
1759 : :
1760 [ + - ][ + - ]: 237 : if(xServiceInfo->supportsService("com.sun.star.drawing.PolyPolygonDescriptor"))
[ + + ]
1761 [ + - ]: 21 : dumpPolyPolygonDescriptorService(xPropSet, xmlWriter);
1762 : :
1763 [ + - ][ + - ]: 237 : if(xServiceInfo->supportsService("com.sun.star.drawing.ShadowProperties"))
[ + + ]
1764 [ + - ]: 36 : dumpShadowPropertiesService(xPropSet, xmlWriter);
1765 : :
1766 [ + - ][ + - ]: 237 : if(xServiceInfo->supportsService("com.sun.star.drawing.Shape"))
[ + + ]
1767 [ + - ]: 231 : dumpShapeService(xPropSet, xmlWriter);
1768 : :
1769 [ + - ][ + - ]: 237 : if(xServiceInfo->supportsService("com.sun.star.drawing.PolyPolygonBezierDescriptor"))
[ + + ]
1770 [ + - ]: 12 : dumpPolyPolygonBezierDescriptorService(xPropSet, xmlWriter);
1771 : :
1772 [ + - ][ + - ]: 237 : if(xServiceInfo->supportsService("com.sun.star.drawing.CustomShape"))
[ + + ]
1773 [ + - ]: 195 : dumpCustomShapeService(xPropSet, xmlWriter);
1774 : :
1775 : : // EnhancedShapeDumper used
1776 : :
1777 [ + - ][ + - ]: 237 : if(xServiceInfo->supportsService("com.sun.star.drawing.EnhancedCustomShapeExtrusion"))
[ - + ]
1778 : : {
1779 : 0 : EnhancedShapeDumper enhancedDumper(xmlWriter);
1780 [ # # ]: 0 : enhancedDumper.dumpEnhancedCustomShapeExtrusionService(xPropSet);
1781 : : }
1782 [ + - ][ + - ]: 237 : if(xServiceInfo->supportsService("com.sun.star.drawing.EnhancedCustomShapeGeometry"))
[ - + ]
1783 : : {
1784 : 0 : EnhancedShapeDumper enhancedDumper(xmlWriter);
1785 [ # # ]: 0 : enhancedDumper.dumpEnhancedCustomShapeGeometryService(xPropSet);
1786 : : }
1787 [ + - ][ + - ]: 237 : if(xServiceInfo->supportsService("com.sun.star.drawing.EnhancedCustomShapeHandle"))
[ - + ]
1788 : : {
1789 : 0 : EnhancedShapeDumper enhancedDumper(xmlWriter);
1790 [ # # ]: 0 : enhancedDumper.dumpEnhancedCustomShapeHandleService(xPropSet);
1791 : : }
1792 [ + - ][ + - ]: 237 : if(xServiceInfo->supportsService("com.sun.star.drawing.EnhancedCustomShapePath"))
[ - + ]
1793 : : {
1794 : 0 : EnhancedShapeDumper enhancedDumper(xmlWriter);
1795 [ # # ]: 0 : enhancedDumper.dumpEnhancedCustomShapePathService(xPropSet);
1796 : : }
1797 [ + - ][ + - ]: 237 : 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 [ + - ][ + - ]: 237 : xmlTextWriterEndElement( xmlWriter );
1819 : 237 : }
1820 : :
1821 : 27 : void dumpXShapes( uno::Reference< drawing::XShapes > xShapes, xmlTextWriterPtr xmlWriter )
1822 : : {
1823 [ + - ]: 27 : xmlTextWriterStartElement( xmlWriter, BAD_CAST( "XShapes" ) );
1824 [ + - ]: 27 : uno::Reference< container::XIndexAccess > xIA( xShapes, uno::UNO_QUERY_THROW);
1825 [ + - ][ + - ]: 27 : sal_Int32 nLength = xIA->getCount();
1826 [ + + ]: 264 : for (sal_Int32 i = 0; i < nLength; ++i)
1827 : : {
1828 [ + - ][ + - ]: 237 : uno::Reference< drawing::XShape > xShape( xIA->getByIndex( i ), uno::UNO_QUERY_THROW );
[ + - ]
1829 [ + - ]: 237 : dumpXShape( xShape, xmlWriter );
1830 : 237 : }
1831 : :
1832 [ + - ]: 27 : xmlTextWriterEndElement( xmlWriter );
1833 : 27 : }
1834 : : } //end of namespace
1835 : :
1836 : 27 : rtl::OUString XShapeDumper::dump(uno::Reference<drawing::XShapes> xPageShapes)
1837 : : {
1838 : :
1839 : 27 : rtl::OStringBuffer aString;
1840 [ + - ]: 27 : xmlOutputBufferPtr xmlOutBuffer = xmlOutputBufferCreateIO( writeCallback, closeCallback, &aString, NULL );
1841 [ + - ]: 27 : xmlTextWriterPtr xmlWriter = xmlNewTextWriter( xmlOutBuffer );
1842 [ + - ]: 27 : xmlTextWriterSetIndent( xmlWriter, 1 );
1843 : :
1844 [ + - ]: 27 : xmlTextWriterStartDocument( xmlWriter, NULL, NULL, NULL );
1845 : :
1846 : : try
1847 : : {
1848 [ + - ]: 27 : 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 [ + - ]: 27 : xmlTextWriterEndDocument( xmlWriter );
1856 [ + - ]: 27 : xmlFreeTextWriter( xmlWriter );
1857 : :
1858 [ + - ]: 27 : return OStringToOUString(aString.makeStringAndClear(), RTL_TEXTENCODING_UTF8);
1859 [ + - ][ + - ]: 735 : }
1860 : :
|