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