LibreOffice Module drawinglayer (master) 1
EnhancedShapeDumper.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
9
11#include <com/sun/star/beans/XPropertySet.hpp>
12
13using namespace com::sun::star;
14
15
16// ---------- EnhancedCustomShapeExtrusion.idl ----------
17
18
19void EnhancedShapeDumper::dumpEnhancedCustomShapeExtrusionService(const uno::Reference< beans::XPropertySet >& xPropSet)
20{
21 {
22 uno::Any anotherAny = xPropSet->getPropertyValue("Extrusion");
23 bool bExtrusion;
24 if(anotherAny >>= bExtrusion)
25 dumpExtrusionAsAttribute(bExtrusion);
26 }
27 {
28 uno::Any anotherAny = xPropSet->getPropertyValue("Brightness");
29 double aBrightness = double();
30 if(anotherAny >>= aBrightness)
31 dumpBrightnessAsAttribute(aBrightness);
32 }
33 {
34 uno::Any anotherAny = xPropSet->getPropertyValue("Depth");
35 drawing::EnhancedCustomShapeParameterPair aDepth;
36 if(anotherAny >>= aDepth)
37 dumpDepthAsElement(aDepth);
38 }
39 {
40 uno::Any anotherAny = xPropSet->getPropertyValue("Diffusion");
41 double aDiffusion = double();
42 if(anotherAny >>= aDiffusion)
43 dumpDiffusionAsAttribute(aDiffusion);
44 }
45 {
46 uno::Any anotherAny = xPropSet->getPropertyValue("NumberOfLineSegments");
47 sal_Int32 aNumberOfLineSegments = sal_Int32();
48 if(anotherAny >>= aNumberOfLineSegments)
49 dumpNumberOfLineSegmentsAsAttribute(aNumberOfLineSegments);
50 }
51 {
52 uno::Any anotherAny = xPropSet->getPropertyValue("LightFace");
53 bool bLightFace;
54 if(anotherAny >>= bLightFace)
55 dumpLightFaceAsAttribute(bLightFace);
56 }
57 {
58 uno::Any anotherAny = xPropSet->getPropertyValue("FirstLightHarsh");
59 bool bFirstLightHarsh;
60 if(anotherAny >>= bFirstLightHarsh)
61 dumpFirstLightHarshAsAttribute(bFirstLightHarsh);
62 }
63 {
64 uno::Any anotherAny = xPropSet->getPropertyValue("SecondLightHarsh");
65 bool bSecondLightHarsh;
66 if(anotherAny >>= bSecondLightHarsh)
67 dumpSecondLightHarshAsAttribute(bSecondLightHarsh);
68 }
69 {
70 uno::Any anotherAny = xPropSet->getPropertyValue("FirstLightLevel");
71 double aFirstLightLevel = double();
72 if(anotherAny >>= aFirstLightLevel)
73 dumpFirstLightLevelAsAttribute(aFirstLightLevel);
74 }
75 {
76 uno::Any anotherAny = xPropSet->getPropertyValue("SecondLightLevel");
77 double aSecondLightLevel = double();
78 if(anotherAny >>= aSecondLightLevel)
79 dumpSecondLightLevelAsAttribute(aSecondLightLevel);
80 }
81 {
82 uno::Any anotherAny = xPropSet->getPropertyValue("FirstLightDirection");
83 drawing::Direction3D aFirstLightDirection;
84 if(anotherAny >>= aFirstLightDirection)
85 dumpFirstLightDirectionAsElement(aFirstLightDirection);
86 }
87 {
88 uno::Any anotherAny = xPropSet->getPropertyValue("SecondLightDirection");
89 drawing::Direction3D aSecondLightDirection;
90 if(anotherAny >>= aSecondLightDirection)
91 dumpSecondLightDirectionAsElement(aSecondLightDirection);
92 }
93 {
94 uno::Any anotherAny = xPropSet->getPropertyValue("Metal");
95 bool bMetal;
96 if(anotherAny >>= bMetal)
98 }
99 {
100 uno::Any anotherAny = xPropSet->getPropertyValue("ShadeMode");
101 drawing::ShadeMode eShadeMode;
102 if(anotherAny >>= eShadeMode)
103 dumpShadeModeAsAttribute(eShadeMode);
104 }
105 {
106 uno::Any anotherAny = xPropSet->getPropertyValue("RotateAngle");
107 drawing::EnhancedCustomShapeParameterPair aRotateAngle;
108 if(anotherAny >>= aRotateAngle)
109 dumpRotateAngleAsElement(aRotateAngle);
110 }
111 {
112 uno::Any anotherAny = xPropSet->getPropertyValue("RotationCenter");
113 drawing::Direction3D aRotationCenter;
114 if(anotherAny >>= aRotationCenter)
115 dumpRotationCenterAsElement(aRotationCenter);
116 }
117 {
118 uno::Any anotherAny = xPropSet->getPropertyValue("Shininess");
119 double aShininess = double();
120 if(anotherAny >>= aShininess)
121 dumpShininessAsAttribute(aShininess);
122 }
123 {
124 uno::Any anotherAny = xPropSet->getPropertyValue("Skew");
125 drawing::EnhancedCustomShapeParameterPair aSkew;
126 if(anotherAny >>= aSkew)
127 dumpSkewAsElement(aSkew);
128 }
129 {
130 uno::Any anotherAny = xPropSet->getPropertyValue("Specularity");
131 double aSpecularity = double();
132 if(anotherAny >>= aSpecularity)
133 dumpSpecularityAsAttribute(aSpecularity);
134 }
135 {
136 uno::Any anotherAny = xPropSet->getPropertyValue("ProjectionMode");
137 drawing::ProjectionMode eProjectionMode;
138 if(anotherAny >>= eProjectionMode)
139 dumpProjectionModeAsAttribute(eProjectionMode);
140 }
141 {
142 uno::Any anotherAny = xPropSet->getPropertyValue("ViewPoint");
143 drawing::Position3D aViewPoint;
144 if(anotherAny >>= aViewPoint)
145 dumpViewPointAsElement(aViewPoint);
146 }
147 {
148 uno::Any anotherAny = xPropSet->getPropertyValue("Origin");
149 drawing::EnhancedCustomShapeParameterPair aOrigin;
150 if(anotherAny >>= aOrigin)
151 dumpOriginAsElement(aOrigin);
152 }
153 {
154 uno::Any anotherAny = xPropSet->getPropertyValue("ExtrusionColor");
155 bool bExtrusionColor;
156 if(anotherAny >>= bExtrusionColor)
157 dumpExtrusionColorAsAttribute(bExtrusionColor);
158 }
159}
161{
162 if(bExtrusion)
163 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("extrusion"), "%s", "true");
164 else
165 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("extrusion"), "%s", "false");
166}
167
169{
170 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("brightness"), "%f", aBrightness);
171}
172
174 const drawing::EnhancedCustomShapeParameterPair& aParameterPair)
175{
176 {
177 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "First" ));
178 dumpEnhancedCustomShapeParameter(aParameterPair.First);
179 (void)xmlTextWriterEndElement( xmlWriter );
180 }
181 {
182 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Second" ));
183 dumpEnhancedCustomShapeParameter(aParameterPair.Second);
184 (void)xmlTextWriterEndElement( xmlWriter );
185 }
186}
187
188void EnhancedShapeDumper::dumpDepthAsElement(const drawing::EnhancedCustomShapeParameterPair& aDepth)
189{
190 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Depth" ));
192 (void)xmlTextWriterEndElement( xmlWriter );
193}
194
196{
197 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("diffusion"), "%f", aDiffusion);
198}
199
201{
202 (void)xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("numberOfLineSegments"), "%" SAL_PRIdINT32, aNumberOfLineSegments);
203}
204
206{
207 if(bLightFace)
208 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("lightFace"), "%s", "true");
209 else
210 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("lightFace"), "%s", "false");
211}
212
214{
215 if(bFirstLightHarsh)
216 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("firstLightHarsh"), "%s", "true");
217 else
218 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("firstLightHarsh"), "%s", "false");
219}
220
222{
223 if(bSecondLightHarsh)
224 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("secondLightHarsh"), "%s", "true");
225 else
226 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("secondLightHarsh"), "%s", "false");
227}
228
230{
231 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("firstLightLevel"), "%f", aFirstLightLevel);
232}
233
235{
236 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("secondLightLevel"), "%f", aSecondLightLevel);
237}
238
239void EnhancedShapeDumper::dumpDirection3D(drawing::Direction3D aDirection3D)
240{
241 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("directionX"), "%f", aDirection3D.DirectionX);
242 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("directionY"), "%f", aDirection3D.DirectionY);
243 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("directionZ"), "%f", aDirection3D.DirectionZ);
244}
245
246void EnhancedShapeDumper::dumpFirstLightDirectionAsElement(drawing::Direction3D aFirstLightDirection)
247{
248 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "FirstLightDirection" ));
249 dumpDirection3D(aFirstLightDirection);
250 (void)xmlTextWriterEndElement( xmlWriter );
251}
252
253void EnhancedShapeDumper::dumpSecondLightDirectionAsElement(drawing::Direction3D aSecondLightDirection)
254{
255 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "SecondLightDirection" ));
256 dumpDirection3D(aSecondLightDirection);
257 (void)xmlTextWriterEndElement( xmlWriter );
258}
259
261{
262 if(bMetal)
263 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("metal"), "%s", "true");
264 else
265 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("metal"), "%s", "false");
266}
267
268void EnhancedShapeDumper::dumpShadeModeAsAttribute(drawing::ShadeMode eShadeMode)
269{
270 switch(eShadeMode)
271 {
272 case drawing::ShadeMode_FLAT:
273 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("shadeMode"), "%s", "FLAT");
274 break;
275 case drawing::ShadeMode_PHONG:
276 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("shadeMode"), "%s", "PHONG");
277 break;
278 case drawing::ShadeMode_SMOOTH:
279 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("shadeMode"), "%s", "SMOOTH");
280 break;
281 case drawing::ShadeMode_DRAFT:
282 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("shadeMode"), "%s", "DRAFT");
283 break;
284 default:
285 break;
286 }
287}
288
289void EnhancedShapeDumper::dumpRotateAngleAsElement(const drawing::EnhancedCustomShapeParameterPair& aRotateAngle)
290{
291 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "RotateAngle" ));
293 (void)xmlTextWriterEndElement( xmlWriter );
294}
295
296void EnhancedShapeDumper::dumpRotationCenterAsElement(drawing::Direction3D aRotationCenter)
297{
298 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "RotationCenter" ));
299 dumpDirection3D(aRotationCenter);
300 (void)xmlTextWriterEndElement( xmlWriter );
301}
302
304{
305 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("shininess"), "%f", aShininess);
306}
307
308void EnhancedShapeDumper::dumpSkewAsElement(const drawing::EnhancedCustomShapeParameterPair& aSkew)
309{
310 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Skew" ));
312 (void)xmlTextWriterEndElement( xmlWriter );
313}
314
316{
317 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("specularity"), "%f", aSpecularity);
318}
319
320void EnhancedShapeDumper::dumpProjectionModeAsAttribute(drawing::ProjectionMode eProjectionMode)
321{
322 switch(eProjectionMode)
323 {
324 case drawing::ProjectionMode_PARALLEL:
325 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("projectionMode"), "%s", "PARALLEL");
326 break;
327 case drawing::ProjectionMode_PERSPECTIVE:
328 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("projectionMode"), "%s", "PERSPECTIVE");
329 break;
330 default:
331 break;
332 }
333}
334
335void EnhancedShapeDumper::dumpViewPointAsElement(drawing::Position3D aViewPoint)
336{
337 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "ViewPoint" ));
338 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("positionX"), "%f", aViewPoint.PositionX);
339 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("positionY"), "%f", aViewPoint.PositionY);
340 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("positionZ"), "%f", aViewPoint.PositionZ);
341 (void)xmlTextWriterEndElement( xmlWriter );
342}
343
344void EnhancedShapeDumper::dumpOriginAsElement(const drawing::EnhancedCustomShapeParameterPair& aOrigin)
345{
346 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Origin" ));
348 (void)xmlTextWriterEndElement( xmlWriter );
349}
350
352{
353 if(bExtrusionColor)
354 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("extrusionColor"), "%s", "true");
355 else
356 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("extrusionColor"), "%s", "false");
357}
358
359
360// ---------- EnhancedCustomShapeGeometry.idl -----------
361
362
363void EnhancedShapeDumper::dumpEnhancedCustomShapeGeometryService(const uno::Reference< beans::XPropertySet >& xPropSet)
364{
365 {
366 uno::Any anotherAny = xPropSet->getPropertyValue("Type");
367 OUString sType;
368 if(anotherAny >>= sType)
370 }
371 {
372 uno::Any anotherAny = xPropSet->getPropertyValue("ViewBox");
373 awt::Rectangle aViewBox;
374 if(anotherAny >>= aViewBox)
375 dumpViewBoxAsElement(aViewBox);
376 }
377 {
378 uno::Any anotherAny = xPropSet->getPropertyValue("MirroredX");
379 bool bMirroredX;
380 if(anotherAny >>= bMirroredX)
381 dumpMirroredXAsAttribute(bMirroredX);
382 }
383 {
384 uno::Any anotherAny = xPropSet->getPropertyValue("MirroredY");
385 bool bMirroredY;
386 if(anotherAny >>= bMirroredY)
387 dumpMirroredYAsAttribute(bMirroredY);
388 }
389 {
390 uno::Any anotherAny = xPropSet->getPropertyValue("TextRotateAngle");
391 double aTextRotateAngle = double();
392 if(anotherAny >>= aTextRotateAngle)
393 dumpTextRotateAngleAsAttribute(aTextRotateAngle);
394 }
395 {
396 uno::Any anotherAny = xPropSet->getPropertyValue("AdjustmentValues");
397 uno::Sequence< drawing::EnhancedCustomShapeAdjustmentValue> aAdjustmentValues;
398 if(anotherAny >>= aAdjustmentValues)
399 dumpAdjustmentValuesAsElement(aAdjustmentValues);
400 }
401 {
402 uno::Any anotherAny = xPropSet->getPropertyValue("Extrusion");
403 uno::Sequence< beans::PropertyValue > aExtrusion;
404 if(anotherAny >>= aExtrusion)
405 dumpExtrusionAsElement(aExtrusion);
406 }
407 {
408 uno::Any anotherAny = xPropSet->getPropertyValue("Path");
409 uno::Sequence< beans::PropertyValue > aPath;
410 if(anotherAny >>= aPath)
411 dumpPathAsElement(aPath);
412 }
413 {
414 uno::Any anotherAny = xPropSet->getPropertyValue("TextPath");
415 uno::Sequence< beans::PropertyValue > aTextPath;
416 if(anotherAny >>= aTextPath)
417 dumpTextPathAsElement(aTextPath);
418 }
419 {
420 uno::Any anotherAny = xPropSet->getPropertyValue("Equations");
421 uno::Sequence< OUString > aEquations;
422 if(anotherAny >>= aEquations)
423 dumpEquationsAsElement(aEquations);
424 }
425 {
426 uno::Any anotherAny = xPropSet->getPropertyValue("Handles");
427 uno::Sequence< beans::PropertyValues > aHandles;
428 if(anotherAny >>= aHandles)
429 dumpHandlesAsElement(aHandles);
430 }
431}
432void EnhancedShapeDumper::dumpTypeAsAttribute(std::u16string_view sType)
433{
434 (void)xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("type"), "%s",
435 OUStringToOString(sType, RTL_TEXTENCODING_UTF8).getStr());
436}
437
438void EnhancedShapeDumper::dumpViewBoxAsElement(awt::Rectangle aViewBox)
439{
440 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "ViewBox" ));
441 (void)xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("x"), "%" SAL_PRIdINT32, aViewBox.X);
442 (void)xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("y"), "%" SAL_PRIdINT32, aViewBox.Y);
443 (void)xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("width"), "%" SAL_PRIdINT32, aViewBox.Width);
444 (void)xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("height"), "%" SAL_PRIdINT32, aViewBox.Height);
445 (void)xmlTextWriterEndElement( xmlWriter );
446}
447
449{
450 if(bMirroredX)
451 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("mirroredX"), "%s", "true");
452 else
453 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("mirroredX"), "%s", "false");
454}
455
457{
458 if(bMirroredY)
459 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("mirroredY"), "%s", "true");
460 else
461 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("mirroredY"), "%s", "false");
462}
463
465{
466 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textRotateAngle"), "%f", aTextRotateAngle);
467}
468
469void EnhancedShapeDumper::dumpAdjustmentValuesAsElement(const uno::Sequence< drawing::EnhancedCustomShapeAdjustmentValue>& aAdjustmentValues)
470{
471 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "AdjustmentValues" ));
472 for (const auto& i : aAdjustmentValues)
473 {
474 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "EnhancedCustomShapeAdjustmentValue" ));
475 uno::Any aAny = i.Value;
476 OUString sValue;
477 float fValue;
478 sal_Int32 nValue;
479 bool bValue;
480 if(aAny >>= sValue)
481 {
482 (void)xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("value"), "%s",
483 OUStringToOString(sValue, RTL_TEXTENCODING_UTF8).getStr());
484 }
485 else if(aAny >>= nValue)
486 {
487 (void)xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("value"), "%" SAL_PRIdINT32, nValue);
488 }
489 else if(aAny >>= fValue)
490 {
491 (void)xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("value"), "%f", fValue);
492 }
493 else if(aAny >>= bValue)
494 {
495 (void)xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("value"), "%s", (bValue? "true": "false"));
496 }
497
498 switch(i.State)
499 {
500 case beans::PropertyState_DIRECT_VALUE:
501 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("propertyState"), "%s", "DIRECT_VALUE");
502 break;
503 case beans::PropertyState_DEFAULT_VALUE:
504 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("propertyState"), "%s", "DEFAULT_VALUE");
505 break;
506 case beans::PropertyState_AMBIGUOUS_VALUE:
507 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("propertyState"), "%s", "AMBIGUOUS_VALUE");
508 break;
509 default:
510 break;
511 }
512 (void)xmlTextWriterEndElement( xmlWriter );
513 }
514 (void)xmlTextWriterEndElement( xmlWriter );
515}
516
517void EnhancedShapeDumper::dumpPropertyValueAsElement(const beans::PropertyValue& aPropertyValue)
518{
519 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "PropertyValue" ));
520
521 (void)xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("name"), "%s",
522 OUStringToOString(aPropertyValue.Name, RTL_TEXTENCODING_UTF8).getStr());
523 (void)xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("handle"), "%" SAL_PRIdINT32, aPropertyValue.Handle);
524
525 uno::Any aAny = aPropertyValue.Value;
526 OUString sValue;
527 if(aAny >>= sValue)
528 {
529 (void)xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("value"), "%s",
530 OUStringToOString(sValue, RTL_TEXTENCODING_UTF8).getStr());
531 }
532 switch(aPropertyValue.State)
533 {
534 case beans::PropertyState_DIRECT_VALUE:
535 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("propertyState"), "%s", "DIRECT_VALUE");
536 break;
537 case beans::PropertyState_DEFAULT_VALUE:
538 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("propertyState"), "%s", "DEFAULT_VALUE");
539 break;
540 case beans::PropertyState_AMBIGUOUS_VALUE:
541 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("propertyState"), "%s", "AMBIGUOUS_VALUE");
542 break;
543 default:
544 break;
545 }
546 (void)xmlTextWriterEndElement( xmlWriter );
547}
548
549void EnhancedShapeDumper::dumpExtrusionAsElement(const uno::Sequence< beans::PropertyValue >& aExtrusion)
550{
551 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Extrusion" ));
552 for (const auto& i : aExtrusion)
553 {
555 }
556 (void)xmlTextWriterEndElement( xmlWriter );
557}
558
559void EnhancedShapeDumper::dumpPathAsElement(const uno::Sequence< beans::PropertyValue >& aPath)
560{
561 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Path" ));
562 for (const auto& i : aPath)
563 {
565 }
566 (void)xmlTextWriterEndElement( xmlWriter );
567}
568
569void EnhancedShapeDumper::dumpTextPathAsElement(const uno::Sequence< beans::PropertyValue >& aTextPath)
570{
571 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "TextPath" ));
572 for (const auto& i : aTextPath)
573 {
575 }
576 (void)xmlTextWriterEndElement( xmlWriter );
577}
578
579void EnhancedShapeDumper::dumpEquationsAsElement(const uno::Sequence< OUString >& aEquations)
580{
581 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Equations" ));
582 for (const auto& i : aEquations)
583 {
584 (void)xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("name"), "%s",
585 OUStringToOString(i, RTL_TEXTENCODING_UTF8).getStr());
586 }
587 (void)xmlTextWriterEndElement( xmlWriter );
588}
589
590// PropertyValues specifies a sequence of PropertyValue instances.
591// so in this case it's a Sequence of a Sequence of a PropertyValue instances.
592// Welcome to Sequenception again.
593void EnhancedShapeDumper::dumpHandlesAsElement(const uno::Sequence< beans::PropertyValues >& aHandles)
594{
595 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Handles" ));
596 for (const auto& i : aHandles)
597 {
598 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "PropertyValues" ));
599 uno::Sequence< beans::PropertyValue > propertyValueSequence = i;
600 for (const auto& j : propertyValueSequence)
601 {
603 }
604 (void)xmlTextWriterEndElement( xmlWriter );
605 }
606 (void)xmlTextWriterEndElement( xmlWriter );
607}
608
609
610// ---------- EnhancedCustomShapeHandle.idl -----------
611
612
613void EnhancedShapeDumper::dumpEnhancedCustomShapeHandleService(const uno::Reference< beans::XPropertySet >& xPropSet)
614{
615 {
616 uno::Any anotherAny = xPropSet->getPropertyValue("MirroredX");
617 bool bMirroredX;
618 if(anotherAny >>= bMirroredX)
619 dumpMirroredXAsAttribute(bMirroredX);
620 }
621 {
622 uno::Any anotherAny = xPropSet->getPropertyValue("MirroredY");
623 bool bMirroredY;
624 if(anotherAny >>= bMirroredY)
625 dumpMirroredYAsAttribute(bMirroredY);
626 }
627 {
628 uno::Any anotherAny = xPropSet->getPropertyValue("Switched");
629 bool bSwitched;
630 if(anotherAny >>= bSwitched)
631 dumpSwitchedAsAttribute(bSwitched);
632 }
633 {
634 uno::Any anotherAny = xPropSet->getPropertyValue("Position");
635 drawing::EnhancedCustomShapeParameterPair aPosition;
636 if(anotherAny >>= aPosition)
637 dumpPositionAsElement(aPosition);
638 }
639 {
640 uno::Any anotherAny = xPropSet->getPropertyValue("Polar");
641 drawing::EnhancedCustomShapeParameterPair aPolar;
642 if(anotherAny >>= aPolar)
643 dumpPolarAsElement(aPolar);
644 }
645 {
646 uno::Any anotherAny = xPropSet->getPropertyValue("RefX");
647 sal_Int32 aRefX = sal_Int32();
648 if(anotherAny >>= aRefX)
649 dumpRefXAsAttribute(aRefX);
650 }
651 {
652 uno::Any anotherAny = xPropSet->getPropertyValue("RefY");
653 sal_Int32 aRefY = sal_Int32();
654 if(anotherAny >>= aRefY)
655 dumpRefYAsAttribute(aRefY);
656 }
657 {
658 uno::Any anotherAny = xPropSet->getPropertyValue("RefAngle");
659 sal_Int32 aRefAngle = sal_Int32();
660 if(anotherAny >>= aRefAngle)
661 dumpRefAngleAsAttribute(aRefAngle);
662 }
663 {
664 uno::Any anotherAny = xPropSet->getPropertyValue("RefR");
665 sal_Int32 aRefR = sal_Int32();
666 if(anotherAny >>= aRefR)
667 dumpRefRAsAttribute(aRefR);
668 }
669 {
670 uno::Any anotherAny = xPropSet->getPropertyValue("RangeXMinimum");
671 drawing::EnhancedCustomShapeParameter aRangeXMinimum;
672 if(anotherAny >>= aRangeXMinimum)
673 dumpRangeXMinimumAsElement(aRangeXMinimum);
674 }
675 {
676 uno::Any anotherAny = xPropSet->getPropertyValue("RangeXMaximum");
677 drawing::EnhancedCustomShapeParameter aRangeXMaximum;
678 if(anotherAny >>= aRangeXMaximum)
679 dumpRangeXMaximumAsElement(aRangeXMaximum);
680 }
681 {
682 uno::Any anotherAny = xPropSet->getPropertyValue("RangeYMinimum");
683 drawing::EnhancedCustomShapeParameter aRangeYMinimum;
684 if(anotherAny >>= aRangeYMinimum)
685 dumpRangeYMinimumAsElement(aRangeYMinimum);
686 }
687 {
688 uno::Any anotherAny = xPropSet->getPropertyValue("RangeYMaximum");
689 drawing::EnhancedCustomShapeParameter aRangeYMaximum;
690 if(anotherAny >>= aRangeYMaximum)
691 dumpRangeYMaximumAsElement(aRangeYMaximum);
692 }
693 {
694 uno::Any anotherAny = xPropSet->getPropertyValue("RadiusRangeMinimum");
695 drawing::EnhancedCustomShapeParameter aRadiusRangeMinimum;
696 if(anotherAny >>= aRadiusRangeMinimum)
697 dumpRadiusRangeMinimumAsElement(aRadiusRangeMinimum);
698 }
699 {
700 uno::Any anotherAny = xPropSet->getPropertyValue("RadiusRangeMaximum");
701 drawing::EnhancedCustomShapeParameter aRadiusRangeMaximum;
702 if(anotherAny >>= aRadiusRangeMaximum)
703 dumpRadiusRangeMaximumAsElement(aRadiusRangeMaximum);
704 }
705}
706
708{
709 if(bSwitched)
710 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("switched"), "%s", "true");
711 else
712 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("switched"), "%s", "false");
713}
714
715void EnhancedShapeDumper::dumpPositionAsElement(const drawing::EnhancedCustomShapeParameterPair& aPosition)
716{
717 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Position" ));
719 (void)xmlTextWriterEndElement( xmlWriter );
720}
721
722void EnhancedShapeDumper::dumpPolarAsElement(const drawing::EnhancedCustomShapeParameterPair& aPolar)
723{
724 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Polar" ));
726 (void)xmlTextWriterEndElement( xmlWriter );
727}
728
730{
731 (void)xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("refX"), "%" SAL_PRIdINT32, aRefX);
732}
733
735{
736 (void)xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("refY"), "%" SAL_PRIdINT32, aRefY);
737}
738
740{
741 (void)xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("refAngle"), "%" SAL_PRIdINT32, aRefAngle);
742}
743
745{
746 (void)xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("refR"), "%" SAL_PRIdINT32, aRefR);
747}
748
750 const drawing::EnhancedCustomShapeParameter& aParameter)
751{
752 uno::Any aAny = aParameter.Value;
753 OUString sValue;
754 float fValue;
755 sal_Int32 nValue;
756 bool bValue;
757 if(aAny >>= sValue)
758 {
759 (void)xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("value"), "%s",
760 OUStringToOString(sValue, RTL_TEXTENCODING_UTF8).getStr());
761 }
762 else if(aAny >>= nValue)
763 {
764 (void)xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("value"), "%" SAL_PRIdINT32, nValue);
765 }
766 else if(aAny >>= fValue)
767 {
768 (void)xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("value"), "%f", fValue);
769 }
770 else if(aAny >>= bValue)
771 {
772 (void)xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("value"), "%s", (bValue? "true": "false"));
773 }
774 sal_Int32 aType = aParameter.Type;
775 (void)xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("type"), "%" SAL_PRIdINT32, aType);
776}
777
778void EnhancedShapeDumper::dumpRangeXMinimumAsElement(const drawing::EnhancedCustomShapeParameter& aRangeXMinimum)
779{
780 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "RangeXMinimum" ));
781 dumpEnhancedCustomShapeParameter(aRangeXMinimum);
782 (void)xmlTextWriterEndElement( xmlWriter );
783}
784
785void EnhancedShapeDumper::dumpRangeXMaximumAsElement(const drawing::EnhancedCustomShapeParameter& aRangeXMaximum)
786{
787 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "RangeXMaximum" ));
788 dumpEnhancedCustomShapeParameter(aRangeXMaximum);
789 (void)xmlTextWriterEndElement( xmlWriter );
790}
791
792void EnhancedShapeDumper::dumpRangeYMinimumAsElement(const drawing::EnhancedCustomShapeParameter& aRangeYMinimum)
793{
794 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "RangeYMinimum" ));
795 dumpEnhancedCustomShapeParameter(aRangeYMinimum);
796 (void)xmlTextWriterEndElement( xmlWriter );
797}
798
799void EnhancedShapeDumper::dumpRangeYMaximumAsElement(const drawing::EnhancedCustomShapeParameter& aRangeYMaximum)
800{
801 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "RangeYMaximum" ));
802 dumpEnhancedCustomShapeParameter(aRangeYMaximum);
803 (void)xmlTextWriterEndElement( xmlWriter );
804}
805
806void EnhancedShapeDumper::dumpRadiusRangeMinimumAsElement(const drawing::EnhancedCustomShapeParameter& aRadiusRangeMinimum)
807{
808 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "RadiusRangeMinimum" ));
809 dumpEnhancedCustomShapeParameter(aRadiusRangeMinimum);
810 (void)xmlTextWriterEndElement( xmlWriter );
811}
812
813void EnhancedShapeDumper::dumpRadiusRangeMaximumAsElement(const drawing::EnhancedCustomShapeParameter& aRadiusRangeMaximum)
814{
815 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "RadiusRangeMaximum" ));
816 dumpEnhancedCustomShapeParameter(aRadiusRangeMaximum);
817 (void)xmlTextWriterEndElement( xmlWriter );
818}
819
820
821// ---------- EnhancedCustomShapePath.idl ---------------
822
823
824void EnhancedShapeDumper::dumpEnhancedCustomShapePathService(const uno::Reference< beans::XPropertySet >& xPropSet)
825{
826 {
827 uno::Any anotherAny = xPropSet->getPropertyValue("Coordinates");
828 uno::Sequence< drawing::EnhancedCustomShapeParameterPair > aCoordinates;
829 if(anotherAny >>= aCoordinates)
830 dumpCoordinatesAsElement(aCoordinates);
831 }
832 {
833 uno::Any anotherAny = xPropSet->getPropertyValue("Segments");
834 uno::Sequence< drawing::EnhancedCustomShapeSegment > aSegments;
835 if(anotherAny >>= aSegments)
837 }
838 {
839 uno::Any anotherAny = xPropSet->getPropertyValue("StretchX");
840 sal_Int32 aStretchX = sal_Int32();
841 if(anotherAny >>= aStretchX)
842 dumpStretchXAsAttribute(aStretchX);
843 }
844 {
845 uno::Any anotherAny = xPropSet->getPropertyValue("StretchY");
846 sal_Int32 aStretchY = sal_Int32();
847 if(anotherAny >>= aStretchY)
848 dumpStretchYAsAttribute(aStretchY);
849 }
850 {
851 uno::Any anotherAny = xPropSet->getPropertyValue("TextFrames");
852 uno::Sequence< drawing::EnhancedCustomShapeTextFrame > aTextFrames;
853 if(anotherAny >>= aTextFrames)
854 dumpTextFramesAsElement(aTextFrames);
855 }
856 {
857 uno::Any anotherAny = xPropSet->getPropertyValue("GluePoints");
858 uno::Sequence< drawing::EnhancedCustomShapeParameterPair > aGluePoints;
859 if(anotherAny >>= aGluePoints)
860 dumpGluePointsAsElement(aGluePoints);
861 }
862 {
863 uno::Any anotherAny = xPropSet->getPropertyValue("GluePointLeavingDirections");
864 uno::Sequence< double > aGluePointLeavingDirections;
865 if(anotherAny >>= aGluePointLeavingDirections)
866 dumpGluePointLeavingDirectionsAsElement(aGluePointLeavingDirections);
867 }
868 {
869 uno::Any anotherAny = xPropSet->getPropertyValue("GluePointType");
870 sal_Int32 aGluePointType = sal_Int32();
871 if(anotherAny >>= aGluePointType)
872 dumpGluePointTypeAsAttribute(aGluePointType);
873 }
874 {
875 uno::Any anotherAny = xPropSet->getPropertyValue("ExtrusionAllowed");
876 bool bExtrusionAllowed;
877 if(anotherAny >>= bExtrusionAllowed)
878 dumpExtrusionAllowedAsAttribute(bExtrusionAllowed);
879 }
880 {
881 uno::Any anotherAny = xPropSet->getPropertyValue("ConcentricGradientFillAllowed");
882 bool bConcentricGradientFillAllowed;
883 if(anotherAny >>= bConcentricGradientFillAllowed)
884 dumpConcentricGradientFillAllowedAsAttribute(bConcentricGradientFillAllowed);
885 }
886 {
887 uno::Any anotherAny = xPropSet->getPropertyValue("TextPathAllowed");
888 bool bTextPathAllowed;
889 if(anotherAny >>= bTextPathAllowed)
890 dumpTextPathAllowedAsAttribute(bTextPathAllowed);
891 }
892 {
893 uno::Any anotherAny = xPropSet->getPropertyValue("SubViewSize");
894 uno::Sequence< awt::Size > aSubViewSize;
895 if(anotherAny >>= aSubViewSize)
896 dumpSubViewSizeAsElement(aSubViewSize);
897 }
898}
899
900void EnhancedShapeDumper::dumpCoordinatesAsElement(const uno::Sequence< drawing::EnhancedCustomShapeParameterPair >& aCoordinates)
901{
902 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Coordinates" ));
903 for (const auto& i : aCoordinates)
904 {
905 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "EnhancedCustomShapeParameterPair" ));
907 (void)xmlTextWriterEndElement( xmlWriter );
908 }
909 (void)xmlTextWriterEndElement( xmlWriter );
910}
911
912void EnhancedShapeDumper::dumpSegmentsAsElement(const uno::Sequence< drawing::EnhancedCustomShapeSegment >& aSegments)
913{
914 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Segments" ));
915 for (const auto& i : aSegments)
916 {
917 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "EnhancedCustomShapeSegment" ));
918 sal_Int32 aCommand = i.Command;
919 sal_Int32 aCount = i.Count;
920 (void)xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("command"), "%" SAL_PRIdINT32, aCommand);
921 (void)xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("count"), "%" SAL_PRIdINT32, aCount);
922 (void)xmlTextWriterEndElement( xmlWriter );
923 }
924 (void)xmlTextWriterEndElement( xmlWriter );
925}
926
928{
929 (void)xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("stretchX"), "%" SAL_PRIdINT32, aStretchX);
930}
931
933{
934 (void)xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("stretchY"), "%" SAL_PRIdINT32, aStretchY);
935}
936
937void EnhancedShapeDumper::dumpTextFramesAsElement(const uno::Sequence< drawing::EnhancedCustomShapeTextFrame >& aTextFrames)
938{
939 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "TextFrames" ));
940 for (const auto& i : aTextFrames)
941 {
942 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "EnhancedCustomShapeTextFrame" ));
943 {
944 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "TopLeft" ));
946 (void)xmlTextWriterEndElement( xmlWriter );
947
948 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "BottomRight" ));
950 (void)xmlTextWriterEndElement( xmlWriter );
951 }
952 (void)xmlTextWriterEndElement( xmlWriter );
953 }
954 (void)xmlTextWriterEndElement( xmlWriter );
955}
956
957void EnhancedShapeDumper::dumpGluePointsAsElement(const uno::Sequence< drawing::EnhancedCustomShapeParameterPair >& aGluePoints)
958{
959 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "GluePoints" ));
960 for (const auto& i : aGluePoints)
961 {
962 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "EnhancedCustomShapeParameterPair" ));
964 (void)xmlTextWriterEndElement( xmlWriter );
965 }
966 (void)xmlTextWriterEndElement( xmlWriter );
967}
968
969void EnhancedShapeDumper::dumpGluePointLeavingDirectionsAsElement(const uno::Sequence< double >& aGluePointLeavingDirections)
970{
971 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "GluePointLeavingDirections" ));
972 for (const auto& i : aGluePointLeavingDirections)
973 {
974 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("value"), "%f", i);
975 }
976 (void)xmlTextWriterEndElement( xmlWriter );
977}
978
980{
981 (void)xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("gluePointType"), "%" SAL_PRIdINT32, aGluePointType);
982}
983
985{
986 if(bExtrusionAllowed)
987 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("extrusionAllowed"), "%s", "true");
988 else
989 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("extrusionAllowed"), "%s", "false");
990}
991
993{
994 if(bConcentricGradientFillAllowed)
995 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("concentricGradientFillAllowed"), "%s", "true");
996 else
997 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("concentricGradientFillAllowed"), "%s", "false");
998}
999
1001{
1002 if(bTextPathAllowed)
1003 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textPathAllowed"), "%s", "true");
1004 else
1005 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textPathAllowed"), "%s", "false");
1006}
1007
1008void EnhancedShapeDumper::dumpSubViewSizeAsElement(const uno::Sequence< awt::Size >& aSubViewSize)
1009{
1010 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "SubViewSize" ));
1011 for (const auto& i : aSubViewSize)
1012 {
1013 (void)xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Size" ));
1014 (void)xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("width"), "%" SAL_PRIdINT32, i.Width);
1015 (void)xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("height"), "%" SAL_PRIdINT32, i.Height);
1016 (void)xmlTextWriterEndElement( xmlWriter );
1017 }
1018 (void)xmlTextWriterEndElement( xmlWriter );
1019}
1020
1021
1022// ---------- EnhancedCustomShapeTextPath.idl ---------------
1023
1024
1025void EnhancedShapeDumper::dumpEnhancedCustomShapeTextPathService(const uno::Reference< beans::XPropertySet >& xPropSet)
1026{
1027 {
1028 uno::Any anotherAny = xPropSet->getPropertyValue("TextPath");
1029 bool bTextPath;
1030 if(anotherAny >>= bTextPath)
1031 dumpTextPathAsAttribute(bTextPath);
1032 }
1033 {
1034 uno::Any anotherAny = xPropSet->getPropertyValue("TextPathMode");
1035 drawing::EnhancedCustomShapeTextPathMode eTextPathMode;
1036 if(anotherAny >>= eTextPathMode)
1037 dumpTextPathModeAsAttribute(eTextPathMode);
1038 }
1039 {
1040 uno::Any anotherAny = xPropSet->getPropertyValue("ScaleX");
1041 bool bScaleX;
1042 if(anotherAny >>= bScaleX)
1043 dumpScaleXAsAttribute(bScaleX);
1044 }
1045}
1046
1048{
1049 if(bTextPath)
1050 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textPath"), "%s", "true");
1051 else
1052 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textPath"), "%s", "false");
1053}
1054
1055void EnhancedShapeDumper::dumpTextPathModeAsAttribute(drawing::EnhancedCustomShapeTextPathMode eTextPathMode)
1056{
1057 switch(eTextPathMode)
1058 {
1059 case drawing::EnhancedCustomShapeTextPathMode_NORMAL:
1060 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textPathMode"), "%s", "NORMAL");
1061 break;
1062 case drawing::EnhancedCustomShapeTextPathMode_PATH:
1063 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textPathMode"), "%s", "PATH");
1064 break;
1065 case drawing::EnhancedCustomShapeTextPathMode_SHAPE:
1066 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textPathMode"), "%s", "SHAPE");
1067 break;
1068 default:
1069 break;
1070 }
1071}
1072
1074{
1075 if(bScaleX)
1076 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("scaleX"), "%s", "true");
1077 else
1078 (void)xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("scaleX"), "%s", "false");
1079}
1080
1081/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
OptionalString sType
void dumpBrightnessAsAttribute(double aBrightness)
void dumpEnhancedCustomShapeHandleService(const css::uno::Reference< css::beans::XPropertySet > &xPropSet)
void dumpStretchXAsAttribute(sal_Int32 aStretchX)
void dumpEquationsAsElement(const css::uno::Sequence< OUString > &aEquations)
void dumpSubViewSizeAsElement(const css::uno::Sequence< css::awt::Size > &aSubViewSize)
void dumpFirstLightLevelAsAttribute(double aFirstLightLevel)
void dumpRefRAsAttribute(sal_Int32 aRefR)
void dumpGluePointsAsElement(const css::uno::Sequence< css::drawing::EnhancedCustomShapeParameterPair > &aGluePoints)
void dumpTextRotateAngleAsAttribute(double aTextRotateAngle)
void dumpTextPathAsElement(const css::uno::Sequence< css::beans::PropertyValue > &aTextPath)
void dumpPolarAsElement(const css::drawing::EnhancedCustomShapeParameterPair &aPolar)
void dumpExtrusionColorAsAttribute(bool bExtrusionColor)
void dumpRangeYMaximumAsElement(const css::drawing::EnhancedCustomShapeParameter &aRangeXMaximum)
void dumpAdjustmentValuesAsElement(const css::uno::Sequence< css::drawing::EnhancedCustomShapeAdjustmentValue > &aAdjustmentValues)
void dumpRangeXMaximumAsElement(const css::drawing::EnhancedCustomShapeParameter &aRangeXMaximum)
void dumpRotateAngleAsElement(const css::drawing::EnhancedCustomShapeParameterPair &aRotateAngle)
xmlTextWriterPtr xmlWriter
void dumpSkewAsElement(const css::drawing::EnhancedCustomShapeParameterPair &aSkew)
void dumpExtrusionAsAttribute(bool bExtrusion)
void dumpHandlesAsElement(const css::uno::Sequence< css::beans::PropertyValues > &aHandles)
void dumpRadiusRangeMaximumAsElement(const css::drawing::EnhancedCustomShapeParameter &aRadiusRangeMaximum)
void dumpLightFaceAsAttribute(bool bLightFace)
void dumpFirstLightDirectionAsElement(css::drawing::Direction3D aFirstLightDirection)
void dumpCoordinatesAsElement(const css::uno::Sequence< css::drawing::EnhancedCustomShapeParameterPair > &aCoordinates)
void dumpScaleXAsAttribute(bool bScaleX)
void dumpTextPathAsAttribute(bool bTextPath)
void dumpTypeAsAttribute(std::u16string_view sType)
void dumpOriginAsElement(const css::drawing::EnhancedCustomShapeParameterPair &aOrigin)
void dumpSecondLightLevelAsAttribute(double aSecondLightLevel)
void dumpExtrusionAsElement(const css::uno::Sequence< css::beans::PropertyValue > &aExtrusion)
void dumpSegmentsAsElement(const css::uno::Sequence< css::drawing::EnhancedCustomShapeSegment > &aSegments)
void dumpGluePointLeavingDirectionsAsElement(const css::uno::Sequence< double > &aGluePointLeavingDirections)
void dumpSwitchedAsAttribute(bool bSwitched)
void dumpShadeModeAsAttribute(css::drawing::ShadeMode eShadeMode)
void dumpSecondLightHarshAsAttribute(bool bSecondLightHarsh)
void dumpEnhancedCustomShapePathService(const css::uno::Reference< css::beans::XPropertySet > &xPropSet)
void dumpEnhancedCustomShapeGeometryService(const css::uno::Reference< css::beans::XPropertySet > &xPropSet)
void dumpTextPathModeAsAttribute(css::drawing::EnhancedCustomShapeTextPathMode eTextPathMode)
void dumpPropertyValueAsElement(const css::beans::PropertyValue &aPropertyValue)
void dumpStretchYAsAttribute(sal_Int32 aStretchY)
void dumpDepthAsElement(const css::drawing::EnhancedCustomShapeParameterPair &aDepth)
void dumpRangeXMinimumAsElement(const css::drawing::EnhancedCustomShapeParameter &aRangeXMinimum)
void dumpViewPointAsElement(css::drawing::Position3D aViewPoint)
void dumpMirroredYAsAttribute(bool bMirroredY)
void dumpDiffusionAsAttribute(double aDiffusion)
void dumpTextFramesAsElement(const css::uno::Sequence< css::drawing::EnhancedCustomShapeTextFrame > &aTextFrames)
void dumpExtrusionAllowedAsAttribute(bool bExtrusionAllowed)
void dumpGluePointTypeAsAttribute(sal_Int32 aGluePointType)
void dumpRefAngleAsAttribute(sal_Int32 aRefAngle)
void dumpProjectionModeAsAttribute(css::drawing::ProjectionMode eProjectionMode)
void dumpShininessAsAttribute(double aShininess)
void dumpRefYAsAttribute(sal_Int32 aRefY)
void dumpMetalAsAttribute(bool bMetal)
void dumpRefXAsAttribute(sal_Int32 aRefX)
void dumpFirstLightHarshAsAttribute(bool bFirstLightHarsh)
void dumpPositionAsElement(const css::drawing::EnhancedCustomShapeParameterPair &aPosition)
void dumpRotationCenterAsElement(css::drawing::Direction3D aRotationCenter)
void dumpConcentricGradientFillAllowedAsAttribute(bool bConcentricGradientFillAllowed)
void dumpViewBoxAsElement(css::awt::Rectangle aViewBox)
void dumpEnhancedCustomShapeTextPathService(const css::uno::Reference< css::beans::XPropertySet > &xPropSet)
void dumpNumberOfLineSegmentsAsAttribute(sal_Int32 aNumberOfLineSegments)
void dumpRangeYMinimumAsElement(const css::drawing::EnhancedCustomShapeParameter &aRangeYMinimum)
void dumpEnhancedCustomShapeExtrusionService(const css::uno::Reference< css::beans::XPropertySet > &xPropSet)
void dumpRadiusRangeMinimumAsElement(const css::drawing::EnhancedCustomShapeParameter &aRadiusRangeMinimum)
void dumpSpecularityAsAttribute(double aSpecularity)
void dumpEnhancedCustomShapeParameterPair(const css::drawing::EnhancedCustomShapeParameterPair &aParameterPair)
void dumpTextPathAllowedAsAttribute(bool bTextPathAllowed)
void dumpDirection3D(css::drawing::Direction3D aDirection3D)
void dumpEnhancedCustomShapeParameter(const css::drawing::EnhancedCustomShapeParameter &aParameter)
void dumpSecondLightDirectionAsElement(css::drawing::Direction3D aSecondLightDirection)
void dumpPathAsElement(const css::uno::Sequence< css::beans::PropertyValue > &aPath)
void dumpMirroredXAsAttribute(bool bMirroredX)
sal_Int16 nValue
int i
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
Object Value
OUString aCommand
std::vector< ISegmentProgressBarRef > aSegments