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
|
/* -*- 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/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <sal/macros.h>
#include <com/sun/star/table/XTable.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/embed/XEmbeddedObject.hpp>
#include <com/sun/star/util/MeasureUnit.hpp>
#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
#include <com/sun/star/media/ZoomLevel.hpp>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <tools/fldunit.hxx>
#include <vcl/svapp.hxx>
#include <comphelper/propertysetinfo.hxx>
#include <comphelper/sequence.hxx>
#include <svx/dialmgr.hxx>
#include "svx/unoapi.hxx"
#include <editeng/unotext.hxx>
#include <svx/unoshprp.hxx>
#include <editeng/editeng.hxx>
#include "svx/globl3d.hxx"
#include <svx/dialogs.hrc>
#include <svx/svdpool.hxx>
#include <svx/svdobj.hxx>
#include <shapeimpl.hxx>
#include <unordered_map>
using namespace ::com::sun::star;
using namespace ::com::sun::star::beans::PropertyAttribute;
using ::com::sun::star::drawing::TextVerticalAdjust;
SfxItemPropertyMapEntry const * ImplGetSvxShapePropertyMap()
{
static SfxItemPropertyMapEntry const aShapePropertyMap_Impl[] =
{
EDGERADIUS_PROPERTIES
FILL_PROPERTIES
LINE_PROPERTIES
LINE_PROPERTIES_START_END
SHAPE_DESCRIPTOR_PROPERTIES
MISC_OBJ_PROPERTIES
LINKTARGET_PROPERTIES
SHADOW_PROPERTIES
TEXT_PROPERTIES
// #FontWork#
FONTWORK_PROPERTIES
CUSTOMSHAPE_PROPERTIES
{ OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{ OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
return aShapePropertyMap_Impl;
}
SfxItemPropertyMapEntry const * ImplGetSvxTextShapePropertyMap()
{
static SfxItemPropertyMapEntry const aTextShapePropertyMap_Impl[] =
{
EDGERADIUS_PROPERTIES
FILL_PROPERTIES
LINE_PROPERTIES
LINE_PROPERTIES_START_END
SHAPE_DESCRIPTOR_PROPERTIES
MISC_OBJ_PROPERTIES_NO_SHEAR
LINKTARGET_PROPERTIES
SHADOW_PROPERTIES
TEXT_PROPERTIES
// #FontWork#
FONTWORK_PROPERTIES
CUSTOMSHAPE_PROPERTIES
{ OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{ OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
return aTextShapePropertyMap_Impl;
}
SfxItemPropertyMapEntry const * ImplGetSvxConnectorPropertyMap()
{
static SfxItemPropertyMapEntry const aConnectorPropertyMap_Impl[] =
{
SPECIAL_CONNECTOR_PROPERTIES
EDGERADIUS_PROPERTIES
FILL_PROPERTIES
LINE_PROPERTIES
LINE_PROPERTIES_START_END
SHAPE_DESCRIPTOR_PROPERTIES
MISC_OBJ_PROPERTIES
LINKTARGET_PROPERTIES
SHADOW_PROPERTIES
TEXT_PROPERTIES
// #FontWork#
FONTWORK_PROPERTIES
{ OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{ OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
return aConnectorPropertyMap_Impl;
}
SfxItemPropertyMapEntry const * ImplGetSvxDimensioningPropertyMap()
{
static SfxItemPropertyMapEntry const aDimensioningPropertyMap_Impl[] =
{
SPECIAL_DIMENSIONING_PROPERTIES
EDGERADIUS_PROPERTIES
FILL_PROPERTIES
LINE_PROPERTIES
LINE_PROPERTIES_START_END
SHAPE_DESCRIPTOR_PROPERTIES
MISC_OBJ_PROPERTIES
LINKTARGET_PROPERTIES
SHADOW_PROPERTIES
TEXT_PROPERTIES
// #FontWork#
FONTWORK_PROPERTIES
{ OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{ OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
return aDimensioningPropertyMap_Impl;
}
SfxItemPropertyMapEntry const * ImplGetSvxCirclePropertyMap()
{
static SfxItemPropertyMapEntry const aCirclePropertyMap_Impl[] =
{
SPECIAL_CIRCLE_PROPERTIES
EDGERADIUS_PROPERTIES
FILL_PROPERTIES
LINE_PROPERTIES
LINE_PROPERTIES_START_END
SHAPE_DESCRIPTOR_PROPERTIES
MISC_OBJ_PROPERTIES
LINKTARGET_PROPERTIES
SHADOW_PROPERTIES
TEXT_PROPERTIES
// #FontWork#
FONTWORK_PROPERTIES
CUSTOMSHAPE_PROPERTIES
{ OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{ OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
return aCirclePropertyMap_Impl;
}
SfxItemPropertyMapEntry const * ImplGetSvxPolyPolygonPropertyMap()
{
static SfxItemPropertyMapEntry const aPolyPolygonPropertyMap_Impl[] =
{
{ OUString("Geometry"), OWN_ATTR_BASE_GEOMETRY, cppu::UnoType<css::drawing::PointSequenceSequence>::get(), 0, 0 },
SPECIAL_POLYGON_PROPERTIES
SPECIAL_POLYPOLYGON_PROPERTIES
FILL_PROPERTIES
LINE_PROPERTIES
LINE_PROPERTIES_START_END
SHAPE_DESCRIPTOR_PROPERTIES
MISC_OBJ_PROPERTIES
LINKTARGET_PROPERTIES
SHADOW_PROPERTIES
TEXT_PROPERTIES
// #FontWork#
FONTWORK_PROPERTIES
CUSTOMSHAPE_PROPERTIES
{ OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{ OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
return aPolyPolygonPropertyMap_Impl;
}
SfxItemPropertyMapEntry const * ImplGetSvxPolyPolygonBezierPropertyMap()
{
static SfxItemPropertyMapEntry const aPolyPolygonBezierPropertyMap_Impl[] =
{
{ OUString("Geometry"), OWN_ATTR_BASE_GEOMETRY, cppu::UnoType<css::drawing::PolyPolygonBezierCoords>::get(), 0, 0 },
SPECIAL_POLYGON_PROPERTIES
SPECIAL_POLYPOLYGONBEZIER_PROPERTIES
FILL_PROPERTIES
LINE_PROPERTIES
LINE_PROPERTIES_START_END
SHAPE_DESCRIPTOR_PROPERTIES
MISC_OBJ_PROPERTIES
LINKTARGET_PROPERTIES
SHADOW_PROPERTIES
TEXT_PROPERTIES
// #FontWork#
FONTWORK_PROPERTIES
CUSTOMSHAPE_PROPERTIES
{ OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{ OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
return aPolyPolygonBezierPropertyMap_Impl;
}
SfxItemPropertyMapEntry const * ImplGetSvxGraphicObjectPropertyMap()
{
static SfxItemPropertyMapEntry const aGraphicObjectPropertyMap_Impl[] =
{
SPECIAL_GRAPHOBJ_PROPERTIES
// #i25616#
FILL_PROPERTIES
LINE_PROPERTIES
LINE_PROPERTIES_START_END
SHAPE_DESCRIPTOR_PROPERTIES
// #i118485# Full properties now, shear included
MISC_OBJ_PROPERTIES
LINKTARGET_PROPERTIES
SHADOW_PROPERTIES
TEXT_PROPERTIES
// #FontWork#
FONTWORK_PROPERTIES
{ OUString("IsMirrored"), OWN_ATTR_MIRRORED, cppu::UnoType<bool>::get(), 0, 0},
{ OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{ OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{ OUString("GraphicStream"), OWN_ATTR_GRAPHIC_STREAM, cppu::UnoType<css::io::XInputStream>::get(), css::beans::PropertyAttribute::READONLY, 0},
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
return aGraphicObjectPropertyMap_Impl;
}
SfxItemPropertyMapEntry const * ImplGetSvx3DSceneObjectPropertyMap()
{
static SfxItemPropertyMapEntry const a3DSceneObjectPropertyMap_Impl[] =
{
SPECIAL_3DSCENEOBJECT_PROPERTIES
FILL_PROPERTIES
LINE_PROPERTIES
LINE_PROPERTIES_START_END
SHAPE_DESCRIPTOR_PROPERTIES
MISC_OBJ_PROPERTIES
LINKTARGET_PROPERTIES
SHADOW_PROPERTIES
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
return a3DSceneObjectPropertyMap_Impl;
}
SfxItemPropertyMapEntry const * ImplGetSvx3DCubeObjectPropertyMap()
{
static SfxItemPropertyMapEntry const a3DCubeObjectPropertyMap_Impl[] =
{
SPECIAL_3DCUBEOBJECT_PROPERTIES
MISC_3D_OBJ_PROPERTIES
FILL_PROPERTIES
LINE_PROPERTIES
LINE_PROPERTIES_START_END
SHAPE_DESCRIPTOR_PROPERTIES
MISC_OBJ_PROPERTIES
LINKTARGET_PROPERTIES
SHADOW_PROPERTIES
{ OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{ OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
return a3DCubeObjectPropertyMap_Impl;
}
SfxItemPropertyMapEntry const * ImplGetSvx3DSphereObjectPropertyMap()
{
static SfxItemPropertyMapEntry const a3DSphereObjectPropertyMap_Impl[] =
{
SPECIAL_3DSPHEREOBJECT_PROPERTIES
MISC_3D_OBJ_PROPERTIES
FILL_PROPERTIES
LINE_PROPERTIES
LINE_PROPERTIES_START_END
SHAPE_DESCRIPTOR_PROPERTIES
MISC_OBJ_PROPERTIES
LINKTARGET_PROPERTIES
SHADOW_PROPERTIES
{ OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{ OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
return a3DSphereObjectPropertyMap_Impl;
}
SfxItemPropertyMapEntry const * ImplGetSvx3DLatheObjectPropertyMap()
{
static SfxItemPropertyMapEntry const a3DLatheObjectPropertyMap_Impl[] =
{
SPECIAL_3DLATHEOBJECT_PROPERTIES
// #107245# New 3D properties which are possible for lathe and extrude 3d objects
SPECIAL_3DLATHEANDEXTRUDEOBJ_PROPERTIES
SPECIAL_3DBACKSCALE_PROPERTIES
MISC_3D_OBJ_PROPERTIES
FILL_PROPERTIES
LINE_PROPERTIES
LINE_PROPERTIES_START_END
SHAPE_DESCRIPTOR_PROPERTIES
MISC_OBJ_PROPERTIES
LINKTARGET_PROPERTIES
SHADOW_PROPERTIES
{ OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{ OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
return a3DLatheObjectPropertyMap_Impl;
}
SfxItemPropertyMapEntry const * ImplGetSvx3DExtrudeObjectPropertyMap()
{
static SfxItemPropertyMapEntry const a3DExtrudeObjectPropertyMap_Impl[] =
{
SPECIAL_3DEXTRUDEOBJECT_PROPERTIES
// #107245# New 3D properties which are possible for lathe and extrude 3d objects
SPECIAL_3DLATHEANDEXTRUDEOBJ_PROPERTIES
SPECIAL_3DBACKSCALE_PROPERTIES
MISC_3D_OBJ_PROPERTIES
FILL_PROPERTIES
LINE_PROPERTIES
LINE_PROPERTIES_START_END
SHAPE_DESCRIPTOR_PROPERTIES
MISC_OBJ_PROPERTIES
LINKTARGET_PROPERTIES
SHADOW_PROPERTIES
{ OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{ OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
return a3DExtrudeObjectPropertyMap_Impl;
}
SfxItemPropertyMapEntry const * ImplGetSvx3DPolygonObjectPropertyMap()
{
static SfxItemPropertyMapEntry const a3DPolygonObjectPropertyMap_Impl[] =
{
SPECIAL_3DPOLYGONOBJECT_PROPERTIES
MISC_3D_OBJ_PROPERTIES
FILL_PROPERTIES
LINE_PROPERTIES
LINE_PROPERTIES_START_END
SHAPE_DESCRIPTOR_PROPERTIES
MISC_OBJ_PROPERTIES
LINKTARGET_PROPERTIES
SHADOW_PROPERTIES
{ OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{ OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
return a3DPolygonObjectPropertyMap_Impl;
}
SfxItemPropertyMapEntry const * ImplGetSvxAllPropertyMap()
{
static SfxItemPropertyMapEntry const aAllPropertyMap_Impl[] =
{
SHADOW_PROPERTIES
LINE_PROPERTIES
LINE_PROPERTIES_START_END
FILL_PROPERTIES
EDGERADIUS_PROPERTIES
TEXT_PROPERTIES
// #FontWork#
FONTWORK_PROPERTIES
SHAPE_DESCRIPTOR_PROPERTIES
MISC_OBJ_PROPERTIES
LINKTARGET_PROPERTIES
SPECIAL_CONNECTOR_PROPERTIES
SPECIAL_DIMENSIONING_PROPERTIES
SPECIAL_CIRCLE_PROPERTIES
SPECIAL_POLYGON_PROPERTIES
SPECIAL_POLYPOLYGON_PROPERTIES
SPECIAL_POLYPOLYGONBEZIER_PROPERTIES
SPECIAL_GRAPHOBJ_PROPERTIES
SPECIAL_3DSCENEOBJECT_PROPERTIES
MISC_3D_OBJ_PROPERTIES
SPECIAL_3DCUBEOBJECT_PROPERTIES
SPECIAL_3DSPHEREOBJECT_PROPERTIES
SPECIAL_3DLATHEOBJECT_PROPERTIES
SPECIAL_3DEXTRUDEOBJECT_PROPERTIES
// #107245# New 3D properties which are possible for lathe and extrude 3d objects
SPECIAL_3DLATHEANDEXTRUDEOBJ_PROPERTIES
SPECIAL_3DBACKSCALE_PROPERTIES
SPECIAL_3DPOLYGONOBJECT_PROPERTIES
CUSTOMSHAPE_PROPERTIES
{ OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{ OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
return aAllPropertyMap_Impl;
}
SfxItemPropertyMapEntry const * ImplGetSvxGroupPropertyMap()
{
static SfxItemPropertyMapEntry const aGroupPropertyMap_Impl[] =
{
SHAPE_DESCRIPTOR_PROPERTIES
MISC_OBJ_PROPERTIES
LINKTARGET_PROPERTIES
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
return aGroupPropertyMap_Impl;
}
SfxItemPropertyMapEntry const * ImplGetSvxOle2PropertyMap()
{
static SfxItemPropertyMapEntry const aOle2PropertyMap_Impl[] =
{
// #i118485# Adding properties for line, fill, text, shadow, fontwork, rotate, shear
FILL_PROPERTIES
LINE_PROPERTIES
LINE_PROPERTIES_START_END
SHAPE_DESCRIPTOR_PROPERTIES
MISC_OBJ_PROPERTIES
LINKTARGET_PROPERTIES
SHADOW_PROPERTIES
TEXT_PROPERTIES
FONTWORK_PROPERTIES
{ OUString("ThumbnailGraphicURL"), OWN_ATTR_THUMBNAIL , cppu::UnoType<OUString>::get(), 0, 0 },
{ OUString("Model"), OWN_ATTR_OLEMODEL , cppu::UnoType<css::frame::XModel>::get(), css::beans::PropertyAttribute::READONLY, 0},
{ OUString("EmbeddedObject"), OWN_ATTR_OLE_EMBEDDED_OBJECT, cppu::UnoType<css::embed::XEmbeddedObject>::get(), css::beans::PropertyAttribute::READONLY, 0},
{ OUString("EmbeddedObjectNoNewClient"),OWN_ATTR_OLE_EMBEDDED_OBJECT_NONEWCLIENT, cppu::UnoType<css::embed::XEmbeddedObject>::get(), css::beans::PropertyAttribute::READONLY, 0},
{ OUString("OriginalSize"), OWN_ATTR_OLESIZE , cppu::UnoType<css::awt::Size>::get(), css::beans::PropertyAttribute::READONLY, 0},
{ OUString("CLSID"), OWN_ATTR_CLSID , cppu::UnoType<OUString>::get(), 0, 0 },
{ OUString("IsInternal"), OWN_ATTR_INTERNAL_OLE , cppu::UnoType<bool>::get() , css::beans::PropertyAttribute::READONLY, 0},
{ OUString("VisibleArea"), OWN_ATTR_OLE_VISAREA , cppu::UnoType<css::awt::Rectangle>::get(), 0, 0},
{ OUString("Aspect"), OWN_ATTR_OLE_ASPECT , cppu::UnoType<sal_Int64>::get(), 0, 0},
{ OUString(UNO_NAME_OLE2_PERSISTNAME), OWN_ATTR_PERSISTNAME , cppu::UnoType<OUString>::get(), 0, 0 },
{ OUString("LinkURL"), OWN_ATTR_OLE_LINKURL , cppu::UnoType<OUString>::get(), 0, 0 },
{ OUString(UNO_NAME_GRAPHOBJ_GRAPHIC), OWN_ATTR_VALUE_GRAPHIC , cppu::UnoType<css::graphic::XGraphic>::get(), 0, 0},
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
return aOle2PropertyMap_Impl;
}
SfxItemPropertyMapEntry const * ImplGetSvxPluginPropertyMap()
{
static SfxItemPropertyMapEntry const aPluginPropertyMap_Impl[] =
{
{ OUString("PluginMimeType"), OWN_ATTR_PLUGIN_MIMETYPE , cppu::UnoType<OUString>::get(), 0, 0},
{ OUString("PluginURL"), OWN_ATTR_PLUGIN_URL , cppu::UnoType<OUString>::get(), 0, 0},
{ OUString("PluginCommands"), OWN_ATTR_PLUGIN_COMMANDS , cppu::UnoType<css::uno::Sequence< css::beans::PropertyValue >>::get(), 0, 0},
{ OUString("Transformation"), OWN_ATTR_TRANSFORMATION , cppu::UnoType<css::drawing::HomogenMatrix3>::get(), 0, 0 },
{ OUString(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER , cppu::UnoType<sal_Int32>::get(), 0, 0},
{ OUString(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID , cppu::UnoType<sal_Int16>::get(), 0, 0},
{ OUString(UNO_NAME_MISC_OBJ_LAYERNAME),SDRATTR_LAYERNAME , cppu::UnoType<OUString>::get(), 0, 0},
{ OUString(UNO_NAME_LINKDISPLAYBITMAP), OWN_ATTR_LDBITMAP , cppu::UnoType<css::awt::XBitmap>::get(), css::beans::PropertyAttribute::READONLY, 0},
{ OUString(UNO_NAME_LINKDISPLAYNAME), OWN_ATTR_LDNAME , cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY, 0},
{ OUString(UNO_NAME_OLE2_METAFILE), OWN_ATTR_METAFILE , cppu::UnoType<css::uno::Sequence<sal_Int8>>::get(), css::beans::PropertyAttribute::READONLY, 0},
{ OUString("ThumbnailGraphicURL"), OWN_ATTR_THUMBNAIL , cppu::UnoType<OUString>::get(), 0, 0 },
{ OUString(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, cppu::UnoType<bool>::get(),0, 0},
{ OUString(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, cppu::UnoType<bool>::get(),0, 0},
{ OUString(UNO_NAME_OLE2_PERSISTNAME), OWN_ATTR_PERSISTNAME , cppu::UnoType<OUString>::get(), 0, 0 },
{ OUString("LinkURL"), OWN_ATTR_OLE_LINKURL , cppu::UnoType<OUString>::get(), 0, 0 },
{ OUString(UNO_NAME_MISC_OBJ_BOUNDRECT), OWN_ATTR_BOUNDRECT, cppu::UnoType<css::awt::Rectangle>::get(), css::beans::PropertyAttribute::READONLY, 0},
{ OUString("VisibleArea"), OWN_ATTR_OLE_VISAREA , cppu::UnoType<css::awt::Rectangle>::get(), 0, 0},
// #i68101#
{ OUString(UNO_NAME_MISC_OBJ_TITLE), OWN_ATTR_MISC_OBJ_TITLE , cppu::UnoType<OUString>::get(), 0, 0},
{ OUString(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , cppu::UnoType<OUString>::get(), 0, 0},
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
return aPluginPropertyMap_Impl;
}
SfxItemPropertyMapEntry const * ImplGetSvxFramePropertyMap()
{
//TODO/LATER: new properties for ScrollingMode and DefaultBorder
static SfxItemPropertyMapEntry const aFramePropertyMap_Impl[] =
{
{ OUString("FrameURL"), OWN_ATTR_FRAME_URL , cppu::UnoType<OUString>::get(), 0, 0},
{ OUString("FrameName"), OWN_ATTR_FRAME_NAME , cppu::UnoType<OUString>::get(), 0, 0},
{ OUString("FrameIsAutoScroll"), OWN_ATTR_FRAME_ISAUTOSCROLL , cppu::UnoType<bool>::get() , css::beans::PropertyAttribute::MAYBEVOID, 0},
{ OUString("FrameIsBorder"), OWN_ATTR_FRAME_ISBORDER , cppu::UnoType<bool>::get() , 0, 0},
{ OUString("FrameMarginWidth"), OWN_ATTR_FRAME_MARGIN_WIDTH , cppu::UnoType<sal_Int32>::get(), 0, 0},
{ OUString("FrameMarginHeight"), OWN_ATTR_FRAME_MARGIN_HEIGHT, cppu::UnoType<sal_Int32>::get(), 0, 0},
{ OUString("Transformation"), OWN_ATTR_TRANSFORMATION , cppu::UnoType<css::drawing::HomogenMatrix3>::get(), 0, 0 },
{ OUString(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER , cppu::UnoType<sal_Int32>::get(), 0, 0},
{ OUString(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID , cppu::UnoType<sal_Int16>::get(), 0, 0},
{ OUString(UNO_NAME_MISC_OBJ_LAYERNAME),SDRATTR_LAYERNAME , cppu::UnoType<OUString>::get(), 0, 0},
{ OUString(UNO_NAME_LINKDISPLAYBITMAP), OWN_ATTR_LDBITMAP , cppu::UnoType<css::awt::XBitmap>::get(), css::beans::PropertyAttribute::READONLY, 0},
{ OUString(UNO_NAME_LINKDISPLAYNAME), OWN_ATTR_LDNAME , cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY, 0},
{ OUString(UNO_NAME_OLE2_METAFILE), OWN_ATTR_METAFILE , cppu::UnoType<css::uno::Sequence<sal_Int8>>::get(), css::beans::PropertyAttribute::READONLY, 0},
{ OUString("ThumbnailGraphicURL"), OWN_ATTR_THUMBNAIL , cppu::UnoType<OUString>::get(), 0, 0 },
{ OUString(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, cppu::UnoType<bool>::get(),0, 0},
{ OUString(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, cppu::UnoType<bool>::get(),0, 0},
{ OUString(UNO_NAME_OLE2_PERSISTNAME), OWN_ATTR_PERSISTNAME , cppu::UnoType<OUString>::get(), 0, 0 },
{ OUString("LinkURL"), OWN_ATTR_OLE_LINKURL , cppu::UnoType<OUString>::get(), 0, 0 },
{ OUString(UNO_NAME_MISC_OBJ_BOUNDRECT), OWN_ATTR_BOUNDRECT, cppu::UnoType<css::awt::Rectangle>::get(), css::beans::PropertyAttribute::READONLY, 0},
{ OUString("VisibleArea"), OWN_ATTR_OLE_VISAREA , cppu::UnoType<css::awt::Rectangle>::get(), 0, 0},
// #i68101#
{ OUString(UNO_NAME_MISC_OBJ_TITLE), OWN_ATTR_MISC_OBJ_TITLE , cppu::UnoType<OUString>::get(), 0, 0},
{ OUString(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , cppu::UnoType<OUString>::get(), 0, 0},
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
return aFramePropertyMap_Impl;
}
SfxItemPropertyMapEntry const * ImplGetSvxAppletPropertyMap()
{
static SfxItemPropertyMapEntry const aAppletPropertyMap_Impl[] =
{
{ OUString("AppletCodeBase"), OWN_ATTR_APPLET_CODEBASE , cppu::UnoType<OUString>::get(), 0, 0},
{ OUString("AppletName"), OWN_ATTR_APPLET_NAME , cppu::UnoType<OUString>::get(), 0, 0},
{ OUString("AppletCode"), OWN_ATTR_APPLET_CODE , cppu::UnoType<OUString>::get(), 0, 0},
{ OUString("AppletCommands"), OWN_ATTR_APPLET_COMMANDS , cppu::UnoType<css::uno::Sequence< css::beans::PropertyValue >>::get(), 0, 0},
{ OUString("AppletDocBase"), OWN_ATTR_APPLET_DOCBASE , cppu::UnoType<OUString>::get(), 0, 0},
{ OUString("AppletIsScript"), OWN_ATTR_APPLET_ISSCRIPT , cppu::UnoType<bool>::get(), 0, 0 },
{ OUString("Transformation"), OWN_ATTR_TRANSFORMATION , cppu::UnoType<css::drawing::HomogenMatrix3>::get(), 0, 0 },
{ OUString(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER , cppu::UnoType<sal_Int32>::get(), 0, 0},
{ OUString(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID , cppu::UnoType<sal_Int16>::get(), 0, 0},
{ OUString(UNO_NAME_MISC_OBJ_LAYERNAME),SDRATTR_LAYERNAME , cppu::UnoType<OUString>::get(), 0, 0},
{ OUString(UNO_NAME_LINKDISPLAYBITMAP), OWN_ATTR_LDBITMAP , cppu::UnoType<css::awt::XBitmap>::get(), css::beans::PropertyAttribute::READONLY, 0},
{ OUString(UNO_NAME_LINKDISPLAYNAME), OWN_ATTR_LDNAME , cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY, 0},
{ OUString(UNO_NAME_OLE2_METAFILE), OWN_ATTR_METAFILE , cppu::UnoType<css::uno::Sequence<sal_Int8>>::get(), css::beans::PropertyAttribute::READONLY, 0},
{ OUString("ThumbnailGraphicURL"), OWN_ATTR_THUMBNAIL , cppu::UnoType<OUString>::get(), 0, 0 },
{ OUString(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, cppu::UnoType<bool>::get(),0, 0},
{ OUString(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, cppu::UnoType<bool>::get(),0, 0},
{ OUString(UNO_NAME_OLE2_PERSISTNAME), OWN_ATTR_PERSISTNAME , cppu::UnoType<OUString>::get(), 0, 0 },
{ OUString("LinkURL"), OWN_ATTR_OLE_LINKURL , cppu::UnoType<OUString>::get(), 0, 0 },
{ OUString(UNO_NAME_MISC_OBJ_BOUNDRECT), OWN_ATTR_BOUNDRECT, cppu::UnoType<css::awt::Rectangle>::get(), css::beans::PropertyAttribute::READONLY, 0},
{ OUString("VisibleArea"), OWN_ATTR_OLE_VISAREA , cppu::UnoType<css::awt::Rectangle>::get(), 0, 0},
// #i68101#
{ OUString(UNO_NAME_MISC_OBJ_TITLE), OWN_ATTR_MISC_OBJ_TITLE , cppu::UnoType<OUString>::get(), 0, 0},
{ OUString(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , cppu::UnoType<OUString>::get(), 0, 0},
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
return aAppletPropertyMap_Impl;
}
SfxItemPropertyMapEntry const * ImplGetSvxControlShapePropertyMap()
{
static SfxItemPropertyMapEntry const aControlPropertyMap_Impl[] =
{
// the following properties are mapped to the XControl Model of this shape
{ OUString(UNO_NAME_EDIT_CHAR_FONTNAME), 0, cppu::UnoType<OUString>::get(), 0, 0 },
{ OUString(UNO_NAME_EDIT_CHAR_FONTSTYLENAME), 0, cppu::UnoType<OUString>::get(), 0, 0 },
{ OUString(UNO_NAME_EDIT_CHAR_FONTFAMILY), 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
{ OUString(UNO_NAME_EDIT_CHAR_FONTCHARSET), 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
{ OUString(UNO_NAME_EDIT_CHAR_HEIGHT), 0, cppu::UnoType<float>::get(), 0, 0 },
{ OUString(UNO_NAME_EDIT_CHAR_FONTPITCH), 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
{ OUString(UNO_NAME_EDIT_CHAR_POSTURE), 0, cppu::UnoType<css::awt::FontSlant>::get(),0, 0 },
{ OUString(UNO_NAME_EDIT_CHAR_WEIGHT), 0, cppu::UnoType<float>::get(), 0, 0 },
{ OUString(UNO_NAME_EDIT_CHAR_UNDERLINE), 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
{ OUString(UNO_NAME_EDIT_CHAR_STRIKEOUT), 0, cppu::UnoType<sal_Int16>::get(), 0, 0},
{ OUString(UNO_NAME_EDIT_CHAR_CASEMAP), 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
{ OUString(UNO_NAME_EDIT_CHAR_COLOR), 0, cppu::UnoType<sal_Int32>::get(), 0, 0 },
{ OUString("CharBackColor"), 0, cppu::UnoType<sal_Int32>::get(), 0, 0 },
{ OUString("CharBackTransparent"), 0, cppu::UnoType<bool>::get(), 0, 0 },
{ OUString("CharRelief"), 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
{ OUString("CharUnderlineColor"), 0, cppu::UnoType<sal_Int32>::get(), 0, 0 },
{ OUString("CharKerning"), 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
{ OUString("CharWordMode"), 0, cppu::UnoType<bool>::get(), 0, 0 },
{ OUString(UNO_NAME_EDIT_PARA_ADJUST), 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
{ OUString("TextVerticalAdjust"), 0, cppu::UnoType<TextVerticalAdjust>::get(), MAYBEVOID, 0 },
{ OUString("ControlBackground"), 0, cppu::UnoType<sal_Int32>::get(), 0, 0 },
{ OUString("ControlBorder"), 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
{ OUString("ControlBorderColor"), 0, cppu::UnoType<sal_Int32>::get(), 0, 0 },
{ OUString("ControlSymbolColor"), 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
{ OUString("ImageScaleMode"), 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
{ OUString(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, cppu::UnoType<bool>::get(),0, 0},
{ OUString(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, cppu::UnoType<bool>::get(),0, 0},
{ OUString("ControlTextEmphasis"), 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
{ OUString("ControlWritingMode"), 0, cppu::UnoType< sal_Int16 >::get(), 0, 0},
// the following properties are handled by SvxShape
{ OUString("Transformation"), OWN_ATTR_TRANSFORMATION , cppu::UnoType<css::drawing::HomogenMatrix3>::get(), 0, 0 },
{ OUString(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER , cppu::UnoType<sal_Int32>::get(), 0, 0},
{ OUString(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID , cppu::UnoType<sal_Int16>::get(), 0, 0},
{ OUString(UNO_NAME_MISC_OBJ_LAYERNAME),SDRATTR_LAYERNAME , cppu::UnoType<OUString>::get(), 0, 0},
{ OUString(UNO_NAME_LINKDISPLAYBITMAP), OWN_ATTR_LDBITMAP , cppu::UnoType<css::awt::XBitmap>::get(), css::beans::PropertyAttribute::READONLY, 0},
{ OUString(UNO_NAME_LINKDISPLAYNAME), OWN_ATTR_LDNAME , cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY, 0},
{ OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{ OUString(UNO_NAME_MISC_OBJ_BOUNDRECT), OWN_ATTR_BOUNDRECT, cppu::UnoType<css::awt::Rectangle>::get(), css::beans::PropertyAttribute::READONLY, 0},
// #i68101#
{ OUString(UNO_NAME_MISC_OBJ_TITLE), OWN_ATTR_MISC_OBJ_TITLE , cppu::UnoType<OUString>::get(), 0, 0},
{ OUString(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , cppu::UnoType<OUString>::get(), 0, 0},
// #i112587#
{ OUString(UNO_NAME_MISC_OBJ_PRINTABLE), SDRATTR_OBJPRINTABLE , cppu::UnoType<bool>::get(), 0, 0},
{ OUString("Visible"), SDRATTR_OBJVISIBLE , cppu::UnoType<bool>::get(), 0, 0},
{ OUString(UNO_NAME_MISC_OBJ_INTEROPGRABBAG), OWN_ATTR_INTEROPGRABBAG, cppu::UnoType<css::uno::Sequence< css::beans::PropertyValue >>::get(), 0, 0},
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
return aControlPropertyMap_Impl;
}
SfxItemPropertyMapEntry const * ImplGetSvxPageShapePropertyMap()
{
static SfxItemPropertyMapEntry const aPageShapePropertyMap_Impl[] =
{
{ OUString("PageNumber"), OWN_ATTR_PAGE_NUMBER , cppu::UnoType<sal_Int32>::get(), 0, 0},
{ OUString("Transformation"), OWN_ATTR_TRANSFORMATION , cppu::UnoType<css::drawing::HomogenMatrix3>::get(), 0, 0 },
{ OUString(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER , cppu::UnoType<sal_Int32>::get(), 0, 0},
{ OUString(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID , cppu::UnoType<sal_Int16>::get(), 0, 0},
{ OUString(UNO_NAME_MISC_OBJ_LAYERNAME),SDRATTR_LAYERNAME , cppu::UnoType<OUString>::get(), 0, 0},
{ OUString(UNO_NAME_LINKDISPLAYBITMAP), OWN_ATTR_LDBITMAP , cppu::UnoType<css::awt::XBitmap>::get(), css::beans::PropertyAttribute::READONLY, 0},
{ OUString(UNO_NAME_LINKDISPLAYNAME), OWN_ATTR_LDNAME , cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY, 0},
{ OUString(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, cppu::UnoType<bool>::get(),0, 0},
{ OUString(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, cppu::UnoType<bool>::get(),0, 0},
{ OUString(UNO_NAME_MISC_OBJ_BOUNDRECT), OWN_ATTR_BOUNDRECT, cppu::UnoType<css::awt::Rectangle>::get(), css::beans::PropertyAttribute::READONLY, 0},
// #i68101#
{ OUString(UNO_NAME_MISC_OBJ_TITLE), OWN_ATTR_MISC_OBJ_TITLE , cppu::UnoType<OUString>::get(), 0, 0},
{ OUString(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , cppu::UnoType<OUString>::get(), 0, 0},
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
return aPageShapePropertyMap_Impl;
}
SfxItemPropertyMapEntry const * ImplGetSvxCaptionPropertyMap()
{
static SfxItemPropertyMapEntry const aCaptionPropertyMap_Impl[] =
{
{ OUString("CaptionPoint"), OWN_ATTR_CAPTION_POINT, cppu::UnoType<css::awt::Point>::get(), 0, 0 },
{ OUString("CaptionType"), SDRATTR_CAPTIONTYPE, cppu::UnoType<sal_Int16>::get(), 0, 0},
{ OUString("CaptionIsFixedAngle"), SDRATTR_CAPTIONFIXEDANGLE, cppu::UnoType<bool>::get(), 0, 0},
{ OUString("CaptionAngle"), SDRATTR_CAPTIONANGLE, cppu::UnoType<sal_Int32>::get(), 0, 0},
{ OUString("CaptionGap"), SDRATTR_CAPTIONGAP, cppu::UnoType<sal_Int32>::get(), 0, SFX_METRIC_ITEM},
{ OUString("CaptionEscapeDirection"), SDRATTR_CAPTIONESCDIR, cppu::UnoType<sal_Int32>::get(), 0, 0},
{ OUString("CaptionIsEscapeRelative"), SDRATTR_CAPTIONESCISREL, cppu::UnoType<bool>::get(), 0, 0},
{ OUString("CaptionEscapeRelative"), SDRATTR_CAPTIONESCREL, cppu::UnoType<sal_Int32>::get(), 0, 0},
{ OUString("CaptionEscapeAbsolute"), SDRATTR_CAPTIONESCABS, cppu::UnoType<sal_Int32>::get(), 0, SFX_METRIC_ITEM},
{ OUString("CaptionLineLength"), SDRATTR_CAPTIONLINELEN, cppu::UnoType<sal_Int32>::get(), 0, SFX_METRIC_ITEM},
{ OUString("CaptionIsFitLineLength"), SDRATTR_CAPTIONFITLINELEN, cppu::UnoType<bool>::get(), 0, 0},
EDGERADIUS_PROPERTIES
FILL_PROPERTIES
LINE_PROPERTIES
LINE_PROPERTIES_START_END
SHAPE_DESCRIPTOR_PROPERTIES
MISC_OBJ_PROPERTIES
LINKTARGET_PROPERTIES
SHADOW_PROPERTIES
TEXT_PROPERTIES
// #FontWork#
FONTWORK_PROPERTIES
{ OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
return aCaptionPropertyMap_Impl;
}
SfxItemPropertyMapEntry const * ImplGetSvxCustomShapePropertyMap()
{
static SfxItemPropertyMapEntry const aCustomShapePropertyMap_Impl[] =
{
{ OUString("CustomShapeEngine"), SDRATTR_CUSTOMSHAPE_ENGINE, cppu::UnoType<OUString>::get(), 0, 0 },
{ OUString("CustomShapeData"), SDRATTR_CUSTOMSHAPE_DATA, cppu::UnoType<OUString>::get(), 0, 0 },
{ OUString("CustomShapeGeometry"), SDRATTR_CUSTOMSHAPE_GEOMETRY,
cppu::UnoType<css::uno::Sequence< css::beans::PropertyValue >>::get(), 0, 0 },
{ OUString("CustomShapeGraphicURL"), SDRATTR_CUSTOMSHAPE_REPLACEMENT_URL, cppu::UnoType<OUString>::get(), 0, 0},
CUSTOMSHAPE_PROPERTIES
FILL_PROPERTIES
LINE_PROPERTIES
LINE_PROPERTIES_START_END
SHAPE_DESCRIPTOR_PROPERTIES
MISC_OBJ_PROPERTIES
LINKTARGET_PROPERTIES
SHADOW_PROPERTIES
TEXT_PROPERTIES
{OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
return aCustomShapePropertyMap_Impl;
}
SfxItemPropertyMapEntry const * ImplGetSvxMediaShapePropertyMap()
{
static SfxItemPropertyMapEntry const aMediaShapePropertyMap_Impl[] =
{
{ OUString(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER, cppu::UnoType<sal_Int32>::get(), 0, 0},
{ OUString(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID, cppu::UnoType<sal_Int16>::get(), 0, 0},
{ OUString(UNO_NAME_MISC_OBJ_LAYERNAME), SDRATTR_LAYERNAME, cppu::UnoType<OUString>::get(), 0, 0},
{ OUString(UNO_NAME_LINKDISPLAYBITMAP), OWN_ATTR_LDBITMAP, cppu::UnoType<css::awt::XBitmap>::get(), css::beans::PropertyAttribute::READONLY, 0},
{ OUString(UNO_NAME_LINKDISPLAYNAME), OWN_ATTR_LDNAME, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY, 0},
{ OUString("Transformation"), OWN_ATTR_TRANSFORMATION, cppu::UnoType<css::drawing::HomogenMatrix3>::get(), 0, 0 },
{ OUString("MediaURL"), OWN_ATTR_MEDIA_URL, cppu::UnoType<OUString>::get(), 0, 0},
{ OUString("PreferredSize"), OWN_ATTR_MEDIA_PREFERREDSIZE, cppu::UnoType<css::awt::Size>::get(), css::beans::PropertyAttribute::READONLY, 0},
{ OUString("Loop"), OWN_ATTR_MEDIA_LOOP, cppu::UnoType<sal_Bool>::get(), 0, 0},
{ OUString("Mute"), OWN_ATTR_MEDIA_MUTE, cppu::UnoType<sal_Bool>::get(), 0, 0},
{ OUString("VolumeDB"), OWN_ATTR_MEDIA_VOLUMEDB, cppu::UnoType<sal_Int16>::get(), 0, 0},
{ OUString("Zoom"), OWN_ATTR_MEDIA_ZOOM, cppu::UnoType<css::media::ZoomLevel>::get(), 0, 0},
{ OUString(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, cppu::UnoType<bool>::get(),0, 0},
{ OUString(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, cppu::UnoType<bool>::get(),0, 0},
{ OUString(UNO_NAME_MISC_OBJ_BOUNDRECT), OWN_ATTR_BOUNDRECT, cppu::UnoType<css::awt::Rectangle>::get(), css::beans::PropertyAttribute::READONLY, 0},
// #i68101#
{ OUString(UNO_NAME_MISC_OBJ_TITLE), OWN_ATTR_MISC_OBJ_TITLE , cppu::UnoType<OUString>::get(), 0, 0},
{ OUString(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , cppu::UnoType<OUString>::get(), 0, 0},
{OUString("PrivateStream"), OWN_ATTR_MEDIA_STREAM, cppu::UnoType<css::io::XInputStream>::get(), 0, 0},
{OUString("PrivateTempFileURL"), OWN_ATTR_MEDIA_TEMPFILEURL, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY, 0},
{ OUString("MediaMimeType"), OWN_ATTR_MEDIA_MIMETYPE, cppu::UnoType<OUString>::get(), 0, 0},
{ OUString("FallbackGraphic"), OWN_ATTR_FALLBACK_GRAPHIC, cppu::UnoType<css::graphic::XGraphic>::get(), css::beans::PropertyAttribute::READONLY, 0},
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
return aMediaShapePropertyMap_Impl;
}
SfxItemPropertyMapEntry const * ImplGetSvxTableShapePropertyMap()
{
static SfxItemPropertyMapEntry const aTableShapePropertyMap_Impl[] =
{
{ OUString(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER, cppu::UnoType<sal_Int32>::get(), 0, 0},
{ OUString(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID, cppu::UnoType<sal_Int16>::get(), 0, 0},
{ OUString(UNO_NAME_MISC_OBJ_LAYERNAME), SDRATTR_LAYERNAME, cppu::UnoType<OUString>::get(), 0, 0},
{ OUString(UNO_NAME_LINKDISPLAYBITMAP), OWN_ATTR_LDBITMAP, cppu::UnoType<css::awt::XBitmap>::get(), css::beans::PropertyAttribute::READONLY, 0},
{ OUString(UNO_NAME_LINKDISPLAYNAME), OWN_ATTR_LDNAME, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY, 0},
{ OUString("Transformation"), OWN_ATTR_TRANSFORMATION, cppu::UnoType<css::drawing::HomogenMatrix3>::get(), 0, 0 },
{ OUString(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, cppu::UnoType<bool>::get(),0, 0},
{ OUString(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, cppu::UnoType<bool>::get(),0, 0},
{ OUString(UNO_NAME_MISC_OBJ_BOUNDRECT), OWN_ATTR_BOUNDRECT, cppu::UnoType<css::awt::Rectangle>::get(), css::beans::PropertyAttribute::READONLY, 0},
{ OUString(UNO_NAME_MISC_OBJ_NAME), SDRATTR_OBJECTNAME, cppu::UnoType<rtl::OUString>::get(), 0, 0},
{ OUString(UNO_NAME_MISC_OBJ_TITLE), OWN_ATTR_MISC_OBJ_TITLE , cppu::UnoType<OUString>::get(), 0, 0},
{ OUString(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , cppu::UnoType<OUString>::get(), 0, 0},
{ OUString("Model"), OWN_ATTR_OLEMODEL , cppu::UnoType<css::table::XTable>::get(), css::beans::PropertyAttribute::READONLY, 0},
{ OUString("TableTemplate"), OWN_ATTR_TABLETEMPLATE , cppu::UnoType<css::container::XIndexAccess>::get(), 0, 0},
{ OUString("UseFirstRowStyle"), OWN_ATTR_TABLETEMPLATE_FIRSTROW, cppu::UnoType<bool>::get(),0, 0},
{ OUString("UseLastRowStyle"), OWN_ATTR_TABLETEMPLATE_LASTROW, cppu::UnoType<bool>::get(),0, 0},
{ OUString("UseFirstColumnStyle"), OWN_ATTR_TABLETEMPLATE_FIRSTCOLUMN, cppu::UnoType<bool>::get(),0, 0},
{ OUString("UseLastColumnStyle"), OWN_ATTR_TABLETEMPLATE_LASTCOLUMN, cppu::UnoType<bool>::get(),0, 0},
{ OUString("UseBandingRowStyle"), OWN_ATTR_TABLETEMPLATE_BANDINGROWS, cppu::UnoType<bool>::get(),0, 0},
{ OUString("UseBandingColumnStyle"), OWN_ATTR_TABLETEMPLATE_BANDINGCOULUMNS, cppu::UnoType<bool>::get(),0, 0},
{ OUString("ReplacementGraphic"), OWN_ATTR_BITMAP, cppu::UnoType<css::graphic::XGraphic>::get(), css::beans::PropertyAttribute::READONLY, 0},
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
return aTableShapePropertyMap_Impl;
}
comphelper::PropertyMapEntry const * ImplGetSvxDrawingDefaultsPropertyMap()
{
static comphelper::PropertyMapEntry const aSvxDrawingDefaultsPropertyMap_Impl[] =
{
SHADOW_PROPERTIES
LINE_PROPERTIES_DEFAULTS
FILL_PROPERTIES_BMP
FILL_PROPERTIES_DEFAULTS
EDGERADIUS_PROPERTIES
TEXT_PROPERTIES_DEFAULTS
CONNECTOR_PROPERTIES
SPECIAL_DIMENSIONING_PROPERTIES_DEFAULTS
MISC_3D_OBJ_PROPERTIES
SPECIAL_3DBACKSCALE_PROPERTIES
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
return aSvxDrawingDefaultsPropertyMap_Impl;
}
comphelper::PropertyMapEntry const * ImplGetAdditionalWriterDrawingDefaultsPropertyMap()
{
static comphelper::PropertyMapEntry const aSvxAdditionalDefaultsPropertyMap_Impl[] =
{
{ OUString("IsFollowingTextFlow"), SID_SW_FOLLOW_TEXT_FLOW, cppu::UnoType<bool>::get(), 0, 0},
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
return aSvxAdditionalDefaultsPropertyMap_Impl;
}
typedef std::unordered_map< OUString, sal_uInt32, OUStringHash > UHashMapImpl;
namespace {
const UHashMapImpl& GetUHashImpl()
{
static UHashMapImpl aImpl(63);
static bool bInited = false;
if (!bInited)
{
const struct { const char *name; sal_Int32 length; sal_uInt32 id; } aInit[] = {
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.RectangleShape"), OBJ_RECT },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.EllipseShape"), OBJ_CIRC },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.ControlShape"), OBJ_UNO },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.ConnectorShape"), OBJ_EDGE },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.MeasureShape"), OBJ_MEASURE },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.LineShape"), OBJ_LINE },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PolyPolygonShape"), OBJ_POLY },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PolyLineShape"), OBJ_PLIN },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.OpenBezierShape"), OBJ_PATHLINE },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.ClosedBezierShape"), OBJ_PATHFILL },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.OpenFreeHandShape"), OBJ_FREELINE },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.ClosedFreeHandShape"), OBJ_FREEFILL },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PolyPolygonPathShape"), OBJ_PATHPOLY },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PolyLinePathShape"), OBJ_PATHPLIN },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.GraphicObjectShape"), OBJ_GRAF },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.GroupShape"), OBJ_GRUP },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.TextShape"), OBJ_TEXT },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.OLE2Shape"), OBJ_OLE2 },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PageShape"), OBJ_PAGE },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.CaptionShape"), OBJ_CAPTION },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.FrameShape"), OBJ_FRAME },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PluginShape"), OBJ_OLE2_PLUGIN },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.AppletShape"), OBJ_OLE2_APPLET },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.CustomShape"), OBJ_CUSTOMSHAPE },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.MediaShape"), OBJ_MEDIA },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DSceneObject"), E3D_SCENE_ID | E3D_INVENTOR_FLAG },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DCubeObject"), E3D_CUBEOBJ_ID | E3D_INVENTOR_FLAG },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DSphereObject"), E3D_SPHEREOBJ_ID | E3D_INVENTOR_FLAG },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DLatheObject"), E3D_LATHEOBJ_ID | E3D_INVENTOR_FLAG },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DExtrudeObject"), E3D_EXTRUDEOBJ_ID | E3D_INVENTOR_FLAG },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DPolygonObject"), E3D_POLYGONOBJ_ID | E3D_INVENTOR_FLAG },
};
for (const auto& i : aInit)
aImpl[OUString( i.name, i.length, RTL_TEXTENCODING_ASCII_US ) ] = i.id;
bInited = true;
}
return aImpl;
}
}
OUString UHashMap::getNameFromId(sal_uInt32 nId)
{
const UHashMapImpl &rMap = GetUHashImpl();
for (UHashMapImpl::const_iterator it = rMap.begin(); it != rMap.end(); ++it)
{
if (it->second == nId)
return it->first;
}
OSL_FAIL("[CL] unknown SdrObject identifier");
return OUString();
}
uno::Sequence< OUString > UHashMap::getServiceNames()
{
return comphelper::mapKeysToSequence( GetUHashImpl() );
}
sal_uInt32 UHashMap::getId( const OUString& rCompareString )
{
const UHashMapImpl &rMap = GetUHashImpl();
UHashMapImpl::const_iterator it = rMap.find( rCompareString );
if( it == rMap.end() )
return UHASHMAP_NOTFOUND;
else
return it->second;
}
struct theSvxMapProvider :
public rtl::Static<SvxUnoPropertyMapProvider, theSvxMapProvider>
{
};
SvxUnoPropertyMapProvider& getSvxMapProvider()
{
return theSvxMapProvider::get();
}
SvxUnoPropertyMapProvider::SvxUnoPropertyMapProvider()
{
for(sal_uInt16 i=0;i<SVXMAP_END; i++)
{
aSetArr[i] = nullptr;
aMapArr[i] = nullptr;
}
}
SvxUnoPropertyMapProvider::~SvxUnoPropertyMapProvider()
{
for(SvxItemPropertySet* p : aSetArr)
delete p;
}
const SfxItemPropertyMapEntry* SvxUnoPropertyMapProvider::GetMap(sal_uInt16 nPropertyId)
{
DBG_ASSERT(nPropertyId < SVXMAP_END, "Id ?" );
if(!aMapArr[nPropertyId]) {
switch(nPropertyId) {
case SVXMAP_SHAPE: aMapArr[SVXMAP_SHAPE]=ImplGetSvxShapePropertyMap(); break;
case SVXMAP_CONNECTOR: aMapArr[SVXMAP_CONNECTOR]=ImplGetSvxConnectorPropertyMap(); break;
case SVXMAP_DIMENSIONING: aMapArr[SVXMAP_DIMENSIONING]=ImplGetSvxDimensioningPropertyMap(); break;
case SVXMAP_CIRCLE: aMapArr[SVXMAP_CIRCLE]=ImplGetSvxCirclePropertyMap(); break;
case SVXMAP_POLYPOLYGON: aMapArr[SVXMAP_POLYPOLYGON]=ImplGetSvxPolyPolygonPropertyMap(); break;
case SVXMAP_POLYPOLYGONBEZIER: aMapArr[SVXMAP_POLYPOLYGONBEZIER]=ImplGetSvxPolyPolygonBezierPropertyMap(); break;
case SVXMAP_GRAPHICOBJECT: aMapArr[SVXMAP_GRAPHICOBJECT]=ImplGetSvxGraphicObjectPropertyMap(); break;
case SVXMAP_3DSCENEOBJECT: aMapArr[SVXMAP_3DSCENEOBJECT]=ImplGetSvx3DSceneObjectPropertyMap(); break;
case SVXMAP_3DCUBEOBJECT: aMapArr[SVXMAP_3DCUBEOBJECT]=ImplGetSvx3DCubeObjectPropertyMap(); break;
case SVXMAP_3DSPHEREOBJECT: aMapArr[SVXMAP_3DSPHEREOBJECT]=ImplGetSvx3DSphereObjectPropertyMap(); break;
case SVXMAP_3DLATHEOBJECT: aMapArr[SVXMAP_3DLATHEOBJECT]=ImplGetSvx3DLatheObjectPropertyMap(); break;
case SVXMAP_3DEXTRUDEOBJECT: aMapArr[SVXMAP_3DEXTRUDEOBJECT]=ImplGetSvx3DExtrudeObjectPropertyMap(); break;
case SVXMAP_3DPOLYGONOBJECT: aMapArr[SVXMAP_3DPOLYGONOBJECT]=ImplGetSvx3DPolygonObjectPropertyMap(); break;
case SVXMAP_ALL: aMapArr[SVXMAP_ALL]=ImplGetSvxAllPropertyMap(); break;
case SVXMAP_GROUP: aMapArr[SVXMAP_GROUP]=ImplGetSvxGroupPropertyMap(); break;
case SVXMAP_CAPTION: aMapArr[SVXMAP_CAPTION]=ImplGetSvxCaptionPropertyMap(); break;
case SVXMAP_OLE2: aMapArr[SVXMAP_OLE2]=ImplGetSvxOle2PropertyMap(); break;
case SVXMAP_PLUGIN: aMapArr[SVXMAP_PLUGIN]=ImplGetSvxPluginPropertyMap(); break;
case SVXMAP_FRAME: aMapArr[SVXMAP_FRAME]=ImplGetSvxFramePropertyMap(); break;
case SVXMAP_APPLET: aMapArr[SVXMAP_APPLET]=ImplGetSvxAppletPropertyMap(); break;
case SVXMAP_CONTROL: aMapArr[SVXMAP_CONTROL]=ImplGetSvxControlShapePropertyMap(); break;
case SVXMAP_TEXT: aMapArr[SVXMAP_TEXT]=ImplGetSvxTextShapePropertyMap(); break;
case SVXMAP_CUSTOMSHAPE: aMapArr[SVXMAP_CUSTOMSHAPE]=ImplGetSvxCustomShapePropertyMap(); break;
case SVXMAP_MEDIA: aMapArr[SVXMAP_MEDIA]=ImplGetSvxMediaShapePropertyMap(); break;
case SVXMAP_TABLE: aMapArr[SVXMAP_TABLE]=ImplGetSvxTableShapePropertyMap(); break;
case SVXMAP_PAGE: aMapArr[SVXMAP_PAGE] = ImplGetSvxPageShapePropertyMap(); break;
default:
OSL_FAIL( "Unknown property map for SvxUnoPropertyMapProvider!" );
}
// Sort(nPropertyId);
}
return aMapArr[nPropertyId];
}
const SvxItemPropertySet* SvxUnoPropertyMapProvider::GetPropertySet(sal_uInt16 nPropertyId, SfxItemPool& rPool)
{
if( !aSetArr[nPropertyId] )
aSetArr[nPropertyId] = new SvxItemPropertySet( GetMap( nPropertyId ), rPool );
return aSetArr[nPropertyId];
}
/** maps the vcl MapUnit enum to a API constant MeasureUnit.
Returns false if conversion is not supported.
*/
bool SvxMapUnitToMeasureUnit( const MapUnit eVcl, short& eApi ) throw()
{
switch( eVcl )
{
case MapUnit::Map100thMM: eApi = util::MeasureUnit::MM_100TH; break;
case MapUnit::Map10thMM: eApi = util::MeasureUnit::MM_10TH; break;
case MapUnit::MapMM: eApi = util::MeasureUnit::MM; break;
case MapUnit::MapCM: eApi = util::MeasureUnit::CM; break;
case MapUnit::Map1000thInch: eApi = util::MeasureUnit::INCH_1000TH; break;
case MapUnit::Map100thInch: eApi = util::MeasureUnit::INCH_100TH; break;
case MapUnit::Map10thInch: eApi = util::MeasureUnit::INCH_10TH; break;
case MapUnit::MapInch: eApi = util::MeasureUnit::INCH; break;
case MapUnit::MapPoint: eApi = util::MeasureUnit::POINT; break;
case MapUnit::MapTwip: eApi = util::MeasureUnit::TWIP; break;
case MapUnit::MapRelative: eApi = util::MeasureUnit::PERCENT; break;
default:
return false;
}
return true;
}
/** maps the API constant MeasureUnit to a vcl MapUnit enum.
Returns false if conversion is not supported.
*/
bool SvxMeasureUnitToFieldUnit( const short eApi, FieldUnit& eVcl ) throw()
{
switch( eApi )
{
case util::MeasureUnit::MM: eVcl = FUNIT_MM; break;
case util::MeasureUnit::CM: eVcl = FUNIT_CM; break;
case util::MeasureUnit::M: eVcl = FUNIT_M; break;
case util::MeasureUnit::KM: eVcl = FUNIT_KM; break;
case util::MeasureUnit::TWIP: eVcl = FUNIT_TWIP; break;
case util::MeasureUnit::POINT: eVcl = FUNIT_POINT; break;
case util::MeasureUnit::PICA: eVcl = FUNIT_PICA; break;
case util::MeasureUnit::INCH: eVcl = FUNIT_INCH; break;
case util::MeasureUnit::FOOT: eVcl = FUNIT_FOOT; break;
case util::MeasureUnit::MILE: eVcl = FUNIT_MILE; break;
case util::MeasureUnit::PERCENT: eVcl = FUNIT_PERCENT; break;
case util::MeasureUnit::MM_100TH: eVcl = FUNIT_100TH_MM; break;
default:
return false;
}
return true;
}
/** maps the vcl MapUnit enum to a API constant MeasureUnit.
Returns false if conversion is not supported.
*/
bool SvxFieldUnitToMeasureUnit( const FieldUnit eVcl, short& eApi ) throw()
{
switch( eVcl )
{
case FUNIT_MM: eApi = util::MeasureUnit::MM; break;
case FUNIT_CM: eApi = util::MeasureUnit::CM; break;
case FUNIT_M: eApi = util::MeasureUnit::M; break;
case FUNIT_KM: eApi = util::MeasureUnit::KM; break;
case FUNIT_TWIP: eApi = util::MeasureUnit::TWIP; break;
case FUNIT_POINT: eApi = util::MeasureUnit::POINT; break;
case FUNIT_PICA: eApi = util::MeasureUnit::PICA; break;
case FUNIT_INCH: eApi = util::MeasureUnit::INCH; break;
case FUNIT_FOOT: eApi = util::MeasureUnit::FOOT; break;
case FUNIT_MILE: eApi = util::MeasureUnit::MILE; break;
case FUNIT_PERCENT: eApi = util::MeasureUnit::PERCENT; break;
case FUNIT_100TH_MM: eApi = util::MeasureUnit::MM_100TH; break;
default:
return false;
}
return true;
}
bool SvxUnoGetResourceRanges( const short nWhich, int& nApiResIds, int& nIntResIds, int& nCount ) throw()
{
switch( nWhich )
{
case XATTR_FILLBITMAP:
nApiResIds = RID_SVXSTR_BMP_DEF_START;
nIntResIds = RID_SVXSTR_BMP_START;
nCount = RID_SVXSTR_BMP_DEF_END - RID_SVXSTR_BMP_DEF_START + 1;
break;
case XATTR_LINEDASH:
nApiResIds = RID_SVXSTR_DASH_DEF_START;
nIntResIds = RID_SVXSTR_DASH_START;
nCount = RID_SVXSTR_DASH_DEF_END - RID_SVXSTR_DASH_DEF_START + 1;
break;
case XATTR_LINESTART:
case XATTR_LINEEND:
nApiResIds = RID_SVXSTR_LEND_DEF_START;
nIntResIds = RID_SVXSTR_LEND_START;
nCount = RID_SVXSTR_LEND_DEF_END - RID_SVXSTR_LEND_DEF_START + 1;
break;
case XATTR_FILLGRADIENT:
nApiResIds = RID_SVXSTR_GRDT_DEF_START;
nIntResIds = RID_SVXSTR_GRDT_START;
nCount = RID_SVXSTR_GRDT_DEF_END - RID_SVXSTR_GRDT_DEF_START + 1;
break;
case XATTR_FILLHATCH:
nApiResIds = RID_SVXSTR_HATCH_DEF_START;
nIntResIds = RID_SVXSTR_HATCH_START;
nCount = RID_SVXSTR_HATCH_DEF_END - RID_SVXSTR_HATCH_DEF_START + 1;
break;
case XATTR_FILLFLOATTRANSPARENCE:
nApiResIds = RID_SVXSTR_TRASNGR_DEF_START;
nIntResIds = RID_SVXSTR_TRASNGR_START;
nCount = RID_SVXSTR_TRASNGR_DEF_END - RID_SVXSTR_TRASNGR_DEF_START + 1;
break;
default:
return false;
}
return true;
}
/// @throws std::exception
bool SvxUnoConvertResourceString( int nSourceResIds, int nDestResIds, int nCount, OUString& rString )
{
// first, calculate the search string length without an optional number behind the name
sal_Int32 nLength = rString.getLength();
while( nLength > 0 )
{
const sal_Unicode nChar = rString[ nLength - 1 ];
if( (nChar < '0') || (nChar > '9') )
break;
nLength--;
}
// if we cut off a number, also cut of some spaces
if( nLength != rString.getLength() )
{
while( nLength > 0 )
{
const sal_Unicode nChar = rString[ nLength - 1 ];
if( nChar != ' ' )
break;
nLength--;
}
}
const OUString aShortString( rString.copy( 0, nLength ) );
int i;
for( i = 0; i < nCount; i++ )
{
sal_uInt16 nResId = (sal_uInt16)(nSourceResIds + i);
const OUString aCompare(SvxResId(nResId));
if( aShortString == aCompare )
{
sal_uInt16 nNewResId = (sal_uInt16)(nDestResIds + i);
rString = rString.replaceAt( 0, aShortString.getLength(), SvxResId( nNewResId ) );
return true;
}
else if( rString == aCompare )
{
sal_uInt16 nNewResId = (sal_uInt16)(nDestResIds + i);
rString = SvxResId(nNewResId);
return true;
}
}
return false;
}
// #i122649# Some comments on the below arrays:
// - They need to have the same order and count of items
// - They are used to translate between translated and non-translated color names
// - To make longer names be found which start with the same basic string,
// these have to be in front of others
// It would be nice to:
// - evtl. organize these in a single array with 2-dimensional inner to eliminate
// the possibility to define it wrong
// - change the compare to also work when a shorter name is in front of a longer one
static const sal_uInt16 SvxUnoColorNameDefResId[] =
{
RID_SVXSTR_COLOR_BLUEGREY_DEF,
RID_SVXSTR_COLOR_BLACK_DEF,
RID_SVXSTR_COLOR_BLUE_CLASSIC_DEF,
RID_SVXSTR_COLOR_BLUE_DEF,
RID_SVXSTR_COLOR_GREEN_DEF,
RID_SVXSTR_COLOR_CYAN_DEF,
RID_SVXSTR_COLOR_RED_DEF,
RID_SVXSTR_COLOR_MAGENTA_DEF,
RID_SVXSTR_COLOR_GREY_DEF,
RID_SVXSTR_COLOR_YELLOWGREEN_DEF,
RID_SVXSTR_COLOR_YELLOW_DEF,
RID_SVXSTR_COLOR_WHITE_DEF,
RID_SVXSTR_COLOR_ORANGE_DEF,
RID_SVXSTR_COLOR_VIOLET_DEF,
RID_SVXSTR_COLOR_BORDEAUX_DEF,
RID_SVXSTR_COLOR_PALE_YELLOW_DEF,
RID_SVXSTR_COLOR_PALE_GREEN_DEF,
RID_SVXSTR_COLOR_DARKVIOLET_DEF,
RID_SVXSTR_COLOR_SALMON_DEF,
RID_SVXSTR_COLOR_SEABLUE_DEF,
RID_SVXSTR_COLOR_CHART_DEF,
RID_SVXSTR_COLOR_PURPLE_DEF,
RID_SVXSTR_COLOR_SKYBLUE_DEF,
RID_SVXSTR_COLOR_PINK_DEF,
RID_SVXSTR_COLOR_TURQUOISE_DEF,
RID_SVXSTR_COLOR_LIBRE_GREEN_1_DEF,
RID_SVXSTR_COLOR_LIBRE_GREEN_ACCENT_DEF,
RID_SVXSTR_COLOR_LIBRE_BLUE_ACCENT_DEF,
RID_SVXSTR_COLOR_LIBRE_ORANGE_ACCENT_DEF,
RID_SVXSTR_COLOR_LIBRE_PURPLE_DEF,
RID_SVXSTR_COLOR_LIBRE_PURPLE_ACCENT_DEF,
RID_SVXSTR_COLOR_LIBRE_YELLOW_ACCENT_DEF,
RID_SVXSTR_COLOR_TANGO_BUTTER_DEF,
RID_SVXSTR_COLOR_TANGO_ORANGE_DEF,
RID_SVXSTR_COLOR_TANGO_CHOCOLATE_DEF,
RID_SVXSTR_COLOR_TANGO_CHAMELEON_DEF,
RID_SVXSTR_COLOR_TANGO_SKY_BLUE_DEF,
RID_SVXSTR_COLOR_TANGO_PLUM_DEF,
RID_SVXSTR_COLOR_TANGO_SCARLET_RED_DEF,
RID_SVXSTR_COLOR_TANGO_ALUMINIUM_DEF
};
static const sal_uInt16 SvxUnoColorNameResId[] =
{
RID_SVXSTR_COLOR_BLUEGREY,
RID_SVXSTR_COLOR_BLACK,
RID_SVXSTR_COLOR_BLUE_CLASSIC,
RID_SVXSTR_COLOR_BLUE,
RID_SVXSTR_COLOR_GREEN,
RID_SVXSTR_COLOR_CYAN,
RID_SVXSTR_COLOR_RED,
RID_SVXSTR_COLOR_MAGENTA,
RID_SVXSTR_COLOR_GREY,
RID_SVXSTR_COLOR_YELLOWGREEN,
RID_SVXSTR_COLOR_YELLOW,
RID_SVXSTR_COLOR_WHITE,
RID_SVXSTR_COLOR_ORANGE,
RID_SVXSTR_COLOR_VIOLET,
RID_SVXSTR_COLOR_BORDEAUX,
RID_SVXSTR_COLOR_PALE_YELLOW,
RID_SVXSTR_COLOR_PALE_GREEN,
RID_SVXSTR_COLOR_DARKVIOLET,
RID_SVXSTR_COLOR_SALMON,
RID_SVXSTR_COLOR_SEABLUE,
RID_SVXSTR_COLOR_CHART,
RID_SVXSTR_COLOR_PURPLE,
RID_SVXSTR_COLOR_SKYBLUE,
RID_SVXSTR_COLOR_PINK,
RID_SVXSTR_COLOR_TURQUOISE,
RID_SVXSTR_COLOR_LIBRE_GREEN_1,
RID_SVXSTR_COLOR_LIBRE_GREEN_ACCENT,
RID_SVXSTR_COLOR_LIBRE_BLUE_ACCENT,
RID_SVXSTR_COLOR_LIBRE_ORANGE_ACCENT,
RID_SVXSTR_COLOR_LIBRE_PURPLE,
RID_SVXSTR_COLOR_LIBRE_PURPLE_ACCENT,
RID_SVXSTR_COLOR_LIBRE_YELLOW_ACCENT,
RID_SVXSTR_COLOR_TANGO_BUTTER,
RID_SVXSTR_COLOR_TANGO_ORANGE,
RID_SVXSTR_COLOR_TANGO_CHOCOLATE,
RID_SVXSTR_COLOR_TANGO_CHAMELEON,
RID_SVXSTR_COLOR_TANGO_SKY_BLUE,
RID_SVXSTR_COLOR_TANGO_PLUM,
RID_SVXSTR_COLOR_TANGO_SCARLET_RED,
RID_SVXSTR_COLOR_TANGO_ALUMINIUM
};
/// @throws std::exception
bool SvxUnoConvertResourceString( const sal_uInt16* pSourceResIds, const sal_uInt16* pDestResIds, int nCount, OUString& rString )
{
//We replace e.g. "Gray 10%" with the translation of Gray, but we shouldn't
//replace "Red Hat 1" with the translation of Red :-)
sal_Int32 nLength = rString.getLength();
while( nLength > 0 )
{
const sal_Unicode nChar = rString[nLength-1];
if (nChar != '%' && (nChar < '0' || nChar > '9'))
break;
nLength--;
}
OUString sStr = rString.copy(0, nLength).trim();
for(int i = 0; i < nCount; ++i )
{
OUString aStrDefName = SvxResId( pSourceResIds[i] );
if( sStr == aStrDefName )
{
OUString aReplace = SvxResId( pDestResIds[i] );
rString = rString.replaceAt( 0, aStrDefName.getLength(), aReplace );
return true;
}
}
return false;
}
/** if the given name is a predefined name for the current language it is replaced by
the corresponding api name.
*/
OUString SvxUnogetApiNameForItem(const sal_Int16 nWhich, const OUString& rInternalName)
{
OUString aNew = rInternalName;
if( nWhich == XATTR_LINECOLOR )
{
if( SvxUnoConvertResourceString( SvxUnoColorNameResId, SvxUnoColorNameDefResId, SAL_N_ELEMENTS( SvxUnoColorNameResId ), aNew ) )
{
return aNew;
}
}
else
{
int nApiResIds;
int nIntResIds;
int nCount;
if( SvxUnoGetResourceRanges( nWhich, nApiResIds, nIntResIds, nCount ) )
{
if(SvxUnoConvertResourceString( nIntResIds, nApiResIds, nCount, aNew ) )
{
return aNew;
}
}
}
// just use previous name, if nothing else was found.
return rInternalName;
}
/** if the given name is a predefined api name it is replaced by the predefined name
for the current language.
*/
OUString SvxUnogetInternalNameForItem(const sal_Int16 nWhich, const OUString& rApiName)
{
OUString aNew = rApiName;
if( nWhich == XATTR_LINECOLOR )
{
if( SvxUnoConvertResourceString( SvxUnoColorNameDefResId, SvxUnoColorNameResId, SAL_N_ELEMENTS( SvxUnoColorNameResId ), aNew ) )
{
return aNew;
}
}
else
{
int nApiResIds;
int nIntResIds;
int nCount;
if( SvxUnoGetResourceRanges( nWhich, nApiResIds, nIntResIds, nCount ) )
{
if(SvxUnoConvertResourceString( nApiResIds, nIntResIds, nCount, aNew ) )
{
return aNew;
}
}
}
// just use previous name, if nothing else was found.
return rApiName;
}
rtl::Reference<comphelper::PropertySetInfo> const & SvxPropertySetInfoPool::getOrCreate( sal_Int32 nServiceId ) throw()
{
SolarMutexGuard aGuard;
assert( nServiceId <= SVXUNO_SERVICEID_LASTID );
if( !mxInfos[ nServiceId ].is() )
{
mxInfos[nServiceId] = new comphelper::PropertySetInfo();
switch( nServiceId )
{
case SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS:
mxInfos[SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS]->add( ImplGetSvxDrawingDefaultsPropertyMap() );
break;
case SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER:
mxInfos[SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER]->add( ImplGetSvxDrawingDefaultsPropertyMap() );
mxInfos[SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER]->remove( UNO_NAME_EDIT_PARA_IS_HANGING_PUNCTUATION );
// OD 13.10.2003 #i18732# - add property map for writer item 'IsFollowingTextFlow'
mxInfos[SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER]->add( ImplGetAdditionalWriterDrawingDefaultsPropertyMap() );
break;
default:
OSL_FAIL( "unknown service id!" );
}
}
return mxInfos[ nServiceId ];
}
rtl::Reference<comphelper::PropertySetInfo> SvxPropertySetInfoPool::mxInfos[SVXUNO_SERVICEID_LASTID+1] = { nullptr };
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|