merge the formfield patch from ooo-build
[ooovba.git] / svx / source / unodraw / unoprov.cxx
blob0ab785b391eca9dfe0c0b78c979931a648703fc1
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: unoprov.cxx,v $
10 * $Revision: 1.72.92.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_svx.hxx"
34 #define _SVX_USE_UNOGLOBALS_
36 #include <com/sun/star/table/XTable.hpp>
38 #include <com/sun/star/container/XIndexAccess.hpp>
39 #include <com/sun/star/frame/XModel.hpp>
40 #include <com/sun/star/embed/XEmbeddedObject.hpp>
41 #include <com/sun/star/util/MeasureUnit.hpp>
42 #include <com/sun/star/drawing/TextVerticalAdjust.hpp>
43 #ifndef _COM_SUN_STAR_MEDIA_ZOOMLEVEL_HDL_
44 #include <com/sun/star/media/ZoomLevel.hpp>
45 #endif
46 #include <com/sun/star/io/XInputStream.hpp>
47 #include <vcl/fldunit.hxx>
48 #include <tools/shl.hxx>
49 #include <vos/mutex.hxx>
50 #include <vcl/svapp.hxx>
52 #include <comphelper/propertysetinfo.hxx>
53 #include <svx/dialmgr.hxx>
55 #include "unoapi.hxx"
56 #include <svx/unotext.hxx>
57 #include <svx/unoshprp.hxx>
58 #include <svx/svdobj.hxx>
59 #include "globl3d.hxx"
60 #include <svx/dialogs.hrc>
62 using namespace ::rtl;
63 using namespace ::com::sun::star;
64 using namespace ::com::sun::star::beans::PropertyAttribute;
65 using ::com::sun::star::drawing::TextVerticalAdjust;
67 SfxItemPropertyMapEntry* ImplGetSvxShapePropertyMap()
69 static SfxItemPropertyMapEntry aShapePropertyMap_Impl[] =
71 EDGERADIUS_PROPERTIES
72 FILL_PROPERTIES
73 LINE_PROPERTIES
74 LINE_PROPERTIES_START_END
75 SHAPE_DESCRIPTOR_PROPERTIES
76 MISC_OBJ_PROPERTIES
77 LINKTARGET_PROPERTIES
78 SHADOW_PROPERTIES
79 TEXT_PROPERTIES
80 // #FontWork#
81 FONTWORK_PROPERTIES
82 CUSTOMSHAPE_PROPERTIES
83 { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
84 {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
85 {0,0,0,0,0,0}
89 return aShapePropertyMap_Impl;
92 SfxItemPropertyMapEntry* ImplGetSvxTextShapePropertyMap()
94 static SfxItemPropertyMapEntry aTextShapePropertyMap_Impl[] =
96 EDGERADIUS_PROPERTIES
97 FILL_PROPERTIES
98 LINE_PROPERTIES
99 LINE_PROPERTIES_START_END
100 SHAPE_DESCRIPTOR_PROPERTIES
101 MISC_OBJ_PROPERTIES_NO_SHEAR
102 LINKTARGET_PROPERTIES
103 SHADOW_PROPERTIES
104 TEXT_PROPERTIES
105 // #FontWork#
106 FONTWORK_PROPERTIES
107 CUSTOMSHAPE_PROPERTIES
108 { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
109 {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
110 {0,0,0,0,0,0}
114 return aTextShapePropertyMap_Impl;
117 SfxItemPropertyMapEntry* ImplGetSvxConnectorPropertyMap()
119 static SfxItemPropertyMapEntry aConnectorPropertyMap_Impl[] =
121 SPECIAL_CONNECTOR_PROPERTIES
122 EDGERADIUS_PROPERTIES
123 FILL_PROPERTIES
124 LINE_PROPERTIES
125 LINE_PROPERTIES_START_END
126 SHAPE_DESCRIPTOR_PROPERTIES
127 MISC_OBJ_PROPERTIES
128 LINKTARGET_PROPERTIES
129 SHADOW_PROPERTIES
130 TEXT_PROPERTIES
131 // #FontWork#
132 FONTWORK_PROPERTIES
133 { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
134 {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
135 {0,0,0,0,0,0}
139 return aConnectorPropertyMap_Impl;
142 SfxItemPropertyMapEntry* ImplGetSvxDimensioningPropertyMap()
144 static SfxItemPropertyMapEntry aDimensioningPropertyMap_Impl[] =
146 SPECIAL_DIMENSIONING_PROPERTIES
147 EDGERADIUS_PROPERTIES
148 FILL_PROPERTIES
149 LINE_PROPERTIES
150 LINE_PROPERTIES_START_END
151 SHAPE_DESCRIPTOR_PROPERTIES
152 MISC_OBJ_PROPERTIES
153 LINKTARGET_PROPERTIES
154 SHADOW_PROPERTIES
155 TEXT_PROPERTIES
156 // #FontWork#
157 FONTWORK_PROPERTIES
158 { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
159 {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
160 {0,0,0,0,0,0}
164 return aDimensioningPropertyMap_Impl;
167 SfxItemPropertyMapEntry* ImplGetSvxCirclePropertyMap()
169 static SfxItemPropertyMapEntry aCirclePropertyMap_Impl[] =
171 SPECIAL_CIRCLE_PROPERTIES
172 EDGERADIUS_PROPERTIES
173 FILL_PROPERTIES
174 LINE_PROPERTIES
175 LINE_PROPERTIES_START_END
176 SHAPE_DESCRIPTOR_PROPERTIES
177 MISC_OBJ_PROPERTIES
178 LINKTARGET_PROPERTIES
179 SHADOW_PROPERTIES
180 TEXT_PROPERTIES
181 // #FontWork#
182 FONTWORK_PROPERTIES
183 CUSTOMSHAPE_PROPERTIES
184 { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
185 {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
186 {0,0,0,0,0,0}
190 return aCirclePropertyMap_Impl;
193 SfxItemPropertyMapEntry* ImplGetSvxPolyPolygonPropertyMap()
195 static SfxItemPropertyMapEntry aPolyPolygonPropertyMap_Impl[] =
197 { MAP_CHAR_LEN("Geometry"), OWN_ATTR_BASE_GEOMETRY, SEQTYPE(::getCppuType((const ::com::sun::star::drawing::PointSequenceSequence*)0)), 0, 0 },
198 SPECIAL_POLYGON_PROPERTIES
199 SPECIAL_POLYPOLYGON_PROPERTIES
200 FILL_PROPERTIES
201 LINE_PROPERTIES
202 LINE_PROPERTIES_START_END
203 SHAPE_DESCRIPTOR_PROPERTIES
204 MISC_OBJ_PROPERTIES
205 LINKTARGET_PROPERTIES
206 SHADOW_PROPERTIES
207 TEXT_PROPERTIES
208 // #FontWork#
209 FONTWORK_PROPERTIES
210 CUSTOMSHAPE_PROPERTIES
211 { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
212 {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
213 {0,0,0,0,0,0}
217 return aPolyPolygonPropertyMap_Impl;
220 SfxItemPropertyMapEntry* ImplGetSvxPolyPolygonBezierPropertyMap()
222 static SfxItemPropertyMapEntry aPolyPolygonBezierPropertyMap_Impl[] =
224 { MAP_CHAR_LEN("Geometry"), OWN_ATTR_BASE_GEOMETRY, &::getCppuType((const ::com::sun::star::drawing::PolyPolygonBezierCoords*)0), 0, 0 },
225 SPECIAL_POLYGON_PROPERTIES
226 SPECIAL_POLYPOLYGONBEZIER_PROPERTIES
227 FILL_PROPERTIES
228 LINE_PROPERTIES
229 LINE_PROPERTIES_START_END
230 SHAPE_DESCRIPTOR_PROPERTIES
231 MISC_OBJ_PROPERTIES
232 LINKTARGET_PROPERTIES
233 SHADOW_PROPERTIES
234 TEXT_PROPERTIES
235 // #FontWork#
236 FONTWORK_PROPERTIES
237 CUSTOMSHAPE_PROPERTIES
238 { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
239 {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
240 {0,0,0,0,0,0}
244 return aPolyPolygonBezierPropertyMap_Impl;
247 SfxItemPropertyMapEntry* ImplGetSvxGraphicObjectPropertyMap()
249 static SfxItemPropertyMapEntry aGraphicObjectPropertyMap_Impl[] =
251 SPECIAL_GRAPHOBJ_PROPERTIES
253 // #i25616#
254 FILL_PROPERTIES
256 LINE_PROPERTIES
257 LINE_PROPERTIES_START_END
258 SHAPE_DESCRIPTOR_PROPERTIES
259 MISC_OBJ_PROPERTIES_NO_SHEAR
260 LINKTARGET_PROPERTIES
261 SHADOW_PROPERTIES
262 TEXT_PROPERTIES
263 // #FontWork#
264 FONTWORK_PROPERTIES
265 { MAP_CHAR_LEN("IsMirrored"), OWN_ATTR_MIRRORED , &::getCppuBooleanType(), 0, 0},
266 { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
267 {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
268 {MAP_CHAR_LEN("GraphicStream"), OWN_ATTR_GRAPHIC_STREAM, &::com::sun::star::io::XInputStream::static_type(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
269 {0,0,0,0,0,0}
273 return aGraphicObjectPropertyMap_Impl;
276 SfxItemPropertyMapEntry* ImplGetSvx3DSceneObjectPropertyMap()
278 static SfxItemPropertyMapEntry a3DSceneObjectPropertyMap_Impl[] =
280 SPECIAL_3DSCENEOBJECT_PROPERTIES
281 FILL_PROPERTIES
282 LINE_PROPERTIES
283 LINE_PROPERTIES_START_END
284 SHAPE_DESCRIPTOR_PROPERTIES
285 MISC_OBJ_PROPERTIES
286 LINKTARGET_PROPERTIES
287 SHADOW_PROPERTIES
288 {0,0,0,0,0,0}
292 return a3DSceneObjectPropertyMap_Impl;
295 SfxItemPropertyMapEntry* ImplGetSvx3DCubeObjectPropertyMap()
297 static SfxItemPropertyMapEntry a3DCubeObjectPropertyMap_Impl[] =
299 SPECIAL_3DCUBEOBJECT_PROPERTIES
300 MISC_3D_OBJ_PROPERTIES
301 FILL_PROPERTIES
302 LINE_PROPERTIES
303 LINE_PROPERTIES_START_END
304 SHAPE_DESCRIPTOR_PROPERTIES
305 MISC_OBJ_PROPERTIES
306 LINKTARGET_PROPERTIES
307 SHADOW_PROPERTIES
308 { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
309 {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
310 {0,0,0,0,0,0}
314 return a3DCubeObjectPropertyMap_Impl;
317 SfxItemPropertyMapEntry* ImplGetSvx3DSphereObjectPropertyMap()
319 static SfxItemPropertyMapEntry a3DSphereObjectPropertyMap_Impl[] =
321 SPECIAL_3DSPHEREOBJECT_PROPERTIES
322 MISC_3D_OBJ_PROPERTIES
323 FILL_PROPERTIES
324 LINE_PROPERTIES
325 LINE_PROPERTIES_START_END
326 SHAPE_DESCRIPTOR_PROPERTIES
327 MISC_OBJ_PROPERTIES
328 LINKTARGET_PROPERTIES
329 SHADOW_PROPERTIES
330 { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
331 {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
332 {0,0,0,0,0,0}
335 return a3DSphereObjectPropertyMap_Impl;
338 SfxItemPropertyMapEntry* ImplGetSvx3DLatheObjectPropertyMap()
340 static SfxItemPropertyMapEntry a3DLatheObjectPropertyMap_Impl[] =
342 SPECIAL_3DLATHEOBJECT_PROPERTIES
344 // #107245# New 3D properties which are possible for lathe and extrude 3d objects
345 SPECIAL_3DLATHEANDEXTRUDEOBJ_PROPERTIES
347 SPECIAL_3DBACKSCALE_PROPERTIES
348 MISC_3D_OBJ_PROPERTIES
349 FILL_PROPERTIES
350 LINE_PROPERTIES
351 LINE_PROPERTIES_START_END
352 SHAPE_DESCRIPTOR_PROPERTIES
353 MISC_OBJ_PROPERTIES
354 LINKTARGET_PROPERTIES
355 SHADOW_PROPERTIES
356 { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
357 {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
358 {0,0,0,0,0,0}
362 return a3DLatheObjectPropertyMap_Impl;
365 SfxItemPropertyMapEntry* ImplGetSvx3DExtrudeObjectPropertyMap()
367 static SfxItemPropertyMapEntry a3DExtrudeObjectPropertyMap_Impl[] =
369 SPECIAL_3DEXTRUDEOBJECT_PROPERTIES
371 // #107245# New 3D properties which are possible for lathe and extrude 3d objects
372 SPECIAL_3DLATHEANDEXTRUDEOBJ_PROPERTIES
374 SPECIAL_3DBACKSCALE_PROPERTIES
375 MISC_3D_OBJ_PROPERTIES
376 FILL_PROPERTIES
377 LINE_PROPERTIES
378 LINE_PROPERTIES_START_END
379 SHAPE_DESCRIPTOR_PROPERTIES
380 MISC_OBJ_PROPERTIES
381 LINKTARGET_PROPERTIES
382 SHADOW_PROPERTIES
383 { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
384 {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
385 {0,0,0,0,0,0}
389 return a3DExtrudeObjectPropertyMap_Impl;
392 SfxItemPropertyMapEntry* ImplGetSvx3DPolygonObjectPropertyMap()
394 static SfxItemPropertyMapEntry a3DPolygonObjectPropertyMap_Impl[] =
396 SPECIAL_3DPOLYGONOBJECT_PROPERTIES
397 MISC_3D_OBJ_PROPERTIES
398 FILL_PROPERTIES
399 LINE_PROPERTIES
400 LINE_PROPERTIES_START_END
401 SHAPE_DESCRIPTOR_PROPERTIES
402 MISC_OBJ_PROPERTIES
403 LINKTARGET_PROPERTIES
404 SHADOW_PROPERTIES
405 { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
406 {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
407 {0,0,0,0,0,0}
411 return a3DPolygonObjectPropertyMap_Impl;
414 SfxItemPropertyMapEntry* ImplGetSvxAllPropertyMap()
416 static SfxItemPropertyMapEntry aAllPropertyMap_Impl[] =
418 SHADOW_PROPERTIES
419 LINE_PROPERTIES
420 LINE_PROPERTIES_START_END
421 FILL_PROPERTIES
422 EDGERADIUS_PROPERTIES
423 TEXT_PROPERTIES
424 // #FontWork#
425 FONTWORK_PROPERTIES
426 SHAPE_DESCRIPTOR_PROPERTIES
427 MISC_OBJ_PROPERTIES
428 LINKTARGET_PROPERTIES
429 SPECIAL_CONNECTOR_PROPERTIES
430 SPECIAL_DIMENSIONING_PROPERTIES
431 SPECIAL_CIRCLE_PROPERTIES
432 SPECIAL_POLYGON_PROPERTIES
433 SPECIAL_POLYPOLYGON_PROPERTIES
434 SPECIAL_POLYPOLYGONBEZIER_PROPERTIES
435 SPECIAL_GRAPHOBJ_PROPERTIES
436 SPECIAL_3DSCENEOBJECT_PROPERTIES
437 MISC_3D_OBJ_PROPERTIES
438 SPECIAL_3DCUBEOBJECT_PROPERTIES
439 SPECIAL_3DSPHEREOBJECT_PROPERTIES
440 SPECIAL_3DLATHEOBJECT_PROPERTIES
441 SPECIAL_3DEXTRUDEOBJECT_PROPERTIES
443 // #107245# New 3D properties which are possible for lathe and extrude 3d objects
444 SPECIAL_3DLATHEANDEXTRUDEOBJ_PROPERTIES
446 SPECIAL_3DBACKSCALE_PROPERTIES
447 SPECIAL_3DPOLYGONOBJECT_PROPERTIES
448 CUSTOMSHAPE_PROPERTIES
449 { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
450 {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
451 {0,0,0,0,0,0}
455 return aAllPropertyMap_Impl;
458 SfxItemPropertyMapEntry* ImplGetSvxGroupPropertyMap()
460 static SfxItemPropertyMapEntry aGroupPropertyMap_Impl[] =
462 SHAPE_DESCRIPTOR_PROPERTIES
463 MISC_OBJ_PROPERTIES
464 LINKTARGET_PROPERTIES
465 {0,0,0,0,0,0}
469 return aGroupPropertyMap_Impl;
472 SfxItemPropertyMapEntry* ImplGetSvxOle2PropertyMap()
474 static SfxItemPropertyMapEntry aOle2PropertyMap_Impl[] =
476 { MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION , &::getCppuType((const struct com::sun::star::drawing::HomogenMatrix3*)0), 0, 0 }, \
477 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER , &::getCppuType((const sal_Int32*)0), 0, 0},
478 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID , &::getCppuType((const sal_Int16*)0), 0, 0},
479 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERNAME),SDRATTR_LAYERNAME , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
480 { 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},
481 { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYNAME), OWN_ATTR_LDNAME , &::getCppuType(( const ::rtl::OUString*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
482 { 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},
483 { MAP_CHAR_LEN("ThumbnailGraphicURL"), OWN_ATTR_THUMBNAIL , &::getCppuType(( const ::rtl::OUString*)0), 0, 0 },
484 { 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},
485 { 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},
486 { MAP_CHAR_LEN("OriginalSize"), OWN_ATTR_OLESIZE , &::getCppuType(( const ::com::sun::star::awt::Size*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
487 { MAP_CHAR_LEN("CLSID"), OWN_ATTR_CLSID , &::getCppuType(( const ::rtl::OUString*)0), 0, 0 },
488 { MAP_CHAR_LEN("IsInternal"), OWN_ATTR_INTERNAL_OLE , &::getBooleanCppuType() , ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
489 { MAP_CHAR_LEN("VisibleArea"), OWN_ATTR_OLE_VISAREA , &::getCppuType((const ::com::sun::star::awt::Rectangle*)0), 0, 0},
490 { MAP_CHAR_LEN("Aspect"), OWN_ATTR_OLE_ASPECT , &::getCppuType((const sal_Int64*)0), 0, 0},
491 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, &::getBooleanCppuType(),0, 0},
492 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, &::getBooleanCppuType(),0, 0},
493 { MAP_CHAR_LEN(UNO_NAME_OLE2_PERSISTNAME), OWN_ATTR_PERSISTNAME , &::getCppuType(( const ::rtl::OUString*)0), 0, 0 },
494 { MAP_CHAR_LEN("LinkURL"), OWN_ATTR_OLE_LINKURL , &::getCppuType(( const ::rtl::OUString*)0), 0, 0 },
495 { 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},
496 { 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},
497 // #i68101#
498 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_TITLE), OWN_ATTR_MISC_OBJ_TITLE , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
499 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
500 {0,0,0,0,0,0}
504 return aOle2PropertyMap_Impl;
507 SfxItemPropertyMapEntry* ImplGetSvxPluginPropertyMap()
509 static SfxItemPropertyMapEntry aPluginPropertyMap_Impl[] =
511 { MAP_CHAR_LEN("PluginMimeType"), OWN_ATTR_PLUGIN_MIMETYPE , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
512 { MAP_CHAR_LEN("PluginURL"), OWN_ATTR_PLUGIN_URL , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
513 { MAP_CHAR_LEN("PluginCommands"), OWN_ATTR_PLUGIN_COMMANDS , SEQTYPE(::getCppuType((::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >*)0)), 0, 0},
514 { MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION , &::getCppuType((const struct com::sun::star::drawing::HomogenMatrix3*)0), 0, 0 }, \
515 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER , &::getCppuType((const sal_Int32*)0), 0, 0},
516 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID , &::getCppuType((const sal_Int16*)0), 0, 0},
517 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERNAME),SDRATTR_LAYERNAME , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
518 { 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},
519 { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYNAME), OWN_ATTR_LDNAME , &::getCppuType(( const ::rtl::OUString*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
520 { 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},
521 { MAP_CHAR_LEN("ThumbnailGraphicURL"), OWN_ATTR_THUMBNAIL , &::getCppuType(( const ::rtl::OUString*)0), 0, 0 },
522 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, &::getBooleanCppuType(),0, 0},
523 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, &::getBooleanCppuType(),0, 0},
524 { MAP_CHAR_LEN(UNO_NAME_OLE2_PERSISTNAME), OWN_ATTR_PERSISTNAME , &::getCppuType(( const ::rtl::OUString*)0), 0, 0 },
525 { MAP_CHAR_LEN("LinkURL"), OWN_ATTR_OLE_LINKURL , &::getCppuType(( const ::rtl::OUString*)0), 0, 0 },
526 { 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},
527 { MAP_CHAR_LEN("VisibleArea"), OWN_ATTR_OLE_VISAREA , &::getCppuType((const ::com::sun::star::awt::Rectangle*)0), 0, 0},
528 // #i68101#
529 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_TITLE), OWN_ATTR_MISC_OBJ_TITLE , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
530 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
531 {0,0,0,0,0,0}
535 return aPluginPropertyMap_Impl;
538 SfxItemPropertyMapEntry* ImplGetSvxFramePropertyMap()
540 //TODO/LATER: new properties for ScrollingMode and DefaultBorder
541 static SfxItemPropertyMapEntry aFramePropertyMap_Impl[] =
543 { MAP_CHAR_LEN("FrameURL"), OWN_ATTR_FRAME_URL , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
544 { MAP_CHAR_LEN("FrameName"), OWN_ATTR_FRAME_NAME , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
545 { MAP_CHAR_LEN("FrameIsAutoScroll"), OWN_ATTR_FRAME_ISAUTOSCROLL , &::getBooleanCppuType() , ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0},
546 { MAP_CHAR_LEN("FrameIsBorder"), OWN_ATTR_FRAME_ISBORDER , &::getBooleanCppuType() , 0, 0},
547 { MAP_CHAR_LEN("FrameMarginWidth"), OWN_ATTR_FRAME_MARGIN_WIDTH , &::getCppuType((const sal_Int32*)0), 0, 0},
548 { MAP_CHAR_LEN("FrameMarginHeight"), OWN_ATTR_FRAME_MARGIN_HEIGHT, &::getCppuType((const sal_Int32*)0), 0, 0},
549 { MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION , &::getCppuType((const struct com::sun::star::drawing::HomogenMatrix3*)0), 0, 0 }, \
550 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER , &::getCppuType((const sal_Int32*)0), 0, 0},
551 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID , &::getCppuType((const sal_Int16*)0), 0, 0},
552 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERNAME),SDRATTR_LAYERNAME , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
553 { 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},
554 { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYNAME), OWN_ATTR_LDNAME , &::getCppuType(( const ::rtl::OUString*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
555 { 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},
556 { MAP_CHAR_LEN("ThumbnailGraphicURL"), OWN_ATTR_THUMBNAIL , &::getCppuType(( const ::rtl::OUString*)0), 0, 0 },
557 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, &::getBooleanCppuType(),0, 0},
558 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, &::getBooleanCppuType(),0, 0},
559 { MAP_CHAR_LEN(UNO_NAME_OLE2_PERSISTNAME), OWN_ATTR_PERSISTNAME , &::getCppuType(( const ::rtl::OUString*)0), 0, 0 },
560 { MAP_CHAR_LEN("LinkURL"), OWN_ATTR_OLE_LINKURL , &::getCppuType(( const ::rtl::OUString*)0), 0, 0 },
561 { 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},
562 { MAP_CHAR_LEN("VisibleArea"), OWN_ATTR_OLE_VISAREA , &::getCppuType((const ::com::sun::star::awt::Rectangle*)0), 0, 0},
563 // #i68101#
564 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_TITLE), OWN_ATTR_MISC_OBJ_TITLE , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
565 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
566 {0,0,0,0,0,0}
570 return aFramePropertyMap_Impl;
573 SfxItemPropertyMapEntry* ImplGetSvxAppletPropertyMap()
575 static SfxItemPropertyMapEntry aAppletPropertyMap_Impl[] =
577 { MAP_CHAR_LEN("AppletCodeBase"), OWN_ATTR_APPLET_CODEBASE , &::getCppuType(( const ::rtl::OUString*)0), 0, 0},
578 { MAP_CHAR_LEN("AppletName"), OWN_ATTR_APPLET_NAME , &::getCppuType(( const ::rtl::OUString*)0), 0, 0},
579 { MAP_CHAR_LEN("AppletCode"), OWN_ATTR_APPLET_CODE , &::getCppuType(( const ::rtl::OUString*)0), 0, 0},
580 { MAP_CHAR_LEN("AppletCommands"), OWN_ATTR_APPLET_COMMANDS , SEQTYPE(::getCppuType((::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >*)0)), 0, 0},
581 { MAP_CHAR_LEN("AppletDocBase"), OWN_ATTR_APPLET_DOCBASE , &::getCppuType(( const ::rtl::OUString*)0), 0, 0},
582 { MAP_CHAR_LEN("AppletIsScript"), OWN_ATTR_APPLET_ISSCRIPT , &::getBooleanCppuType(), 0, 0 },
583 { MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION , &::getCppuType((const struct com::sun::star::drawing::HomogenMatrix3*)0), 0, 0 }, \
584 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER , &::getCppuType((const sal_Int32*)0), 0, 0},
585 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID , &::getCppuType((const sal_Int16*)0), 0, 0},
586 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERNAME),SDRATTR_LAYERNAME , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
587 { 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},
588 { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYNAME), OWN_ATTR_LDNAME , &::getCppuType(( const ::rtl::OUString*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
589 { 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},
590 { MAP_CHAR_LEN("ThumbnailGraphicURL"), OWN_ATTR_THUMBNAIL , &::getCppuType(( const ::rtl::OUString*)0), 0, 0 },
591 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, &::getBooleanCppuType(),0, 0},
592 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, &::getBooleanCppuType(),0, 0},
593 { MAP_CHAR_LEN(UNO_NAME_OLE2_PERSISTNAME), OWN_ATTR_PERSISTNAME , &::getCppuType(( const ::rtl::OUString*)0), 0, 0 },
594 { MAP_CHAR_LEN("LinkURL"), OWN_ATTR_OLE_LINKURL , &::getCppuType(( const ::rtl::OUString*)0), 0, 0 },
595 { 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},
596 { MAP_CHAR_LEN("VisibleArea"), OWN_ATTR_OLE_VISAREA , &::getCppuType((const ::com::sun::star::awt::Rectangle*)0), 0, 0},
597 // #i68101#
598 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_TITLE), OWN_ATTR_MISC_OBJ_TITLE , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
599 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
600 {0,0,0,0,0,0}
604 return aAppletPropertyMap_Impl;
607 SfxItemPropertyMapEntry* ImplGetSvxControlShapePropertyMap()
609 static SfxItemPropertyMapEntry aControlPropertyMap_Impl[] =
611 // the following properties are mapped to the XControl Model of this shape
612 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTNAME), 0, &::getCppuType((const ::rtl::OUString*)0), 0, 0 },
613 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTSTYLENAME), 0, &::getCppuType((const ::rtl::OUString*)0), 0, 0 },
614 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTFAMILY), 0, &::getCppuType((const sal_Int16*)0), 0, 0 },
615 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTCHARSET), 0, &::getCppuType((const sal_Int16*)0), 0, 0 },
616 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_HEIGHT), 0, &::getCppuType((const float*)0), 0, 0 },
617 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTPITCH), 0, &::getCppuType((const sal_Int16*)0), 0, 0 },
618 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_POSTURE), 0, &::getCppuType((const ::com::sun::star::awt::FontSlant*)0),0, 0 },
619 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_WEIGHT), 0, &::getCppuType((const float*)0), 0, 0 },
620 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_UNDERLINE), 0, &::getCppuType((const sal_Int16*)0), 0, 0 },
621 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_STRIKEOUT), 0, &::getCppuType((const sal_Int16*)0), 0, 0},
622 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_COLOR), 0, &::getCppuType((const sal_Int32*)0), 0, 0 },
623 { MAP_CHAR_LEN("CharRelief"), 0, &::getCppuType((const sal_Int16*)0), 0, 0 },
624 { MAP_CHAR_LEN("CharUnderlineColor"), 0, &::getCppuType((const sal_Int32*)0), 0, 0 },
625 { MAP_CHAR_LEN("CharKerning"), 0, &::getCppuType((const sal_Int16*)0), 0, 0 },
626 { MAP_CHAR_LEN("CharWordMode"), 0, &::getBooleanCppuType(), 0, 0 },
627 { MAP_CHAR_LEN(UNO_NAME_EDIT_PARA_ADJUST), 0, &::getCppuType((const sal_Int16*)0), 0, 0 },
628 { MAP_CHAR_LEN("TextVerticalAdjust"), 0, &::getCppuType((const TextVerticalAdjust*)0), MAYBEVOID, 0 },
629 { MAP_CHAR_LEN("ControlBackground"), 0, &::getCppuType((const sal_Int32*)0), 0, 0 },
630 { MAP_CHAR_LEN("ControlBorder"), 0, &::getCppuType((const sal_Int16*)0), 0, 0 },
631 { MAP_CHAR_LEN("ControlBorderColor"), 0, &::getCppuType((const sal_Int32*)0), 0, 0 },
632 { MAP_CHAR_LEN("ControlSymbolColor"), 0, &::getCppuType((const sal_Int16*)0), 0, 0 },
633 { MAP_CHAR_LEN("ImageScaleMode"), 0, &::getCppuType((const sal_Int16*)0), 0, 0 },
634 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, &::getBooleanCppuType(),0, 0},
635 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, &::getBooleanCppuType(),0, 0},
636 { MAP_CHAR_LEN("ControlTextEmphasis"), 0, &::getCppuType((const sal_Int16*)0), 0, 0 },
637 { MAP_CHAR_LEN("ControlWritingMode"), 0, &::cppu::UnoType< sal_Int16 >::get(), 0, 0},
638 // the following properties are handled by SvxShape
639 { MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION , &::getCppuType((const struct com::sun::star::drawing::HomogenMatrix3*)0), 0, 0 },
640 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER , &::getCppuType((const sal_Int32*)0), 0, 0},
641 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID , &::getCppuType((const sal_Int16*)0), 0, 0},
642 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERNAME),SDRATTR_LAYERNAME , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
643 { 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},
644 { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYNAME), OWN_ATTR_LDNAME , &::getCppuType(( const ::rtl::OUString*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
645 { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
646 {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
647 { 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},
648 // #i68101#
649 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_TITLE), OWN_ATTR_MISC_OBJ_TITLE , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
650 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
651 {0,0,0,0,0,0}
655 return aControlPropertyMap_Impl;
658 SfxItemPropertyMapEntry* ImplGetSvxPageShapePropertyMap()
660 static SfxItemPropertyMapEntry aPageShapePropertyMap_Impl[] =
662 { MAP_CHAR_LEN("PageNumber"), OWN_ATTR_PAGE_NUMBER , &::getCppuType((const sal_Int32*)0), 0, 0},
663 { MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION , &::getCppuType((const struct com::sun::star::drawing::HomogenMatrix3*)0), 0, 0 }, \
664 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER , &::getCppuType((const sal_Int32*)0), 0, 0},
665 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID , &::getCppuType((const sal_Int16*)0), 0, 0},
666 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERNAME),SDRATTR_LAYERNAME , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
667 { 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},
668 { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYNAME), OWN_ATTR_LDNAME , &::getCppuType(( const ::rtl::OUString*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
669 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, &::getBooleanCppuType(),0, 0},
670 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, &::getBooleanCppuType(),0, 0},
671 { 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},
672 // #i68101#
673 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_TITLE), OWN_ATTR_MISC_OBJ_TITLE , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
674 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
675 {0,0,0,0,0,0}
679 return aPageShapePropertyMap_Impl;
682 SfxItemPropertyMapEntry* ImplGetSvxCaptionPropertyMap()
684 static SfxItemPropertyMapEntry aCaptionPropertyMap_Impl[] =
686 { MAP_CHAR_LEN("CaptionPoint"), OWN_ATTR_CAPTION_POINT, &::getCppuType((const com::sun::star::awt::Point*)0), 0, 0 },
687 { MAP_CHAR_LEN("CaptionType"), SDRATTR_CAPTIONTYPE, &::getCppuType((const sal_Int16*)0), 0, 0},
688 { MAP_CHAR_LEN("CaptionIsFixedAngle"), SDRATTR_CAPTIONFIXEDANGLE, &::getBooleanCppuType(), 0, 0},
689 { MAP_CHAR_LEN("CaptionAngle"), SDRATTR_CAPTIONANGLE, &::getCppuType((const sal_Int32*)0), 0, 0},
690 { MAP_CHAR_LEN("CaptionGap"), SDRATTR_CAPTIONGAP, &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM},
691 { MAP_CHAR_LEN("CaptionEscapeDirection"), SDRATTR_CAPTIONESCDIR, &::getCppuType((const sal_Int32*)0), 0, 0},
692 { MAP_CHAR_LEN("CaptionIsEscapeRelative"), SDRATTR_CAPTIONESCISREL, &::getBooleanCppuType(), 0, 0},
693 { MAP_CHAR_LEN("CaptionEscapeRelative"), SDRATTR_CAPTIONESCREL, &::getCppuType((const sal_Int32*)0), 0, 0},
694 { MAP_CHAR_LEN("CaptionEscapeAbsolute"), SDRATTR_CAPTIONESCABS, &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM},
695 { MAP_CHAR_LEN("CaptionLineLength"), SDRATTR_CAPTIONLINELEN, &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM},
696 { MAP_CHAR_LEN("CaptionIsFitLineLength"), SDRATTR_CAPTIONFITLINELEN, &::getBooleanCppuType(), 0, 0},
697 EDGERADIUS_PROPERTIES
698 FILL_PROPERTIES
699 LINE_PROPERTIES
700 LINE_PROPERTIES_START_END
701 SHAPE_DESCRIPTOR_PROPERTIES
702 MISC_OBJ_PROPERTIES
703 LINKTARGET_PROPERTIES
704 SHADOW_PROPERTIES
705 TEXT_PROPERTIES
706 // #FontWork#
707 FONTWORK_PROPERTIES
708 { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
709 {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
710 {0,0,0,0,0,0}
714 return aCaptionPropertyMap_Impl;
717 SfxItemPropertyMapEntry* ImplGetSvxCustomShapePropertyMap()
719 static SfxItemPropertyMapEntry aCustomShapePropertyMap_Impl[] =
721 { MAP_CHAR_LEN("CustomShapeEngine"), SDRATTR_CUSTOMSHAPE_ENGINE, &::getCppuType((const ::rtl::OUString*)0), 0, 0 },
722 { MAP_CHAR_LEN("CustomShapeData"), SDRATTR_CUSTOMSHAPE_DATA, &::getCppuType((const ::rtl::OUString*)0), 0, 0 },
723 { MAP_CHAR_LEN("CustomShapeGeometry"), SDRATTR_CUSTOMSHAPE_GEOMETRY, SEQTYPE(::getCppuType((::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >*)0)), 0, 0 },
724 { MAP_CHAR_LEN("CustomShapeGraphicURL"), SDRATTR_CUSTOMSHAPE_REPLACEMENT_URL, &::getCppuType((const ::rtl::OUString*)0), 0, 0},
725 CUSTOMSHAPE_PROPERTIES
726 FILL_PROPERTIES
727 LINE_PROPERTIES
728 LINE_PROPERTIES_START_END
729 SHAPE_DESCRIPTOR_PROPERTIES
730 MISC_OBJ_PROPERTIES
731 LINKTARGET_PROPERTIES
732 SHADOW_PROPERTIES
733 TEXT_PROPERTIES
734 {MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
735 {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
736 {0,0,0,0,0,0}
739 return aCustomShapePropertyMap_Impl;
742 SfxItemPropertyMapEntry* ImplGetSvxMediaShapePropertyMap()
744 static SfxItemPropertyMapEntry aMediaShapePropertyMap_Impl[] =
746 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER, &::getCppuType((const sal_Int32*)0), 0, 0},
747 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID, &::getCppuType((const sal_Int16*)0), 0, 0},
748 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERNAME), SDRATTR_LAYERNAME, &::getCppuType((const ::rtl::OUString*)0), 0, 0},
749 { 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},
750 { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYNAME), OWN_ATTR_LDNAME, &::getCppuType(( const ::rtl::OUString*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
751 { MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION, &::getCppuType((const struct com::sun::star::drawing::HomogenMatrix3*)0), 0, 0 },
752 { MAP_CHAR_LEN("MediaURL"), OWN_ATTR_MEDIA_URL, &::getCppuType((const ::rtl::OUString*)0), 0, 0},
753 { MAP_CHAR_LEN("PreferredSize"), OWN_ATTR_MEDIA_PREFERREDSIZE, &::getCppuType((const ::com::sun::star::awt::Size*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
754 { MAP_CHAR_LEN("Loop"), OWN_ATTR_MEDIA_LOOP, &::getCppuType((const sal_Bool*)0), 0, 0},
755 { MAP_CHAR_LEN("Mute"), OWN_ATTR_MEDIA_MUTE, &::getCppuType((const sal_Bool*)0), 0, 0},
756 { MAP_CHAR_LEN("VolumeDB"), OWN_ATTR_MEDIA_VOLUMEDB, &::getCppuType((const sal_Int16*)0), 0, 0},
757 { MAP_CHAR_LEN("Zoom"), OWN_ATTR_MEDIA_ZOOM, &::getCppuType((const ::com::sun::star::media::ZoomLevel*)0), 0, 0},
758 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, &::getBooleanCppuType(),0, 0},
759 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, &::getBooleanCppuType(),0, 0},
760 { 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},
761 // #i68101#
762 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_TITLE), OWN_ATTR_MISC_OBJ_TITLE , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
763 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
764 {0,0,0,0,0,0}
768 return aMediaShapePropertyMap_Impl;
771 SfxItemPropertyMapEntry* ImplGetSvxTableShapePropertyMap()
773 static SfxItemPropertyMapEntry aTableShapePropertyMap_Impl[] =
775 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER, &::getCppuType((const sal_Int32*)0), 0, 0},
776 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID, &::getCppuType((const sal_Int16*)0), 0, 0},
777 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERNAME), SDRATTR_LAYERNAME, &::getCppuType((const ::rtl::OUString*)0), 0, 0},
778 { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYBITMAP), OWN_ATTR_LDBITMAP, &::com::sun::star::awt::XBitmap::static_type(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
779 { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYNAME), OWN_ATTR_LDNAME, &::getCppuType(( const ::rtl::OUString*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
780 { MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION, &::getCppuType((const struct com::sun::star::drawing::HomogenMatrix3*)0), 0, 0 },
781 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, &::getBooleanCppuType(),0, 0},
782 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, &::getBooleanCppuType(),0, 0},
783 { 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},
784 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_TITLE), OWN_ATTR_MISC_OBJ_TITLE , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
785 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
786 { MAP_CHAR_LEN("Model"), OWN_ATTR_OLEMODEL , &::com::sun::star::table::XTable::static_type(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
787 { MAP_CHAR_LEN("TableTemplate"), OWN_ATTR_TABLETEMPLATE , &::com::sun::star::container::XIndexAccess::static_type(), 0, 0},
788 { MAP_CHAR_LEN("UseFirstRowStyle"), OWN_ATTR_TABLETEMPLATE_FIRSTROW, &::getBooleanCppuType(),0, 0},
789 { MAP_CHAR_LEN("UseLastRowStyle"), OWN_ATTR_TABLETEMPLATE_LASTROW, &::getBooleanCppuType(),0, 0},
790 { MAP_CHAR_LEN("UseFirstColumnStyle"), OWN_ATTR_TABLETEMPLATE_FIRSTCOLUMN, &::getBooleanCppuType(),0, 0},
791 { MAP_CHAR_LEN("UseLastColumnStyle"), OWN_ATTR_TABLETEMPLATE_LASTCOLUMN, &::getBooleanCppuType(),0, 0},
792 { MAP_CHAR_LEN("UseBandingRowStyle"), OWN_ATTR_TABLETEMPLATE_BANDINGROWS, &::getBooleanCppuType(),0, 0},
793 { MAP_CHAR_LEN("UseBandingColumnStyle"), OWN_ATTR_TABLETEMPLATE_BANDINGCOULUMNS, &::getBooleanCppuType(),0, 0},
794 { MAP_CHAR_LEN("ReplacementGraphic"), OWN_ATTR_BITMAP, &::com::sun::star::graphic::XGraphic::static_type(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
796 {0,0,0,0,0,0}
799 return aTableShapePropertyMap_Impl;
802 comphelper::PropertyMapEntry* ImplGetSvxDrawingDefaultsPropertyMap()
804 static comphelper::PropertyMapEntry aSvxDrawingDefaultsPropertyMap_Impl[] =
806 SHADOW_PROPERTIES
807 LINE_PROPERTIES_DEFAULTS
808 FILL_PROPERTIES_BMP
809 FILL_PROPERTIES_DEFAULTS
810 EDGERADIUS_PROPERTIES
811 TEXT_PROPERTIES_DEFAULTS
812 CONNECTOR_PROPERTIES
813 SPECIAL_DIMENSIONING_PROPERTIES_DEFAULTS
814 MISC_3D_OBJ_PROPERTIES
815 SPECIAL_3DBACKSCALE_PROPERTIES
816 {0,0,0,0,0,0}
820 return aSvxDrawingDefaultsPropertyMap_Impl;
823 // OD 13.10.2003 #i18732#
824 comphelper::PropertyMapEntry* ImplGetAdditionalWriterDrawingDefaultsPropertyMap()
826 static comphelper::PropertyMapEntry aSvxAdditionalDefaultsPropertyMap_Impl[] =
828 { MAP_CHAR_LEN("IsFollowingTextFlow"), SID_SW_FOLLOW_TEXT_FLOW, &::getBooleanCppuType(), 0, 0},
829 {0,0,0,0,0,0}
833 return aSvxAdditionalDefaultsPropertyMap_Impl;
836 // ---------------------------------------------------------------------
838 SvxUnoPropertyMapProvider aSvxMapProvider;
840 UHashMapEntry pSdrShapeIdentifierMap[] =
842 UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.RectangleShape"), OBJ_RECT ),
843 UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.EllipseShape"), OBJ_CIRC ),
844 UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.ControlShape"), OBJ_UNO ),
845 UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.ConnectorShape"), OBJ_EDGE ),
846 UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.MeasureShape"), OBJ_MEASURE ),
847 UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.LineShape"), OBJ_LINE ),
848 UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PolyPolygonShape"), OBJ_POLY ),
849 UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PolyLineShape"), OBJ_PLIN ),
850 UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.OpenBezierShape"), OBJ_PATHLINE ),
851 UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.ClosedBezierShape"), OBJ_PATHFILL ),
852 UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.OpenFreeHandShape"), OBJ_FREELINE ),
853 UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.ClosedFreeHandShape"), OBJ_FREEFILL ),
854 UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PolyPolygonPathShape"), OBJ_PATHPOLY ),
855 UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PolyLinePathShape"), OBJ_PATHPLIN ),
856 UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.GraphicObjectShape"), OBJ_GRAF ),
857 UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.GroupShape"), OBJ_GRUP ),
858 UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.TextShape"), OBJ_TEXT ),
859 UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.OLE2Shape"), OBJ_OLE2 ),
860 UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PageShape"), OBJ_PAGE ),
861 UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.CaptionShape"), OBJ_CAPTION ),
862 UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.FrameShape"), OBJ_FRAME ),
863 UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PluginShape"), OBJ_OLE2_PLUGIN ),
864 UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.AppletShape"), OBJ_OLE2_APPLET ),
865 UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.CustomShape"), OBJ_CUSTOMSHAPE ),
866 UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.MediaShape"), OBJ_MEDIA ),
868 UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DSceneObject"), E3D_POLYSCENE_ID | E3D_INVENTOR_FLAG ),
869 UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DCubeObject"), E3D_CUBEOBJ_ID | E3D_INVENTOR_FLAG ),
870 UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DSphereObject"), E3D_SPHEREOBJ_ID | E3D_INVENTOR_FLAG ),
871 UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DLatheObject"), E3D_LATHEOBJ_ID | E3D_INVENTOR_FLAG ),
872 UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DExtrudeObject"), E3D_EXTRUDEOBJ_ID | E3D_INVENTOR_FLAG ),
873 UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DPolygonObject"), E3D_POLYGONOBJ_ID | E3D_INVENTOR_FLAG ),
874 UHashMapEntry (RTL_CONSTASCII_STRINGPARAM(""), 0 )
877 // ---------------------------------------------------------------------
879 UHashMap aSdrShapeIdentifierMap( pSdrShapeIdentifierMap );
881 /***********************************************************************
882 * class UHashMap *
883 ***********************************************************************/
885 UHashMap::UHashMap( UHashMapEntry* pMap )
887 while( pMap->aIdentifier.getLength() )
889 OUString aStr( pMap->aIdentifier );
890 size_t nHash = aStr.hashCode() & (HASHARRAYSIZE-1);
892 m_aHashList[nHash].Insert(pMap);
893 pMap++;
897 // ---------------------------------------------------------------------
899 UINT32 UHashMap::getId( const OUString& rCompareString )
901 size_t nHash = rCompareString.hashCode() & (HASHARRAYSIZE-1);
903 UHashMapEntryList& rList = m_aHashList[nHash];
905 UHashMapEntry * pMap = rList.First();
907 while(pMap)
909 if( rCompareString == pMap->aIdentifier )
910 return pMap->nId;
912 pMap = rList.Next();
915 return UHASHMAP_NOTFOUND;
918 /***********************************************************************
919 * class SvxUnoPropertyMapProvider *
920 ***********************************************************************/
922 EXTERN_C
923 #if defined( PM2 ) && (!defined( CSET ) && !defined ( MTW ) && !defined( WTC ))
924 int _stdcall
925 #else
926 #ifdef WNT
927 int _cdecl
928 #else
930 #endif
931 #endif
932 Svx_CompareMap(const void* pSmaller, const void* pBigger )
934 int nDiff = strcmp( ((const SfxItemPropertyMapEntry*)pSmaller)->pName,
935 ((const SfxItemPropertyMapEntry*)pBigger)->pName );
936 return nDiff;
939 // ---------------------------------------------------------------------
941 SvxUnoPropertyMapProvider::SvxUnoPropertyMapProvider()
943 for(UINT16 i=0;i<SVXMAP_END; i++)
945 aSetArr[i] = 0;
946 aMapArr[i] = 0;
950 SvxUnoPropertyMapProvider::~SvxUnoPropertyMapProvider()
952 for(UINT16 i=0;i<SVXMAP_END; i++)
953 delete aSetArr[i];
956 // ---------------------------------------------------------------------
958 /*void SvxUnoPropertyMapProvider::Sort(USHORT nId)
960 SfxItemPropertyMapEntry* pTemp = aMapArr[nId];
961 UINT16 i = 0;
962 while(pTemp[i].pName) { i++; }
963 qsort(aMapArr[nId], i, sizeof(SfxItemPropertyMapEntry), Svx_CompareMap);
966 // ---------------------------------------------------------------------
968 const SfxItemPropertyMapEntry* SvxUnoPropertyMapProvider::GetMap(UINT16 nPropertyId)
970 DBG_ASSERT(nPropertyId < SVXMAP_END, "Id ?" );
971 if(!aMapArr[nPropertyId]) {
972 switch(nPropertyId) {
973 case SVXMAP_SHAPE: aMapArr[SVXMAP_SHAPE]=ImplGetSvxShapePropertyMap(); break;
974 case SVXMAP_CONNECTOR: aMapArr[SVXMAP_CONNECTOR]=ImplGetSvxConnectorPropertyMap(); break;
975 case SVXMAP_DIMENSIONING: aMapArr[SVXMAP_DIMENSIONING]=ImplGetSvxDimensioningPropertyMap(); break;
976 case SVXMAP_CIRCLE: aMapArr[SVXMAP_CIRCLE]=ImplGetSvxCirclePropertyMap(); break;
977 case SVXMAP_POLYPOLYGON: aMapArr[SVXMAP_POLYPOLYGON]=ImplGetSvxPolyPolygonPropertyMap(); break;
978 case SVXMAP_POLYPOLYGONBEZIER: aMapArr[SVXMAP_POLYPOLYGONBEZIER]=ImplGetSvxPolyPolygonBezierPropertyMap(); break;
979 case SVXMAP_GRAPHICOBJECT: aMapArr[SVXMAP_GRAPHICOBJECT]=ImplGetSvxGraphicObjectPropertyMap(); break;
980 case SVXMAP_3DSCENEOBJECT: aMapArr[SVXMAP_3DSCENEOBJECT]=ImplGetSvx3DSceneObjectPropertyMap(); break;
981 case SVXMAP_3DCUBEOBJEKT: aMapArr[SVXMAP_3DCUBEOBJEKT]=ImplGetSvx3DCubeObjectPropertyMap(); break;
982 case SVXMAP_3DSPHEREOBJECT: aMapArr[SVXMAP_3DSPHEREOBJECT]=ImplGetSvx3DSphereObjectPropertyMap(); break;
983 case SVXMAP_3DLATHEOBJECT: aMapArr[SVXMAP_3DLATHEOBJECT]=ImplGetSvx3DLatheObjectPropertyMap(); break;
984 case SVXMAP_3DEXTRUDEOBJECT: aMapArr[SVXMAP_3DEXTRUDEOBJECT]=ImplGetSvx3DExtrudeObjectPropertyMap(); break;
985 case SVXMAP_3DPOLYGONOBJECT: aMapArr[SVXMAP_3DPOLYGONOBJECT]=ImplGetSvx3DPolygonObjectPropertyMap(); break;
986 case SVXMAP_ALL: aMapArr[SVXMAP_ALL]=ImplGetSvxAllPropertyMap(); break;
987 case SVXMAP_GROUP: aMapArr[SVXMAP_GROUP]=ImplGetSvxGroupPropertyMap(); break;
988 case SVXMAP_CAPTION: aMapArr[SVXMAP_CAPTION]=ImplGetSvxCaptionPropertyMap(); break;
989 case SVXMAP_OLE2: aMapArr[SVXMAP_OLE2]=ImplGetSvxOle2PropertyMap(); break;
990 case SVXMAP_PLUGIN: aMapArr[SVXMAP_PLUGIN]=ImplGetSvxPluginPropertyMap(); break;
991 case SVXMAP_FRAME: aMapArr[SVXMAP_FRAME]=ImplGetSvxFramePropertyMap(); break;
992 case SVXMAP_APPLET: aMapArr[SVXMAP_APPLET]=ImplGetSvxAppletPropertyMap(); break;
993 case SVXMAP_CONTROL: aMapArr[SVXMAP_CONTROL]=ImplGetSvxControlShapePropertyMap(); break;
994 case SVXMAP_TEXT: aMapArr[SVXMAP_TEXT]=ImplGetSvxTextShapePropertyMap(); break;
995 case SVXMAP_CUSTOMSHAPE: aMapArr[SVXMAP_CUSTOMSHAPE]=ImplGetSvxCustomShapePropertyMap(); break;
996 case SVXMAP_MEDIA: aMapArr[SVXMAP_MEDIA]=ImplGetSvxMediaShapePropertyMap(); break;
997 case SVXMAP_TABLE: aMapArr[SVXMAP_TABLE]=ImplGetSvxTableShapePropertyMap(); break;
998 case SVXMAP_PAGE: aMapArr[SVXMAP_PAGE] = ImplGetSvxPageShapePropertyMap(); break;
1000 default:
1001 DBG_ERROR( "Unknown property map for SvxUnoPropertyMapProvider!" );
1003 // Sort(nPropertyId);
1005 return aMapArr[nPropertyId];
1007 const SvxItemPropertySet* SvxUnoPropertyMapProvider::GetPropertySet(UINT16 nPropertyId)
1009 if( !aSetArr[nPropertyId] )
1010 aSetArr[nPropertyId] = new SvxItemPropertySet( GetMap( nPropertyId ) );
1011 return aSetArr[nPropertyId];
1014 // #####################################################################
1016 /** returns an empty UString(). most times sufficient */
1017 ::rtl::OUString SAL_CALL SvxServiceInfoHelper::getImplementationName() throw( ::com::sun::star::uno::RuntimeException )
1019 return ::rtl::OUString();
1022 /** the base implementation iterates over the service names from <code>getSupportedServiceNames</code> */
1023 sal_Bool SAL_CALL SvxServiceInfoHelper::supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException)
1025 return supportsService( ServiceName, getSupportedServiceNames() );
1028 sal_Bool SAL_CALL SvxServiceInfoHelper::supportsService( const ::rtl::OUString& ServiceName, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& SupportedServices ) throw()
1030 const ::rtl::OUString * pArray = SupportedServices.getConstArray();
1031 for( INT32 i = 0; i < SupportedServices.getLength(); i++ )
1032 if( pArray[i] == ServiceName )
1033 return TRUE;
1034 return FALSE;
1037 /** the base implementation has no supported services */
1038 ::com::sun::star::uno::Sequence< ::rtl::OUString > SvxServiceInfoHelper::getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException )
1040 ::com::sun::star::uno::Sequence< ::rtl::OUString> aSeq(0);
1041 return aSeq;
1044 /** this method concatenates the given sequences and returns the result
1046 ::com::sun::star::uno::Sequence< ::rtl::OUString > SvxServiceInfoHelper::concatSequences( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rSeq1, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rSeq2 ) throw()
1048 const sal_Int32 nLen1 = rSeq1.getLength();
1049 const sal_Int32 nLen2 = rSeq2.getLength();
1051 ::com::sun::star::uno::Sequence< ::rtl::OUString > aSeq( nLen1 + nLen2 );
1053 ::rtl::OUString* pStrings = aSeq.getArray();
1055 sal_Int32 nIdx;
1056 const ::rtl::OUString* pStringSrc = rSeq1.getConstArray();
1057 for( nIdx = 0; nIdx < nLen1; nIdx++ )
1058 *pStrings++ = *pStringSrc++;
1060 pStringSrc = rSeq2.getConstArray();
1061 for( nIdx = 0; nIdx < nLen2; nIdx++ )
1062 *pStrings++ = *pStringSrc++;
1064 return aSeq;
1067 /** this method adds a variable number of char pointer to a given Sequence
1069 void SvxServiceInfoHelper::addToSequence( ::com::sun::star::uno::Sequence< ::rtl::OUString >& rSeq, UINT16 nServices, /* char * */ ... ) throw()
1071 UINT32 nCount = rSeq.getLength();
1073 rSeq.realloc( nCount + nServices );
1074 OUString* pStrings = rSeq.getArray();
1076 va_list marker;
1077 va_start( marker, nServices );
1078 for( UINT16 i = 0 ; i < nServices; i++ )
1079 pStrings[nCount++] = OUString::createFromAscii(va_arg( marker, char*));
1080 va_end( marker );
1085 /** maps the API constant MeasureUnit to a vcl MapUnit enum.
1086 Returns false if conversion is not supported.
1088 @cl: for warnings01 I found out that this method never worked so I thin
1089 it is not used at all
1090 sal_Bool SvxMeasureUnitToMapUnit( const short eApi, int& eVcl ) throw()
1092 switch( eVcl )
1094 case util::MeasureUnit::MM_100TH: eVcl = MAP_100TH_MM; break;
1095 case util::MeasureUnit::MM_10TH: eVcl = MAP_10TH_MM; break;
1096 case util::MeasureUnit::MM: eVcl = MAP_MM; break;
1097 case util::MeasureUnit::CM: eVcl = MAP_CM; break;
1098 case util::MeasureUnit::INCH_1000TH: eVcl = MAP_1000TH_INCH; break;
1099 case util::MeasureUnit::INCH_100TH: eVcl = MAP_100TH_INCH; break;
1100 case util::MeasureUnit::INCH_10TH: eVcl = MAP_10TH_INCH; break;
1101 case util::MeasureUnit::INCH: eVcl = MAP_INCH; break;
1102 case util::MeasureUnit::POINT: eVcl = MAP_POINT; break;
1103 case util::MeasureUnit::TWIP: eVcl = MAP_TWIP; break;
1104 case util::MeasureUnit::PERCENT: eVcl = MAP_RELATIVE; break;
1105 default:
1106 return false;
1109 return true;
1113 /** maps the vcl MapUnit enum to a API constant MeasureUnit.
1114 Returns false if conversion is not supported.
1116 sal_Bool SvxMapUnitToMeasureUnit( const short eVcl, short& eApi ) throw()
1118 switch( eVcl )
1120 case MAP_100TH_MM: eApi = util::MeasureUnit::MM_100TH; break;
1121 case MAP_10TH_MM: eApi = util::MeasureUnit::MM_10TH; break;
1122 case MAP_MM: eApi = util::MeasureUnit::MM; break;
1123 case MAP_CM: eApi = util::MeasureUnit::CM; break;
1124 case MAP_1000TH_INCH: eApi = util::MeasureUnit::INCH_1000TH; break;
1125 case MAP_100TH_INCH: eApi = util::MeasureUnit::INCH_100TH; break;
1126 case MAP_10TH_INCH: eApi = util::MeasureUnit::INCH_10TH; break;
1127 case MAP_INCH: eApi = util::MeasureUnit::INCH; break;
1128 case MAP_POINT: eApi = util::MeasureUnit::POINT; break;
1129 case MAP_TWIP: eApi = util::MeasureUnit::TWIP; break;
1130 case MAP_RELATIVE: eApi = util::MeasureUnit::PERCENT; break;
1131 default:
1132 return false;
1135 return true;
1138 /** maps the API constant MeasureUnit to a vcl MapUnit enum.
1139 Returns false if conversion is not supported.
1142 sal_Bool SvxMeasureUnitToFieldUnit( const short eApi, short& eVcl ) throw()
1144 switch( eApi )
1146 case util::MeasureUnit::MM: eVcl = FUNIT_MM; break;
1147 case util::MeasureUnit::CM: eVcl = FUNIT_CM; break;
1148 case util::MeasureUnit::M: eVcl = FUNIT_M; break;
1149 case util::MeasureUnit::KM: eVcl = FUNIT_KM; break;
1150 case util::MeasureUnit::TWIP: eVcl = FUNIT_TWIP; break;
1151 case util::MeasureUnit::POINT: eVcl = FUNIT_POINT; break;
1152 case util::MeasureUnit::PICA: eVcl = FUNIT_PICA; break;
1153 case util::MeasureUnit::INCH: eVcl = FUNIT_INCH; break;
1154 case util::MeasureUnit::FOOT: eVcl = FUNIT_FOOT; break;
1155 case util::MeasureUnit::MILE: eVcl = FUNIT_MILE; break;
1156 case util::MeasureUnit::PERCENT: eVcl = FUNIT_PERCENT; break;
1157 case util::MeasureUnit::MM_100TH: eVcl = FUNIT_100TH_MM; break;
1158 default:
1159 return sal_False;
1162 return sal_True;
1165 /** maps the vcl MapUnit enum to a API constant MeasureUnit.
1166 Returns false if conversion is not supported.
1168 sal_Bool SvxFieldUnitToMeasureUnit( const short eVcl, short& eApi ) throw()
1170 switch( eVcl )
1172 case FUNIT_MM: eApi = util::MeasureUnit::MM; break;
1173 case FUNIT_CM: eApi = util::MeasureUnit::CM; break;
1174 case FUNIT_M: eApi = util::MeasureUnit::M; break;
1175 case FUNIT_KM: eApi = util::MeasureUnit::KM; break;
1176 case FUNIT_TWIP: eApi = util::MeasureUnit::TWIP; break;
1177 case FUNIT_POINT: eApi = util::MeasureUnit::POINT; break;
1178 case FUNIT_PICA: eApi = util::MeasureUnit::PICA; break;
1179 case FUNIT_INCH: eApi = util::MeasureUnit::INCH; break;
1180 case FUNIT_FOOT: eApi = util::MeasureUnit::FOOT; break;
1181 case FUNIT_MILE: eApi = util::MeasureUnit::MILE; break;
1182 case FUNIT_PERCENT: eApi = util::MeasureUnit::PERCENT; break;
1183 case FUNIT_100TH_MM: eApi = util::MeasureUnit::MM_100TH; break;
1184 default:
1185 return sal_False;
1188 return sal_True;
1191 bool SvxUnoGetResourceRanges( const short nWhich, int& nApiResIds, int& nIntResIds, int& nCount ) throw()
1193 switch( nWhich )
1195 case XATTR_FILLBITMAP:
1196 nApiResIds = RID_SVXSTR_BMP_DEF_START;
1197 nIntResIds = RID_SVXSTR_BMP_START;
1198 nCount = RID_SVXSTR_BMP_DEF_END - RID_SVXSTR_BMP_DEF_START + 1;
1199 break;
1201 case XATTR_LINEDASH:
1202 nApiResIds = RID_SVXSTR_DASH_DEF_START;
1203 nIntResIds = RID_SVXSTR_DASH_START;
1204 nCount = RID_SVXSTR_DASH_DEF_END - RID_SVXSTR_DASH_DEF_START + 1;
1205 break;
1207 case XATTR_LINESTART:
1208 case XATTR_LINEEND:
1209 nApiResIds = RID_SVXSTR_LEND_DEF_START;
1210 nIntResIds = RID_SVXSTR_LEND_START;
1211 nCount = RID_SVXSTR_LEND_DEF_END - RID_SVXSTR_LEND_DEF_START + 1;
1212 break;
1214 case XATTR_FILLGRADIENT:
1215 nApiResIds = RID_SVXSTR_GRDT_DEF_START;
1216 nIntResIds = RID_SVXSTR_GRDT_START;
1217 nCount = RID_SVXSTR_GRDT_DEF_END - RID_SVXSTR_GRDT_DEF_START + 1;
1218 break;
1220 case XATTR_FILLHATCH:
1221 nApiResIds = RID_SVXSTR_HATCH_DEF_START;
1222 nIntResIds = RID_SVXSTR_HATCH_START;
1223 nCount = RID_SVXSTR_HATCH_DEF_END - RID_SVXSTR_HATCH_DEF_START + 1;
1224 break;
1226 case XATTR_FILLFLOATTRANSPARENCE:
1227 nApiResIds = RID_SVXSTR_TRASNGR_DEF_START;
1228 nIntResIds = RID_SVXSTR_TRASNGR_START;
1229 nCount = RID_SVXSTR_TRASNGR_DEF_END - RID_SVXSTR_TRASNGR_DEF_START + 1;
1230 break;
1232 default:
1233 return FALSE;
1236 return TRUE;
1239 /*sal_Int16 SvxUnoGetWhichIdForNamedProperty( const ::rtl::OUString & rPropName )
1241 sal_Int16 nWhich = 0;
1243 const SfxItemPropertyMapEntry* pMap = aSvxMapProvider.GetMap( SVXMAP_SHAPE );
1244 if( pMap )
1246 const SfxItemPropertyMapEntry* pFound = SfxItemPropertyMapEntry::getByName( pMap, rPropName );
1247 if( pFound )
1248 nWhich = pFound->nWID;
1251 return nWhich;
1252 } */
1254 bool SvxUnoConvertResourceString( int nSourceResIds, int nDestResIds, int nCount, String& rString ) throw()
1256 // first, calculate the search string length without an optional number behind the name
1257 xub_StrLen nLength = rString.Len();
1258 while( nLength > 0 )
1260 const sal_Unicode nChar = rString.GetChar( nLength - 1 );
1261 if( (nChar < '0') || (nChar > '9') )
1262 break;
1264 nLength--;
1267 // if we cut off a number, also cut of some spaces
1268 if( nLength != rString.Len() )
1270 while( nLength > 0 )
1272 const sal_Unicode nChar = rString.GetChar( nLength - 1 );
1273 if( nChar != ' ' )
1274 break;
1276 nLength--;
1280 const String aShortString( rString.Copy( 0, nLength ) );
1282 int i;
1283 for( i = 0; i < nCount; i++ )
1285 USHORT nResId = (USHORT)(nSourceResIds + i);
1286 const ResId aRes( SVX_RES(nResId));
1287 const String aCompare( aRes );
1288 if( aShortString == aCompare )
1290 USHORT nNewResId = (USHORT)(nDestResIds + i);
1291 ResId aNewRes( SVX_RES( nNewResId ));
1292 rString.Replace( 0, aShortString.Len(), String( aNewRes ) );
1293 return TRUE;
1295 else if( rString == aCompare )
1297 USHORT nNewResId = (USHORT)(nDestResIds + i);
1298 ResId aNewRes( SVX_RES( nNewResId ));
1299 rString = String( aNewRes );
1300 return TRUE;
1304 return FALSE;
1307 static USHORT __READONLY_DATA SvxUnoColorNameDefResId[] =
1309 RID_SVXSTR_BLUEGREY_DEF,
1310 RID_SVXSTR_BLACK_DEF,
1311 RID_SVXSTR_BLUE_DEF,
1312 RID_SVXSTR_GREEN_DEF,
1313 RID_SVXSTR_CYAN_DEF,
1314 RID_SVXSTR_RED_DEF,
1315 RID_SVXSTR_MAGENTA_DEF,
1316 RID_SVXSTR_BROWN_DEF,
1317 RID_SVXSTR_GREY_DEF,
1318 RID_SVXSTR_LIGHTGREY_DEF,
1319 RID_SVXSTR_LIGHTBLUE_DEF,
1320 RID_SVXSTR_LIGHTGREEN_DEF,
1321 RID_SVXSTR_LIGHTCYAN_DEF,
1322 RID_SVXSTR_LIGHTRED_DEF,
1323 RID_SVXSTR_LIGHTMAGENTA_DEF,
1324 RID_SVXSTR_YELLOW_DEF,
1325 RID_SVXSTR_WHITE_DEF,
1326 RID_SVXSTR_ORANGE_DEF,
1327 RID_SVXSTR_VIOLET_DEF,
1328 RID_SVXSTR_BORDEAUX_DEF,
1329 RID_SVXSTR_PALE_YELLOW_DEF,
1330 RID_SVXSTR_PALE_GREEN_DEF,
1331 RID_SVXSTR_DKVIOLET_DEF,
1332 RID_SVXSTR_SALMON_DEF,
1333 RID_SVXSTR_SEABLUE_DEF,
1334 RID_SVXSTR_COLOR_SUN_DEF,
1335 RID_SVXSTR_COLOR_CHART_DEF
1338 static USHORT __READONLY_DATA SvxUnoColorNameResId[] =
1340 RID_SVXSTR_BLUEGREY,
1341 RID_SVXSTR_BLACK,
1342 RID_SVXSTR_BLUE,
1343 RID_SVXSTR_GREEN,
1344 RID_SVXSTR_CYAN,
1345 RID_SVXSTR_RED,
1346 RID_SVXSTR_MAGENTA,
1347 RID_SVXSTR_BROWN,
1348 RID_SVXSTR_GREY,
1349 RID_SVXSTR_LIGHTGREY,
1350 RID_SVXSTR_LIGHTBLUE,
1351 RID_SVXSTR_LIGHTGREEN,
1352 RID_SVXSTR_LIGHTCYAN,
1353 RID_SVXSTR_LIGHTRED,
1354 RID_SVXSTR_LIGHTMAGENTA,
1355 RID_SVXSTR_YELLOW,
1356 RID_SVXSTR_WHITE,
1357 RID_SVXSTR_ORANGE,
1358 RID_SVXSTR_VIOLET,
1359 RID_SVXSTR_BORDEAUX,
1360 RID_SVXSTR_PALE_YELLOW,
1361 RID_SVXSTR_PALE_GREEN,
1362 RID_SVXSTR_DKVIOLET,
1363 RID_SVXSTR_SALMON,
1364 RID_SVXSTR_SEABLUE,
1365 RID_SVXSTR_COLOR_SUN,
1366 RID_SVXSTR_COLOR_CHART
1369 bool SvxUnoConvertResourceString( USHORT* pSourceResIds, USHORT* pDestResIds, int nCount, String& rString ) throw()
1371 int i = 0;
1373 for( i = 0; i < nCount; i++ )
1375 String aStrDefName = SVX_RESSTR( pSourceResIds[i] );
1376 if( rString.Search( aStrDefName ) == 0 )
1378 String aReplace = SVX_RESSTR( pDestResIds[i] );
1379 rString.Replace( 0, aStrDefName.Len(), aReplace );
1380 return true;
1384 return false;
1387 /** if the given name is a predefined name for the current language it is replaced by
1388 the corresponding api name.
1390 void SvxUnogetApiNameForItem( const sal_Int16 nWhich, const String& rInternalName, rtl::OUString& rApiName ) throw()
1392 #ifndef SVX_LIGHT
1393 String aNew = rInternalName;
1395 if( nWhich == XATTR_LINECOLOR )
1397 if( SvxUnoConvertResourceString( (USHORT*)SvxUnoColorNameResId, (USHORT*)SvxUnoColorNameDefResId, sizeof( SvxUnoColorNameResId ) / sizeof( USHORT ), aNew ) )
1399 rApiName = aNew;
1400 return;
1403 else
1405 int nApiResIds;
1406 int nIntResIds;
1407 int nCount;
1409 if( SvxUnoGetResourceRanges( nWhich, nApiResIds, nIntResIds, nCount ) )
1411 if(SvxUnoConvertResourceString( nIntResIds, nApiResIds, nCount, aNew ) )
1413 rApiName = aNew;
1414 return;
1418 #endif
1420 // just use previous name, if nothing else was found.
1421 rApiName = rInternalName;
1424 /** if the given name is a predefined api name it is replaced by the predefined name
1425 for the current language.
1427 void SvxUnogetInternalNameForItem( const sal_Int16 nWhich, const rtl::OUString& rApiName, String& rInternalName ) throw()
1429 #ifndef SVX_LIGHT
1430 String aNew = rApiName;
1432 if( nWhich == XATTR_LINECOLOR )
1434 if( SvxUnoConvertResourceString( (USHORT*)SvxUnoColorNameDefResId, (USHORT*)SvxUnoColorNameResId, sizeof( SvxUnoColorNameResId ) / sizeof( USHORT ), aNew ) )
1436 rInternalName = aNew;
1437 return;
1440 else
1442 int nApiResIds;
1443 int nIntResIds;
1444 int nCount;
1446 if( SvxUnoGetResourceRanges( nWhich, nApiResIds, nIntResIds, nCount ) )
1448 if(SvxUnoConvertResourceString( nApiResIds, nIntResIds, nCount, aNew ) )
1450 rInternalName = aNew;
1451 return;
1455 #endif // !SVX_LIGHT
1457 // just use previous name, if nothing else was found.
1458 rInternalName = rApiName;
1461 ///////////////////////////////////////////////////////////////////////
1463 comphelper::PropertySetInfo* SvxPropertySetInfoPool::getOrCreate( sal_Int32 nServiceId ) throw()
1465 vos::OGuard aGuard( Application::GetSolarMutex() );
1467 if( nServiceId > SVXUNO_SERVICEID_LASTID )
1469 DBG_ERROR( "unknown service id!" );
1470 return NULL;
1473 if( mpInfos[ nServiceId ] == NULL )
1475 mpInfos[nServiceId] = new comphelper::PropertySetInfo();
1476 mpInfos[nServiceId]->acquire();
1478 switch( nServiceId )
1480 case SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS:
1481 mpInfos[SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS]->add( ImplGetSvxDrawingDefaultsPropertyMap() );
1482 break;
1483 case SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER:
1484 mpInfos[SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER]->add( ImplGetSvxDrawingDefaultsPropertyMap() );
1485 mpInfos[SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER]->remove( OUString( RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_EDIT_PARA_IS_HANGING_PUNCTUATION ) ) );
1486 // OD 13.10.2003 #i18732# - add property map for writer item 'IsFollowingTextFlow'
1487 mpInfos[SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER]->add( ImplGetAdditionalWriterDrawingDefaultsPropertyMap() );
1488 break;
1490 default:
1491 DBG_ERROR( "unknown service id!" );
1495 return mpInfos[ nServiceId ];
1498 comphelper::PropertySetInfo* SvxPropertySetInfoPool::mpInfos[SVXUNO_SERVICEID_LASTID+1] = { NULL };