1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <sal/macros.h>
21 #include <com/sun/star/table/XTable.hpp>
22 #include <com/sun/star/container/XIndexAccess.hpp>
23 #include <com/sun/star/frame/XModel.hpp>
24 #include <com/sun/star/embed/XEmbeddedObject.hpp>
25 #include <com/sun/star/util/MeasureUnit.hpp>
26 #include <com/sun/star/drawing/TextVerticalAdjust.hpp>
27 #include <com/sun/star/media/ZoomLevel.hpp>
28 #include <com/sun/star/io/XInputStream.hpp>
29 #include <com/sun/star/beans/PropertyAttribute.hpp>
30 #include <boost/unordered_map.hpp>
31 #include <tools/fldunit.hxx>
32 #include <tools/shl.hxx>
33 #include <osl/mutex.hxx>
34 #include <vcl/svapp.hxx>
35 #include <comphelper/propertysetinfo.hxx>
36 #include <svx/dialmgr.hxx>
37 #include "svx/unoapi.hxx"
38 #include <editeng/unotext.hxx>
39 #include <svx/unoshprp.hxx>
40 #include <editeng/editeng.hxx>
41 #include "svx/globl3d.hxx"
42 #include <svx/dialogs.hrc>
43 #include <svx/svdpool.hxx>
44 #include <svx/svdobj.hxx>
46 using namespace ::rtl
;
47 using namespace ::com::sun::star
;
48 using namespace ::com::sun::star::beans::PropertyAttribute
;
49 using ::com::sun::star::drawing::TextVerticalAdjust
;
51 SfxItemPropertyMapEntry
* ImplGetSvxShapePropertyMap()
53 static SfxItemPropertyMapEntry aShapePropertyMap_Impl
[] =
58 LINE_PROPERTIES_START_END
59 SHAPE_DESCRIPTOR_PROPERTIES
66 CUSTOMSHAPE_PROPERTIES
67 { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
>*)0) , 0, 0},
68 {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
>*)0) , 0, 0},
73 return aShapePropertyMap_Impl
;
76 SfxItemPropertyMapEntry
* ImplGetSvxTextShapePropertyMap()
78 static SfxItemPropertyMapEntry aTextShapePropertyMap_Impl
[] =
83 LINE_PROPERTIES_START_END
84 SHAPE_DESCRIPTOR_PROPERTIES
85 MISC_OBJ_PROPERTIES_NO_SHEAR
91 CUSTOMSHAPE_PROPERTIES
92 { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
>*)0) , 0, 0},
93 {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
>*)0) , 0, 0},
98 return aTextShapePropertyMap_Impl
;
101 SfxItemPropertyMapEntry
* ImplGetSvxConnectorPropertyMap()
103 static SfxItemPropertyMapEntry aConnectorPropertyMap_Impl
[] =
105 SPECIAL_CONNECTOR_PROPERTIES
106 EDGERADIUS_PROPERTIES
109 LINE_PROPERTIES_START_END
110 SHAPE_DESCRIPTOR_PROPERTIES
112 LINKTARGET_PROPERTIES
117 { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
>*)0) , 0, 0},
118 {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
>*)0) , 0, 0},
123 return aConnectorPropertyMap_Impl
;
126 SfxItemPropertyMapEntry
* ImplGetSvxDimensioningPropertyMap()
128 static SfxItemPropertyMapEntry aDimensioningPropertyMap_Impl
[] =
130 SPECIAL_DIMENSIONING_PROPERTIES
131 EDGERADIUS_PROPERTIES
134 LINE_PROPERTIES_START_END
135 SHAPE_DESCRIPTOR_PROPERTIES
137 LINKTARGET_PROPERTIES
142 { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
>*)0) , 0, 0},
143 {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
>*)0) , 0, 0},
148 return aDimensioningPropertyMap_Impl
;
151 SfxItemPropertyMapEntry
* ImplGetSvxCirclePropertyMap()
153 static SfxItemPropertyMapEntry aCirclePropertyMap_Impl
[] =
155 SPECIAL_CIRCLE_PROPERTIES
156 EDGERADIUS_PROPERTIES
159 LINE_PROPERTIES_START_END
160 SHAPE_DESCRIPTOR_PROPERTIES
162 LINKTARGET_PROPERTIES
167 CUSTOMSHAPE_PROPERTIES
168 { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
>*)0) , 0, 0},
169 {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
>*)0) , 0, 0},
174 return aCirclePropertyMap_Impl
;
177 SfxItemPropertyMapEntry
* ImplGetSvxPolyPolygonPropertyMap()
179 static SfxItemPropertyMapEntry aPolyPolygonPropertyMap_Impl
[] =
181 { MAP_CHAR_LEN("Geometry"), OWN_ATTR_BASE_GEOMETRY
, SEQTYPE(::getCppuType((const ::com::sun::star::drawing::PointSequenceSequence
*)0)), 0, 0 },
182 SPECIAL_POLYGON_PROPERTIES
183 SPECIAL_POLYPOLYGON_PROPERTIES
186 LINE_PROPERTIES_START_END
187 SHAPE_DESCRIPTOR_PROPERTIES
189 LINKTARGET_PROPERTIES
194 CUSTOMSHAPE_PROPERTIES
195 { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
>*)0) , 0, 0},
196 {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
>*)0) , 0, 0},
201 return aPolyPolygonPropertyMap_Impl
;
204 SfxItemPropertyMapEntry
* ImplGetSvxPolyPolygonBezierPropertyMap()
206 static SfxItemPropertyMapEntry aPolyPolygonBezierPropertyMap_Impl
[] =
208 { MAP_CHAR_LEN("Geometry"), OWN_ATTR_BASE_GEOMETRY
, &::getCppuType((const ::com::sun::star::drawing::PolyPolygonBezierCoords
*)0), 0, 0 },
209 SPECIAL_POLYGON_PROPERTIES
210 SPECIAL_POLYPOLYGONBEZIER_PROPERTIES
213 LINE_PROPERTIES_START_END
214 SHAPE_DESCRIPTOR_PROPERTIES
216 LINKTARGET_PROPERTIES
221 CUSTOMSHAPE_PROPERTIES
222 { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
>*)0) , 0, 0},
223 {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
>*)0) , 0, 0},
228 return aPolyPolygonBezierPropertyMap_Impl
;
231 SfxItemPropertyMapEntry
* ImplGetSvxGraphicObjectPropertyMap()
233 static SfxItemPropertyMapEntry aGraphicObjectPropertyMap_Impl
[] =
235 SPECIAL_GRAPHOBJ_PROPERTIES
241 LINE_PROPERTIES_START_END
242 SHAPE_DESCRIPTOR_PROPERTIES
244 // #i118485# Full properties now, shear included
247 LINKTARGET_PROPERTIES
252 { MAP_CHAR_LEN("IsMirrored"), OWN_ATTR_MIRRORED
, &::getCppuBooleanType(), 0, 0},
253 { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
>*)0) , 0, 0},
254 {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
>*)0) , 0, 0},
255 {MAP_CHAR_LEN("GraphicStream"), OWN_ATTR_GRAPHIC_STREAM
, &::com::sun::star::io::XInputStream::static_type(), ::com::sun::star::beans::PropertyAttribute::READONLY
, 0},
260 return aGraphicObjectPropertyMap_Impl
;
263 SfxItemPropertyMapEntry
* ImplGetSvx3DSceneObjectPropertyMap()
265 static SfxItemPropertyMapEntry a3DSceneObjectPropertyMap_Impl
[] =
267 SPECIAL_3DSCENEOBJECT_PROPERTIES
270 LINE_PROPERTIES_START_END
271 SHAPE_DESCRIPTOR_PROPERTIES
273 LINKTARGET_PROPERTIES
279 return a3DSceneObjectPropertyMap_Impl
;
282 SfxItemPropertyMapEntry
* ImplGetSvx3DCubeObjectPropertyMap()
284 static SfxItemPropertyMapEntry a3DCubeObjectPropertyMap_Impl
[] =
286 SPECIAL_3DCUBEOBJECT_PROPERTIES
287 MISC_3D_OBJ_PROPERTIES
290 LINE_PROPERTIES_START_END
291 SHAPE_DESCRIPTOR_PROPERTIES
293 LINKTARGET_PROPERTIES
295 { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
>*)0) , 0, 0},
296 {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
>*)0) , 0, 0},
301 return a3DCubeObjectPropertyMap_Impl
;
304 SfxItemPropertyMapEntry
* ImplGetSvx3DSphereObjectPropertyMap()
306 static SfxItemPropertyMapEntry a3DSphereObjectPropertyMap_Impl
[] =
308 SPECIAL_3DSPHEREOBJECT_PROPERTIES
309 MISC_3D_OBJ_PROPERTIES
312 LINE_PROPERTIES_START_END
313 SHAPE_DESCRIPTOR_PROPERTIES
315 LINKTARGET_PROPERTIES
317 { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
>*)0) , 0, 0},
318 {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
>*)0) , 0, 0},
322 return a3DSphereObjectPropertyMap_Impl
;
325 SfxItemPropertyMapEntry
* ImplGetSvx3DLatheObjectPropertyMap()
327 static SfxItemPropertyMapEntry a3DLatheObjectPropertyMap_Impl
[] =
329 SPECIAL_3DLATHEOBJECT_PROPERTIES
331 // #107245# New 3D properties which are possible for lathe and extrude 3d objects
332 SPECIAL_3DLATHEANDEXTRUDEOBJ_PROPERTIES
334 SPECIAL_3DBACKSCALE_PROPERTIES
335 MISC_3D_OBJ_PROPERTIES
338 LINE_PROPERTIES_START_END
339 SHAPE_DESCRIPTOR_PROPERTIES
341 LINKTARGET_PROPERTIES
343 { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
>*)0) , 0, 0},
344 {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
>*)0) , 0, 0},
349 return a3DLatheObjectPropertyMap_Impl
;
352 SfxItemPropertyMapEntry
* ImplGetSvx3DExtrudeObjectPropertyMap()
354 static SfxItemPropertyMapEntry a3DExtrudeObjectPropertyMap_Impl
[] =
356 SPECIAL_3DEXTRUDEOBJECT_PROPERTIES
358 // #107245# New 3D properties which are possible for lathe and extrude 3d objects
359 SPECIAL_3DLATHEANDEXTRUDEOBJ_PROPERTIES
361 SPECIAL_3DBACKSCALE_PROPERTIES
362 MISC_3D_OBJ_PROPERTIES
365 LINE_PROPERTIES_START_END
366 SHAPE_DESCRIPTOR_PROPERTIES
368 LINKTARGET_PROPERTIES
370 { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
>*)0) , 0, 0},
371 {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
>*)0) , 0, 0},
376 return a3DExtrudeObjectPropertyMap_Impl
;
379 SfxItemPropertyMapEntry
* ImplGetSvx3DPolygonObjectPropertyMap()
381 static SfxItemPropertyMapEntry a3DPolygonObjectPropertyMap_Impl
[] =
383 SPECIAL_3DPOLYGONOBJECT_PROPERTIES
384 MISC_3D_OBJ_PROPERTIES
387 LINE_PROPERTIES_START_END
388 SHAPE_DESCRIPTOR_PROPERTIES
390 LINKTARGET_PROPERTIES
392 { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
>*)0) , 0, 0},
393 {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
>*)0) , 0, 0},
398 return a3DPolygonObjectPropertyMap_Impl
;
401 SfxItemPropertyMapEntry
* ImplGetSvxAllPropertyMap()
403 static SfxItemPropertyMapEntry aAllPropertyMap_Impl
[] =
407 LINE_PROPERTIES_START_END
409 EDGERADIUS_PROPERTIES
413 SHAPE_DESCRIPTOR_PROPERTIES
415 LINKTARGET_PROPERTIES
416 SPECIAL_CONNECTOR_PROPERTIES
417 SPECIAL_DIMENSIONING_PROPERTIES
418 SPECIAL_CIRCLE_PROPERTIES
419 SPECIAL_POLYGON_PROPERTIES
420 SPECIAL_POLYPOLYGON_PROPERTIES
421 SPECIAL_POLYPOLYGONBEZIER_PROPERTIES
422 SPECIAL_GRAPHOBJ_PROPERTIES
423 SPECIAL_3DSCENEOBJECT_PROPERTIES
424 MISC_3D_OBJ_PROPERTIES
425 SPECIAL_3DCUBEOBJECT_PROPERTIES
426 SPECIAL_3DSPHEREOBJECT_PROPERTIES
427 SPECIAL_3DLATHEOBJECT_PROPERTIES
428 SPECIAL_3DEXTRUDEOBJECT_PROPERTIES
430 // #107245# New 3D properties which are possible for lathe and extrude 3d objects
431 SPECIAL_3DLATHEANDEXTRUDEOBJ_PROPERTIES
433 SPECIAL_3DBACKSCALE_PROPERTIES
434 SPECIAL_3DPOLYGONOBJECT_PROPERTIES
435 CUSTOMSHAPE_PROPERTIES
436 { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
>*)0) , 0, 0},
437 {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
>*)0) , 0, 0},
442 return aAllPropertyMap_Impl
;
445 SfxItemPropertyMapEntry
* ImplGetSvxGroupPropertyMap()
447 static SfxItemPropertyMapEntry aGroupPropertyMap_Impl
[] =
449 SHAPE_DESCRIPTOR_PROPERTIES
451 LINKTARGET_PROPERTIES
456 return aGroupPropertyMap_Impl
;
459 SfxItemPropertyMapEntry
* ImplGetSvxOle2PropertyMap()
461 static SfxItemPropertyMapEntry aOle2PropertyMap_Impl
[] =
463 // #i118485# Adding properties for line, fill, text, shadow, fontwork, rotate, shear
466 LINE_PROPERTIES_START_END
467 SHAPE_DESCRIPTOR_PROPERTIES
469 LINKTARGET_PROPERTIES
474 { MAP_CHAR_LEN("ThumbnailGraphicURL"), OWN_ATTR_THUMBNAIL
, &::getCppuType(( const OUString
*)0), 0, 0 },
475 { MAP_CHAR_LEN("Model"), OWN_ATTR_OLEMODEL
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XModel
>*)0), ::com::sun::star::beans::PropertyAttribute::READONLY
, 0},
476 { MAP_CHAR_LEN("EmbeddedObject"), OWN_ATTR_OLE_EMBEDDED_OBJECT
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::embed::XEmbeddedObject
>*)0), ::com::sun::star::beans::PropertyAttribute::READONLY
, 0},
477 { MAP_CHAR_LEN("EmbeddedObjectNoNewClient"),OWN_ATTR_OLE_EMBEDDED_OBJECT_NONEWCLIENT
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::embed::XEmbeddedObject
>*)0), ::com::sun::star::beans::PropertyAttribute::READONLY
, 0},
478 { MAP_CHAR_LEN("OriginalSize"), OWN_ATTR_OLESIZE
, &::getCppuType(( const ::com::sun::star::awt::Size
*)0), ::com::sun::star::beans::PropertyAttribute::READONLY
, 0},
479 { MAP_CHAR_LEN("CLSID"), OWN_ATTR_CLSID
, &::getCppuType(( const OUString
*)0), 0, 0 },
480 { MAP_CHAR_LEN("IsInternal"), OWN_ATTR_INTERNAL_OLE
, &::getBooleanCppuType() , ::com::sun::star::beans::PropertyAttribute::READONLY
, 0},
481 { MAP_CHAR_LEN("VisibleArea"), OWN_ATTR_OLE_VISAREA
, &::getCppuType((const ::com::sun::star::awt::Rectangle
*)0), 0, 0},
482 { MAP_CHAR_LEN("Aspect"), OWN_ATTR_OLE_ASPECT
, &::getCppuType((const sal_Int64
*)0), 0, 0},
483 { MAP_CHAR_LEN(UNO_NAME_OLE2_PERSISTNAME
), OWN_ATTR_PERSISTNAME
, &::getCppuType(( const OUString
*)0), 0, 0 },
484 { MAP_CHAR_LEN("LinkURL"), OWN_ATTR_OLE_LINKURL
, &::getCppuType(( const OUString
*)0), 0, 0 },
485 { 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},
490 return aOle2PropertyMap_Impl
;
493 SfxItemPropertyMapEntry
* ImplGetSvxPluginPropertyMap()
495 static SfxItemPropertyMapEntry aPluginPropertyMap_Impl
[] =
497 { MAP_CHAR_LEN("PluginMimeType"), OWN_ATTR_PLUGIN_MIMETYPE
, &::getCppuType((const OUString
*)0), 0, 0},
498 { MAP_CHAR_LEN("PluginURL"), OWN_ATTR_PLUGIN_URL
, &::getCppuType((const OUString
*)0), 0, 0},
499 { MAP_CHAR_LEN("PluginCommands"), OWN_ATTR_PLUGIN_COMMANDS
, SEQTYPE(::getCppuType((::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
>*)0)), 0, 0},
500 { MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION
, &::getCppuType((const struct com::sun::star::drawing::HomogenMatrix3
*)0), 0, 0 }, \
501 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER
), OWN_ATTR_ZORDER
, &::getCppuType((const sal_Int32
*)0), 0, 0},
502 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID
), SDRATTR_LAYERID
, &::getCppuType((const sal_Int16
*)0), 0, 0},
503 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERNAME
),SDRATTR_LAYERNAME
, &::getCppuType((const OUString
*)0), 0, 0},
504 { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYBITMAP
), OWN_ATTR_LDBITMAP
, &::getCppuType(( const ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XBitmap
>*)0), ::com::sun::star::beans::PropertyAttribute::READONLY
, 0},
505 { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYNAME
), OWN_ATTR_LDNAME
, &::getCppuType(( const OUString
*)0), ::com::sun::star::beans::PropertyAttribute::READONLY
, 0},
506 { MAP_CHAR_LEN(UNO_NAME_OLE2_METAFILE
), OWN_ATTR_METAFILE
, SEQTYPE(::getCppuType((::com::sun::star::uno::Sequence
<sal_Int8
>*)0)), ::com::sun::star::beans::PropertyAttribute::READONLY
, 0},
507 { MAP_CHAR_LEN("ThumbnailGraphicURL"), OWN_ATTR_THUMBNAIL
, &::getCppuType(( const OUString
*)0), 0, 0 },
508 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_MOVEPROTECT
), SDRATTR_OBJMOVEPROTECT
, &::getBooleanCppuType(),0, 0},
509 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SIZEPROTECT
), SDRATTR_OBJSIZEPROTECT
, &::getBooleanCppuType(),0, 0},
510 { MAP_CHAR_LEN(UNO_NAME_OLE2_PERSISTNAME
), OWN_ATTR_PERSISTNAME
, &::getCppuType(( const OUString
*)0), 0, 0 },
511 { MAP_CHAR_LEN("LinkURL"), OWN_ATTR_OLE_LINKURL
, &::getCppuType(( const OUString
*)0), 0, 0 },
512 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_BOUNDRECT
), OWN_ATTR_BOUNDRECT
, &::getCppuType((const ::com::sun::star::awt::Rectangle
*)0), ::com::sun::star::beans::PropertyAttribute::READONLY
, 0},
513 { MAP_CHAR_LEN("VisibleArea"), OWN_ATTR_OLE_VISAREA
, &::getCppuType((const ::com::sun::star::awt::Rectangle
*)0), 0, 0},
515 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_TITLE
), OWN_ATTR_MISC_OBJ_TITLE
, &::getCppuType((const OUString
*)0), 0, 0},
516 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_DESCRIPTION
), OWN_ATTR_MISC_OBJ_DESCRIPTION
, &::getCppuType((const OUString
*)0), 0, 0},
521 return aPluginPropertyMap_Impl
;
524 SfxItemPropertyMapEntry
* ImplGetSvxFramePropertyMap()
526 //TODO/LATER: new properties for ScrollingMode and DefaultBorder
527 static SfxItemPropertyMapEntry aFramePropertyMap_Impl
[] =
529 { MAP_CHAR_LEN("FrameURL"), OWN_ATTR_FRAME_URL
, &::getCppuType((const OUString
*)0), 0, 0},
530 { MAP_CHAR_LEN("FrameName"), OWN_ATTR_FRAME_NAME
, &::getCppuType((const OUString
*)0), 0, 0},
531 { MAP_CHAR_LEN("FrameIsAutoScroll"), OWN_ATTR_FRAME_ISAUTOSCROLL
, &::getBooleanCppuType() , ::com::sun::star::beans::PropertyAttribute::MAYBEVOID
, 0},
532 { MAP_CHAR_LEN("FrameIsBorder"), OWN_ATTR_FRAME_ISBORDER
, &::getBooleanCppuType() , 0, 0},
533 { MAP_CHAR_LEN("FrameMarginWidth"), OWN_ATTR_FRAME_MARGIN_WIDTH
, &::getCppuType((const sal_Int32
*)0), 0, 0},
534 { MAP_CHAR_LEN("FrameMarginHeight"), OWN_ATTR_FRAME_MARGIN_HEIGHT
, &::getCppuType((const sal_Int32
*)0), 0, 0},
535 { MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION
, &::getCppuType((const struct com::sun::star::drawing::HomogenMatrix3
*)0), 0, 0 }, \
536 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER
), OWN_ATTR_ZORDER
, &::getCppuType((const sal_Int32
*)0), 0, 0},
537 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID
), SDRATTR_LAYERID
, &::getCppuType((const sal_Int16
*)0), 0, 0},
538 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERNAME
),SDRATTR_LAYERNAME
, &::getCppuType((const OUString
*)0), 0, 0},
539 { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYBITMAP
), OWN_ATTR_LDBITMAP
, &::getCppuType(( const ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XBitmap
>*)0), ::com::sun::star::beans::PropertyAttribute::READONLY
, 0},
540 { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYNAME
), OWN_ATTR_LDNAME
, &::getCppuType(( const OUString
*)0), ::com::sun::star::beans::PropertyAttribute::READONLY
, 0},
541 { MAP_CHAR_LEN(UNO_NAME_OLE2_METAFILE
), OWN_ATTR_METAFILE
, SEQTYPE(::getCppuType((::com::sun::star::uno::Sequence
<sal_Int8
>*)0)), ::com::sun::star::beans::PropertyAttribute::READONLY
, 0},
542 { MAP_CHAR_LEN("ThumbnailGraphicURL"), OWN_ATTR_THUMBNAIL
, &::getCppuType(( const OUString
*)0), 0, 0 },
543 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_MOVEPROTECT
), SDRATTR_OBJMOVEPROTECT
, &::getBooleanCppuType(),0, 0},
544 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SIZEPROTECT
), SDRATTR_OBJSIZEPROTECT
, &::getBooleanCppuType(),0, 0},
545 { MAP_CHAR_LEN(UNO_NAME_OLE2_PERSISTNAME
), OWN_ATTR_PERSISTNAME
, &::getCppuType(( const OUString
*)0), 0, 0 },
546 { MAP_CHAR_LEN("LinkURL"), OWN_ATTR_OLE_LINKURL
, &::getCppuType(( const OUString
*)0), 0, 0 },
547 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_BOUNDRECT
), OWN_ATTR_BOUNDRECT
, &::getCppuType((const ::com::sun::star::awt::Rectangle
*)0), ::com::sun::star::beans::PropertyAttribute::READONLY
, 0},
548 { MAP_CHAR_LEN("VisibleArea"), OWN_ATTR_OLE_VISAREA
, &::getCppuType((const ::com::sun::star::awt::Rectangle
*)0), 0, 0},
550 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_TITLE
), OWN_ATTR_MISC_OBJ_TITLE
, &::getCppuType((const OUString
*)0), 0, 0},
551 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_DESCRIPTION
), OWN_ATTR_MISC_OBJ_DESCRIPTION
, &::getCppuType((const OUString
*)0), 0, 0},
556 return aFramePropertyMap_Impl
;
559 SfxItemPropertyMapEntry
* ImplGetSvxAppletPropertyMap()
561 static SfxItemPropertyMapEntry aAppletPropertyMap_Impl
[] =
563 { MAP_CHAR_LEN("AppletCodeBase"), OWN_ATTR_APPLET_CODEBASE
, &::getCppuType(( const OUString
*)0), 0, 0},
564 { MAP_CHAR_LEN("AppletName"), OWN_ATTR_APPLET_NAME
, &::getCppuType(( const OUString
*)0), 0, 0},
565 { MAP_CHAR_LEN("AppletCode"), OWN_ATTR_APPLET_CODE
, &::getCppuType(( const OUString
*)0), 0, 0},
566 { MAP_CHAR_LEN("AppletCommands"), OWN_ATTR_APPLET_COMMANDS
, SEQTYPE(::getCppuType((::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
>*)0)), 0, 0},
567 { MAP_CHAR_LEN("AppletDocBase"), OWN_ATTR_APPLET_DOCBASE
, &::getCppuType(( const OUString
*)0), 0, 0},
568 { MAP_CHAR_LEN("AppletIsScript"), OWN_ATTR_APPLET_ISSCRIPT
, &::getBooleanCppuType(), 0, 0 },
569 { MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION
, &::getCppuType((const struct com::sun::star::drawing::HomogenMatrix3
*)0), 0, 0 }, \
570 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER
), OWN_ATTR_ZORDER
, &::getCppuType((const sal_Int32
*)0), 0, 0},
571 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID
), SDRATTR_LAYERID
, &::getCppuType((const sal_Int16
*)0), 0, 0},
572 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERNAME
),SDRATTR_LAYERNAME
, &::getCppuType((const OUString
*)0), 0, 0},
573 { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYBITMAP
), OWN_ATTR_LDBITMAP
, &::getCppuType(( const ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XBitmap
>*)0), ::com::sun::star::beans::PropertyAttribute::READONLY
, 0},
574 { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYNAME
), OWN_ATTR_LDNAME
, &::getCppuType(( const OUString
*)0), ::com::sun::star::beans::PropertyAttribute::READONLY
, 0},
575 { MAP_CHAR_LEN(UNO_NAME_OLE2_METAFILE
), OWN_ATTR_METAFILE
, SEQTYPE(::getCppuType((::com::sun::star::uno::Sequence
<sal_Int8
>*)0)), ::com::sun::star::beans::PropertyAttribute::READONLY
, 0},
576 { MAP_CHAR_LEN("ThumbnailGraphicURL"), OWN_ATTR_THUMBNAIL
, &::getCppuType(( const OUString
*)0), 0, 0 },
577 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_MOVEPROTECT
), SDRATTR_OBJMOVEPROTECT
, &::getBooleanCppuType(),0, 0},
578 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SIZEPROTECT
), SDRATTR_OBJSIZEPROTECT
, &::getBooleanCppuType(),0, 0},
579 { MAP_CHAR_LEN(UNO_NAME_OLE2_PERSISTNAME
), OWN_ATTR_PERSISTNAME
, &::getCppuType(( const OUString
*)0), 0, 0 },
580 { MAP_CHAR_LEN("LinkURL"), OWN_ATTR_OLE_LINKURL
, &::getCppuType(( const OUString
*)0), 0, 0 },
581 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_BOUNDRECT
), OWN_ATTR_BOUNDRECT
, &::getCppuType((const ::com::sun::star::awt::Rectangle
*)0), ::com::sun::star::beans::PropertyAttribute::READONLY
, 0},
582 { MAP_CHAR_LEN("VisibleArea"), OWN_ATTR_OLE_VISAREA
, &::getCppuType((const ::com::sun::star::awt::Rectangle
*)0), 0, 0},
584 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_TITLE
), OWN_ATTR_MISC_OBJ_TITLE
, &::getCppuType((const OUString
*)0), 0, 0},
585 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_DESCRIPTION
), OWN_ATTR_MISC_OBJ_DESCRIPTION
, &::getCppuType((const OUString
*)0), 0, 0},
590 return aAppletPropertyMap_Impl
;
593 SfxItemPropertyMapEntry
* ImplGetSvxControlShapePropertyMap()
595 static SfxItemPropertyMapEntry aControlPropertyMap_Impl
[] =
597 // the following properties are mapped to the XControl Model of this shape
598 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTNAME
), 0, &::getCppuType((const OUString
*)0), 0, 0 },
599 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTSTYLENAME
), 0, &::getCppuType((const OUString
*)0), 0, 0 },
600 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTFAMILY
), 0, &::getCppuType((const sal_Int16
*)0), 0, 0 },
601 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTCHARSET
), 0, &::getCppuType((const sal_Int16
*)0), 0, 0 },
602 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_HEIGHT
), 0, &::getCppuType((const float*)0), 0, 0 },
603 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTPITCH
), 0, &::getCppuType((const sal_Int16
*)0), 0, 0 },
604 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_POSTURE
), 0, &::getCppuType((const ::com::sun::star::awt::FontSlant
*)0),0, 0 },
605 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_WEIGHT
), 0, &::getCppuType((const float*)0), 0, 0 },
606 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_UNDERLINE
), 0, &::getCppuType((const sal_Int16
*)0), 0, 0 },
607 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_STRIKEOUT
), 0, &::getCppuType((const sal_Int16
*)0), 0, 0},
608 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_COLOR
), 0, &::getCppuType((const sal_Int32
*)0), 0, 0 },
609 { MAP_CHAR_LEN("CharRelief"), 0, &::getCppuType((const sal_Int16
*)0), 0, 0 },
610 { MAP_CHAR_LEN("CharUnderlineColor"), 0, &::getCppuType((const sal_Int32
*)0), 0, 0 },
611 { MAP_CHAR_LEN("CharKerning"), 0, &::getCppuType((const sal_Int16
*)0), 0, 0 },
612 { MAP_CHAR_LEN("CharWordMode"), 0, &::getBooleanCppuType(), 0, 0 },
613 { MAP_CHAR_LEN(UNO_NAME_EDIT_PARA_ADJUST
), 0, &::getCppuType((const sal_Int16
*)0), 0, 0 },
614 { MAP_CHAR_LEN("TextVerticalAdjust"), 0, &::getCppuType((const TextVerticalAdjust
*)0), MAYBEVOID
, 0 },
615 { MAP_CHAR_LEN("ControlBackground"), 0, &::getCppuType((const sal_Int32
*)0), 0, 0 },
616 { MAP_CHAR_LEN("ControlBorder"), 0, &::getCppuType((const sal_Int16
*)0), 0, 0 },
617 { MAP_CHAR_LEN("ControlBorderColor"), 0, &::getCppuType((const sal_Int32
*)0), 0, 0 },
618 { MAP_CHAR_LEN("ControlSymbolColor"), 0, &::getCppuType((const sal_Int16
*)0), 0, 0 },
619 { MAP_CHAR_LEN("ImageScaleMode"), 0, &::getCppuType((const sal_Int16
*)0), 0, 0 },
620 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_MOVEPROTECT
), SDRATTR_OBJMOVEPROTECT
, &::getBooleanCppuType(),0, 0},
621 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SIZEPROTECT
), SDRATTR_OBJSIZEPROTECT
, &::getBooleanCppuType(),0, 0},
622 { MAP_CHAR_LEN("ControlTextEmphasis"), 0, &::getCppuType((const sal_Int16
*)0), 0, 0 },
623 { MAP_CHAR_LEN("ControlWritingMode"), 0, &::cppu::UnoType
< sal_Int16
>::get(), 0, 0},
624 // the following properties are handled by SvxShape
625 { MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION
, &::getCppuType((const struct com::sun::star::drawing::HomogenMatrix3
*)0), 0, 0 },
626 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER
), OWN_ATTR_ZORDER
, &::getCppuType((const sal_Int32
*)0), 0, 0},
627 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID
), SDRATTR_LAYERID
, &::getCppuType((const sal_Int16
*)0), 0, 0},
628 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERNAME
),SDRATTR_LAYERNAME
, &::getCppuType((const OUString
*)0), 0, 0},
629 { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYBITMAP
), OWN_ATTR_LDBITMAP
, &::getCppuType(( const ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XBitmap
>*)0), ::com::sun::star::beans::PropertyAttribute::READONLY
, 0},
630 { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYNAME
), OWN_ATTR_LDNAME
, &::getCppuType(( const OUString
*)0), ::com::sun::star::beans::PropertyAttribute::READONLY
, 0},
631 { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
>*)0) , 0, 0},
632 {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
>*)0) , 0, 0},
633 { 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},
635 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_TITLE
), OWN_ATTR_MISC_OBJ_TITLE
, &::getCppuType((const OUString
*)0), 0, 0},
636 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_DESCRIPTION
), OWN_ATTR_MISC_OBJ_DESCRIPTION
, &::getCppuType((const OUString
*)0), 0, 0},
638 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_PRINTABLE
), SDRATTR_OBJPRINTABLE
, &::getBooleanCppuType(), 0, 0}, \
639 { MAP_CHAR_LEN("Visible"), SDRATTR_OBJVISIBLE
, &::getBooleanCppuType(), 0, 0}, \
643 return aControlPropertyMap_Impl
;
646 SfxItemPropertyMapEntry
* ImplGetSvxPageShapePropertyMap()
648 static SfxItemPropertyMapEntry aPageShapePropertyMap_Impl
[] =
650 { MAP_CHAR_LEN("PageNumber"), OWN_ATTR_PAGE_NUMBER
, &::getCppuType((const sal_Int32
*)0), 0, 0},
651 { MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION
, &::getCppuType((const struct com::sun::star::drawing::HomogenMatrix3
*)0), 0, 0 }, \
652 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER
), OWN_ATTR_ZORDER
, &::getCppuType((const sal_Int32
*)0), 0, 0},
653 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID
), SDRATTR_LAYERID
, &::getCppuType((const sal_Int16
*)0), 0, 0},
654 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERNAME
),SDRATTR_LAYERNAME
, &::getCppuType((const OUString
*)0), 0, 0},
655 { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYBITMAP
), OWN_ATTR_LDBITMAP
, &::getCppuType(( const ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XBitmap
>*)0), ::com::sun::star::beans::PropertyAttribute::READONLY
, 0},
656 { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYNAME
), OWN_ATTR_LDNAME
, &::getCppuType(( const OUString
*)0), ::com::sun::star::beans::PropertyAttribute::READONLY
, 0},
657 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_MOVEPROTECT
), SDRATTR_OBJMOVEPROTECT
, &::getBooleanCppuType(),0, 0},
658 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SIZEPROTECT
), SDRATTR_OBJSIZEPROTECT
, &::getBooleanCppuType(),0, 0},
659 { 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},
661 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_TITLE
), OWN_ATTR_MISC_OBJ_TITLE
, &::getCppuType((const OUString
*)0), 0, 0},
662 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_DESCRIPTION
), OWN_ATTR_MISC_OBJ_DESCRIPTION
, &::getCppuType((const OUString
*)0), 0, 0},
667 return aPageShapePropertyMap_Impl
;
670 SfxItemPropertyMapEntry
* ImplGetSvxCaptionPropertyMap()
672 static SfxItemPropertyMapEntry aCaptionPropertyMap_Impl
[] =
674 { MAP_CHAR_LEN("CaptionPoint"), OWN_ATTR_CAPTION_POINT
, &::getCppuType((const com::sun::star::awt::Point
*)0), 0, 0 },
675 { MAP_CHAR_LEN("CaptionType"), SDRATTR_CAPTIONTYPE
, &::getCppuType((const sal_Int16
*)0), 0, 0},
676 { MAP_CHAR_LEN("CaptionIsFixedAngle"), SDRATTR_CAPTIONFIXEDANGLE
, &::getBooleanCppuType(), 0, 0},
677 { MAP_CHAR_LEN("CaptionAngle"), SDRATTR_CAPTIONANGLE
, &::getCppuType((const sal_Int32
*)0), 0, 0},
678 { MAP_CHAR_LEN("CaptionGap"), SDRATTR_CAPTIONGAP
, &::getCppuType((const sal_Int32
*)0), 0, SFX_METRIC_ITEM
},
679 { MAP_CHAR_LEN("CaptionEscapeDirection"), SDRATTR_CAPTIONESCDIR
, &::getCppuType((const sal_Int32
*)0), 0, 0},
680 { MAP_CHAR_LEN("CaptionIsEscapeRelative"), SDRATTR_CAPTIONESCISREL
, &::getBooleanCppuType(), 0, 0},
681 { MAP_CHAR_LEN("CaptionEscapeRelative"), SDRATTR_CAPTIONESCREL
, &::getCppuType((const sal_Int32
*)0), 0, 0},
682 { MAP_CHAR_LEN("CaptionEscapeAbsolute"), SDRATTR_CAPTIONESCABS
, &::getCppuType((const sal_Int32
*)0), 0, SFX_METRIC_ITEM
},
683 { MAP_CHAR_LEN("CaptionLineLength"), SDRATTR_CAPTIONLINELEN
, &::getCppuType((const sal_Int32
*)0), 0, SFX_METRIC_ITEM
},
684 { MAP_CHAR_LEN("CaptionIsFitLineLength"), SDRATTR_CAPTIONFITLINELEN
, &::getBooleanCppuType(), 0, 0},
685 EDGERADIUS_PROPERTIES
688 LINE_PROPERTIES_START_END
689 SHAPE_DESCRIPTOR_PROPERTIES
691 LINKTARGET_PROPERTIES
696 { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
>*)0) , 0, 0},
697 {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
>*)0) , 0, 0},
702 return aCaptionPropertyMap_Impl
;
705 SfxItemPropertyMapEntry
* ImplGetSvxCustomShapePropertyMap()
707 static SfxItemPropertyMapEntry aCustomShapePropertyMap_Impl
[] =
709 { MAP_CHAR_LEN("CustomShapeEngine"), SDRATTR_CUSTOMSHAPE_ENGINE
, &::getCppuType((const OUString
*)0), 0, 0 },
710 { MAP_CHAR_LEN("CustomShapeData"), SDRATTR_CUSTOMSHAPE_DATA
, &::getCppuType((const OUString
*)0), 0, 0 },
711 { MAP_CHAR_LEN("CustomShapeGeometry"), SDRATTR_CUSTOMSHAPE_GEOMETRY
, SEQTYPE(::getCppuType((::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
>*)0)), 0, 0 },
712 { MAP_CHAR_LEN("CustomShapeGraphicURL"), SDRATTR_CUSTOMSHAPE_REPLACEMENT_URL
, &::getCppuType((const OUString
*)0), 0, 0},
713 CUSTOMSHAPE_PROPERTIES
716 LINE_PROPERTIES_START_END
717 SHAPE_DESCRIPTOR_PROPERTIES
719 LINKTARGET_PROPERTIES
722 {MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
>*)0) , 0, 0},
723 {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS
, &::getCppuType((const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
>*)0) , 0, 0},
727 return aCustomShapePropertyMap_Impl
;
730 SfxItemPropertyMapEntry
* ImplGetSvxMediaShapePropertyMap()
732 static SfxItemPropertyMapEntry aMediaShapePropertyMap_Impl
[] =
734 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER
), OWN_ATTR_ZORDER
, &::getCppuType((const sal_Int32
*)0), 0, 0},
735 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID
), SDRATTR_LAYERID
, &::getCppuType((const sal_Int16
*)0), 0, 0},
736 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERNAME
), SDRATTR_LAYERNAME
, &::getCppuType((const OUString
*)0), 0, 0},
737 { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYBITMAP
), OWN_ATTR_LDBITMAP
, &::getCppuType(( const ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XBitmap
>*)0), ::com::sun::star::beans::PropertyAttribute::READONLY
, 0},
738 { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYNAME
), OWN_ATTR_LDNAME
, &::getCppuType(( const OUString
*)0), ::com::sun::star::beans::PropertyAttribute::READONLY
, 0},
739 { MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION
, &::getCppuType((const struct com::sun::star::drawing::HomogenMatrix3
*)0), 0, 0 },
740 { MAP_CHAR_LEN("MediaURL"), OWN_ATTR_MEDIA_URL
, &::getCppuType((const OUString
*)0), 0, 0},
741 { MAP_CHAR_LEN("PreferredSize"), OWN_ATTR_MEDIA_PREFERREDSIZE
, &::getCppuType((const ::com::sun::star::awt::Size
*)0), ::com::sun::star::beans::PropertyAttribute::READONLY
, 0},
742 { MAP_CHAR_LEN("Loop"), OWN_ATTR_MEDIA_LOOP
, &::getCppuType((const sal_Bool
*)0), 0, 0},
743 { MAP_CHAR_LEN("Mute"), OWN_ATTR_MEDIA_MUTE
, &::getCppuType((const sal_Bool
*)0), 0, 0},
744 { MAP_CHAR_LEN("VolumeDB"), OWN_ATTR_MEDIA_VOLUMEDB
, &::getCppuType((const sal_Int16
*)0), 0, 0},
745 { MAP_CHAR_LEN("Zoom"), OWN_ATTR_MEDIA_ZOOM
, &::getCppuType((const ::com::sun::star::media::ZoomLevel
*)0), 0, 0},
746 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_MOVEPROTECT
), SDRATTR_OBJMOVEPROTECT
, &::getBooleanCppuType(),0, 0},
747 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SIZEPROTECT
), SDRATTR_OBJSIZEPROTECT
, &::getBooleanCppuType(),0, 0},
748 { 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},
750 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_TITLE
), OWN_ATTR_MISC_OBJ_TITLE
, &::getCppuType((const OUString
*)0), 0, 0},
751 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_DESCRIPTION
), OWN_ATTR_MISC_OBJ_DESCRIPTION
, &::getCppuType((const OUString
*)0), 0, 0},
752 {MAP_CHAR_LEN("PrivateStream"), OWN_ATTR_MEDIA_STREAM
, &::com::sun::star::io::XInputStream::static_type(), ::com::sun::star::beans::PropertyAttribute::READONLY
, 0},
753 {MAP_CHAR_LEN("PrivateTempFileURL"), OWN_ATTR_MEDIA_TEMPFILEURL
, &::getCppuType((const OUString
*)0), ::com::sun::star::beans::PropertyAttribute::READONLY
, 0},
758 return aMediaShapePropertyMap_Impl
;
761 SfxItemPropertyMapEntry
* ImplGetSvxTableShapePropertyMap()
763 static SfxItemPropertyMapEntry aTableShapePropertyMap_Impl
[] =
765 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER
), OWN_ATTR_ZORDER
, &::getCppuType((const sal_Int32
*)0), 0, 0},
766 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID
), SDRATTR_LAYERID
, &::getCppuType((const sal_Int16
*)0), 0, 0},
767 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERNAME
), SDRATTR_LAYERNAME
, &::getCppuType((const OUString
*)0), 0, 0},
768 { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYBITMAP
), OWN_ATTR_LDBITMAP
, &::com::sun::star::awt::XBitmap::static_type(), ::com::sun::star::beans::PropertyAttribute::READONLY
, 0},
769 { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYNAME
), OWN_ATTR_LDNAME
, &::getCppuType(( const OUString
*)0), ::com::sun::star::beans::PropertyAttribute::READONLY
, 0},
770 { MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION
, &::getCppuType((const struct com::sun::star::drawing::HomogenMatrix3
*)0), 0, 0 },
771 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_MOVEPROTECT
), SDRATTR_OBJMOVEPROTECT
, &::getBooleanCppuType(),0, 0},
772 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SIZEPROTECT
), SDRATTR_OBJSIZEPROTECT
, &::getBooleanCppuType(),0, 0},
773 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_BOUNDRECT
), OWN_ATTR_BOUNDRECT
, &::getCppuType((const ::com::sun::star::awt::Rectangle
*)0), ::com::sun::star::beans::PropertyAttribute::READONLY
, 0},
774 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_TITLE
), OWN_ATTR_MISC_OBJ_TITLE
, &::getCppuType((const OUString
*)0), 0, 0},
775 { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_DESCRIPTION
), OWN_ATTR_MISC_OBJ_DESCRIPTION
, &::getCppuType((const OUString
*)0), 0, 0},
776 { MAP_CHAR_LEN("Model"), OWN_ATTR_OLEMODEL
, &::com::sun::star::table::XTable::static_type(), ::com::sun::star::beans::PropertyAttribute::READONLY
, 0},
777 { MAP_CHAR_LEN("TableTemplate"), OWN_ATTR_TABLETEMPLATE
, &::com::sun::star::container::XIndexAccess::static_type(), 0, 0},
778 { MAP_CHAR_LEN("UseFirstRowStyle"), OWN_ATTR_TABLETEMPLATE_FIRSTROW
, &::getBooleanCppuType(),0, 0},
779 { MAP_CHAR_LEN("UseLastRowStyle"), OWN_ATTR_TABLETEMPLATE_LASTROW
, &::getBooleanCppuType(),0, 0},
780 { MAP_CHAR_LEN("UseFirstColumnStyle"), OWN_ATTR_TABLETEMPLATE_FIRSTCOLUMN
, &::getBooleanCppuType(),0, 0},
781 { MAP_CHAR_LEN("UseLastColumnStyle"), OWN_ATTR_TABLETEMPLATE_LASTCOLUMN
, &::getBooleanCppuType(),0, 0},
782 { MAP_CHAR_LEN("UseBandingRowStyle"), OWN_ATTR_TABLETEMPLATE_BANDINGROWS
, &::getBooleanCppuType(),0, 0},
783 { MAP_CHAR_LEN("UseBandingColumnStyle"), OWN_ATTR_TABLETEMPLATE_BANDINGCOULUMNS
, &::getBooleanCppuType(),0, 0},
784 { MAP_CHAR_LEN("ReplacementGraphic"), OWN_ATTR_BITMAP
, &::com::sun::star::graphic::XGraphic::static_type(), ::com::sun::star::beans::PropertyAttribute::READONLY
, 0},
789 return aTableShapePropertyMap_Impl
;
792 comphelper::PropertyMapEntry
* ImplGetSvxDrawingDefaultsPropertyMap()
794 static comphelper::PropertyMapEntry aSvxDrawingDefaultsPropertyMap_Impl
[] =
797 LINE_PROPERTIES_DEFAULTS
799 FILL_PROPERTIES_DEFAULTS
800 EDGERADIUS_PROPERTIES
801 TEXT_PROPERTIES_DEFAULTS
803 SPECIAL_DIMENSIONING_PROPERTIES_DEFAULTS
804 MISC_3D_OBJ_PROPERTIES
805 SPECIAL_3DBACKSCALE_PROPERTIES
810 return aSvxDrawingDefaultsPropertyMap_Impl
;
813 comphelper::PropertyMapEntry
* ImplGetAdditionalWriterDrawingDefaultsPropertyMap()
815 static comphelper::PropertyMapEntry aSvxAdditionalDefaultsPropertyMap_Impl
[] =
817 { MAP_CHAR_LEN("IsFollowingTextFlow"), SID_SW_FOLLOW_TEXT_FLOW
, &::getBooleanCppuType(), 0, 0},
822 return aSvxAdditionalDefaultsPropertyMap_Impl
;
825 /***********************************************************************
827 ***********************************************************************/
829 typedef ::boost::unordered_map
< OUString
, sal_uInt32
, OUStringHash
> UHashMapImpl
;
832 static const UHashMapImpl
&GetUHashImpl()
834 static UHashMapImpl
aImpl(63);
835 static bool bInited
= false;
837 struct { const char *name
; sal_Int32 length
; sal_uInt32 id
; } aInit
[] = {
838 { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.RectangleShape"), OBJ_RECT
},
839 { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.EllipseShape"), OBJ_CIRC
},
840 { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.ControlShape"), OBJ_UNO
},
841 { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.ConnectorShape"), OBJ_EDGE
},
842 { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.MeasureShape"), OBJ_MEASURE
},
843 { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.LineShape"), OBJ_LINE
},
844 { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PolyPolygonShape"), OBJ_POLY
},
845 { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PolyLineShape"), OBJ_PLIN
},
846 { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.OpenBezierShape"), OBJ_PATHLINE
},
847 { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.ClosedBezierShape"), OBJ_PATHFILL
},
848 { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.OpenFreeHandShape"), OBJ_FREELINE
},
849 { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.ClosedFreeHandShape"), OBJ_FREEFILL
},
850 { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PolyPolygonPathShape"), OBJ_PATHPOLY
},
851 { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PolyLinePathShape"), OBJ_PATHPLIN
},
852 { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.GraphicObjectShape"), OBJ_GRAF
},
853 { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.GroupShape"), OBJ_GRUP
},
854 { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.TextShape"), OBJ_TEXT
},
855 { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.OLE2Shape"), OBJ_OLE2
},
856 { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PageShape"), OBJ_PAGE
},
857 { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.CaptionShape"), OBJ_CAPTION
},
858 { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.FrameShape"), OBJ_FRAME
},
859 { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PluginShape"), OBJ_OLE2_PLUGIN
},
860 { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.AppletShape"), OBJ_OLE2_APPLET
},
861 { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.CustomShape"), OBJ_CUSTOMSHAPE
},
862 { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.MediaShape"), OBJ_MEDIA
},
864 { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DSceneObject"), E3D_POLYSCENE_ID
| E3D_INVENTOR_FLAG
},
865 { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DCubeObject"), E3D_CUBEOBJ_ID
| E3D_INVENTOR_FLAG
},
866 { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DSphereObject"), E3D_SPHEREOBJ_ID
| E3D_INVENTOR_FLAG
},
867 { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DLatheObject"), E3D_LATHEOBJ_ID
| E3D_INVENTOR_FLAG
},
868 { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DExtrudeObject"), E3D_EXTRUDEOBJ_ID
| E3D_INVENTOR_FLAG
},
869 { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DPolygonObject"), E3D_POLYGONOBJ_ID
| E3D_INVENTOR_FLAG
},
871 for (sal_uInt32 i
= 0; i
< sizeof(aInit
)/sizeof(aInit
[0]); i
++)
872 aImpl
[OUString( aInit
[i
].name
, aInit
[i
].length
, RTL_TEXTENCODING_ASCII_US
) ] = aInit
[i
].id
;
879 //----------------------------------------------------------------------
880 OUString
UHashMap::getNameFromId(sal_uInt32 nId
)
882 const UHashMapImpl
&rMap
= GetUHashImpl();
884 for (UHashMapImpl::const_iterator it
= rMap
.begin(); it
!= rMap
.end(); ++it
)
886 if (it
->second
== nId
)
889 OSL_FAIL("[CL] unknown SdrObjekt identifier");
893 uno::Sequence
< OUString
> UHashMap::getServiceNames()
895 const UHashMapImpl
&rMap
= GetUHashImpl();
897 uno::Sequence
< OUString
> aSeq( rMap
.size() );
898 OUString
* pStrings
= aSeq
.getArray();
901 for (UHashMapImpl::const_iterator it
= rMap
.begin(); it
!= rMap
.end(); ++it
)
902 pStrings
[i
++] = it
->first
;
907 sal_uInt32
UHashMap::getId( const OUString
& rCompareString
)
909 const UHashMapImpl
&rMap
= GetUHashImpl();
910 UHashMapImpl::const_iterator it
= rMap
.find( rCompareString
);
911 if( it
== rMap
.end() )
912 return UHASHMAP_NOTFOUND
;
917 /***********************************************************************
918 * class SvxUnoPropertyMapProvider *
919 ***********************************************************************/
921 struct theSvxMapProvider
:
922 public rtl::Static
<SvxUnoPropertyMapProvider
, theSvxMapProvider
>
926 SvxUnoPropertyMapProvider
& getSvxMapProvider()
928 return theSvxMapProvider::get();
931 // ---------------------------------------------------------------------
933 SvxUnoPropertyMapProvider::SvxUnoPropertyMapProvider()
935 for(sal_uInt16 i
=0;i
<SVXMAP_END
; i
++)
942 SvxUnoPropertyMapProvider::~SvxUnoPropertyMapProvider()
944 for(sal_uInt16 i
=0;i
<SVXMAP_END
; i
++)
948 // ---------------------------------------------------------------------
950 const SfxItemPropertyMapEntry
* SvxUnoPropertyMapProvider::GetMap(sal_uInt16 nPropertyId
)
952 DBG_ASSERT(nPropertyId
< SVXMAP_END
, "Id ?" );
953 if(!aMapArr
[nPropertyId
]) {
954 switch(nPropertyId
) {
955 case SVXMAP_SHAPE
: aMapArr
[SVXMAP_SHAPE
]=ImplGetSvxShapePropertyMap(); break;
956 case SVXMAP_CONNECTOR
: aMapArr
[SVXMAP_CONNECTOR
]=ImplGetSvxConnectorPropertyMap(); break;
957 case SVXMAP_DIMENSIONING
: aMapArr
[SVXMAP_DIMENSIONING
]=ImplGetSvxDimensioningPropertyMap(); break;
958 case SVXMAP_CIRCLE
: aMapArr
[SVXMAP_CIRCLE
]=ImplGetSvxCirclePropertyMap(); break;
959 case SVXMAP_POLYPOLYGON
: aMapArr
[SVXMAP_POLYPOLYGON
]=ImplGetSvxPolyPolygonPropertyMap(); break;
960 case SVXMAP_POLYPOLYGONBEZIER
: aMapArr
[SVXMAP_POLYPOLYGONBEZIER
]=ImplGetSvxPolyPolygonBezierPropertyMap(); break;
961 case SVXMAP_GRAPHICOBJECT
: aMapArr
[SVXMAP_GRAPHICOBJECT
]=ImplGetSvxGraphicObjectPropertyMap(); break;
962 case SVXMAP_3DSCENEOBJECT
: aMapArr
[SVXMAP_3DSCENEOBJECT
]=ImplGetSvx3DSceneObjectPropertyMap(); break;
963 case SVXMAP_3DCUBEOBJEKT
: aMapArr
[SVXMAP_3DCUBEOBJEKT
]=ImplGetSvx3DCubeObjectPropertyMap(); break;
964 case SVXMAP_3DSPHEREOBJECT
: aMapArr
[SVXMAP_3DSPHEREOBJECT
]=ImplGetSvx3DSphereObjectPropertyMap(); break;
965 case SVXMAP_3DLATHEOBJECT
: aMapArr
[SVXMAP_3DLATHEOBJECT
]=ImplGetSvx3DLatheObjectPropertyMap(); break;
966 case SVXMAP_3DEXTRUDEOBJECT
: aMapArr
[SVXMAP_3DEXTRUDEOBJECT
]=ImplGetSvx3DExtrudeObjectPropertyMap(); break;
967 case SVXMAP_3DPOLYGONOBJECT
: aMapArr
[SVXMAP_3DPOLYGONOBJECT
]=ImplGetSvx3DPolygonObjectPropertyMap(); break;
968 case SVXMAP_ALL
: aMapArr
[SVXMAP_ALL
]=ImplGetSvxAllPropertyMap(); break;
969 case SVXMAP_GROUP
: aMapArr
[SVXMAP_GROUP
]=ImplGetSvxGroupPropertyMap(); break;
970 case SVXMAP_CAPTION
: aMapArr
[SVXMAP_CAPTION
]=ImplGetSvxCaptionPropertyMap(); break;
971 case SVXMAP_OLE2
: aMapArr
[SVXMAP_OLE2
]=ImplGetSvxOle2PropertyMap(); break;
972 case SVXMAP_PLUGIN
: aMapArr
[SVXMAP_PLUGIN
]=ImplGetSvxPluginPropertyMap(); break;
973 case SVXMAP_FRAME
: aMapArr
[SVXMAP_FRAME
]=ImplGetSvxFramePropertyMap(); break;
974 case SVXMAP_APPLET
: aMapArr
[SVXMAP_APPLET
]=ImplGetSvxAppletPropertyMap(); break;
975 case SVXMAP_CONTROL
: aMapArr
[SVXMAP_CONTROL
]=ImplGetSvxControlShapePropertyMap(); break;
976 case SVXMAP_TEXT
: aMapArr
[SVXMAP_TEXT
]=ImplGetSvxTextShapePropertyMap(); break;
977 case SVXMAP_CUSTOMSHAPE
: aMapArr
[SVXMAP_CUSTOMSHAPE
]=ImplGetSvxCustomShapePropertyMap(); break;
978 case SVXMAP_MEDIA
: aMapArr
[SVXMAP_MEDIA
]=ImplGetSvxMediaShapePropertyMap(); break;
979 case SVXMAP_TABLE
: aMapArr
[SVXMAP_TABLE
]=ImplGetSvxTableShapePropertyMap(); break;
980 case SVXMAP_PAGE
: aMapArr
[SVXMAP_PAGE
] = ImplGetSvxPageShapePropertyMap(); break;
983 OSL_FAIL( "Unknown property map for SvxUnoPropertyMapProvider!" );
985 // Sort(nPropertyId);
987 return aMapArr
[nPropertyId
];
989 const SvxItemPropertySet
* SvxUnoPropertyMapProvider::GetPropertySet(sal_uInt16 nPropertyId
, SfxItemPool
& rPool
)
991 if( !aSetArr
[nPropertyId
] )
992 aSetArr
[nPropertyId
] = new SvxItemPropertySet( GetMap( nPropertyId
), rPool
);
993 return aSetArr
[nPropertyId
];
996 // #####################################################################
998 /** maps the API constant MeasureUnit to a vcl MapUnit enum.
999 Returns false if conversion is not supported.
1001 @cl: for warnings01 I found out that this method never worked so I thin
1002 it is not used at all
1003 sal_Bool SvxMeasureUnitToMapUnit( const short eApi, int& eVcl ) throw()
1007 case util::MeasureUnit::MM_100TH: eVcl = MAP_100TH_MM; break;
1008 case util::MeasureUnit::MM_10TH: eVcl = MAP_10TH_MM; break;
1009 case util::MeasureUnit::MM: eVcl = MAP_MM; break;
1010 case util::MeasureUnit::CM: eVcl = MAP_CM; break;
1011 case util::MeasureUnit::INCH_1000TH: eVcl = MAP_1000TH_INCH; break;
1012 case util::MeasureUnit::INCH_100TH: eVcl = MAP_100TH_INCH; break;
1013 case util::MeasureUnit::INCH_10TH: eVcl = MAP_10TH_INCH; break;
1014 case util::MeasureUnit::INCH: eVcl = MAP_INCH; break;
1015 case util::MeasureUnit::POINT: eVcl = MAP_POINT; break;
1016 case util::MeasureUnit::TWIP: eVcl = MAP_TWIP; break;
1017 case util::MeasureUnit::PERCENT: eVcl = MAP_RELATIVE; break;
1026 /** maps the vcl MapUnit enum to a API constant MeasureUnit.
1027 Returns false if conversion is not supported.
1029 sal_Bool
SvxMapUnitToMeasureUnit( const short eVcl
, short& eApi
) throw()
1033 case MAP_100TH_MM
: eApi
= util::MeasureUnit::MM_100TH
; break;
1034 case MAP_10TH_MM
: eApi
= util::MeasureUnit::MM_10TH
; break;
1035 case MAP_MM
: eApi
= util::MeasureUnit::MM
; break;
1036 case MAP_CM
: eApi
= util::MeasureUnit::CM
; break;
1037 case MAP_1000TH_INCH
: eApi
= util::MeasureUnit::INCH_1000TH
; break;
1038 case MAP_100TH_INCH
: eApi
= util::MeasureUnit::INCH_100TH
; break;
1039 case MAP_10TH_INCH
: eApi
= util::MeasureUnit::INCH_10TH
; break;
1040 case MAP_INCH
: eApi
= util::MeasureUnit::INCH
; break;
1041 case MAP_POINT
: eApi
= util::MeasureUnit::POINT
; break;
1042 case MAP_TWIP
: eApi
= util::MeasureUnit::TWIP
; break;
1043 case MAP_RELATIVE
: eApi
= util::MeasureUnit::PERCENT
; break;
1051 /** maps the API constant MeasureUnit to a vcl MapUnit enum.
1052 Returns false if conversion is not supported.
1055 sal_Bool
SvxMeasureUnitToFieldUnit( const short eApi
, short& eVcl
) throw()
1059 case util::MeasureUnit::MM
: eVcl
= FUNIT_MM
; break;
1060 case util::MeasureUnit::CM
: eVcl
= FUNIT_CM
; break;
1061 case util::MeasureUnit::M
: eVcl
= FUNIT_M
; break;
1062 case util::MeasureUnit::KM
: eVcl
= FUNIT_KM
; break;
1063 case util::MeasureUnit::TWIP
: eVcl
= FUNIT_TWIP
; break;
1064 case util::MeasureUnit::POINT
: eVcl
= FUNIT_POINT
; break;
1065 case util::MeasureUnit::PICA
: eVcl
= FUNIT_PICA
; break;
1066 case util::MeasureUnit::INCH
: eVcl
= FUNIT_INCH
; break;
1067 case util::MeasureUnit::FOOT
: eVcl
= FUNIT_FOOT
; break;
1068 case util::MeasureUnit::MILE
: eVcl
= FUNIT_MILE
; break;
1069 case util::MeasureUnit::PERCENT
: eVcl
= FUNIT_PERCENT
; break;
1070 case util::MeasureUnit::MM_100TH
: eVcl
= FUNIT_100TH_MM
; break;
1078 /** maps the vcl MapUnit enum to a API constant MeasureUnit.
1079 Returns false if conversion is not supported.
1081 sal_Bool
SvxFieldUnitToMeasureUnit( const short eVcl
, short& eApi
) throw()
1085 case FUNIT_MM
: eApi
= util::MeasureUnit::MM
; break;
1086 case FUNIT_CM
: eApi
= util::MeasureUnit::CM
; break;
1087 case FUNIT_M
: eApi
= util::MeasureUnit::M
; break;
1088 case FUNIT_KM
: eApi
= util::MeasureUnit::KM
; break;
1089 case FUNIT_TWIP
: eApi
= util::MeasureUnit::TWIP
; break;
1090 case FUNIT_POINT
: eApi
= util::MeasureUnit::POINT
; break;
1091 case FUNIT_PICA
: eApi
= util::MeasureUnit::PICA
; break;
1092 case FUNIT_INCH
: eApi
= util::MeasureUnit::INCH
; break;
1093 case FUNIT_FOOT
: eApi
= util::MeasureUnit::FOOT
; break;
1094 case FUNIT_MILE
: eApi
= util::MeasureUnit::MILE
; break;
1095 case FUNIT_PERCENT
: eApi
= util::MeasureUnit::PERCENT
; break;
1096 case FUNIT_100TH_MM
: eApi
= util::MeasureUnit::MM_100TH
; break;
1104 bool SvxUnoGetResourceRanges( const short nWhich
, int& nApiResIds
, int& nIntResIds
, int& nCount
) throw()
1108 case XATTR_FILLBITMAP
:
1109 nApiResIds
= RID_SVXSTR_BMP_DEF_START
;
1110 nIntResIds
= RID_SVXSTR_BMP_START
;
1111 nCount
= RID_SVXSTR_BMP_DEF_END
- RID_SVXSTR_BMP_DEF_START
+ 1;
1114 case XATTR_LINEDASH
:
1115 nApiResIds
= RID_SVXSTR_DASH_DEF_START
;
1116 nIntResIds
= RID_SVXSTR_DASH_START
;
1117 nCount
= RID_SVXSTR_DASH_DEF_END
- RID_SVXSTR_DASH_DEF_START
+ 1;
1120 case XATTR_LINESTART
:
1122 nApiResIds
= RID_SVXSTR_LEND_DEF_START
;
1123 nIntResIds
= RID_SVXSTR_LEND_START
;
1124 nCount
= RID_SVXSTR_LEND_DEF_END
- RID_SVXSTR_LEND_DEF_START
+ 1;
1127 case XATTR_FILLGRADIENT
:
1128 nApiResIds
= RID_SVXSTR_GRDT_DEF_START
;
1129 nIntResIds
= RID_SVXSTR_GRDT_START
;
1130 nCount
= RID_SVXSTR_GRDT_DEF_END
- RID_SVXSTR_GRDT_DEF_START
+ 1;
1133 case XATTR_FILLHATCH
:
1134 nApiResIds
= RID_SVXSTR_HATCH_DEF_START
;
1135 nIntResIds
= RID_SVXSTR_HATCH_START
;
1136 nCount
= RID_SVXSTR_HATCH_DEF_END
- RID_SVXSTR_HATCH_DEF_START
+ 1;
1139 case XATTR_FILLFLOATTRANSPARENCE
:
1140 nApiResIds
= RID_SVXSTR_TRASNGR_DEF_START
;
1141 nIntResIds
= RID_SVXSTR_TRASNGR_START
;
1142 nCount
= RID_SVXSTR_TRASNGR_DEF_END
- RID_SVXSTR_TRASNGR_DEF_START
+ 1;
1152 bool SvxUnoConvertResourceString( int nSourceResIds
, int nDestResIds
, int nCount
, String
& rString
) throw()
1154 // first, calculate the search string length without an optional number behind the name
1155 xub_StrLen nLength
= rString
.Len();
1156 while( nLength
> 0 )
1158 const sal_Unicode nChar
= rString
.GetChar( nLength
- 1 );
1159 if( (nChar
< '0') || (nChar
> '9') )
1165 // if we cut off a number, also cut of some spaces
1166 if( nLength
!= rString
.Len() )
1168 while( nLength
> 0 )
1170 const sal_Unicode nChar
= rString
.GetChar( nLength
- 1 );
1178 const String
aShortString( rString
.Copy( 0, nLength
) );
1181 for( i
= 0; i
< nCount
; i
++ )
1183 sal_uInt16 nResId
= (sal_uInt16
)(nSourceResIds
+ i
);
1184 const ResId
aRes( SVX_RES(nResId
));
1185 const String
aCompare( aRes
);
1186 if( aShortString
== aCompare
)
1188 sal_uInt16 nNewResId
= (sal_uInt16
)(nDestResIds
+ i
);
1189 ResId
aNewRes( SVX_RES( nNewResId
));
1190 rString
.Replace( 0, aShortString
.Len(), String( aNewRes
) );
1193 else if( rString
== aCompare
)
1195 sal_uInt16 nNewResId
= (sal_uInt16
)(nDestResIds
+ i
);
1196 ResId
aNewRes( SVX_RES( nNewResId
));
1197 rString
= String( aNewRes
);
1205 static sal_uInt16 SvxUnoColorNameDefResId
[] =
1207 RID_SVXSTR_BLUEGREY_DEF
,
1208 RID_SVXSTR_BLACK_DEF
,
1209 RID_SVXSTR_BLUE_DEF
,
1210 RID_SVXSTR_SKY_BLUE_DEF
,
1211 RID_SVXSTR_GREEN_DEF
,
1212 RID_SVXSTR_YELLOW_GREEN_DEF
,
1213 RID_SVXSTR_CYAN_DEF
,
1214 RID_SVXSTR_CYAN2_DEF
,
1216 RID_SVXSTR_MAGENTA_DEF
,
1217 RID_SVXSTR_BROWN_DEF
,
1218 RID_SVXSTR_GREY_DEF
,
1219 RID_SVXSTR_LIGHTGREY_DEF
,
1220 RID_SVXSTR_LIGHTBLUE_DEF
,
1221 RID_SVXSTR_LIGHTGREEN_DEF
,
1222 RID_SVXSTR_LIGHTCYAN_DEF
,
1223 RID_SVXSTR_LIGHTRED_DEF
,
1224 RID_SVXSTR_LIGHTMAGENTA_DEF
,
1225 RID_SVXSTR_YELLOW_DEF
,
1226 RID_SVXSTR_WHITE_DEF
,
1227 RID_SVXSTR_ORANGE_DEF
,
1228 RID_SVXSTR_VIOLET_DEF
,
1229 RID_SVXSTR_PINK_DEF
,
1230 RID_SVXSTR_BORDEAUX_DEF
,
1231 RID_SVXSTR_PALE_YELLOW_DEF
,
1232 RID_SVXSTR_PALE_GREEN_DEF
,
1233 RID_SVXSTR_DKVIOLET_DEF
,
1234 RID_SVXSTR_SALMON_DEF
,
1235 RID_SVXSTR_SEABLUE_DEF
,
1236 RID_SVXSTR_COLOR_SUN_DEF
,
1237 RID_SVXSTR_COLOR_CHART_DEF
,
1238 RID_SVXSTR_LIBRE_GREEN_1_DEF
,
1239 RID_SVXSTR_LIBRE_GREEN_ACCENT_DEF
,
1240 RID_SVXSTR_LIBRE_BLUE_ACCENT_DEF
,
1241 RID_SVXSTR_LIBRE_ORANGE_ACCENT_DEF
,
1242 RID_SVXSTR_LIBRE_PURPLE_DEF
,
1243 RID_SVXSTR_LIBRE_PURPLE_ACCENT_DEF
,
1244 RID_SVXSTR_LIBRE_YELLOW_ACCENT_DEF
,
1245 RID_SVXSTR_TANGO_BUTTER_DEF
,
1246 RID_SVXSTR_TANGO_ORANGE_DEF
,
1247 RID_SVXSTR_TANGO_CHOCOLATE_DEF
,
1248 RID_SVXSTR_TANGO_CHAMELEON_DEF
,
1249 RID_SVXSTR_TANGO_SKY_BLUE_DEF
,
1250 RID_SVXSTR_TANGO_PLUM_DEF
,
1251 RID_SVXSTR_TANGO_SCARLET_RED_DEF
,
1252 RID_SVXSTR_TANGO_ALUMINIUM_DEF
1255 static sal_uInt16 SvxUnoColorNameResId
[] =
1257 RID_SVXSTR_BLUEGREY
,
1260 RID_SVXSTR_SKY_BLUE
,
1262 RID_SVXSTR_YELLOW_GREEN
,
1269 RID_SVXSTR_LIGHTGREY
,
1270 RID_SVXSTR_LIGHTBLUE
,
1271 RID_SVXSTR_LIGHTGREEN
,
1272 RID_SVXSTR_LIGHTCYAN
,
1273 RID_SVXSTR_LIGHTRED
,
1274 RID_SVXSTR_LIGHTMAGENTA
,
1280 RID_SVXSTR_BORDEAUX
,
1281 RID_SVXSTR_PALE_YELLOW
,
1282 RID_SVXSTR_PALE_GREEN
,
1283 RID_SVXSTR_DKVIOLET
,
1286 RID_SVXSTR_COLOR_SUN
,
1287 RID_SVXSTR_COLOR_CHART
,
1288 RID_SVXSTR_LIBRE_GREEN_1
,
1289 RID_SVXSTR_LIBRE_GREEN_ACCENT
,
1290 RID_SVXSTR_LIBRE_BLUE_ACCENT
,
1291 RID_SVXSTR_LIBRE_ORANGE_ACCENT
,
1292 RID_SVXSTR_LIBRE_PURPLE
,
1293 RID_SVXSTR_LIBRE_PURPLE_ACCENT
,
1294 RID_SVXSTR_LIBRE_YELLOW_ACCENT
,
1295 RID_SVXSTR_TANGO_BUTTER
,
1296 RID_SVXSTR_TANGO_ORANGE
,
1297 RID_SVXSTR_TANGO_CHOCOLATE
,
1298 RID_SVXSTR_TANGO_CHAMELEON
,
1299 RID_SVXSTR_TANGO_SKY_BLUE
,
1300 RID_SVXSTR_TANGO_PLUM
,
1301 RID_SVXSTR_TANGO_SCARLET_RED
,
1302 RID_SVXSTR_TANGO_ALUMINIUM
1305 bool SvxUnoConvertResourceString( sal_uInt16
* pSourceResIds
, sal_uInt16
* pDestResIds
, int nCount
, String
& rString
) throw()
1307 //We replace e.g. "Gray 10%" with the translation of Gray, but we shouldn't
1308 //replace "Red Hat 1" with the translation of Red :-)
1309 OUString
sStr(rString
);
1310 const sal_Unicode
*pStr
= sStr
.getStr();
1311 sal_Int32 nLength
= sStr
.getLength();
1312 while( nLength
> 0 )
1314 const sal_Unicode nChar
= pStr
[nLength
-1];
1315 if (nChar
!= '%' && (nChar
< '0' || nChar
> '9'))
1319 sStr
= OUString(pStr
, nLength
).trim();
1321 for(int i
= 0; i
< nCount
; ++i
)
1323 String aStrDefName
= SVX_RESSTR( pSourceResIds
[i
] );
1324 if( sStr
.equals( aStrDefName
) )
1326 String aReplace
= SVX_RESSTR( pDestResIds
[i
] );
1327 rString
.Replace( 0, aStrDefName
.Len(), aReplace
);
1335 /** if the given name is a predefined name for the current language it is replaced by
1336 the corresponding api name.
1338 OUString
SvxUnogetApiNameForItem(const sal_Int16 nWhich
, const OUString
& rInternalName
) throw()
1340 String aNew
= rInternalName
;
1342 if( nWhich
== XATTR_LINECOLOR
)
1344 if( SvxUnoConvertResourceString( (sal_uInt16
*)SvxUnoColorNameResId
, (sal_uInt16
*)SvxUnoColorNameDefResId
, sizeof( SvxUnoColorNameResId
) / sizeof( sal_uInt16
), aNew
) )
1355 if( SvxUnoGetResourceRanges( nWhich
, nApiResIds
, nIntResIds
, nCount
) )
1357 if(SvxUnoConvertResourceString( nIntResIds
, nApiResIds
, nCount
, aNew
) )
1364 // just use previous name, if nothing else was found.
1365 return rInternalName
;
1368 /** if the given name is a predefined api name it is replaced by the predefined name
1369 for the current language.
1371 OUString
SvxUnogetInternalNameForItem(const sal_Int16 nWhich
, const OUString
& rApiName
) throw()
1373 String aNew
= rApiName
;
1375 if( nWhich
== XATTR_LINECOLOR
)
1377 if( SvxUnoConvertResourceString( (sal_uInt16
*)SvxUnoColorNameDefResId
, (sal_uInt16
*)SvxUnoColorNameResId
, sizeof( SvxUnoColorNameResId
) / sizeof( sal_uInt16
), aNew
) )
1388 if( SvxUnoGetResourceRanges( nWhich
, nApiResIds
, nIntResIds
, nCount
) )
1390 if(SvxUnoConvertResourceString( nApiResIds
, nIntResIds
, nCount
, aNew
) )
1397 // just use previous name, if nothing else was found.
1401 ///////////////////////////////////////////////////////////////////////
1403 comphelper::PropertySetInfo
* SvxPropertySetInfoPool::getOrCreate( sal_Int32 nServiceId
) throw()
1405 SolarMutexGuard aGuard
;
1407 if( nServiceId
> SVXUNO_SERVICEID_LASTID
)
1409 OSL_FAIL( "unknown service id!" );
1413 if( mpInfos
[ nServiceId
] == NULL
)
1415 mpInfos
[nServiceId
] = new comphelper::PropertySetInfo();
1416 mpInfos
[nServiceId
]->acquire();
1418 switch( nServiceId
)
1420 case SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS
:
1421 mpInfos
[SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS
]->add( ImplGetSvxDrawingDefaultsPropertyMap() );
1423 case SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER
:
1424 mpInfos
[SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER
]->add( ImplGetSvxDrawingDefaultsPropertyMap() );
1425 mpInfos
[SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER
]->remove( OUString( UNO_NAME_EDIT_PARA_IS_HANGING_PUNCTUATION
) );
1426 // OD 13.10.2003 #i18732# - add property map for writer item 'IsFollowingTextFlow'
1427 mpInfos
[SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER
]->add( ImplGetAdditionalWriterDrawingDefaultsPropertyMap() );
1431 OSL_FAIL( "unknown service id!" );
1435 return mpInfos
[ nServiceId
];
1438 comphelper::PropertySetInfo
* SvxPropertySetInfoPool::mpInfos
[SVXUNO_SERVICEID_LASTID
+1] = { NULL
};
1440 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */