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