Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #include <sal/macros.h>
21 : #include <com/sun/star/table/XTable.hpp>
22 : #include <com/sun/star/container/XIndexAccess.hpp>
23 : #include <com/sun/star/frame/XModel.hpp>
24 : #include <com/sun/star/embed/XEmbeddedObject.hpp>
25 : #include <com/sun/star/util/MeasureUnit.hpp>
26 : #include <com/sun/star/drawing/TextVerticalAdjust.hpp>
27 : #include <com/sun/star/media/ZoomLevel.hpp>
28 : #include <com/sun/star/io/XInputStream.hpp>
29 : #include <com/sun/star/beans/PropertyAttribute.hpp>
30 : #include <tools/fldunit.hxx>
31 : #include <osl/mutex.hxx>
32 : #include <vcl/svapp.hxx>
33 : #include <comphelper/propertysetinfo.hxx>
34 : #include <svx/dialmgr.hxx>
35 : #include "svx/unoapi.hxx"
36 : #include <editeng/unotext.hxx>
37 : #include <svx/unoshprp.hxx>
38 : #include <editeng/editeng.hxx>
39 : #include "svx/globl3d.hxx"
40 : #include <svx/dialogs.hrc>
41 : #include <svx/svdpool.hxx>
42 : #include <svx/svdobj.hxx>
43 :
44 : #include <shapeimpl.hxx>
45 : #include <unordered_map>
46 :
47 : using namespace ::com::sun::star;
48 : using namespace ::com::sun::star::beans::PropertyAttribute;
49 : using ::com::sun::star::drawing::TextVerticalAdjust;
50 :
51 43 : SfxItemPropertyMapEntry const * ImplGetSvxShapePropertyMap()
52 : {
53 : static SfxItemPropertyMapEntry const aShapePropertyMap_Impl[] =
54 : {
55 43 : EDGERADIUS_PROPERTIES
56 1161 : FILL_PROPERTIES
57 516 : LINE_PROPERTIES
58 172 : LINE_PROPERTIES_START_END
59 473 : SHAPE_DESCRIPTOR_PROPERTIES
60 430 : MISC_OBJ_PROPERTIES
61 86 : LINKTARGET_PROPERTIES
62 215 : SHADOW_PROPERTIES
63 3870 : TEXT_PROPERTIES
64 : // #FontWork#
65 516 : FONTWORK_PROPERTIES
66 43 : CUSTOMSHAPE_PROPERTIES
67 43 : { OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
68 43 : { OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
69 : { OUString(), 0, css::uno::Type(), 0, 0 }
70 7697 : };
71 :
72 43 : return aShapePropertyMap_Impl;
73 : }
74 :
75 32 : SfxItemPropertyMapEntry const * ImplGetSvxTextShapePropertyMap()
76 : {
77 : static SfxItemPropertyMapEntry const aTextShapePropertyMap_Impl[] =
78 : {
79 32 : EDGERADIUS_PROPERTIES
80 864 : FILL_PROPERTIES
81 384 : LINE_PROPERTIES
82 128 : LINE_PROPERTIES_START_END
83 352 : SHAPE_DESCRIPTOR_PROPERTIES
84 256 : MISC_OBJ_PROPERTIES_NO_SHEAR
85 64 : LINKTARGET_PROPERTIES
86 160 : SHADOW_PROPERTIES
87 2880 : TEXT_PROPERTIES
88 : // #FontWork#
89 384 : FONTWORK_PROPERTIES
90 32 : CUSTOMSHAPE_PROPERTIES
91 32 : { OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
92 32 : { OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
93 : { OUString(), 0, css::uno::Type(), 0, 0 }
94 5664 : };
95 :
96 32 : return aTextShapePropertyMap_Impl;
97 : }
98 :
99 4 : SfxItemPropertyMapEntry const * ImplGetSvxConnectorPropertyMap()
100 : {
101 : static SfxItemPropertyMapEntry const aConnectorPropertyMap_Impl[] =
102 : {
103 76 : SPECIAL_CONNECTOR_PROPERTIES
104 4 : EDGERADIUS_PROPERTIES
105 108 : FILL_PROPERTIES
106 48 : LINE_PROPERTIES
107 16 : LINE_PROPERTIES_START_END
108 44 : SHAPE_DESCRIPTOR_PROPERTIES
109 40 : MISC_OBJ_PROPERTIES
110 8 : LINKTARGET_PROPERTIES
111 20 : SHADOW_PROPERTIES
112 360 : TEXT_PROPERTIES
113 : // #FontWork#
114 48 : FONTWORK_PROPERTIES
115 4 : { OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
116 4 : { OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
117 : { OUString(), 0, css::uno::Type(), 0, 0 }
118 788 : };
119 :
120 4 : return aConnectorPropertyMap_Impl;
121 : }
122 :
123 3 : SfxItemPropertyMapEntry const * ImplGetSvxDimensioningPropertyMap()
124 : {
125 : static SfxItemPropertyMapEntry const aDimensioningPropertyMap_Impl[] =
126 : {
127 66 : SPECIAL_DIMENSIONING_PROPERTIES
128 3 : EDGERADIUS_PROPERTIES
129 81 : FILL_PROPERTIES
130 36 : LINE_PROPERTIES
131 12 : LINE_PROPERTIES_START_END
132 33 : SHAPE_DESCRIPTOR_PROPERTIES
133 30 : MISC_OBJ_PROPERTIES
134 6 : LINKTARGET_PROPERTIES
135 15 : SHADOW_PROPERTIES
136 270 : TEXT_PROPERTIES
137 : // #FontWork#
138 36 : FONTWORK_PROPERTIES
139 3 : { OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
140 3 : { OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
141 : { OUString(), 0, css::uno::Type(), 0, 0 }
142 600 : };
143 :
144 3 : return aDimensioningPropertyMap_Impl;
145 : }
146 :
147 15 : SfxItemPropertyMapEntry const * ImplGetSvxCirclePropertyMap()
148 : {
149 : static SfxItemPropertyMapEntry const aCirclePropertyMap_Impl[] =
150 : {
151 45 : SPECIAL_CIRCLE_PROPERTIES
152 15 : EDGERADIUS_PROPERTIES
153 405 : FILL_PROPERTIES
154 180 : LINE_PROPERTIES
155 60 : LINE_PROPERTIES_START_END
156 165 : SHAPE_DESCRIPTOR_PROPERTIES
157 150 : MISC_OBJ_PROPERTIES
158 30 : LINKTARGET_PROPERTIES
159 75 : SHADOW_PROPERTIES
160 1350 : TEXT_PROPERTIES
161 : // #FontWork#
162 180 : FONTWORK_PROPERTIES
163 15 : CUSTOMSHAPE_PROPERTIES
164 15 : { OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
165 15 : { OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
166 : { OUString(), 0, css::uno::Type(), 0, 0 }
167 2730 : };
168 :
169 15 : return aCirclePropertyMap_Impl;
170 : }
171 :
172 38 : SfxItemPropertyMapEntry const * ImplGetSvxPolyPolygonPropertyMap()
173 : {
174 : static SfxItemPropertyMapEntry const aPolyPolygonPropertyMap_Impl[] =
175 : {
176 38 : { OUString("Geometry"), OWN_ATTR_BASE_GEOMETRY, cppu::UnoType<css::drawing::PointSequenceSequence>::get(), 0, 0 },
177 38 : SPECIAL_POLYGON_PROPERTIES
178 76 : SPECIAL_POLYPOLYGON_PROPERTIES
179 1026 : FILL_PROPERTIES
180 456 : LINE_PROPERTIES
181 152 : LINE_PROPERTIES_START_END
182 418 : SHAPE_DESCRIPTOR_PROPERTIES
183 380 : MISC_OBJ_PROPERTIES
184 76 : LINKTARGET_PROPERTIES
185 190 : SHADOW_PROPERTIES
186 3420 : TEXT_PROPERTIES
187 : // #FontWork#
188 456 : FONTWORK_PROPERTIES
189 38 : CUSTOMSHAPE_PROPERTIES
190 38 : { OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
191 38 : { OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
192 : { OUString(), 0, css::uno::Type(), 0, 0 }
193 6916 : };
194 :
195 38 : return aPolyPolygonPropertyMap_Impl;
196 : }
197 :
198 23 : SfxItemPropertyMapEntry const * ImplGetSvxPolyPolygonBezierPropertyMap()
199 : {
200 : static SfxItemPropertyMapEntry const aPolyPolygonBezierPropertyMap_Impl[] =
201 : {
202 23 : { OUString("Geometry"), OWN_ATTR_BASE_GEOMETRY, cppu::UnoType<com::sun::star::drawing::PolyPolygonBezierCoords>::get(), 0, 0 },
203 23 : SPECIAL_POLYGON_PROPERTIES
204 23 : SPECIAL_POLYPOLYGONBEZIER_PROPERTIES
205 621 : FILL_PROPERTIES
206 276 : LINE_PROPERTIES
207 92 : LINE_PROPERTIES_START_END
208 253 : SHAPE_DESCRIPTOR_PROPERTIES
209 230 : MISC_OBJ_PROPERTIES
210 46 : LINKTARGET_PROPERTIES
211 115 : SHADOW_PROPERTIES
212 2070 : TEXT_PROPERTIES
213 : // #FontWork#
214 276 : FONTWORK_PROPERTIES
215 23 : CUSTOMSHAPE_PROPERTIES
216 23 : { OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
217 23 : { OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
218 : { OUString(), 0, css::uno::Type(), 0, 0 }
219 4163 : };
220 :
221 23 : return aPolyPolygonBezierPropertyMap_Impl;
222 : }
223 :
224 30 : SfxItemPropertyMapEntry const * ImplGetSvxGraphicObjectPropertyMap()
225 : {
226 : static SfxItemPropertyMapEntry const aGraphicObjectPropertyMap_Impl[] =
227 : {
228 420 : SPECIAL_GRAPHOBJ_PROPERTIES
229 :
230 : // #i25616#
231 810 : FILL_PROPERTIES
232 :
233 360 : LINE_PROPERTIES
234 120 : LINE_PROPERTIES_START_END
235 330 : SHAPE_DESCRIPTOR_PROPERTIES
236 :
237 : // #i118485# Full properties now, shear included
238 300 : MISC_OBJ_PROPERTIES
239 :
240 60 : LINKTARGET_PROPERTIES
241 150 : SHADOW_PROPERTIES
242 2700 : TEXT_PROPERTIES
243 : // #FontWork#
244 360 : FONTWORK_PROPERTIES
245 30 : { OUString("IsMirrored"), OWN_ATTR_MIRRORED, cppu::UnoType<bool>::get(), 0, 0},
246 30 : { OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
247 30 : { OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
248 30 : { OUString("GraphicStream"), OWN_ATTR_GRAPHIC_STREAM, cppu::UnoType<css::io::XInputStream>::get(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
249 : { OUString(), 0, css::uno::Type(), 0, 0 }
250 5790 : };
251 :
252 30 : return aGraphicObjectPropertyMap_Impl;
253 : }
254 :
255 6 : SfxItemPropertyMapEntry const * ImplGetSvx3DSceneObjectPropertyMap()
256 : {
257 : static SfxItemPropertyMapEntry const a3DSceneObjectPropertyMap_Impl[] =
258 : {
259 198 : SPECIAL_3DSCENEOBJECT_PROPERTIES
260 162 : FILL_PROPERTIES
261 72 : LINE_PROPERTIES
262 24 : LINE_PROPERTIES_START_END
263 66 : SHAPE_DESCRIPTOR_PROPERTIES
264 60 : MISC_OBJ_PROPERTIES
265 12 : LINKTARGET_PROPERTIES
266 30 : SHADOW_PROPERTIES
267 : { OUString(), 0, css::uno::Type(), 0, 0 }
268 636 : };
269 :
270 6 : return a3DSceneObjectPropertyMap_Impl;
271 : }
272 :
273 1 : SfxItemPropertyMapEntry const * ImplGetSvx3DCubeObjectPropertyMap()
274 : {
275 : static SfxItemPropertyMapEntry const a3DCubeObjectPropertyMap_Impl[] =
276 : {
277 4 : SPECIAL_3DCUBEOBJECT_PROPERTIES
278 14 : MISC_3D_OBJ_PROPERTIES
279 27 : FILL_PROPERTIES
280 12 : LINE_PROPERTIES
281 4 : LINE_PROPERTIES_START_END
282 11 : SHAPE_DESCRIPTOR_PROPERTIES
283 10 : MISC_OBJ_PROPERTIES
284 2 : LINKTARGET_PROPERTIES
285 5 : SHADOW_PROPERTIES
286 1 : { OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
287 1 : { OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
288 : { OUString(), 0, css::uno::Type(), 0, 0 }
289 93 : };
290 :
291 1 : return a3DCubeObjectPropertyMap_Impl;
292 : }
293 :
294 1 : SfxItemPropertyMapEntry const * ImplGetSvx3DSphereObjectPropertyMap()
295 : {
296 : static SfxItemPropertyMapEntry const a3DSphereObjectPropertyMap_Impl[] =
297 : {
298 5 : SPECIAL_3DSPHEREOBJECT_PROPERTIES
299 14 : MISC_3D_OBJ_PROPERTIES
300 27 : FILL_PROPERTIES
301 12 : LINE_PROPERTIES
302 4 : LINE_PROPERTIES_START_END
303 11 : SHAPE_DESCRIPTOR_PROPERTIES
304 10 : MISC_OBJ_PROPERTIES
305 2 : LINKTARGET_PROPERTIES
306 5 : SHADOW_PROPERTIES
307 1 : { OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
308 1 : { OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
309 : { OUString(), 0, css::uno::Type(), 0, 0 }
310 94 : };
311 1 : return a3DSphereObjectPropertyMap_Impl;
312 : }
313 :
314 4 : SfxItemPropertyMapEntry const * ImplGetSvx3DLatheObjectPropertyMap()
315 : {
316 : static SfxItemPropertyMapEntry const a3DLatheObjectPropertyMap_Impl[] =
317 : {
318 24 : SPECIAL_3DLATHEOBJECT_PROPERTIES
319 :
320 : // #107245# New 3D properties which are possible for lathe and extrude 3d objects
321 20 : SPECIAL_3DLATHEANDEXTRUDEOBJ_PROPERTIES
322 :
323 4 : SPECIAL_3DBACKSCALE_PROPERTIES
324 56 : MISC_3D_OBJ_PROPERTIES
325 108 : FILL_PROPERTIES
326 48 : LINE_PROPERTIES
327 16 : LINE_PROPERTIES_START_END
328 44 : SHAPE_DESCRIPTOR_PROPERTIES
329 40 : MISC_OBJ_PROPERTIES
330 8 : LINKTARGET_PROPERTIES
331 20 : SHADOW_PROPERTIES
332 4 : { OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
333 4 : { OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
334 : { OUString(), 0, css::uno::Type(), 0, 0 }
335 404 : };
336 :
337 4 : return a3DLatheObjectPropertyMap_Impl;
338 : }
339 :
340 6 : SfxItemPropertyMapEntry const * ImplGetSvx3DExtrudeObjectPropertyMap()
341 : {
342 : static SfxItemPropertyMapEntry const a3DExtrudeObjectPropertyMap_Impl[] =
343 : {
344 24 : SPECIAL_3DEXTRUDEOBJECT_PROPERTIES
345 :
346 : // #107245# New 3D properties which are possible for lathe and extrude 3d objects
347 30 : SPECIAL_3DLATHEANDEXTRUDEOBJ_PROPERTIES
348 :
349 6 : SPECIAL_3DBACKSCALE_PROPERTIES
350 84 : MISC_3D_OBJ_PROPERTIES
351 162 : FILL_PROPERTIES
352 72 : LINE_PROPERTIES
353 24 : LINE_PROPERTIES_START_END
354 66 : SHAPE_DESCRIPTOR_PROPERTIES
355 60 : MISC_OBJ_PROPERTIES
356 12 : LINKTARGET_PROPERTIES
357 30 : SHADOW_PROPERTIES
358 6 : { OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
359 6 : { OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
360 : { OUString(), 0, css::uno::Type(), 0, 0 }
361 594 : };
362 :
363 6 : return a3DExtrudeObjectPropertyMap_Impl;
364 : }
365 :
366 6 : SfxItemPropertyMapEntry const * ImplGetSvx3DPolygonObjectPropertyMap()
367 : {
368 : static SfxItemPropertyMapEntry const a3DPolygonObjectPropertyMap_Impl[] =
369 : {
370 30 : SPECIAL_3DPOLYGONOBJECT_PROPERTIES
371 84 : MISC_3D_OBJ_PROPERTIES
372 162 : FILL_PROPERTIES
373 72 : LINE_PROPERTIES
374 24 : LINE_PROPERTIES_START_END
375 66 : SHAPE_DESCRIPTOR_PROPERTIES
376 60 : MISC_OBJ_PROPERTIES
377 12 : LINKTARGET_PROPERTIES
378 30 : SHADOW_PROPERTIES
379 6 : { OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
380 6 : { OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
381 : { OUString(), 0, css::uno::Type(), 0, 0 }
382 564 : };
383 :
384 6 : return a3DPolygonObjectPropertyMap_Impl;
385 : }
386 :
387 0 : SfxItemPropertyMapEntry const * ImplGetSvxAllPropertyMap()
388 : {
389 : static SfxItemPropertyMapEntry const aAllPropertyMap_Impl[] =
390 : {
391 0 : SHADOW_PROPERTIES
392 0 : LINE_PROPERTIES
393 0 : LINE_PROPERTIES_START_END
394 0 : FILL_PROPERTIES
395 0 : EDGERADIUS_PROPERTIES
396 0 : TEXT_PROPERTIES
397 : // #FontWork#
398 0 : FONTWORK_PROPERTIES
399 0 : SHAPE_DESCRIPTOR_PROPERTIES
400 0 : MISC_OBJ_PROPERTIES
401 0 : LINKTARGET_PROPERTIES
402 0 : SPECIAL_CONNECTOR_PROPERTIES
403 0 : SPECIAL_DIMENSIONING_PROPERTIES
404 0 : SPECIAL_CIRCLE_PROPERTIES
405 0 : SPECIAL_POLYGON_PROPERTIES
406 0 : SPECIAL_POLYPOLYGON_PROPERTIES
407 0 : SPECIAL_POLYPOLYGONBEZIER_PROPERTIES
408 0 : SPECIAL_GRAPHOBJ_PROPERTIES
409 0 : SPECIAL_3DSCENEOBJECT_PROPERTIES
410 0 : MISC_3D_OBJ_PROPERTIES
411 0 : SPECIAL_3DCUBEOBJECT_PROPERTIES
412 0 : SPECIAL_3DSPHEREOBJECT_PROPERTIES
413 0 : SPECIAL_3DLATHEOBJECT_PROPERTIES
414 0 : SPECIAL_3DEXTRUDEOBJECT_PROPERTIES
415 :
416 : // #107245# New 3D properties which are possible for lathe and extrude 3d objects
417 0 : SPECIAL_3DLATHEANDEXTRUDEOBJ_PROPERTIES
418 :
419 0 : SPECIAL_3DBACKSCALE_PROPERTIES
420 0 : SPECIAL_3DPOLYGONOBJECT_PROPERTIES
421 0 : CUSTOMSHAPE_PROPERTIES
422 0 : { OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
423 0 : { OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
424 : { OUString(), 0, css::uno::Type(), 0, 0 }
425 0 : };
426 :
427 0 : return aAllPropertyMap_Impl;
428 : }
429 :
430 35 : SfxItemPropertyMapEntry const * ImplGetSvxGroupPropertyMap()
431 : {
432 : static SfxItemPropertyMapEntry const aGroupPropertyMap_Impl[] =
433 : {
434 385 : SHAPE_DESCRIPTOR_PROPERTIES
435 350 : MISC_OBJ_PROPERTIES
436 70 : LINKTARGET_PROPERTIES
437 : { OUString(), 0, css::uno::Type(), 0, 0 }
438 875 : };
439 :
440 35 : return aGroupPropertyMap_Impl;
441 : }
442 :
443 13 : SfxItemPropertyMapEntry const * ImplGetSvxOle2PropertyMap()
444 : {
445 : static SfxItemPropertyMapEntry const aOle2PropertyMap_Impl[] =
446 : {
447 : // #i118485# Adding properties for line, fill, text, shadow, fontwork, rotate, shear
448 351 : FILL_PROPERTIES
449 156 : LINE_PROPERTIES
450 52 : LINE_PROPERTIES_START_END
451 143 : SHAPE_DESCRIPTOR_PROPERTIES
452 130 : MISC_OBJ_PROPERTIES
453 26 : LINKTARGET_PROPERTIES
454 65 : SHADOW_PROPERTIES
455 1170 : TEXT_PROPERTIES
456 156 : FONTWORK_PROPERTIES
457 :
458 13 : { OUString("ThumbnailGraphicURL"), OWN_ATTR_THUMBNAIL , cppu::UnoType<OUString>::get(), 0, 0 },
459 13 : { OUString("Model"), OWN_ATTR_OLEMODEL , cppu::UnoType<com::sun::star::frame::XModel>::get(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
460 13 : { OUString("EmbeddedObject"), OWN_ATTR_OLE_EMBEDDED_OBJECT, cppu::UnoType<com::sun::star::embed::XEmbeddedObject>::get(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
461 13 : { OUString("EmbeddedObjectNoNewClient"),OWN_ATTR_OLE_EMBEDDED_OBJECT_NONEWCLIENT, cppu::UnoType<com::sun::star::embed::XEmbeddedObject>::get(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
462 13 : { OUString("OriginalSize"), OWN_ATTR_OLESIZE , cppu::UnoType<com::sun::star::awt::Size>::get(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
463 13 : { OUString("CLSID"), OWN_ATTR_CLSID , cppu::UnoType<OUString>::get(), 0, 0 },
464 13 : { OUString("IsInternal"), OWN_ATTR_INTERNAL_OLE , cppu::UnoType<bool>::get() , ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
465 13 : { OUString("VisibleArea"), OWN_ATTR_OLE_VISAREA , cppu::UnoType<com::sun::star::awt::Rectangle>::get(), 0, 0},
466 13 : { OUString("Aspect"), OWN_ATTR_OLE_ASPECT , cppu::UnoType<sal_Int64>::get(), 0, 0},
467 13 : { OUString(UNO_NAME_OLE2_PERSISTNAME), OWN_ATTR_PERSISTNAME , cppu::UnoType<OUString>::get(), 0, 0 },
468 13 : { OUString("LinkURL"), OWN_ATTR_OLE_LINKURL , cppu::UnoType<OUString>::get(), 0, 0 },
469 13 : { OUString(UNO_NAME_GRAPHOBJ_GRAPHIC), OWN_ATTR_VALUE_GRAPHIC , cppu::UnoType<com::sun::star::graphic::XGraphic>::get(), 0, 0},
470 : { OUString(), 0, css::uno::Type(), 0, 0 }
471 2431 : };
472 :
473 13 : return aOle2PropertyMap_Impl;
474 : }
475 :
476 1 : SfxItemPropertyMapEntry const * ImplGetSvxPluginPropertyMap()
477 : {
478 : static SfxItemPropertyMapEntry const aPluginPropertyMap_Impl[] =
479 : {
480 1 : { OUString("PluginMimeType"), OWN_ATTR_PLUGIN_MIMETYPE , cppu::UnoType<OUString>::get(), 0, 0},
481 1 : { OUString("PluginURL"), OWN_ATTR_PLUGIN_URL , cppu::UnoType<OUString>::get(), 0, 0},
482 1 : { OUString("PluginCommands"), OWN_ATTR_PLUGIN_COMMANDS , cppu::UnoType<css::uno::Sequence< ::com::sun::star::beans::PropertyValue >>::get(), 0, 0},
483 1 : { OUString("Transformation"), OWN_ATTR_TRANSFORMATION , cppu::UnoType<com::sun::star::drawing::HomogenMatrix3>::get(), 0, 0 },
484 1 : { OUString(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER , cppu::UnoType<sal_Int32>::get(), 0, 0},
485 1 : { OUString(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID , cppu::UnoType<sal_Int16>::get(), 0, 0},
486 1 : { OUString(UNO_NAME_MISC_OBJ_LAYERNAME),SDRATTR_LAYERNAME , cppu::UnoType<OUString>::get(), 0, 0},
487 1 : { OUString(UNO_NAME_LINKDISPLAYBITMAP), OWN_ATTR_LDBITMAP , cppu::UnoType<com::sun::star::awt::XBitmap>::get(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
488 1 : { OUString(UNO_NAME_LINKDISPLAYNAME), OWN_ATTR_LDNAME , cppu::UnoType<OUString>::get(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
489 1 : { OUString(UNO_NAME_OLE2_METAFILE), OWN_ATTR_METAFILE , cppu::UnoType<css::uno::Sequence<sal_Int8>>::get(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
490 1 : { OUString("ThumbnailGraphicURL"), OWN_ATTR_THUMBNAIL , cppu::UnoType<OUString>::get(), 0, 0 },
491 1 : { OUString(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, cppu::UnoType<bool>::get(),0, 0},
492 1 : { OUString(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, cppu::UnoType<bool>::get(),0, 0},
493 1 : { OUString(UNO_NAME_OLE2_PERSISTNAME), OWN_ATTR_PERSISTNAME , cppu::UnoType<OUString>::get(), 0, 0 },
494 1 : { OUString("LinkURL"), OWN_ATTR_OLE_LINKURL , cppu::UnoType<OUString>::get(), 0, 0 },
495 1 : { OUString(UNO_NAME_MISC_OBJ_BOUNDRECT), OWN_ATTR_BOUNDRECT, cppu::UnoType<com::sun::star::awt::Rectangle>::get(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
496 1 : { OUString("VisibleArea"), OWN_ATTR_OLE_VISAREA , cppu::UnoType<com::sun::star::awt::Rectangle>::get(), 0, 0},
497 : // #i68101#
498 1 : { OUString(UNO_NAME_MISC_OBJ_TITLE), OWN_ATTR_MISC_OBJ_TITLE , cppu::UnoType<OUString>::get(), 0, 0},
499 1 : { OUString(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , cppu::UnoType<OUString>::get(), 0, 0},
500 : { OUString(), 0, css::uno::Type(), 0, 0 }
501 21 : };
502 :
503 1 : return aPluginPropertyMap_Impl;
504 : }
505 :
506 1 : SfxItemPropertyMapEntry const * ImplGetSvxFramePropertyMap()
507 : {
508 : //TODO/LATER: new properties for ScrollingMode and DefaultBorder
509 : static SfxItemPropertyMapEntry const aFramePropertyMap_Impl[] =
510 : {
511 1 : { OUString("FrameURL"), OWN_ATTR_FRAME_URL , cppu::UnoType<OUString>::get(), 0, 0},
512 1 : { OUString("FrameName"), OWN_ATTR_FRAME_NAME , cppu::UnoType<OUString>::get(), 0, 0},
513 1 : { OUString("FrameIsAutoScroll"), OWN_ATTR_FRAME_ISAUTOSCROLL , cppu::UnoType<bool>::get() , ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0},
514 1 : { OUString("FrameIsBorder"), OWN_ATTR_FRAME_ISBORDER , cppu::UnoType<bool>::get() , 0, 0},
515 1 : { OUString("FrameMarginWidth"), OWN_ATTR_FRAME_MARGIN_WIDTH , cppu::UnoType<sal_Int32>::get(), 0, 0},
516 1 : { OUString("FrameMarginHeight"), OWN_ATTR_FRAME_MARGIN_HEIGHT, cppu::UnoType<sal_Int32>::get(), 0, 0},
517 1 : { OUString("Transformation"), OWN_ATTR_TRANSFORMATION , cppu::UnoType<com::sun::star::drawing::HomogenMatrix3>::get(), 0, 0 },
518 1 : { OUString(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER , cppu::UnoType<sal_Int32>::get(), 0, 0},
519 1 : { OUString(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID , cppu::UnoType<sal_Int16>::get(), 0, 0},
520 1 : { OUString(UNO_NAME_MISC_OBJ_LAYERNAME),SDRATTR_LAYERNAME , cppu::UnoType<OUString>::get(), 0, 0},
521 1 : { OUString(UNO_NAME_LINKDISPLAYBITMAP), OWN_ATTR_LDBITMAP , cppu::UnoType<com::sun::star::awt::XBitmap>::get(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
522 1 : { OUString(UNO_NAME_LINKDISPLAYNAME), OWN_ATTR_LDNAME , cppu::UnoType<OUString>::get(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
523 1 : { OUString(UNO_NAME_OLE2_METAFILE), OWN_ATTR_METAFILE , cppu::UnoType<css::uno::Sequence<sal_Int8>>::get(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
524 1 : { OUString("ThumbnailGraphicURL"), OWN_ATTR_THUMBNAIL , cppu::UnoType<OUString>::get(), 0, 0 },
525 1 : { OUString(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, cppu::UnoType<bool>::get(),0, 0},
526 1 : { OUString(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, cppu::UnoType<bool>::get(),0, 0},
527 1 : { OUString(UNO_NAME_OLE2_PERSISTNAME), OWN_ATTR_PERSISTNAME , cppu::UnoType<OUString>::get(), 0, 0 },
528 1 : { OUString("LinkURL"), OWN_ATTR_OLE_LINKURL , cppu::UnoType<OUString>::get(), 0, 0 },
529 1 : { OUString(UNO_NAME_MISC_OBJ_BOUNDRECT), OWN_ATTR_BOUNDRECT, cppu::UnoType<com::sun::star::awt::Rectangle>::get(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
530 1 : { OUString("VisibleArea"), OWN_ATTR_OLE_VISAREA , cppu::UnoType<com::sun::star::awt::Rectangle>::get(), 0, 0},
531 : // #i68101#
532 1 : { OUString(UNO_NAME_MISC_OBJ_TITLE), OWN_ATTR_MISC_OBJ_TITLE , cppu::UnoType<OUString>::get(), 0, 0},
533 1 : { OUString(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , cppu::UnoType<OUString>::get(), 0, 0},
534 : { OUString(), 0, css::uno::Type(), 0, 0 }
535 24 : };
536 :
537 1 : return aFramePropertyMap_Impl;
538 : }
539 :
540 1 : SfxItemPropertyMapEntry const * ImplGetSvxAppletPropertyMap()
541 : {
542 : static SfxItemPropertyMapEntry const aAppletPropertyMap_Impl[] =
543 : {
544 1 : { OUString("AppletCodeBase"), OWN_ATTR_APPLET_CODEBASE , cppu::UnoType<OUString>::get(), 0, 0},
545 1 : { OUString("AppletName"), OWN_ATTR_APPLET_NAME , cppu::UnoType<OUString>::get(), 0, 0},
546 1 : { OUString("AppletCode"), OWN_ATTR_APPLET_CODE , cppu::UnoType<OUString>::get(), 0, 0},
547 1 : { OUString("AppletCommands"), OWN_ATTR_APPLET_COMMANDS , cppu::UnoType<css::uno::Sequence< ::com::sun::star::beans::PropertyValue >>::get(), 0, 0},
548 1 : { OUString("AppletDocBase"), OWN_ATTR_APPLET_DOCBASE , cppu::UnoType<OUString>::get(), 0, 0},
549 1 : { OUString("AppletIsScript"), OWN_ATTR_APPLET_ISSCRIPT , cppu::UnoType<bool>::get(), 0, 0 },
550 1 : { OUString("Transformation"), OWN_ATTR_TRANSFORMATION , cppu::UnoType<com::sun::star::drawing::HomogenMatrix3>::get(), 0, 0 },
551 1 : { OUString(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER , cppu::UnoType<sal_Int32>::get(), 0, 0},
552 1 : { OUString(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID , cppu::UnoType<sal_Int16>::get(), 0, 0},
553 1 : { OUString(UNO_NAME_MISC_OBJ_LAYERNAME),SDRATTR_LAYERNAME , cppu::UnoType<OUString>::get(), 0, 0},
554 1 : { OUString(UNO_NAME_LINKDISPLAYBITMAP), OWN_ATTR_LDBITMAP , cppu::UnoType<com::sun::star::awt::XBitmap>::get(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
555 1 : { OUString(UNO_NAME_LINKDISPLAYNAME), OWN_ATTR_LDNAME , cppu::UnoType<OUString>::get(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
556 1 : { OUString(UNO_NAME_OLE2_METAFILE), OWN_ATTR_METAFILE , cppu::UnoType<css::uno::Sequence<sal_Int8>>::get(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
557 1 : { OUString("ThumbnailGraphicURL"), OWN_ATTR_THUMBNAIL , cppu::UnoType<OUString>::get(), 0, 0 },
558 1 : { OUString(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, cppu::UnoType<bool>::get(),0, 0},
559 1 : { OUString(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, cppu::UnoType<bool>::get(),0, 0},
560 1 : { OUString(UNO_NAME_OLE2_PERSISTNAME), OWN_ATTR_PERSISTNAME , cppu::UnoType<OUString>::get(), 0, 0 },
561 1 : { OUString("LinkURL"), OWN_ATTR_OLE_LINKURL , cppu::UnoType<OUString>::get(), 0, 0 },
562 1 : { OUString(UNO_NAME_MISC_OBJ_BOUNDRECT), OWN_ATTR_BOUNDRECT, cppu::UnoType<com::sun::star::awt::Rectangle>::get(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
563 1 : { OUString("VisibleArea"), OWN_ATTR_OLE_VISAREA , cppu::UnoType<com::sun::star::awt::Rectangle>::get(), 0, 0},
564 : // #i68101#
565 1 : { OUString(UNO_NAME_MISC_OBJ_TITLE), OWN_ATTR_MISC_OBJ_TITLE , cppu::UnoType<OUString>::get(), 0, 0},
566 1 : { OUString(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , cppu::UnoType<OUString>::get(), 0, 0},
567 : { OUString(), 0, css::uno::Type(), 0, 0 }
568 24 : };
569 :
570 1 : return aAppletPropertyMap_Impl;
571 : }
572 :
573 29 : SfxItemPropertyMapEntry const * ImplGetSvxControlShapePropertyMap()
574 : {
575 : static SfxItemPropertyMapEntry const aControlPropertyMap_Impl[] =
576 : {
577 : // the following properties are mapped to the XControl Model of this shape
578 29 : { OUString(UNO_NAME_EDIT_CHAR_FONTNAME), 0, cppu::UnoType<OUString>::get(), 0, 0 },
579 29 : { OUString(UNO_NAME_EDIT_CHAR_FONTSTYLENAME), 0, cppu::UnoType<OUString>::get(), 0, 0 },
580 29 : { OUString(UNO_NAME_EDIT_CHAR_FONTFAMILY), 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
581 29 : { OUString(UNO_NAME_EDIT_CHAR_FONTCHARSET), 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
582 29 : { OUString(UNO_NAME_EDIT_CHAR_HEIGHT), 0, cppu::UnoType<float>::get(), 0, 0 },
583 29 : { OUString(UNO_NAME_EDIT_CHAR_FONTPITCH), 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
584 29 : { OUString(UNO_NAME_EDIT_CHAR_POSTURE), 0, cppu::UnoType<com::sun::star::awt::FontSlant>::get(),0, 0 },
585 29 : { OUString(UNO_NAME_EDIT_CHAR_WEIGHT), 0, cppu::UnoType<float>::get(), 0, 0 },
586 29 : { OUString(UNO_NAME_EDIT_CHAR_UNDERLINE), 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
587 29 : { OUString(UNO_NAME_EDIT_CHAR_STRIKEOUT), 0, cppu::UnoType<sal_Int16>::get(), 0, 0},
588 29 : { OUString(UNO_NAME_EDIT_CHAR_CASEMAP), 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
589 29 : { OUString(UNO_NAME_EDIT_CHAR_COLOR), 0, cppu::UnoType<sal_Int32>::get(), 0, 0 },
590 29 : { OUString("CharBackColor"), 0, cppu::UnoType<sal_Int32>::get(), 0, 0 },
591 29 : { OUString("CharBackTransparent"), 0, cppu::UnoType<bool>::get(), 0, 0 },
592 29 : { OUString("CharRelief"), 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
593 29 : { OUString("CharUnderlineColor"), 0, cppu::UnoType<sal_Int32>::get(), 0, 0 },
594 29 : { OUString("CharKerning"), 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
595 29 : { OUString("CharWordMode"), 0, cppu::UnoType<bool>::get(), 0, 0 },
596 29 : { OUString(UNO_NAME_EDIT_PARA_ADJUST), 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
597 29 : { OUString("TextVerticalAdjust"), 0, cppu::UnoType<TextVerticalAdjust>::get(), MAYBEVOID, 0 },
598 29 : { OUString("ControlBackground"), 0, cppu::UnoType<sal_Int32>::get(), 0, 0 },
599 29 : { OUString("ControlBorder"), 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
600 29 : { OUString("ControlBorderColor"), 0, cppu::UnoType<sal_Int32>::get(), 0, 0 },
601 29 : { OUString("ControlSymbolColor"), 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
602 29 : { OUString("ImageScaleMode"), 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
603 29 : { OUString(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, cppu::UnoType<bool>::get(),0, 0},
604 29 : { OUString(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, cppu::UnoType<bool>::get(),0, 0},
605 29 : { OUString("ControlTextEmphasis"), 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
606 29 : { OUString("ControlWritingMode"), 0, cppu::UnoType< sal_Int16 >::get(), 0, 0},
607 : // the following properties are handled by SvxShape
608 29 : { OUString("Transformation"), OWN_ATTR_TRANSFORMATION , cppu::UnoType<com::sun::star::drawing::HomogenMatrix3>::get(), 0, 0 },
609 29 : { OUString(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER , cppu::UnoType<sal_Int32>::get(), 0, 0},
610 29 : { OUString(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID , cppu::UnoType<sal_Int16>::get(), 0, 0},
611 29 : { OUString(UNO_NAME_MISC_OBJ_LAYERNAME),SDRATTR_LAYERNAME , cppu::UnoType<OUString>::get(), 0, 0},
612 29 : { OUString(UNO_NAME_LINKDISPLAYBITMAP), OWN_ATTR_LDBITMAP , cppu::UnoType<com::sun::star::awt::XBitmap>::get(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
613 29 : { OUString(UNO_NAME_LINKDISPLAYNAME), OWN_ATTR_LDNAME , cppu::UnoType<OUString>::get(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
614 29 : { OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
615 29 : {OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
616 29 : { OUString(UNO_NAME_MISC_OBJ_BOUNDRECT), OWN_ATTR_BOUNDRECT, cppu::UnoType<com::sun::star::awt::Rectangle>::get(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
617 : // #i68101#
618 29 : { OUString(UNO_NAME_MISC_OBJ_TITLE), OWN_ATTR_MISC_OBJ_TITLE , cppu::UnoType<OUString>::get(), 0, 0},
619 29 : { OUString(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , cppu::UnoType<OUString>::get(), 0, 0},
620 : // #i112587#
621 29 : { OUString(UNO_NAME_MISC_OBJ_PRINTABLE), SDRATTR_OBJPRINTABLE , cppu::UnoType<bool>::get(), 0, 0},
622 29 : { OUString("Visible"), SDRATTR_OBJVISIBLE , cppu::UnoType<bool>::get(), 0, 0},
623 29 : { OUString(UNO_NAME_MISC_OBJ_INTEROPGRABBAG), OWN_ATTR_INTEROPGRABBAG, cppu::UnoType<css::uno::Sequence< ::com::sun::star::beans::PropertyValue >>::get(), 0, 0},
624 : { OUString(), 0, css::uno::Type(), 0, 0 }
625 1305 : };
626 :
627 29 : return aControlPropertyMap_Impl;
628 : }
629 :
630 19 : SfxItemPropertyMapEntry const * ImplGetSvxPageShapePropertyMap()
631 : {
632 : static SfxItemPropertyMapEntry const aPageShapePropertyMap_Impl[] =
633 : {
634 19 : { OUString("PageNumber"), OWN_ATTR_PAGE_NUMBER , cppu::UnoType<sal_Int32>::get(), 0, 0},
635 19 : { OUString("Transformation"), OWN_ATTR_TRANSFORMATION , cppu::UnoType<com::sun::star::drawing::HomogenMatrix3>::get(), 0, 0 },
636 19 : { OUString(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER , cppu::UnoType<sal_Int32>::get(), 0, 0},
637 19 : { OUString(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID , cppu::UnoType<sal_Int16>::get(), 0, 0},
638 19 : { OUString(UNO_NAME_MISC_OBJ_LAYERNAME),SDRATTR_LAYERNAME , cppu::UnoType<OUString>::get(), 0, 0},
639 19 : { OUString(UNO_NAME_LINKDISPLAYBITMAP), OWN_ATTR_LDBITMAP , cppu::UnoType<com::sun::star::awt::XBitmap>::get(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
640 19 : { OUString(UNO_NAME_LINKDISPLAYNAME), OWN_ATTR_LDNAME , cppu::UnoType<OUString>::get(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
641 19 : { OUString(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, cppu::UnoType<bool>::get(),0, 0},
642 19 : { OUString(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, cppu::UnoType<bool>::get(),0, 0},
643 19 : { OUString(UNO_NAME_MISC_OBJ_BOUNDRECT), OWN_ATTR_BOUNDRECT, cppu::UnoType<com::sun::star::awt::Rectangle>::get(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
644 : // #i68101#
645 19 : { OUString(UNO_NAME_MISC_OBJ_TITLE), OWN_ATTR_MISC_OBJ_TITLE , cppu::UnoType<OUString>::get(), 0, 0},
646 19 : { OUString(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , cppu::UnoType<OUString>::get(), 0, 0},
647 : { OUString(), 0, css::uno::Type(), 0, 0 }
648 266 : };
649 :
650 19 : return aPageShapePropertyMap_Impl;
651 : }
652 :
653 11 : SfxItemPropertyMapEntry const * ImplGetSvxCaptionPropertyMap()
654 : {
655 : static SfxItemPropertyMapEntry const aCaptionPropertyMap_Impl[] =
656 : {
657 11 : { OUString("CaptionPoint"), OWN_ATTR_CAPTION_POINT, cppu::UnoType<com::sun::star::awt::Point>::get(), 0, 0 },
658 11 : { OUString("CaptionType"), SDRATTR_CAPTIONTYPE, cppu::UnoType<sal_Int16>::get(), 0, 0},
659 11 : { OUString("CaptionIsFixedAngle"), SDRATTR_CAPTIONFIXEDANGLE, cppu::UnoType<bool>::get(), 0, 0},
660 11 : { OUString("CaptionAngle"), SDRATTR_CAPTIONANGLE, cppu::UnoType<sal_Int32>::get(), 0, 0},
661 11 : { OUString("CaptionGap"), SDRATTR_CAPTIONGAP, cppu::UnoType<sal_Int32>::get(), 0, SFX_METRIC_ITEM},
662 11 : { OUString("CaptionEscapeDirection"), SDRATTR_CAPTIONESCDIR, cppu::UnoType<sal_Int32>::get(), 0, 0},
663 11 : { OUString("CaptionIsEscapeRelative"), SDRATTR_CAPTIONESCISREL, cppu::UnoType<bool>::get(), 0, 0},
664 11 : { OUString("CaptionEscapeRelative"), SDRATTR_CAPTIONESCREL, cppu::UnoType<sal_Int32>::get(), 0, 0},
665 11 : { OUString("CaptionEscapeAbsolute"), SDRATTR_CAPTIONESCABS, cppu::UnoType<sal_Int32>::get(), 0, SFX_METRIC_ITEM},
666 11 : { OUString("CaptionLineLength"), SDRATTR_CAPTIONLINELEN, cppu::UnoType<sal_Int32>::get(), 0, SFX_METRIC_ITEM},
667 11 : { OUString("CaptionIsFitLineLength"), SDRATTR_CAPTIONFITLINELEN, cppu::UnoType<bool>::get(), 0, 0},
668 11 : EDGERADIUS_PROPERTIES
669 297 : FILL_PROPERTIES
670 132 : LINE_PROPERTIES
671 44 : LINE_PROPERTIES_START_END
672 121 : SHAPE_DESCRIPTOR_PROPERTIES
673 110 : MISC_OBJ_PROPERTIES
674 22 : LINKTARGET_PROPERTIES
675 55 : SHADOW_PROPERTIES
676 990 : TEXT_PROPERTIES
677 : // #FontWork#
678 132 : FONTWORK_PROPERTIES
679 11 : { OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
680 11 : {OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
681 : { OUString(), 0, css::uno::Type(), 0, 0 }
682 2079 : };
683 :
684 11 : return aCaptionPropertyMap_Impl;
685 : }
686 :
687 31 : SfxItemPropertyMapEntry const * ImplGetSvxCustomShapePropertyMap()
688 : {
689 : static SfxItemPropertyMapEntry const aCustomShapePropertyMap_Impl[] =
690 : {
691 31 : { OUString("CustomShapeEngine"), SDRATTR_CUSTOMSHAPE_ENGINE, cppu::UnoType<OUString>::get(), 0, 0 },
692 31 : { OUString("CustomShapeData"), SDRATTR_CUSTOMSHAPE_DATA, cppu::UnoType<OUString>::get(), 0, 0 },
693 : { OUString("CustomShapeGeometry"), SDRATTR_CUSTOMSHAPE_GEOMETRY,
694 31 : cppu::UnoType<css::uno::Sequence< ::com::sun::star::beans::PropertyValue >>::get(), 0, 0 },
695 31 : { OUString("CustomShapeGraphicURL"), SDRATTR_CUSTOMSHAPE_REPLACEMENT_URL, cppu::UnoType<OUString>::get(), 0, 0},
696 31 : CUSTOMSHAPE_PROPERTIES
697 837 : FILL_PROPERTIES
698 372 : LINE_PROPERTIES
699 124 : LINE_PROPERTIES_START_END
700 341 : SHAPE_DESCRIPTOR_PROPERTIES
701 310 : MISC_OBJ_PROPERTIES
702 62 : LINKTARGET_PROPERTIES
703 155 : SHADOW_PROPERTIES
704 2790 : TEXT_PROPERTIES
705 31 : {OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
706 31 : {OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
707 : { OUString(), 0, css::uno::Type(), 0, 0 }
708 5270 : };
709 31 : return aCustomShapePropertyMap_Impl;
710 : }
711 :
712 4 : SfxItemPropertyMapEntry const * ImplGetSvxMediaShapePropertyMap()
713 : {
714 : static SfxItemPropertyMapEntry const aMediaShapePropertyMap_Impl[] =
715 : {
716 4 : { OUString(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER, cppu::UnoType<sal_Int32>::get(), 0, 0},
717 4 : { OUString(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID, cppu::UnoType<sal_Int16>::get(), 0, 0},
718 4 : { OUString(UNO_NAME_MISC_OBJ_LAYERNAME), SDRATTR_LAYERNAME, cppu::UnoType<OUString>::get(), 0, 0},
719 4 : { OUString(UNO_NAME_LINKDISPLAYBITMAP), OWN_ATTR_LDBITMAP, cppu::UnoType<com::sun::star::awt::XBitmap>::get(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
720 4 : { OUString(UNO_NAME_LINKDISPLAYNAME), OWN_ATTR_LDNAME, cppu::UnoType<OUString>::get(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
721 4 : { OUString("Transformation"), OWN_ATTR_TRANSFORMATION, cppu::UnoType<com::sun::star::drawing::HomogenMatrix3>::get(), 0, 0 },
722 4 : { OUString("MediaURL"), OWN_ATTR_MEDIA_URL, cppu::UnoType<OUString>::get(), 0, 0},
723 4 : { OUString("PreferredSize"), OWN_ATTR_MEDIA_PREFERREDSIZE, cppu::UnoType<com::sun::star::awt::Size>::get(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
724 4 : { OUString("Loop"), OWN_ATTR_MEDIA_LOOP, cppu::UnoType<sal_Bool>::get(), 0, 0},
725 4 : { OUString("Mute"), OWN_ATTR_MEDIA_MUTE, cppu::UnoType<sal_Bool>::get(), 0, 0},
726 4 : { OUString("VolumeDB"), OWN_ATTR_MEDIA_VOLUMEDB, cppu::UnoType<sal_Int16>::get(), 0, 0},
727 4 : { OUString("Zoom"), OWN_ATTR_MEDIA_ZOOM, cppu::UnoType<com::sun::star::media::ZoomLevel>::get(), 0, 0},
728 4 : { OUString(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, cppu::UnoType<bool>::get(),0, 0},
729 4 : { OUString(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, cppu::UnoType<bool>::get(),0, 0},
730 4 : { OUString(UNO_NAME_MISC_OBJ_BOUNDRECT), OWN_ATTR_BOUNDRECT, cppu::UnoType<com::sun::star::awt::Rectangle>::get(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
731 : // #i68101#
732 4 : { OUString(UNO_NAME_MISC_OBJ_TITLE), OWN_ATTR_MISC_OBJ_TITLE , cppu::UnoType<OUString>::get(), 0, 0},
733 4 : { OUString(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , cppu::UnoType<OUString>::get(), 0, 0},
734 4 : {OUString("PrivateStream"), OWN_ATTR_MEDIA_STREAM, cppu::UnoType<css::io::XInputStream>::get(), 0, 0},
735 4 : {OUString("PrivateTempFileURL"), OWN_ATTR_MEDIA_TEMPFILEURL, cppu::UnoType<OUString>::get(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
736 4 : { OUString("MediaMimeType"), OWN_ATTR_MEDIA_MIMETYPE, cppu::UnoType<OUString>::get(), 0, 0},
737 4 : { OUString("FallbackGraphic"), OWN_ATTR_FALLBACK_GRAPHIC, cppu::UnoType<css::graphic::XGraphic>::get(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
738 : { OUString(), 0, css::uno::Type(), 0, 0 }
739 92 : };
740 :
741 4 : return aMediaShapePropertyMap_Impl;
742 : }
743 :
744 5 : SfxItemPropertyMapEntry const * ImplGetSvxTableShapePropertyMap()
745 : {
746 : static SfxItemPropertyMapEntry const aTableShapePropertyMap_Impl[] =
747 : {
748 5 : { OUString(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER, cppu::UnoType<sal_Int32>::get(), 0, 0},
749 5 : { OUString(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID, cppu::UnoType<sal_Int16>::get(), 0, 0},
750 5 : { OUString(UNO_NAME_MISC_OBJ_LAYERNAME), SDRATTR_LAYERNAME, cppu::UnoType<OUString>::get(), 0, 0},
751 5 : { OUString(UNO_NAME_LINKDISPLAYBITMAP), OWN_ATTR_LDBITMAP, cppu::UnoType<css::awt::XBitmap>::get(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
752 5 : { OUString(UNO_NAME_LINKDISPLAYNAME), OWN_ATTR_LDNAME, cppu::UnoType<OUString>::get(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
753 5 : { OUString("Transformation"), OWN_ATTR_TRANSFORMATION, cppu::UnoType<com::sun::star::drawing::HomogenMatrix3>::get(), 0, 0 },
754 5 : { OUString(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, cppu::UnoType<bool>::get(),0, 0},
755 5 : { OUString(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, cppu::UnoType<bool>::get(),0, 0},
756 5 : { OUString(UNO_NAME_MISC_OBJ_BOUNDRECT), OWN_ATTR_BOUNDRECT, cppu::UnoType<com::sun::star::awt::Rectangle>::get(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
757 5 : { OUString(UNO_NAME_MISC_OBJ_NAME), SDRATTR_OBJECTNAME, cppu::UnoType<rtl::OUString>::get(), 0, 0},
758 5 : { OUString(UNO_NAME_MISC_OBJ_TITLE), OWN_ATTR_MISC_OBJ_TITLE , cppu::UnoType<OUString>::get(), 0, 0},
759 5 : { OUString(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , cppu::UnoType<OUString>::get(), 0, 0},
760 5 : { OUString("Model"), OWN_ATTR_OLEMODEL , cppu::UnoType<css::table::XTable>::get(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
761 5 : { OUString("TableTemplate"), OWN_ATTR_TABLETEMPLATE , cppu::UnoType<css::container::XIndexAccess>::get(), 0, 0},
762 5 : { OUString("UseFirstRowStyle"), OWN_ATTR_TABLETEMPLATE_FIRSTROW, cppu::UnoType<bool>::get(),0, 0},
763 5 : { OUString("UseLastRowStyle"), OWN_ATTR_TABLETEMPLATE_LASTROW, cppu::UnoType<bool>::get(),0, 0},
764 5 : { OUString("UseFirstColumnStyle"), OWN_ATTR_TABLETEMPLATE_FIRSTCOLUMN, cppu::UnoType<bool>::get(),0, 0},
765 5 : { OUString("UseLastColumnStyle"), OWN_ATTR_TABLETEMPLATE_LASTCOLUMN, cppu::UnoType<bool>::get(),0, 0},
766 5 : { OUString("UseBandingRowStyle"), OWN_ATTR_TABLETEMPLATE_BANDINGROWS, cppu::UnoType<bool>::get(),0, 0},
767 5 : { OUString("UseBandingColumnStyle"), OWN_ATTR_TABLETEMPLATE_BANDINGCOULUMNS, cppu::UnoType<bool>::get(),0, 0},
768 5 : { OUString("ReplacementGraphic"), OWN_ATTR_BITMAP, cppu::UnoType<css::graphic::XGraphic>::get(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
769 : { OUString(), 0, css::uno::Type(), 0, 0 }
770 115 : };
771 :
772 5 : return aTableShapePropertyMap_Impl;
773 : }
774 :
775 59 : comphelper::PropertyMapEntry const * ImplGetSvxDrawingDefaultsPropertyMap()
776 : {
777 : static comphelper::PropertyMapEntry const aSvxDrawingDefaultsPropertyMap_Impl[] =
778 : {
779 265 : SHADOW_PROPERTIES
780 530 : LINE_PROPERTIES_DEFAULTS
781 583 : FILL_PROPERTIES_BMP
782 53 : FILL_PROPERTIES_DEFAULTS
783 53 : EDGERADIUS_PROPERTIES
784 4664 : TEXT_PROPERTIES_DEFAULTS
785 265 : CONNECTOR_PROPERTIES
786 1060 : SPECIAL_DIMENSIONING_PROPERTIES_DEFAULTS
787 742 : MISC_3D_OBJ_PROPERTIES
788 53 : SPECIAL_3DBACKSCALE_PROPERTIES
789 : { OUString(), 0, css::uno::Type(), 0, 0 }
790 8380 : };
791 :
792 59 : return aSvxDrawingDefaultsPropertyMap_Impl;
793 : }
794 :
795 36 : comphelper::PropertyMapEntry const * ImplGetAdditionalWriterDrawingDefaultsPropertyMap()
796 : {
797 : static comphelper::PropertyMapEntry const aSvxAdditionalDefaultsPropertyMap_Impl[] =
798 : {
799 36 : { OUString("IsFollowingTextFlow"), SID_SW_FOLLOW_TEXT_FLOW, cppu::UnoType<bool>::get(), 0, 0},
800 : { OUString(), 0, css::uno::Type(), 0, 0 }
801 108 : };
802 :
803 36 : return aSvxAdditionalDefaultsPropertyMap_Impl;
804 : }
805 :
806 : typedef std::unordered_map< OUString, sal_uInt32, OUStringHash > UHashMapImpl;
807 :
808 : namespace {
809 :
810 386014 : const UHashMapImpl& GetUHashImpl()
811 : {
812 386014 : static UHashMapImpl aImpl(63);
813 : static bool bInited = false;
814 386014 : if (!bInited)
815 : {
816 : const struct { const char *name; sal_Int32 length; sal_uInt32 id; } aInit[] = {
817 63 : { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.RectangleShape"), OBJ_RECT },
818 63 : { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.EllipseShape"), OBJ_CIRC },
819 63 : { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.ControlShape"), OBJ_UNO },
820 63 : { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.ConnectorShape"), OBJ_EDGE },
821 63 : { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.MeasureShape"), OBJ_MEASURE },
822 63 : { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.LineShape"), OBJ_LINE },
823 63 : { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PolyPolygonShape"), OBJ_POLY },
824 63 : { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PolyLineShape"), OBJ_PLIN },
825 63 : { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.OpenBezierShape"), OBJ_PATHLINE },
826 63 : { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.ClosedBezierShape"), OBJ_PATHFILL },
827 63 : { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.OpenFreeHandShape"), OBJ_FREELINE },
828 63 : { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.ClosedFreeHandShape"), OBJ_FREEFILL },
829 63 : { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PolyPolygonPathShape"), OBJ_PATHPOLY },
830 63 : { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PolyLinePathShape"), OBJ_PATHPLIN },
831 63 : { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.GraphicObjectShape"), OBJ_GRAF },
832 63 : { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.GroupShape"), OBJ_GRUP },
833 63 : { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.TextShape"), OBJ_TEXT },
834 63 : { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.OLE2Shape"), OBJ_OLE2 },
835 63 : { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PageShape"), OBJ_PAGE },
836 63 : { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.CaptionShape"), OBJ_CAPTION },
837 63 : { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.FrameShape"), OBJ_FRAME },
838 63 : { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PluginShape"), OBJ_OLE2_PLUGIN },
839 63 : { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.AppletShape"), OBJ_OLE2_APPLET },
840 63 : { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.CustomShape"), OBJ_CUSTOMSHAPE },
841 63 : { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.MediaShape"), OBJ_MEDIA },
842 :
843 63 : { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DSceneObject"), E3D_POLYSCENE_ID | E3D_INVENTOR_FLAG },
844 63 : { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DCubeObject"), E3D_CUBEOBJ_ID | E3D_INVENTOR_FLAG },
845 63 : { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DSphereObject"), E3D_SPHEREOBJ_ID | E3D_INVENTOR_FLAG },
846 63 : { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DLatheObject"), E3D_LATHEOBJ_ID | E3D_INVENTOR_FLAG },
847 63 : { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DExtrudeObject"), E3D_EXTRUDEOBJ_ID | E3D_INVENTOR_FLAG },
848 63 : { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DPolygonObject"), E3D_POLYGONOBJ_ID | E3D_INVENTOR_FLAG },
849 63 : { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.OpenGLObject"), OBJ_OPENGL },
850 2079 : };
851 :
852 2079 : for (sal_uInt32 i = 0; i < sizeof(aInit)/sizeof(aInit[0]); i++)
853 2016 : aImpl[OUString( aInit[i].name, aInit[i].length, RTL_TEXTENCODING_ASCII_US ) ] = aInit[i].id;
854 63 : bInited = true;
855 : }
856 :
857 386014 : return aImpl;
858 : }
859 :
860 : }
861 :
862 :
863 195648 : OUString UHashMap::getNameFromId(sal_uInt32 nId)
864 : {
865 195648 : const UHashMapImpl &rMap = GetUHashImpl();
866 :
867 3390315 : for (UHashMapImpl::const_iterator it = rMap.begin(); it != rMap.end(); ++it)
868 : {
869 3390315 : if (it->second == nId)
870 195648 : return it->first;
871 : }
872 : OSL_FAIL("[CL] unknown SdrObject identifier");
873 0 : return OUString();
874 : }
875 :
876 389 : uno::Sequence< OUString > UHashMap::getServiceNames()
877 : {
878 389 : const UHashMapImpl &rMap = GetUHashImpl();
879 :
880 389 : uno::Sequence< OUString > aSeq( rMap.size() );
881 389 : OUString* pStrings = aSeq.getArray();
882 :
883 389 : int i = 0;
884 12837 : for (UHashMapImpl::const_iterator it = rMap.begin(); it != rMap.end(); ++it)
885 12448 : pStrings[i++] = it->first;
886 :
887 389 : return aSeq;
888 : }
889 :
890 189977 : sal_uInt32 UHashMap::getId( const OUString& rCompareString )
891 : {
892 189977 : const UHashMapImpl &rMap = GetUHashImpl();
893 189977 : UHashMapImpl::const_iterator it = rMap.find( rCompareString );
894 189977 : if( it == rMap.end() )
895 23 : return UHASHMAP_NOTFOUND;
896 : else
897 189954 : return it->second;
898 : }
899 :
900 : struct theSvxMapProvider :
901 : public rtl::Static<SvxUnoPropertyMapProvider, theSvxMapProvider>
902 : {
903 : };
904 :
905 332224 : SvxUnoPropertyMapProvider& getSvxMapProvider()
906 : {
907 332224 : return theSvxMapProvider::get();
908 : }
909 :
910 :
911 :
912 69 : SvxUnoPropertyMapProvider::SvxUnoPropertyMapProvider()
913 : {
914 1863 : for(sal_uInt16 i=0;i<SVXMAP_END; i++)
915 : {
916 1794 : aSetArr[i] = 0;
917 1794 : aMapArr[i] = 0;
918 : }
919 69 : }
920 :
921 69 : SvxUnoPropertyMapProvider::~SvxUnoPropertyMapProvider()
922 : {
923 1863 : for(sal_uInt16 i=0;i<SVXMAP_END; i++)
924 1794 : delete aSetArr[i];
925 69 : }
926 :
927 :
928 :
929 167339 : const SfxItemPropertyMapEntry* SvxUnoPropertyMapProvider::GetMap(sal_uInt16 nPropertyId)
930 : {
931 : DBG_ASSERT(nPropertyId < SVXMAP_END, "Id ?" );
932 167339 : if(!aMapArr[nPropertyId]) {
933 362 : switch(nPropertyId) {
934 43 : case SVXMAP_SHAPE: aMapArr[SVXMAP_SHAPE]=ImplGetSvxShapePropertyMap(); break;
935 4 : case SVXMAP_CONNECTOR: aMapArr[SVXMAP_CONNECTOR]=ImplGetSvxConnectorPropertyMap(); break;
936 3 : case SVXMAP_DIMENSIONING: aMapArr[SVXMAP_DIMENSIONING]=ImplGetSvxDimensioningPropertyMap(); break;
937 15 : case SVXMAP_CIRCLE: aMapArr[SVXMAP_CIRCLE]=ImplGetSvxCirclePropertyMap(); break;
938 38 : case SVXMAP_POLYPOLYGON: aMapArr[SVXMAP_POLYPOLYGON]=ImplGetSvxPolyPolygonPropertyMap(); break;
939 23 : case SVXMAP_POLYPOLYGONBEZIER: aMapArr[SVXMAP_POLYPOLYGONBEZIER]=ImplGetSvxPolyPolygonBezierPropertyMap(); break;
940 30 : case SVXMAP_GRAPHICOBJECT: aMapArr[SVXMAP_GRAPHICOBJECT]=ImplGetSvxGraphicObjectPropertyMap(); break;
941 6 : case SVXMAP_3DSCENEOBJECT: aMapArr[SVXMAP_3DSCENEOBJECT]=ImplGetSvx3DSceneObjectPropertyMap(); break;
942 1 : case SVXMAP_3DCUBEOBJEKT: aMapArr[SVXMAP_3DCUBEOBJEKT]=ImplGetSvx3DCubeObjectPropertyMap(); break;
943 1 : case SVXMAP_3DSPHEREOBJECT: aMapArr[SVXMAP_3DSPHEREOBJECT]=ImplGetSvx3DSphereObjectPropertyMap(); break;
944 4 : case SVXMAP_3DLATHEOBJECT: aMapArr[SVXMAP_3DLATHEOBJECT]=ImplGetSvx3DLatheObjectPropertyMap(); break;
945 6 : case SVXMAP_3DEXTRUDEOBJECT: aMapArr[SVXMAP_3DEXTRUDEOBJECT]=ImplGetSvx3DExtrudeObjectPropertyMap(); break;
946 6 : case SVXMAP_3DPOLYGONOBJECT: aMapArr[SVXMAP_3DPOLYGONOBJECT]=ImplGetSvx3DPolygonObjectPropertyMap(); break;
947 0 : case SVXMAP_ALL: aMapArr[SVXMAP_ALL]=ImplGetSvxAllPropertyMap(); break;
948 35 : case SVXMAP_GROUP: aMapArr[SVXMAP_GROUP]=ImplGetSvxGroupPropertyMap(); break;
949 11 : case SVXMAP_CAPTION: aMapArr[SVXMAP_CAPTION]=ImplGetSvxCaptionPropertyMap(); break;
950 13 : case SVXMAP_OLE2: aMapArr[SVXMAP_OLE2]=ImplGetSvxOle2PropertyMap(); break;
951 1 : case SVXMAP_PLUGIN: aMapArr[SVXMAP_PLUGIN]=ImplGetSvxPluginPropertyMap(); break;
952 1 : case SVXMAP_FRAME: aMapArr[SVXMAP_FRAME]=ImplGetSvxFramePropertyMap(); break;
953 1 : case SVXMAP_APPLET: aMapArr[SVXMAP_APPLET]=ImplGetSvxAppletPropertyMap(); break;
954 29 : case SVXMAP_CONTROL: aMapArr[SVXMAP_CONTROL]=ImplGetSvxControlShapePropertyMap(); break;
955 32 : case SVXMAP_TEXT: aMapArr[SVXMAP_TEXT]=ImplGetSvxTextShapePropertyMap(); break;
956 31 : case SVXMAP_CUSTOMSHAPE: aMapArr[SVXMAP_CUSTOMSHAPE]=ImplGetSvxCustomShapePropertyMap(); break;
957 4 : case SVXMAP_MEDIA: aMapArr[SVXMAP_MEDIA]=ImplGetSvxMediaShapePropertyMap(); break;
958 5 : case SVXMAP_TABLE: aMapArr[SVXMAP_TABLE]=ImplGetSvxTableShapePropertyMap(); break;
959 19 : case SVXMAP_PAGE: aMapArr[SVXMAP_PAGE] = ImplGetSvxPageShapePropertyMap(); break;
960 :
961 : default:
962 : OSL_FAIL( "Unknown property map for SvxUnoPropertyMapProvider!" );
963 : }
964 : // Sort(nPropertyId);
965 : }
966 167339 : return aMapArr[nPropertyId];
967 : }
968 166977 : const SvxItemPropertySet* SvxUnoPropertyMapProvider::GetPropertySet(sal_uInt16 nPropertyId, SfxItemPool& rPool)
969 : {
970 166977 : if( !aSetArr[nPropertyId] )
971 362 : aSetArr[nPropertyId] = new SvxItemPropertySet( GetMap( nPropertyId ), rPool );
972 166977 : return aSetArr[nPropertyId];
973 : }
974 :
975 :
976 : /** maps the API constant MeasureUnit to a vcl MapUnit enum.
977 : Returns false if conversion is not supported.
978 :
979 : @cl: for warnings01 I found out that this method never worked so I thin
980 : it is not used at all
981 : sal_Bool SvxMeasureUnitToMapUnit( const short eApi, int& eVcl ) throw()
982 : {
983 : switch( eVcl )
984 : {
985 : case util::MeasureUnit::MM_100TH: eVcl = MAP_100TH_MM; break;
986 : case util::MeasureUnit::MM_10TH: eVcl = MAP_10TH_MM; break;
987 : case util::MeasureUnit::MM: eVcl = MAP_MM; break;
988 : case util::MeasureUnit::CM: eVcl = MAP_CM; break;
989 : case util::MeasureUnit::INCH_1000TH: eVcl = MAP_1000TH_INCH; break;
990 : case util::MeasureUnit::INCH_100TH: eVcl = MAP_100TH_INCH; break;
991 : case util::MeasureUnit::INCH_10TH: eVcl = MAP_10TH_INCH; break;
992 : case util::MeasureUnit::INCH: eVcl = MAP_INCH; break;
993 : case util::MeasureUnit::POINT: eVcl = MAP_POINT; break;
994 : case util::MeasureUnit::TWIP: eVcl = MAP_TWIP; break;
995 : case util::MeasureUnit::PERCENT: eVcl = MAP_RELATIVE; break;
996 : default:
997 : return false;
998 : }
999 :
1000 : return true;
1001 : }
1002 : */
1003 :
1004 : /** maps the vcl MapUnit enum to a API constant MeasureUnit.
1005 : Returns false if conversion is not supported.
1006 : */
1007 0 : bool SvxMapUnitToMeasureUnit( const MapUnit eVcl, short& eApi ) throw()
1008 : {
1009 0 : switch( eVcl )
1010 : {
1011 0 : case MAP_100TH_MM: eApi = util::MeasureUnit::MM_100TH; break;
1012 0 : case MAP_10TH_MM: eApi = util::MeasureUnit::MM_10TH; break;
1013 0 : case MAP_MM: eApi = util::MeasureUnit::MM; break;
1014 0 : case MAP_CM: eApi = util::MeasureUnit::CM; break;
1015 0 : case MAP_1000TH_INCH: eApi = util::MeasureUnit::INCH_1000TH; break;
1016 0 : case MAP_100TH_INCH: eApi = util::MeasureUnit::INCH_100TH; break;
1017 0 : case MAP_10TH_INCH: eApi = util::MeasureUnit::INCH_10TH; break;
1018 0 : case MAP_INCH: eApi = util::MeasureUnit::INCH; break;
1019 0 : case MAP_POINT: eApi = util::MeasureUnit::POINT; break;
1020 0 : case MAP_TWIP: eApi = util::MeasureUnit::TWIP; break;
1021 0 : case MAP_RELATIVE: eApi = util::MeasureUnit::PERCENT; break;
1022 : default:
1023 0 : return false;
1024 : }
1025 :
1026 0 : return true;
1027 : }
1028 :
1029 : /** maps the API constant MeasureUnit to a vcl MapUnit enum.
1030 : Returns false if conversion is not supported.
1031 : */
1032 :
1033 1 : bool SvxMeasureUnitToFieldUnit( const short eApi, FieldUnit& eVcl ) throw()
1034 : {
1035 1 : switch( eApi )
1036 : {
1037 0 : case util::MeasureUnit::MM: eVcl = FUNIT_MM; break;
1038 0 : case util::MeasureUnit::CM: eVcl = FUNIT_CM; break;
1039 0 : case util::MeasureUnit::M: eVcl = FUNIT_M; break;
1040 0 : case util::MeasureUnit::KM: eVcl = FUNIT_KM; break;
1041 0 : case util::MeasureUnit::TWIP: eVcl = FUNIT_TWIP; break;
1042 0 : case util::MeasureUnit::POINT: eVcl = FUNIT_POINT; break;
1043 0 : case util::MeasureUnit::PICA: eVcl = FUNIT_PICA; break;
1044 1 : case util::MeasureUnit::INCH: eVcl = FUNIT_INCH; break;
1045 0 : case util::MeasureUnit::FOOT: eVcl = FUNIT_FOOT; break;
1046 0 : case util::MeasureUnit::MILE: eVcl = FUNIT_MILE; break;
1047 0 : case util::MeasureUnit::PERCENT: eVcl = FUNIT_PERCENT; break;
1048 0 : case util::MeasureUnit::MM_100TH: eVcl = FUNIT_100TH_MM; break;
1049 : default:
1050 0 : return false;
1051 : }
1052 :
1053 1 : return true;
1054 : }
1055 :
1056 : /** maps the vcl MapUnit enum to a API constant MeasureUnit.
1057 : Returns false if conversion is not supported.
1058 : */
1059 8 : bool SvxFieldUnitToMeasureUnit( const FieldUnit eVcl, short& eApi ) throw()
1060 : {
1061 8 : switch( eVcl )
1062 : {
1063 0 : case FUNIT_MM: eApi = util::MeasureUnit::MM; break;
1064 0 : case FUNIT_CM: eApi = util::MeasureUnit::CM; break;
1065 0 : case FUNIT_M: eApi = util::MeasureUnit::M; break;
1066 0 : case FUNIT_KM: eApi = util::MeasureUnit::KM; break;
1067 0 : case FUNIT_TWIP: eApi = util::MeasureUnit::TWIP; break;
1068 0 : case FUNIT_POINT: eApi = util::MeasureUnit::POINT; break;
1069 0 : case FUNIT_PICA: eApi = util::MeasureUnit::PICA; break;
1070 8 : case FUNIT_INCH: eApi = util::MeasureUnit::INCH; break;
1071 0 : case FUNIT_FOOT: eApi = util::MeasureUnit::FOOT; break;
1072 0 : case FUNIT_MILE: eApi = util::MeasureUnit::MILE; break;
1073 0 : case FUNIT_PERCENT: eApi = util::MeasureUnit::PERCENT; break;
1074 0 : case FUNIT_100TH_MM: eApi = util::MeasureUnit::MM_100TH; break;
1075 : default:
1076 0 : return false;
1077 : }
1078 :
1079 8 : return true;
1080 : }
1081 :
1082 48285 : bool SvxUnoGetResourceRanges( const short nWhich, int& nApiResIds, int& nIntResIds, int& nCount ) throw()
1083 : {
1084 48285 : switch( nWhich )
1085 : {
1086 : case XATTR_FILLBITMAP:
1087 11522 : nApiResIds = RID_SVXSTR_BMP_DEF_START;
1088 11522 : nIntResIds = RID_SVXSTR_BMP_START;
1089 11522 : nCount = RID_SVXSTR_BMP_DEF_END - RID_SVXSTR_BMP_DEF_START + 1;
1090 11522 : break;
1091 :
1092 : case XATTR_LINEDASH:
1093 2864 : nApiResIds = RID_SVXSTR_DASH_DEF_START;
1094 2864 : nIntResIds = RID_SVXSTR_DASH_START;
1095 2864 : nCount = RID_SVXSTR_DASH_DEF_END - RID_SVXSTR_DASH_DEF_START + 1;
1096 2864 : break;
1097 :
1098 : case XATTR_LINESTART:
1099 : case XATTR_LINEEND:
1100 1926 : nApiResIds = RID_SVXSTR_LEND_DEF_START;
1101 1926 : nIntResIds = RID_SVXSTR_LEND_START;
1102 1926 : nCount = RID_SVXSTR_LEND_DEF_END - RID_SVXSTR_LEND_DEF_START + 1;
1103 1926 : break;
1104 :
1105 : case XATTR_FILLGRADIENT:
1106 12080 : nApiResIds = RID_SVXSTR_GRDT_DEF_START;
1107 12080 : nIntResIds = RID_SVXSTR_GRDT_START;
1108 12080 : nCount = RID_SVXSTR_GRDT_DEF_END - RID_SVXSTR_GRDT_DEF_START + 1;
1109 12080 : break;
1110 :
1111 : case XATTR_FILLHATCH:
1112 13619 : nApiResIds = RID_SVXSTR_HATCH_DEF_START;
1113 13619 : nIntResIds = RID_SVXSTR_HATCH_START;
1114 13619 : nCount = RID_SVXSTR_HATCH_DEF_END - RID_SVXSTR_HATCH_DEF_START + 1;
1115 13619 : break;
1116 :
1117 : case XATTR_FILLFLOATTRANSPARENCE:
1118 6274 : nApiResIds = RID_SVXSTR_TRASNGR_DEF_START;
1119 6274 : nIntResIds = RID_SVXSTR_TRASNGR_START;
1120 6274 : nCount = RID_SVXSTR_TRASNGR_DEF_END - RID_SVXSTR_TRASNGR_DEF_START + 1;
1121 6274 : break;
1122 :
1123 : default:
1124 0 : return false;
1125 : }
1126 :
1127 48285 : return true;
1128 : }
1129 :
1130 48285 : bool SvxUnoConvertResourceString( int nSourceResIds, int nDestResIds, int nCount, OUString& rString ) throw()
1131 : {
1132 : // first, calculate the search string length without an optional number behind the name
1133 48285 : sal_Int32 nLength = rString.getLength();
1134 126354 : while( nLength > 0 )
1135 : {
1136 75210 : const sal_Unicode nChar = rString[ nLength - 1 ];
1137 75210 : if( (nChar < '0') || (nChar > '9') )
1138 : break;
1139 :
1140 29784 : nLength--;
1141 : }
1142 :
1143 : // if we cut off a number, also cut of some spaces
1144 48285 : if( nLength != rString.getLength() )
1145 : {
1146 87656 : while( nLength > 0 )
1147 : {
1148 58178 : const sal_Unicode nChar = rString[ nLength - 1 ];
1149 58178 : if( nChar != ' ' )
1150 29478 : break;
1151 :
1152 28700 : nLength--;
1153 : }
1154 : }
1155 :
1156 48285 : const OUString aShortString( rString.copy( 0, nLength ) );
1157 :
1158 : int i;
1159 706034 : for( i = 0; i < nCount; i++ )
1160 : {
1161 696993 : sal_uInt16 nResId = (sal_uInt16)(nSourceResIds + i);
1162 696993 : const ResId aRes( SVX_RES(nResId));
1163 696993 : const OUString aCompare( aRes.toString() );
1164 696993 : if( aShortString == aCompare )
1165 : {
1166 39079 : sal_uInt16 nNewResId = (sal_uInt16)(nDestResIds + i);
1167 39079 : ResId aNewRes( SVX_RES( nNewResId ));
1168 39079 : rString = rString.replaceAt( 0, aShortString.getLength(), aNewRes.toString() );
1169 39079 : return true;
1170 : }
1171 657914 : else if( rString == aCompare )
1172 : {
1173 165 : sal_uInt16 nNewResId = (sal_uInt16)(nDestResIds + i);
1174 165 : ResId aNewRes( SVX_RES( nNewResId ));
1175 165 : rString = aNewRes.toString();
1176 165 : return true;
1177 : }
1178 657749 : }
1179 :
1180 9041 : return false;
1181 : }
1182 :
1183 :
1184 : // #i122649# Some comments on the below arrays:
1185 : // - They need to have the same order and count of items
1186 : // - They are used to translate between translated and non-translated color names
1187 : // - To make longer names be found which start with the same basic string,
1188 : // these have to be in front of others
1189 :
1190 : // It would be nice to:
1191 : // - evtl. organize these in a single array with 2-dimensional inner to elliminate
1192 : // the possibility to define it wrong
1193 : // - change the compare to also work when a shorter name is in front of a longer one
1194 :
1195 : static const sal_uInt16 SvxUnoColorNameDefResId[] =
1196 : {
1197 : RID_SVXSTR_COLOR_BLUEGREY_DEF,
1198 : RID_SVXSTR_COLOR_BLACK_DEF,
1199 : RID_SVXSTR_COLOR_BLUE_CLASSIC_DEF,
1200 : RID_SVXSTR_COLOR_BLUE_DEF,
1201 : RID_SVXSTR_COLOR_GREEN_DEF,
1202 : RID_SVXSTR_COLOR_CYAN_DEF,
1203 : RID_SVXSTR_COLOR_RED_DEF,
1204 : RID_SVXSTR_COLOR_MAGENTA_DEF,
1205 : RID_SVXSTR_COLOR_GREY_DEF,
1206 : RID_SVXSTR_COLOR_YELLOWGREEN_DEF,
1207 : RID_SVXSTR_COLOR_YELLOW_DEF,
1208 : RID_SVXSTR_COLOR_WHITE_DEF,
1209 : RID_SVXSTR_COLOR_ORANGE_DEF,
1210 : RID_SVXSTR_COLOR_VIOLET_DEF,
1211 : RID_SVXSTR_COLOR_BORDEAUX_DEF,
1212 : RID_SVXSTR_COLOR_PALE_YELLOW_DEF,
1213 : RID_SVXSTR_COLOR_PALE_GREEN_DEF,
1214 : RID_SVXSTR_COLOR_DARKVIOLET_DEF,
1215 : RID_SVXSTR_COLOR_SALMON_DEF,
1216 : RID_SVXSTR_COLOR_SEABLUE_DEF,
1217 : RID_SVXSTR_COLOR_CHART_DEF,
1218 : RID_SVXSTR_COLOR_PURPLE_DEF,
1219 : RID_SVXSTR_COLOR_SKYBLUE_DEF,
1220 : RID_SVXSTR_COLOR_PINK_DEF,
1221 : RID_SVXSTR_COLOR_TURQUOISE_DEF,
1222 : RID_SVXSTR_COLOR_LIBRE_GREEN_1_DEF,
1223 : RID_SVXSTR_COLOR_LIBRE_GREEN_ACCENT_DEF,
1224 : RID_SVXSTR_COLOR_LIBRE_BLUE_ACCENT_DEF,
1225 : RID_SVXSTR_COLOR_LIBRE_ORANGE_ACCENT_DEF,
1226 : RID_SVXSTR_COLOR_LIBRE_PURPLE_DEF,
1227 : RID_SVXSTR_COLOR_LIBRE_PURPLE_ACCENT_DEF,
1228 : RID_SVXSTR_COLOR_LIBRE_YELLOW_ACCENT_DEF,
1229 : RID_SVXSTR_COLOR_TANGO_BUTTER_DEF,
1230 : RID_SVXSTR_COLOR_TANGO_ORANGE_DEF,
1231 : RID_SVXSTR_COLOR_TANGO_CHOCOLATE_DEF,
1232 : RID_SVXSTR_COLOR_TANGO_CHAMELEON_DEF,
1233 : RID_SVXSTR_COLOR_TANGO_SKY_BLUE_DEF,
1234 : RID_SVXSTR_COLOR_TANGO_PLUM_DEF,
1235 : RID_SVXSTR_COLOR_TANGO_SCARLET_RED_DEF,
1236 : RID_SVXSTR_COLOR_TANGO_ALUMINIUM_DEF
1237 : };
1238 :
1239 : static const sal_uInt16 SvxUnoColorNameResId[] =
1240 : {
1241 : RID_SVXSTR_COLOR_BLUEGREY,
1242 : RID_SVXSTR_COLOR_BLACK,
1243 : RID_SVXSTR_COLOR_BLUE_CLASSIC,
1244 : RID_SVXSTR_COLOR_BLUE,
1245 : RID_SVXSTR_COLOR_GREEN,
1246 : RID_SVXSTR_COLOR_CYAN,
1247 : RID_SVXSTR_COLOR_RED,
1248 : RID_SVXSTR_COLOR_MAGENTA,
1249 : RID_SVXSTR_COLOR_GREY,
1250 : RID_SVXSTR_COLOR_YELLOWGREEN,
1251 : RID_SVXSTR_COLOR_YELLOW,
1252 : RID_SVXSTR_COLOR_WHITE,
1253 : RID_SVXSTR_COLOR_ORANGE,
1254 : RID_SVXSTR_COLOR_VIOLET,
1255 : RID_SVXSTR_COLOR_BORDEAUX,
1256 : RID_SVXSTR_COLOR_PALE_YELLOW,
1257 : RID_SVXSTR_COLOR_PALE_GREEN,
1258 : RID_SVXSTR_COLOR_DARKVIOLET,
1259 : RID_SVXSTR_COLOR_SALMON,
1260 : RID_SVXSTR_COLOR_SEABLUE,
1261 : RID_SVXSTR_COLOR_CHART,
1262 : RID_SVXSTR_COLOR_PURPLE,
1263 : RID_SVXSTR_COLOR_SKYBLUE,
1264 : RID_SVXSTR_COLOR_PINK,
1265 : RID_SVXSTR_COLOR_TURQUOISE,
1266 : RID_SVXSTR_COLOR_LIBRE_GREEN_1,
1267 : RID_SVXSTR_COLOR_LIBRE_GREEN_ACCENT,
1268 : RID_SVXSTR_COLOR_LIBRE_BLUE_ACCENT,
1269 : RID_SVXSTR_COLOR_LIBRE_ORANGE_ACCENT,
1270 : RID_SVXSTR_COLOR_LIBRE_PURPLE,
1271 : RID_SVXSTR_COLOR_LIBRE_PURPLE_ACCENT,
1272 : RID_SVXSTR_COLOR_LIBRE_YELLOW_ACCENT,
1273 : RID_SVXSTR_COLOR_TANGO_BUTTER,
1274 : RID_SVXSTR_COLOR_TANGO_ORANGE,
1275 : RID_SVXSTR_COLOR_TANGO_CHOCOLATE,
1276 : RID_SVXSTR_COLOR_TANGO_CHAMELEON,
1277 : RID_SVXSTR_COLOR_TANGO_SKY_BLUE,
1278 : RID_SVXSTR_COLOR_TANGO_PLUM,
1279 : RID_SVXSTR_COLOR_TANGO_SCARLET_RED,
1280 : RID_SVXSTR_COLOR_TANGO_ALUMINIUM
1281 : };
1282 :
1283 :
1284 :
1285 0 : bool SvxUnoConvertResourceString( const sal_uInt16* pSourceResIds, const sal_uInt16* pDestResIds, int nCount, OUString& rString ) throw()
1286 : {
1287 : //We replace e.g. "Gray 10%" with the translation of Gray, but we shouldn't
1288 : //replace "Red Hat 1" with the translation of Red :-)
1289 0 : sal_Int32 nLength = rString.getLength();
1290 0 : while( nLength > 0 )
1291 : {
1292 0 : const sal_Unicode nChar = rString[nLength-1];
1293 0 : if (nChar != '%' && (nChar < '0' || nChar > '9'))
1294 : break;
1295 0 : nLength--;
1296 : }
1297 0 : OUString sStr = rString.copy(0, nLength).trim();
1298 :
1299 0 : for(int i = 0; i < nCount; ++i )
1300 : {
1301 0 : OUString aStrDefName = SVX_RESSTR( pSourceResIds[i] );
1302 0 : if( sStr == aStrDefName )
1303 : {
1304 0 : OUString aReplace = SVX_RESSTR( pDestResIds[i] );
1305 0 : rString = rString.replaceAt( 0, aStrDefName.getLength(), aReplace );
1306 0 : return true;
1307 : }
1308 0 : }
1309 :
1310 0 : return false;
1311 : }
1312 :
1313 : /** if the given name is a predefined name for the current language it is replaced by
1314 : the corresponding api name.
1315 : */
1316 2362 : OUString SvxUnogetApiNameForItem(const sal_Int16 nWhich, const OUString& rInternalName) throw()
1317 : {
1318 2362 : OUString aNew = rInternalName;
1319 :
1320 2362 : if( nWhich == XATTR_LINECOLOR )
1321 : {
1322 0 : if( SvxUnoConvertResourceString( SvxUnoColorNameResId, SvxUnoColorNameDefResId, sizeof( SvxUnoColorNameResId ) / sizeof( sal_uInt16 ), aNew ) )
1323 : {
1324 0 : return aNew;
1325 : }
1326 : }
1327 : else
1328 : {
1329 : int nApiResIds;
1330 : int nIntResIds;
1331 : int nCount;
1332 :
1333 2362 : if( SvxUnoGetResourceRanges( nWhich, nApiResIds, nIntResIds, nCount ) )
1334 : {
1335 2362 : if(SvxUnoConvertResourceString( nIntResIds, nApiResIds, nCount, aNew ) )
1336 : {
1337 350 : return aNew;
1338 : }
1339 : }
1340 : }
1341 :
1342 : // just use previous name, if nothing else was found.
1343 2012 : return rInternalName;
1344 : }
1345 :
1346 : /** if the given name is a predefined api name it is replaced by the predefined name
1347 : for the current language.
1348 : */
1349 45923 : OUString SvxUnogetInternalNameForItem(const sal_Int16 nWhich, const OUString& rApiName) throw()
1350 : {
1351 45923 : OUString aNew = rApiName;
1352 :
1353 45923 : if( nWhich == XATTR_LINECOLOR )
1354 : {
1355 0 : if( SvxUnoConvertResourceString( SvxUnoColorNameDefResId, SvxUnoColorNameResId, sizeof( SvxUnoColorNameResId ) / sizeof( sal_uInt16 ), aNew ) )
1356 : {
1357 0 : return aNew;
1358 : }
1359 : }
1360 : else
1361 : {
1362 : int nApiResIds;
1363 : int nIntResIds;
1364 : int nCount;
1365 :
1366 45923 : if( SvxUnoGetResourceRanges( nWhich, nApiResIds, nIntResIds, nCount ) )
1367 : {
1368 45923 : if(SvxUnoConvertResourceString( nApiResIds, nIntResIds, nCount, aNew ) )
1369 : {
1370 38894 : return aNew;
1371 : }
1372 : }
1373 : }
1374 :
1375 : // just use previous name, if nothing else was found.
1376 7029 : return rApiName;
1377 : }
1378 :
1379 :
1380 :
1381 518 : comphelper::PropertySetInfo* SvxPropertySetInfoPool::getOrCreate( sal_Int32 nServiceId ) throw()
1382 : {
1383 518 : SolarMutexGuard aGuard;
1384 :
1385 518 : if( nServiceId > SVXUNO_SERVICEID_LASTID )
1386 : {
1387 : OSL_FAIL( "unknown service id!" );
1388 0 : return NULL;
1389 : }
1390 :
1391 518 : if( mpInfos[ nServiceId ] == NULL )
1392 : {
1393 59 : mpInfos[nServiceId] = new comphelper::PropertySetInfo();
1394 59 : mpInfos[nServiceId]->acquire();
1395 :
1396 59 : switch( nServiceId )
1397 : {
1398 : case SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS:
1399 23 : mpInfos[SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS]->add( ImplGetSvxDrawingDefaultsPropertyMap() );
1400 23 : break;
1401 : case SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER:
1402 36 : mpInfos[SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER]->add( ImplGetSvxDrawingDefaultsPropertyMap() );
1403 36 : mpInfos[SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER]->remove( OUString( UNO_NAME_EDIT_PARA_IS_HANGING_PUNCTUATION ) );
1404 : // OD 13.10.2003 #i18732# - add property map for writer item 'IsFollowingTextFlow'
1405 36 : mpInfos[SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER]->add( ImplGetAdditionalWriterDrawingDefaultsPropertyMap() );
1406 36 : break;
1407 :
1408 : default:
1409 : OSL_FAIL( "unknown service id!" );
1410 : }
1411 : }
1412 :
1413 518 : return mpInfos[ nServiceId ];
1414 : }
1415 :
1416 435 : comphelper::PropertySetInfo* SvxPropertySetInfoPool::mpInfos[SVXUNO_SERVICEID_LASTID+1] = { NULL };
1417 :
1418 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|