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