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/container/XNameContainer.hpp>
24 #include <com/sun/star/frame/XModel.hpp>
25 #include <com/sun/star/embed/XEmbeddedObject.hpp>
26 #include <com/sun/star/util/MeasureUnit.hpp>
27 #include <com/sun/star/drawing/TextVerticalAdjust.hpp>
28 #include <com/sun/star/media/ZoomLevel.hpp>
29 #include <com/sun/star/io/XInputStream.hpp>
30 #include <com/sun/star/beans/PropertyAttribute.hpp>
31 #include <com/sun/star/lang/Locale.hpp>
32 #include <tools/debug.hxx>
33 #include <tools/fldunit.hxx>
34 #include <vcl/svapp.hxx>
35 #include <comphelper/propertysetinfo.hxx>
36 #include <comphelper/sequence.hxx>
37 #include <svx/dialmgr.hxx>
38 #include <svx/unoapi.hxx>
39 #include <svx/unoshprp.hxx>
40 #include <svx/svxids.hrc>
41 #include <svx/svdobjkind.hxx>
42 #include <svx/strings.hrc>
43 #include <strings.hxx>
45 #include "shapeimpl.hxx"
46 #include <unordered_map>
48 using namespace ::com::sun::star
;
49 using namespace ::com::sun::star::beans::PropertyAttribute
;
50 using ::com::sun::star::drawing::TextVerticalAdjust
;
52 static SfxItemPropertyMapEntry
const * ImplGetSvxShapePropertyMap()
54 static SfxItemPropertyMapEntry
const aShapePropertyMap_Impl
[] =
59 LINE_PROPERTIES_START_END
60 SHAPE_DESCRIPTOR_PROPERTIES
69 { u
"UserDefinedAttributes", SDRATTR_XMLATTRIBUTES
, cppu::UnoType
<css::container::XNameContainer
>::get(), 0, 0},
70 { u
"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS
, cppu::UnoType
<css::container::XNameContainer
>::get(), 0, 0},
71 { u
"", 0, css::uno::Type(), 0, 0 }
74 return aShapePropertyMap_Impl
;
77 static SfxItemPropertyMapEntry
const * ImplGetSvxTextShapePropertyMap()
79 static SfxItemPropertyMapEntry
const aTextShapePropertyMap_Impl
[] =
84 LINE_PROPERTIES_START_END
85 SHAPE_DESCRIPTOR_PROPERTIES
86 MISC_OBJ_PROPERTIES_NO_SHEAR
94 { u
"UserDefinedAttributes", SDRATTR_XMLATTRIBUTES
, cppu::UnoType
<css::container::XNameContainer
>::get(), 0, 0},
95 { u
"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS
, cppu::UnoType
<css::container::XNameContainer
>::get(), 0, 0},
96 { u
"", 0, css::uno::Type(), 0, 0 }
99 return aTextShapePropertyMap_Impl
;
102 static SfxItemPropertyMapEntry
const * ImplGetSvxConnectorPropertyMap()
104 static SfxItemPropertyMapEntry
const aConnectorPropertyMap_Impl
[] =
106 SPECIAL_CONNECTOR_PROPERTIES
107 EDGERADIUS_PROPERTIES
110 LINE_PROPERTIES_START_END
111 SHAPE_DESCRIPTOR_PROPERTIES
113 LINKTARGET_PROPERTIES
120 { u
"UserDefinedAttributes", SDRATTR_XMLATTRIBUTES
, cppu::UnoType
<css::container::XNameContainer
>::get(), 0, 0},
121 { u
"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS
, cppu::UnoType
<css::container::XNameContainer
>::get(), 0, 0},
122 { u
"", 0, css::uno::Type(), 0, 0 }
125 return aConnectorPropertyMap_Impl
;
128 static SfxItemPropertyMapEntry
const * ImplGetSvxDimensioningPropertyMap()
130 static SfxItemPropertyMapEntry
const aDimensioningPropertyMap_Impl
[] =
132 SPECIAL_DIMENSIONING_PROPERTIES
133 EDGERADIUS_PROPERTIES
136 LINE_PROPERTIES_START_END
137 SHAPE_DESCRIPTOR_PROPERTIES
139 LINKTARGET_PROPERTIES
146 { u
"UserDefinedAttributes", SDRATTR_XMLATTRIBUTES
, cppu::UnoType
<css::container::XNameContainer
>::get(), 0, 0},
147 { u
"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS
, cppu::UnoType
<css::container::XNameContainer
>::get(), 0, 0},
148 { u
"", 0, css::uno::Type(), 0, 0 }
151 return aDimensioningPropertyMap_Impl
;
154 static SfxItemPropertyMapEntry
const * ImplGetSvxCirclePropertyMap()
156 static SfxItemPropertyMapEntry
const aCirclePropertyMap_Impl
[] =
158 SPECIAL_CIRCLE_PROPERTIES
159 EDGERADIUS_PROPERTIES
162 LINE_PROPERTIES_START_END
163 SHAPE_DESCRIPTOR_PROPERTIES
165 LINKTARGET_PROPERTIES
172 { u
"UserDefinedAttributes", SDRATTR_XMLATTRIBUTES
, cppu::UnoType
<css::container::XNameContainer
>::get(), 0, 0},
173 { u
"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS
, cppu::UnoType
<css::container::XNameContainer
>::get(), 0, 0},
174 { u
"", 0, css::uno::Type(), 0, 0 }
177 return aCirclePropertyMap_Impl
;
180 static SfxItemPropertyMapEntry
const * ImplGetSvxPolyPolygonPropertyMap()
182 static SfxItemPropertyMapEntry
const aPolyPolygonPropertyMap_Impl
[] =
184 { u
"Geometry", OWN_ATTR_BASE_GEOMETRY
, cppu::UnoType
<css::drawing::PointSequenceSequence
>::get(), 0, 0 },
185 SPECIAL_POLYGON_PROPERTIES
186 SPECIAL_POLYPOLYGON_PROPERTIES
187 SPECIAL_POLYPOLYGONBEZIER_PROPERTIES
190 LINE_PROPERTIES_START_END
191 SHAPE_DESCRIPTOR_PROPERTIES
193 LINKTARGET_PROPERTIES
200 { u
"UserDefinedAttributes", SDRATTR_XMLATTRIBUTES
, cppu::UnoType
<css::container::XNameContainer
>::get(), 0, 0},
201 { u
"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS
, cppu::UnoType
<css::container::XNameContainer
>::get(), 0, 0},
202 { u
"", 0, css::uno::Type(), 0, 0 }
205 return aPolyPolygonPropertyMap_Impl
;
208 static SfxItemPropertyMapEntry
const * ImplGetSvxGraphicObjectPropertyMap()
210 static SfxItemPropertyMapEntry
const aGraphicObjectPropertyMap_Impl
[] =
212 SPECIAL_GRAPHOBJ_PROPERTIES
218 LINE_PROPERTIES_START_END
219 SHAPE_DESCRIPTOR_PROPERTIES
221 // #i118485# Full properties now, shear included
224 LINKTARGET_PROPERTIES
231 { u
"IsMirrored", OWN_ATTR_MIRRORED
, cppu::UnoType
<bool>::get(), 0, 0},
232 { u
"UserDefinedAttributes", SDRATTR_XMLATTRIBUTES
, cppu::UnoType
<css::container::XNameContainer
>::get(), 0, 0},
233 { u
"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS
, cppu::UnoType
<css::container::XNameContainer
>::get(), 0, 0},
234 { u
"GraphicStream", OWN_ATTR_GRAPHIC_STREAM
, cppu::UnoType
<css::io::XInputStream
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
235 { u
"", 0, css::uno::Type(), 0, 0 }
238 return aGraphicObjectPropertyMap_Impl
;
241 static SfxItemPropertyMapEntry
const * ImplGetSvx3DSceneObjectPropertyMap()
243 static SfxItemPropertyMapEntry
const a3DSceneObjectPropertyMap_Impl
[] =
245 SPECIAL_3DSCENEOBJECT_PROPERTIES
248 LINE_PROPERTIES_START_END
249 SHAPE_DESCRIPTOR_PROPERTIES
251 LINKTARGET_PROPERTIES
253 { u
"", 0, css::uno::Type(), 0, 0 }
256 return a3DSceneObjectPropertyMap_Impl
;
259 static SfxItemPropertyMapEntry
const * ImplGetSvx3DCubeObjectPropertyMap()
261 static SfxItemPropertyMapEntry
const a3DCubeObjectPropertyMap_Impl
[] =
263 SPECIAL_3DCUBEOBJECT_PROPERTIES
264 MISC_3D_OBJ_PROPERTIES
267 LINE_PROPERTIES_START_END
268 SHAPE_DESCRIPTOR_PROPERTIES
270 LINKTARGET_PROPERTIES
272 { u
"UserDefinedAttributes", SDRATTR_XMLATTRIBUTES
, cppu::UnoType
<css::container::XNameContainer
>::get(), 0, 0},
273 { u
"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS
, cppu::UnoType
<css::container::XNameContainer
>::get(), 0, 0},
274 { u
"", 0, css::uno::Type(), 0, 0 }
277 return a3DCubeObjectPropertyMap_Impl
;
280 static SfxItemPropertyMapEntry
const * ImplGetSvx3DSphereObjectPropertyMap()
282 static SfxItemPropertyMapEntry
const a3DSphereObjectPropertyMap_Impl
[] =
284 SPECIAL_3DSPHEREOBJECT_PROPERTIES
285 MISC_3D_OBJ_PROPERTIES
288 LINE_PROPERTIES_START_END
289 SHAPE_DESCRIPTOR_PROPERTIES
291 LINKTARGET_PROPERTIES
293 { u
"UserDefinedAttributes", SDRATTR_XMLATTRIBUTES
, cppu::UnoType
<css::container::XNameContainer
>::get(), 0, 0},
294 { u
"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS
, cppu::UnoType
<css::container::XNameContainer
>::get(), 0, 0},
295 { u
"", 0, css::uno::Type(), 0, 0 }
297 return a3DSphereObjectPropertyMap_Impl
;
300 static SfxItemPropertyMapEntry
const * ImplGetSvx3DLatheObjectPropertyMap()
302 static SfxItemPropertyMapEntry
const a3DLatheObjectPropertyMap_Impl
[] =
304 SPECIAL_3DLATHEOBJECT_PROPERTIES
306 // #107245# New 3D properties which are possible for lathe and extrude 3d objects
307 SPECIAL_3DLATHEANDEXTRUDEOBJ_PROPERTIES
309 SPECIAL_3DBACKSCALE_PROPERTIES
310 MISC_3D_OBJ_PROPERTIES
313 LINE_PROPERTIES_START_END
314 SHAPE_DESCRIPTOR_PROPERTIES
316 LINKTARGET_PROPERTIES
318 { u
"UserDefinedAttributes", SDRATTR_XMLATTRIBUTES
, cppu::UnoType
<css::container::XNameContainer
>::get(), 0, 0},
319 { u
"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS
, cppu::UnoType
<css::container::XNameContainer
>::get(), 0, 0},
320 { u
"", 0, css::uno::Type(), 0, 0 }
323 return a3DLatheObjectPropertyMap_Impl
;
326 static SfxItemPropertyMapEntry
const * ImplGetSvx3DExtrudeObjectPropertyMap()
328 static SfxItemPropertyMapEntry
const a3DExtrudeObjectPropertyMap_Impl
[] =
330 SPECIAL_3DEXTRUDEOBJECT_PROPERTIES
332 // #107245# New 3D properties which are possible for lathe and extrude 3d objects
333 SPECIAL_3DLATHEANDEXTRUDEOBJ_PROPERTIES
335 SPECIAL_3DBACKSCALE_PROPERTIES
336 MISC_3D_OBJ_PROPERTIES
339 LINE_PROPERTIES_START_END
340 SHAPE_DESCRIPTOR_PROPERTIES
342 LINKTARGET_PROPERTIES
344 { u
"UserDefinedAttributes", SDRATTR_XMLATTRIBUTES
, cppu::UnoType
<css::container::XNameContainer
>::get(), 0, 0},
345 { u
"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS
, cppu::UnoType
<css::container::XNameContainer
>::get(), 0, 0},
346 { u
"", 0, css::uno::Type(), 0, 0 }
349 return a3DExtrudeObjectPropertyMap_Impl
;
352 static SfxItemPropertyMapEntry
const * ImplGetSvx3DPolygonObjectPropertyMap()
354 static SfxItemPropertyMapEntry
const a3DPolygonObjectPropertyMap_Impl
[] =
356 SPECIAL_3DPOLYGONOBJECT_PROPERTIES
357 MISC_3D_OBJ_PROPERTIES
360 LINE_PROPERTIES_START_END
361 SHAPE_DESCRIPTOR_PROPERTIES
363 LINKTARGET_PROPERTIES
365 { u
"UserDefinedAttributes", SDRATTR_XMLATTRIBUTES
, cppu::UnoType
<css::container::XNameContainer
>::get(), 0, 0},
366 { u
"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS
, cppu::UnoType
<css::container::XNameContainer
>::get(), 0, 0},
367 { u
"", 0, css::uno::Type(), 0, 0 }
370 return a3DPolygonObjectPropertyMap_Impl
;
373 static SfxItemPropertyMapEntry
const * ImplGetSvxAllPropertyMap()
375 static SfxItemPropertyMapEntry
const aAllPropertyMap_Impl
[] =
381 LINE_PROPERTIES_START_END
383 EDGERADIUS_PROPERTIES
387 SHAPE_DESCRIPTOR_PROPERTIES
389 LINKTARGET_PROPERTIES
390 SPECIAL_CONNECTOR_PROPERTIES
391 SPECIAL_DIMENSIONING_PROPERTIES
392 SPECIAL_CIRCLE_PROPERTIES
393 SPECIAL_POLYGON_PROPERTIES
394 SPECIAL_POLYPOLYGON_PROPERTIES
395 SPECIAL_POLYPOLYGONBEZIER_PROPERTIES
396 SPECIAL_GRAPHOBJ_PROPERTIES
397 SPECIAL_3DSCENEOBJECT_PROPERTIES
398 MISC_3D_OBJ_PROPERTIES
399 SPECIAL_3DCUBEOBJECT_PROPERTIES
400 SPECIAL_3DSPHEREOBJECT_PROPERTIES
401 SPECIAL_3DLATHEOBJECT_PROPERTIES
402 SPECIAL_3DEXTRUDEOBJECT_PROPERTIES
404 // #107245# New 3D properties which are possible for lathe and extrude 3d objects
405 SPECIAL_3DLATHEANDEXTRUDEOBJ_PROPERTIES
407 SPECIAL_3DBACKSCALE_PROPERTIES
408 SPECIAL_3DPOLYGONOBJECT_PROPERTIES
409 { u
"UserDefinedAttributes", SDRATTR_XMLATTRIBUTES
, cppu::UnoType
<css::container::XNameContainer
>::get(), 0, 0},
410 { u
"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS
, cppu::UnoType
<css::container::XNameContainer
>::get(), 0, 0},
411 { u
"", 0, css::uno::Type(), 0, 0 }
414 return aAllPropertyMap_Impl
;
417 static SfxItemPropertyMapEntry
const * ImplGetSvxGroupPropertyMap()
419 static SfxItemPropertyMapEntry
const aGroupPropertyMap_Impl
[] =
421 SHAPE_DESCRIPTOR_PROPERTIES
423 LINKTARGET_PROPERTIES
424 { u
"", 0, css::uno::Type(), 0, 0 }
427 return aGroupPropertyMap_Impl
;
430 static SfxItemPropertyMapEntry
const * ImplGetSvxOle2PropertyMap()
432 static SfxItemPropertyMapEntry
const aOle2PropertyMap_Impl
[] =
434 // #i118485# Adding properties for line, fill, text, shadow, fontwork, rotate, shear
437 LINE_PROPERTIES_START_END
438 SHAPE_DESCRIPTOR_PROPERTIES
440 LINKTARGET_PROPERTIES
447 { u
"ThumbnailGraphic", OWN_ATTR_THUMBNAIL
, cppu::UnoType
<css::graphic::XGraphic
>::get(), 0, 0 },
448 { u
"Model", OWN_ATTR_OLEMODEL
, cppu::UnoType
<css::frame::XModel
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
449 { u
"EmbeddedObject", OWN_ATTR_OLE_EMBEDDED_OBJECT
, cppu::UnoType
<css::embed::XEmbeddedObject
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
450 { u
"EmbeddedObjectNoNewClient",OWN_ATTR_OLE_EMBEDDED_OBJECT_NONEWCLIENT
, cppu::UnoType
<css::embed::XEmbeddedObject
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
451 { u
"OriginalSize", OWN_ATTR_OLESIZE
, cppu::UnoType
<css::awt::Size
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
452 { u
"CLSID", OWN_ATTR_CLSID
, cppu::UnoType
<OUString
>::get(), 0, 0 },
453 { u
"IsInternal", OWN_ATTR_INTERNAL_OLE
, cppu::UnoType
<bool>::get() , css::beans::PropertyAttribute::READONLY
, 0},
454 { u
"VisibleArea", OWN_ATTR_OLE_VISAREA
, cppu::UnoType
<css::awt::Rectangle
>::get(), 0, 0},
455 { u
"Aspect", OWN_ATTR_OLE_ASPECT
, cppu::UnoType
<sal_Int64
>::get(), 0, 0},
456 { u
"" UNO_NAME_OLE2_PERSISTNAME
, OWN_ATTR_PERSISTNAME
, cppu::UnoType
<OUString
>::get(), 0, 0 },
457 { u
"LinkURL", OWN_ATTR_OLE_LINKURL
, cppu::UnoType
<OUString
>::get(), 0, 0 },
458 { u
"" UNO_NAME_GRAPHOBJ_GRAPHIC
, OWN_ATTR_VALUE_GRAPHIC
, cppu::UnoType
<css::graphic::XGraphic
>::get(), 0, 0},
459 { u
"", 0, css::uno::Type(), 0, 0 }
462 return aOle2PropertyMap_Impl
;
465 static SfxItemPropertyMapEntry
const * ImplGetSvxPluginPropertyMap()
467 static SfxItemPropertyMapEntry
const aPluginPropertyMap_Impl
[] =
469 { u
"PluginMimeType", OWN_ATTR_PLUGIN_MIMETYPE
, cppu::UnoType
<OUString
>::get(), 0, 0},
470 { u
"PluginURL", OWN_ATTR_PLUGIN_URL
, cppu::UnoType
<OUString
>::get(), 0, 0},
471 { u
"PluginCommands", OWN_ATTR_PLUGIN_COMMANDS
, cppu::UnoType
<css::uno::Sequence
< css::beans::PropertyValue
>>::get(), 0, 0},
472 { u
"Transformation", OWN_ATTR_TRANSFORMATION
, cppu::UnoType
<css::drawing::HomogenMatrix3
>::get(), 0, 0 },
473 { u
"" UNO_NAME_MISC_OBJ_ZORDER
, OWN_ATTR_ZORDER
, cppu::UnoType
<sal_Int32
>::get(), 0, 0},
474 { u
"" UNO_NAME_MISC_OBJ_LAYERID
, SDRATTR_LAYERID
, cppu::UnoType
<sal_Int16
>::get(), 0, 0},
475 { u
"" UNO_NAME_MISC_OBJ_LAYERNAME
,SDRATTR_LAYERNAME
, cppu::UnoType
<OUString
>::get(), 0, 0},
476 { u
"" UNO_NAME_LINKDISPLAYBITMAP
, OWN_ATTR_LDBITMAP
, cppu::UnoType
<css::awt::XBitmap
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
477 { u
"" UNO_NAME_LINKDISPLAYNAME
, OWN_ATTR_LDNAME
, cppu::UnoType
<OUString
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
478 { u
"" UNO_NAME_OLE2_METAFILE
, OWN_ATTR_METAFILE
, cppu::UnoType
<css::uno::Sequence
<sal_Int8
>>::get(), css::beans::PropertyAttribute::READONLY
, 0},
479 { u
"ThumbnailGraphic", OWN_ATTR_THUMBNAIL
, cppu::UnoType
<css::graphic::XGraphic
>::get(), 0, 0 },
480 { u
"" UNO_NAME_MISC_OBJ_MOVEPROTECT
, SDRATTR_OBJMOVEPROTECT
, cppu::UnoType
<bool>::get(),0, 0},
481 { u
"" UNO_NAME_MISC_OBJ_SIZEPROTECT
, SDRATTR_OBJSIZEPROTECT
, cppu::UnoType
<bool>::get(),0, 0},
482 { u
"" UNO_NAME_OLE2_PERSISTNAME
, OWN_ATTR_PERSISTNAME
, cppu::UnoType
<OUString
>::get(), 0, 0 },
483 { u
"LinkURL", OWN_ATTR_OLE_LINKURL
, cppu::UnoType
<OUString
>::get(), 0, 0 },
484 { u
"" UNO_NAME_MISC_OBJ_BOUNDRECT
, OWN_ATTR_BOUNDRECT
, cppu::UnoType
<css::awt::Rectangle
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
485 { u
"VisibleArea", OWN_ATTR_OLE_VISAREA
, cppu::UnoType
<css::awt::Rectangle
>::get(), 0, 0},
486 { u
"UINameSingular", OWN_ATTR_UINAME_SINGULAR
, ::cppu::UnoType
<OUString
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
488 { u
"" UNO_NAME_MISC_OBJ_TITLE
, OWN_ATTR_MISC_OBJ_TITLE
, cppu::UnoType
<OUString
>::get(), 0, 0},
489 { u
"" UNO_NAME_MISC_OBJ_DESCRIPTION
, OWN_ATTR_MISC_OBJ_DESCRIPTION
, cppu::UnoType
<OUString
>::get(), 0, 0},
490 { u
"", 0, css::uno::Type(), 0, 0 }
493 return aPluginPropertyMap_Impl
;
496 static SfxItemPropertyMapEntry
const * ImplGetSvxFramePropertyMap()
498 //TODO/LATER: new properties for ScrollingMode and DefaultBorder
499 static SfxItemPropertyMapEntry
const aFramePropertyMap_Impl
[] =
501 { u
"FrameURL", OWN_ATTR_FRAME_URL
, cppu::UnoType
<OUString
>::get(), 0, 0},
502 { u
"FrameName", OWN_ATTR_FRAME_NAME
, cppu::UnoType
<OUString
>::get(), 0, 0},
503 { u
"FrameIsAutoScroll", OWN_ATTR_FRAME_ISAUTOSCROLL
, cppu::UnoType
<bool>::get() , css::beans::PropertyAttribute::MAYBEVOID
, 0},
504 { u
"FrameIsBorder", OWN_ATTR_FRAME_ISBORDER
, cppu::UnoType
<bool>::get() , 0, 0},
505 { u
"FrameMarginWidth", OWN_ATTR_FRAME_MARGIN_WIDTH
, cppu::UnoType
<sal_Int32
>::get(), 0, 0},
506 { u
"FrameMarginHeight", OWN_ATTR_FRAME_MARGIN_HEIGHT
, cppu::UnoType
<sal_Int32
>::get(), 0, 0},
507 { u
"Transformation", OWN_ATTR_TRANSFORMATION
, cppu::UnoType
<css::drawing::HomogenMatrix3
>::get(), 0, 0 },
508 { u
"" UNO_NAME_MISC_OBJ_ZORDER
, OWN_ATTR_ZORDER
, cppu::UnoType
<sal_Int32
>::get(), 0, 0},
509 { u
"" UNO_NAME_MISC_OBJ_LAYERID
, SDRATTR_LAYERID
, cppu::UnoType
<sal_Int16
>::get(), 0, 0},
510 { u
"" UNO_NAME_MISC_OBJ_LAYERNAME
,SDRATTR_LAYERNAME
, cppu::UnoType
<OUString
>::get(), 0, 0},
511 { u
"" UNO_NAME_LINKDISPLAYBITMAP
, OWN_ATTR_LDBITMAP
, cppu::UnoType
<css::awt::XBitmap
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
512 { u
"" UNO_NAME_LINKDISPLAYNAME
, OWN_ATTR_LDNAME
, cppu::UnoType
<OUString
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
513 { u
"" UNO_NAME_OLE2_METAFILE
, OWN_ATTR_METAFILE
, cppu::UnoType
<css::uno::Sequence
<sal_Int8
>>::get(), css::beans::PropertyAttribute::READONLY
, 0},
514 { u
"ThumbnailGraphic", OWN_ATTR_THUMBNAIL
, cppu::UnoType
<css::graphic::XGraphic
>::get(), 0, 0 },
515 { u
"" UNO_NAME_MISC_OBJ_MOVEPROTECT
, SDRATTR_OBJMOVEPROTECT
, cppu::UnoType
<bool>::get(),0, 0},
516 { u
"" UNO_NAME_MISC_OBJ_SIZEPROTECT
, SDRATTR_OBJSIZEPROTECT
, cppu::UnoType
<bool>::get(),0, 0},
517 { u
"" UNO_NAME_OLE2_PERSISTNAME
, OWN_ATTR_PERSISTNAME
, cppu::UnoType
<OUString
>::get(), 0, 0 },
518 { u
"LinkURL", OWN_ATTR_OLE_LINKURL
, cppu::UnoType
<OUString
>::get(), 0, 0 },
519 { u
"" UNO_NAME_MISC_OBJ_BOUNDRECT
, OWN_ATTR_BOUNDRECT
, cppu::UnoType
<css::awt::Rectangle
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
520 { u
"VisibleArea", OWN_ATTR_OLE_VISAREA
, cppu::UnoType
<css::awt::Rectangle
>::get(), 0, 0},
521 { u
"UINameSingular", OWN_ATTR_UINAME_SINGULAR
, ::cppu::UnoType
<OUString
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
523 { u
"" UNO_NAME_MISC_OBJ_TITLE
, OWN_ATTR_MISC_OBJ_TITLE
, cppu::UnoType
<OUString
>::get(), 0, 0},
524 { u
"" UNO_NAME_MISC_OBJ_DESCRIPTION
, OWN_ATTR_MISC_OBJ_DESCRIPTION
, cppu::UnoType
<OUString
>::get(), 0, 0},
525 { u
"", 0, css::uno::Type(), 0, 0 }
528 return aFramePropertyMap_Impl
;
531 static SfxItemPropertyMapEntry
const * ImplGetSvxAppletPropertyMap()
533 static SfxItemPropertyMapEntry
const aAppletPropertyMap_Impl
[] =
535 { u
"AppletCodeBase", OWN_ATTR_APPLET_CODEBASE
, cppu::UnoType
<OUString
>::get(), 0, 0},
536 { u
"AppletName", OWN_ATTR_APPLET_NAME
, cppu::UnoType
<OUString
>::get(), 0, 0},
537 { u
"AppletCode", OWN_ATTR_APPLET_CODE
, cppu::UnoType
<OUString
>::get(), 0, 0},
538 { u
"AppletCommands", OWN_ATTR_APPLET_COMMANDS
, cppu::UnoType
<css::uno::Sequence
< css::beans::PropertyValue
>>::get(), 0, 0},
539 { u
"AppletDocBase", OWN_ATTR_APPLET_DOCBASE
, cppu::UnoType
<OUString
>::get(), 0, 0},
540 { u
"AppletIsScript", OWN_ATTR_APPLET_ISSCRIPT
, cppu::UnoType
<bool>::get(), 0, 0 },
541 { u
"Transformation", OWN_ATTR_TRANSFORMATION
, cppu::UnoType
<css::drawing::HomogenMatrix3
>::get(), 0, 0 },
542 { u
"" UNO_NAME_MISC_OBJ_ZORDER
, OWN_ATTR_ZORDER
, cppu::UnoType
<sal_Int32
>::get(), 0, 0},
543 { u
"" UNO_NAME_MISC_OBJ_LAYERID
, SDRATTR_LAYERID
, cppu::UnoType
<sal_Int16
>::get(), 0, 0},
544 { u
"" UNO_NAME_MISC_OBJ_LAYERNAME
,SDRATTR_LAYERNAME
, cppu::UnoType
<OUString
>::get(), 0, 0},
545 { u
"" UNO_NAME_LINKDISPLAYBITMAP
, OWN_ATTR_LDBITMAP
, cppu::UnoType
<css::awt::XBitmap
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
546 { u
"" UNO_NAME_LINKDISPLAYNAME
, OWN_ATTR_LDNAME
, cppu::UnoType
<OUString
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
547 { u
"" UNO_NAME_OLE2_METAFILE
, OWN_ATTR_METAFILE
, cppu::UnoType
<css::uno::Sequence
<sal_Int8
>>::get(), css::beans::PropertyAttribute::READONLY
, 0},
548 { u
"ThumbnailGraphic", OWN_ATTR_THUMBNAIL
, cppu::UnoType
<css::graphic::XGraphic
>::get(), 0, 0 },
549 { u
"" UNO_NAME_MISC_OBJ_MOVEPROTECT
, SDRATTR_OBJMOVEPROTECT
, cppu::UnoType
<bool>::get(),0, 0},
550 { u
"" UNO_NAME_MISC_OBJ_SIZEPROTECT
, SDRATTR_OBJSIZEPROTECT
, cppu::UnoType
<bool>::get(),0, 0},
551 { u
"" UNO_NAME_OLE2_PERSISTNAME
, OWN_ATTR_PERSISTNAME
, cppu::UnoType
<OUString
>::get(), 0, 0 },
552 { u
"LinkURL", OWN_ATTR_OLE_LINKURL
, cppu::UnoType
<OUString
>::get(), 0, 0 },
553 { u
"" UNO_NAME_MISC_OBJ_BOUNDRECT
, OWN_ATTR_BOUNDRECT
, cppu::UnoType
<css::awt::Rectangle
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
554 { u
"VisibleArea", OWN_ATTR_OLE_VISAREA
, cppu::UnoType
<css::awt::Rectangle
>::get(), 0, 0},
555 { u
"UINameSingular", OWN_ATTR_UINAME_SINGULAR
, ::cppu::UnoType
<OUString
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
557 { u
"" UNO_NAME_MISC_OBJ_TITLE
, OWN_ATTR_MISC_OBJ_TITLE
, cppu::UnoType
<OUString
>::get(), 0, 0},
558 { u
"" UNO_NAME_MISC_OBJ_DESCRIPTION
, OWN_ATTR_MISC_OBJ_DESCRIPTION
, cppu::UnoType
<OUString
>::get(), 0, 0},
559 { u
"", 0, css::uno::Type(), 0, 0 }
562 return aAppletPropertyMap_Impl
;
565 static SfxItemPropertyMapEntry
const * ImplGetSvxControlShapePropertyMap()
567 static SfxItemPropertyMapEntry
const aControlPropertyMap_Impl
[] =
569 // the following properties are mapped to the XControl Model of this shape
570 { u
"" UNO_NAME_EDIT_CHAR_FONTNAME
, 0, cppu::UnoType
<OUString
>::get(), 0, 0 },
571 { u
"" UNO_NAME_EDIT_CHAR_FONTSTYLENAME
, 0, cppu::UnoType
<OUString
>::get(), 0, 0 },
572 { u
"" UNO_NAME_EDIT_CHAR_FONTFAMILY
, 0, cppu::UnoType
<sal_Int16
>::get(), 0, 0 },
573 { u
"" UNO_NAME_EDIT_CHAR_FONTCHARSET
, 0, cppu::UnoType
<sal_Int16
>::get(), 0, 0 },
574 { u
"" UNO_NAME_EDIT_CHAR_HEIGHT
, 0, cppu::UnoType
<float>::get(), 0, 0 },
575 { u
"" UNO_NAME_EDIT_CHAR_FONTPITCH
, 0, cppu::UnoType
<sal_Int16
>::get(), 0, 0 },
576 { u
"" UNO_NAME_EDIT_CHAR_POSTURE
, 0, cppu::UnoType
<css::awt::FontSlant
>::get(),0, 0 },
577 { u
"" UNO_NAME_EDIT_CHAR_WEIGHT
, 0, cppu::UnoType
<float>::get(), 0, 0 },
578 { u
"" UNO_NAME_EDIT_CHAR_UNDERLINE
, 0, cppu::UnoType
<sal_Int16
>::get(), 0, 0 },
579 { u
"" UNO_NAME_EDIT_CHAR_STRIKEOUT
, 0, cppu::UnoType
<sal_Int16
>::get(), 0, 0},
580 { u
"" UNO_NAME_EDIT_CHAR_CASEMAP
, 0, cppu::UnoType
<sal_Int16
>::get(), 0, 0 },
581 { u
"" UNO_NAME_EDIT_CHAR_COLOR
, 0, cppu::UnoType
<sal_Int32
>::get(), 0, 0 },
582 { u
"CharBackColor", 0, cppu::UnoType
<sal_Int32
>::get(), 0, 0 },
583 { u
"CharBackTransparent", 0, cppu::UnoType
<bool>::get(), 0, 0 },
584 { u
"CharRelief", 0, cppu::UnoType
<sal_Int16
>::get(), 0, 0 },
585 { u
"CharUnderlineColor", 0, cppu::UnoType
<sal_Int32
>::get(), 0, 0 },
586 { u
"CharKerning", 0, cppu::UnoType
<sal_Int16
>::get(), 0, 0 },
587 { u
"CharWordMode", 0, cppu::UnoType
<bool>::get(), 0, 0 },
588 { u
"" UNO_NAME_EDIT_PARA_ADJUST
, 0, cppu::UnoType
<sal_Int16
>::get(), 0, 0 },
589 { u
"TextVerticalAdjust", 0, cppu::UnoType
<TextVerticalAdjust
>::get(), MAYBEVOID
, 0 },
590 { u
"ControlBackground", 0, cppu::UnoType
<sal_Int32
>::get(), 0, 0 },
591 { u
"ControlBorder", 0, cppu::UnoType
<sal_Int16
>::get(), 0, 0 },
592 { u
"ControlBorderColor", 0, cppu::UnoType
<sal_Int32
>::get(), 0, 0 },
593 { u
"ControlSymbolColor", 0, cppu::UnoType
<sal_Int16
>::get(), 0, 0 },
594 { u
"ImageScaleMode", 0, cppu::UnoType
<sal_Int16
>::get(), 0, 0 },
595 { u
"" UNO_NAME_MISC_OBJ_MOVEPROTECT
, SDRATTR_OBJMOVEPROTECT
, cppu::UnoType
<bool>::get(),0, 0},
596 { u
"" UNO_NAME_MISC_OBJ_SIZEPROTECT
, SDRATTR_OBJSIZEPROTECT
, cppu::UnoType
<bool>::get(),0, 0},
597 { u
"ControlTextEmphasis", 0, cppu::UnoType
<sal_Int16
>::get(), 0, 0 },
598 { u
"ControlWritingMode", 0, cppu::UnoType
< sal_Int16
>::get(), 0, 0},
599 // the following properties are handled by SvxShape
600 { u
"Transformation", OWN_ATTR_TRANSFORMATION
, cppu::UnoType
<css::drawing::HomogenMatrix3
>::get(), 0, 0 },
601 { u
"" UNO_NAME_MISC_OBJ_ZORDER
, OWN_ATTR_ZORDER
, cppu::UnoType
<sal_Int32
>::get(), 0, 0},
602 { u
"" UNO_NAME_MISC_OBJ_LAYERID
, SDRATTR_LAYERID
, cppu::UnoType
<sal_Int16
>::get(), 0, 0},
603 { u
"" UNO_NAME_MISC_OBJ_LAYERNAME
,SDRATTR_LAYERNAME
, cppu::UnoType
<OUString
>::get(), 0, 0},
604 { u
"" UNO_NAME_LINKDISPLAYBITMAP
, OWN_ATTR_LDBITMAP
, cppu::UnoType
<css::awt::XBitmap
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
605 { u
"" UNO_NAME_LINKDISPLAYNAME
, OWN_ATTR_LDNAME
, cppu::UnoType
<OUString
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
606 { u
"UserDefinedAttributes", SDRATTR_XMLATTRIBUTES
, cppu::UnoType
<css::container::XNameContainer
>::get(), 0, 0},
607 {u
"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS
, cppu::UnoType
<css::container::XNameContainer
>::get(), 0, 0},
608 { u
"" UNO_NAME_MISC_OBJ_BOUNDRECT
, OWN_ATTR_BOUNDRECT
, cppu::UnoType
<css::awt::Rectangle
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
609 { u
"UINameSingular", OWN_ATTR_UINAME_SINGULAR
, ::cppu::UnoType
<OUString
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
611 { u
"" UNO_NAME_MISC_OBJ_TITLE
, OWN_ATTR_MISC_OBJ_TITLE
, cppu::UnoType
<OUString
>::get(), 0, 0},
612 { u
"" UNO_NAME_MISC_OBJ_DESCRIPTION
, OWN_ATTR_MISC_OBJ_DESCRIPTION
, cppu::UnoType
<OUString
>::get(), 0, 0},
614 { u
"" UNO_NAME_MISC_OBJ_PRINTABLE
, SDRATTR_OBJPRINTABLE
, cppu::UnoType
<bool>::get(), 0, 0},
615 { u
"Visible", SDRATTR_OBJVISIBLE
, cppu::UnoType
<bool>::get(), 0, 0},
616 { u
"" UNO_NAME_MISC_OBJ_INTEROPGRABBAG
, OWN_ATTR_INTEROPGRABBAG
, cppu::UnoType
<css::uno::Sequence
< css::beans::PropertyValue
>>::get(), 0, 0},
617 { u
"", 0, css::uno::Type(), 0, 0 }
620 return aControlPropertyMap_Impl
;
623 static SfxItemPropertyMapEntry
const * ImplGetSvxPageShapePropertyMap()
625 static SfxItemPropertyMapEntry
const aPageShapePropertyMap_Impl
[] =
627 { u
"PageNumber", OWN_ATTR_PAGE_NUMBER
, cppu::UnoType
<sal_Int32
>::get(), 0, 0},
628 { u
"Transformation", OWN_ATTR_TRANSFORMATION
, cppu::UnoType
<css::drawing::HomogenMatrix3
>::get(), 0, 0 },
629 { u
"" UNO_NAME_MISC_OBJ_ZORDER
, OWN_ATTR_ZORDER
, cppu::UnoType
<sal_Int32
>::get(), 0, 0},
630 { u
"" UNO_NAME_MISC_OBJ_LAYERID
, SDRATTR_LAYERID
, cppu::UnoType
<sal_Int16
>::get(), 0, 0},
631 { u
"" UNO_NAME_MISC_OBJ_LAYERNAME
,SDRATTR_LAYERNAME
, cppu::UnoType
<OUString
>::get(), 0, 0},
632 { u
"" UNO_NAME_LINKDISPLAYBITMAP
, OWN_ATTR_LDBITMAP
, cppu::UnoType
<css::awt::XBitmap
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
633 { u
"" UNO_NAME_LINKDISPLAYNAME
, OWN_ATTR_LDNAME
, cppu::UnoType
<OUString
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
634 { u
"" UNO_NAME_MISC_OBJ_MOVEPROTECT
, SDRATTR_OBJMOVEPROTECT
, cppu::UnoType
<bool>::get(),0, 0},
635 { u
"" UNO_NAME_MISC_OBJ_SIZEPROTECT
, SDRATTR_OBJSIZEPROTECT
, cppu::UnoType
<bool>::get(),0, 0},
636 { u
"" UNO_NAME_MISC_OBJ_BOUNDRECT
, OWN_ATTR_BOUNDRECT
, cppu::UnoType
<css::awt::Rectangle
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
638 { u
"" UNO_NAME_MISC_OBJ_TITLE
, OWN_ATTR_MISC_OBJ_TITLE
, cppu::UnoType
<OUString
>::get(), 0, 0},
639 { u
"" UNO_NAME_MISC_OBJ_DESCRIPTION
, OWN_ATTR_MISC_OBJ_DESCRIPTION
, cppu::UnoType
<OUString
>::get(), 0, 0},
640 { u
"", 0, css::uno::Type(), 0, 0 }
643 return aPageShapePropertyMap_Impl
;
646 static SfxItemPropertyMapEntry
const * ImplGetSvxCaptionPropertyMap()
648 static SfxItemPropertyMapEntry
const aCaptionPropertyMap_Impl
[] =
650 { u
"CaptionPoint", OWN_ATTR_CAPTION_POINT
, cppu::UnoType
<css::awt::Point
>::get(), 0, 0 },
651 { u
"CaptionType", SDRATTR_CAPTIONTYPE
, cppu::UnoType
<sal_Int16
>::get(), 0, 0},
652 { u
"CaptionIsFixedAngle", SDRATTR_CAPTIONFIXEDANGLE
, cppu::UnoType
<bool>::get(), 0, 0},
653 { u
"CaptionAngle", SDRATTR_CAPTIONANGLE
, cppu::UnoType
<sal_Int32
>::get(), 0, 0},
654 { u
"CaptionGap", SDRATTR_CAPTIONGAP
, cppu::UnoType
<sal_Int32
>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM
},
655 { u
"CaptionEscapeDirection", SDRATTR_CAPTIONESCDIR
, cppu::UnoType
<sal_Int32
>::get(), 0, 0},
656 { u
"CaptionIsEscapeRelative", SDRATTR_CAPTIONESCISREL
, cppu::UnoType
<bool>::get(), 0, 0},
657 { u
"CaptionEscapeRelative", SDRATTR_CAPTIONESCREL
, cppu::UnoType
<sal_Int32
>::get(), 0, 0},
658 { u
"CaptionEscapeAbsolute", SDRATTR_CAPTIONESCABS
, cppu::UnoType
<sal_Int32
>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM
},
659 { u
"CaptionLineLength", SDRATTR_CAPTIONLINELEN
, cppu::UnoType
<sal_Int32
>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM
},
660 { u
"CaptionIsFitLineLength", SDRATTR_CAPTIONFITLINELEN
, cppu::UnoType
<bool>::get(), 0, 0},
661 EDGERADIUS_PROPERTIES
664 LINE_PROPERTIES_START_END
665 SHAPE_DESCRIPTOR_PROPERTIES
667 LINKTARGET_PROPERTIES
672 { u
"UserDefinedAttributes", SDRATTR_XMLATTRIBUTES
, cppu::UnoType
<css::container::XNameContainer
>::get(), 0, 0},
673 {u
"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS
, cppu::UnoType
<css::container::XNameContainer
>::get(), 0, 0},
674 { u
"", 0, css::uno::Type(), 0, 0 }
677 return aCaptionPropertyMap_Impl
;
680 static SfxItemPropertyMapEntry
const * ImplGetSvxCustomShapePropertyMap()
682 static SfxItemPropertyMapEntry
const aCustomShapePropertyMap_Impl
[] =
684 { u
"CustomShapeEngine", SDRATTR_CUSTOMSHAPE_ENGINE
, cppu::UnoType
<OUString
>::get(), 0, 0 },
685 { u
"CustomShapeData", SDRATTR_CUSTOMSHAPE_DATA
, cppu::UnoType
<OUString
>::get(), 0, 0 },
686 { u
"CustomShapeGeometry", SDRATTR_CUSTOMSHAPE_GEOMETRY
,
687 cppu::UnoType
<css::uno::Sequence
< css::beans::PropertyValue
>>::get(), 0, 0 },
690 LINE_PROPERTIES_START_END
691 SHAPE_DESCRIPTOR_PROPERTIES
693 LINKTARGET_PROPERTIES
698 {u
"UserDefinedAttributes", SDRATTR_XMLATTRIBUTES
, cppu::UnoType
<css::container::XNameContainer
>::get(), 0, 0},
699 {u
"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS
, cppu::UnoType
<css::container::XNameContainer
>::get(), 0, 0},
700 { u
"", 0, css::uno::Type(), 0, 0 }
702 return aCustomShapePropertyMap_Impl
;
705 static SfxItemPropertyMapEntry
const * ImplGetSvxMediaShapePropertyMap()
707 static SfxItemPropertyMapEntry
const aMediaShapePropertyMap_Impl
[] =
709 { u
"" UNO_NAME_MISC_OBJ_ZORDER
, OWN_ATTR_ZORDER
, cppu::UnoType
<sal_Int32
>::get(), 0, 0},
710 { u
"" UNO_NAME_MISC_OBJ_LAYERID
, SDRATTR_LAYERID
, cppu::UnoType
<sal_Int16
>::get(), 0, 0},
711 { u
"" UNO_NAME_MISC_OBJ_LAYERNAME
, SDRATTR_LAYERNAME
, cppu::UnoType
<OUString
>::get(), 0, 0},
712 { u
"" UNO_NAME_LINKDISPLAYBITMAP
, OWN_ATTR_LDBITMAP
, cppu::UnoType
<css::awt::XBitmap
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
713 { u
"" UNO_NAME_LINKDISPLAYNAME
, OWN_ATTR_LDNAME
, cppu::UnoType
<OUString
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
714 { u
"Transformation", OWN_ATTR_TRANSFORMATION
, cppu::UnoType
<css::drawing::HomogenMatrix3
>::get(), 0, 0 },
715 { u
"MediaURL", OWN_ATTR_MEDIA_URL
, cppu::UnoType
<OUString
>::get(), 0, 0},
716 { u
"PreferredSize", OWN_ATTR_MEDIA_PREFERREDSIZE
, cppu::UnoType
<css::awt::Size
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
717 { u
"Loop", OWN_ATTR_MEDIA_LOOP
, cppu::UnoType
<sal_Bool
>::get(), 0, 0},
718 { u
"Mute", OWN_ATTR_MEDIA_MUTE
, cppu::UnoType
<sal_Bool
>::get(), 0, 0},
719 { u
"VolumeDB", OWN_ATTR_MEDIA_VOLUMEDB
, cppu::UnoType
<sal_Int16
>::get(), 0, 0},
720 { u
"Zoom", OWN_ATTR_MEDIA_ZOOM
, cppu::UnoType
<css::media::ZoomLevel
>::get(), 0, 0},
721 { u
"" UNO_NAME_MISC_OBJ_MOVEPROTECT
, SDRATTR_OBJMOVEPROTECT
, cppu::UnoType
<bool>::get(),0, 0},
722 { u
"" UNO_NAME_MISC_OBJ_SIZEPROTECT
, SDRATTR_OBJSIZEPROTECT
, cppu::UnoType
<bool>::get(),0, 0},
723 { u
"" UNO_NAME_MISC_OBJ_BOUNDRECT
, OWN_ATTR_BOUNDRECT
, cppu::UnoType
<css::awt::Rectangle
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
724 { u
"UINameSingular", OWN_ATTR_UINAME_SINGULAR
, ::cppu::UnoType
<OUString
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
726 { u
"" UNO_NAME_MISC_OBJ_TITLE
, OWN_ATTR_MISC_OBJ_TITLE
, cppu::UnoType
<OUString
>::get(), 0, 0},
727 { u
"" UNO_NAME_MISC_OBJ_DESCRIPTION
, OWN_ATTR_MISC_OBJ_DESCRIPTION
, cppu::UnoType
<OUString
>::get(), 0, 0},
728 {u
"PrivateStream", OWN_ATTR_MEDIA_STREAM
, cppu::UnoType
<css::io::XInputStream
>::get(), 0, 0},
729 {u
"PrivateTempFileURL", OWN_ATTR_MEDIA_TEMPFILEURL
, cppu::UnoType
<OUString
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
730 { u
"MediaMimeType", OWN_ATTR_MEDIA_MIMETYPE
, cppu::UnoType
<OUString
>::get(), 0, 0},
731 { u
"FallbackGraphic", OWN_ATTR_FALLBACK_GRAPHIC
, cppu::UnoType
<css::graphic::XGraphic
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
732 { u
"" UNO_NAME_GRAPHOBJ_GRAPHIC
, OWN_ATTR_VALUE_GRAPHIC
, cppu::UnoType
<css::graphic::XGraphic
>::get(), 0, 0},
733 { u
"", 0, css::uno::Type(), 0, 0 }
736 return aMediaShapePropertyMap_Impl
;
739 static SfxItemPropertyMapEntry
const * ImplGetSvxTableShapePropertyMap()
741 static SfxItemPropertyMapEntry
const aTableShapePropertyMap_Impl
[] =
744 { u
"" UNO_NAME_MISC_OBJ_ZORDER
, OWN_ATTR_ZORDER
, cppu::UnoType
<sal_Int32
>::get(), 0, 0},
745 { u
"" UNO_NAME_MISC_OBJ_LAYERID
, SDRATTR_LAYERID
, cppu::UnoType
<sal_Int16
>::get(), 0, 0},
746 { u
"" UNO_NAME_MISC_OBJ_LAYERNAME
, SDRATTR_LAYERNAME
, cppu::UnoType
<OUString
>::get(), 0, 0},
747 { u
"" UNO_NAME_LINKDISPLAYBITMAP
, OWN_ATTR_LDBITMAP
, cppu::UnoType
<css::awt::XBitmap
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
748 { u
"" UNO_NAME_LINKDISPLAYNAME
, OWN_ATTR_LDNAME
, cppu::UnoType
<OUString
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
749 { u
"Transformation", OWN_ATTR_TRANSFORMATION
, cppu::UnoType
<css::drawing::HomogenMatrix3
>::get(), 0, 0 },
750 { u
"" UNO_NAME_MISC_OBJ_MOVEPROTECT
, SDRATTR_OBJMOVEPROTECT
, cppu::UnoType
<bool>::get(),0, 0},
751 { u
"" UNO_NAME_MISC_OBJ_SIZEPROTECT
, SDRATTR_OBJSIZEPROTECT
, cppu::UnoType
<bool>::get(),0, 0},
752 { u
"" UNO_NAME_MISC_OBJ_BOUNDRECT
, OWN_ATTR_BOUNDRECT
, cppu::UnoType
<css::awt::Rectangle
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
753 { u
"" UNO_NAME_MISC_OBJ_NAME
, SDRATTR_OBJECTNAME
, cppu::UnoType
<OUString
>::get(), 0, 0},
754 { u
"UINameSingular", OWN_ATTR_UINAME_SINGULAR
, ::cppu::UnoType
<OUString
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
755 { u
"" UNO_NAME_MISC_OBJ_TITLE
, OWN_ATTR_MISC_OBJ_TITLE
, cppu::UnoType
<OUString
>::get(), 0, 0},
756 { u
"" UNO_NAME_MISC_OBJ_DESCRIPTION
, OWN_ATTR_MISC_OBJ_DESCRIPTION
, cppu::UnoType
<OUString
>::get(), 0, 0},
757 { u
"Model", OWN_ATTR_OLEMODEL
, cppu::UnoType
<css::table::XTable
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
758 { u
"TableTemplate", OWN_ATTR_TABLETEMPLATE
, cppu::UnoType
<css::container::XIndexAccess
>::get(), 0, 0},
759 { u
"UseFirstRowStyle", OWN_ATTR_TABLETEMPLATE_FIRSTROW
, cppu::UnoType
<bool>::get(),0, 0},
760 { u
"UseLastRowStyle", OWN_ATTR_TABLETEMPLATE_LASTROW
, cppu::UnoType
<bool>::get(),0, 0},
761 { u
"UseFirstColumnStyle", OWN_ATTR_TABLETEMPLATE_FIRSTCOLUMN
, cppu::UnoType
<bool>::get(),0, 0},
762 { u
"UseLastColumnStyle", OWN_ATTR_TABLETEMPLATE_LASTCOLUMN
, cppu::UnoType
<bool>::get(),0, 0},
763 { u
"UseBandingRowStyle", OWN_ATTR_TABLETEMPLATE_BANDINGROWS
, cppu::UnoType
<bool>::get(),0, 0},
764 { u
"UseBandingColumnStyle", OWN_ATTR_TABLETEMPLATE_BANDINGCOLUMNS
, cppu::UnoType
<bool>::get(),0, 0},
765 { u
"ReplacementGraphic", OWN_ATTR_REPLACEMENT_GRAPHIC
, cppu::UnoType
<css::graphic::XGraphic
>::get(), css::beans::PropertyAttribute::READONLY
, 0},
766 { u
"", 0, css::uno::Type(), 0, 0 }
769 return aTableShapePropertyMap_Impl
;
772 static comphelper::PropertyMapEntry
const * ImplGetSvxDrawingDefaultsPropertyMap()
774 static comphelper::PropertyMapEntry
const aSvxDrawingDefaultsPropertyMap_Impl
[] =
779 LINE_PROPERTIES_DEFAULTS
781 FILL_PROPERTIES_DEFAULTS
782 EDGERADIUS_PROPERTIES
783 TEXT_PROPERTIES_DEFAULTS
785 SPECIAL_DIMENSIONING_PROPERTIES_DEFAULTS
786 MISC_3D_OBJ_PROPERTIES
787 SPECIAL_3DBACKSCALE_PROPERTIES
788 { OUString(), 0, css::uno::Type(), 0, 0 }
791 return aSvxDrawingDefaultsPropertyMap_Impl
;
794 static comphelper::PropertyMapEntry
const * ImplGetAdditionalWriterDrawingDefaultsPropertyMap()
796 static comphelper::PropertyMapEntry
const aSvxAdditionalDefaultsPropertyMap_Impl
[] =
798 { "IsFollowingTextFlow", SID_SW_FOLLOW_TEXT_FLOW
, cppu::UnoType
<bool>::get(), 0, 0},
799 { OUString(), 0, css::uno::Type(), 0, 0 }
802 return aSvxAdditionalDefaultsPropertyMap_Impl
;
805 typedef std::unordered_map
< OUString
, sal_uInt32
> UHashMapImpl
;
809 const UHashMapImpl
& GetUHashImpl()
811 static UHashMapImpl
const aImpl
813 { "com.sun.star.drawing.RectangleShape", OBJ_RECT
},
814 { "com.sun.star.drawing.EllipseShape", OBJ_CIRC
},
815 { "com.sun.star.drawing.ControlShape", OBJ_UNO
},
816 { "com.sun.star.drawing.ConnectorShape", OBJ_EDGE
},
817 { "com.sun.star.drawing.MeasureShape", OBJ_MEASURE
},
818 { "com.sun.star.drawing.LineShape", OBJ_LINE
},
819 { "com.sun.star.drawing.PolyPolygonShape", OBJ_POLY
},
820 { "com.sun.star.drawing.PolyLineShape", OBJ_PLIN
},
821 { "com.sun.star.drawing.OpenBezierShape", OBJ_PATHLINE
},
822 { "com.sun.star.drawing.ClosedBezierShape", OBJ_PATHFILL
},
823 { "com.sun.star.drawing.OpenFreeHandShape", OBJ_FREELINE
},
824 { "com.sun.star.drawing.ClosedFreeHandShape", OBJ_FREEFILL
},
825 { "com.sun.star.drawing.PolyPolygonPathShape", OBJ_PATHPOLY
},
826 { "com.sun.star.drawing.PolyLinePathShape", OBJ_PATHPLIN
},
827 { "com.sun.star.drawing.GraphicObjectShape", OBJ_GRAF
},
828 { "com.sun.star.drawing.GroupShape", OBJ_GRUP
},
829 { "com.sun.star.drawing.TextShape", OBJ_TEXT
},
830 { "com.sun.star.drawing.OLE2Shape", OBJ_OLE2
},
831 { "com.sun.star.drawing.PageShape", OBJ_PAGE
},
832 { "com.sun.star.drawing.CaptionShape", OBJ_CAPTION
},
833 { "com.sun.star.drawing.FrameShape", OBJ_FRAME
},
834 { "com.sun.star.drawing.PluginShape", OBJ_OLE2_PLUGIN
},
835 { "com.sun.star.drawing.AppletShape", OBJ_OLE2_APPLET
},
836 { "com.sun.star.drawing.CustomShape", OBJ_CUSTOMSHAPE
},
837 { "com.sun.star.drawing.MediaShape", OBJ_MEDIA
},
839 { "com.sun.star.drawing.Shape3DSceneObject", E3D_SCENE_ID
| E3D_INVENTOR_FLAG
},
840 { "com.sun.star.drawing.Shape3DCubeObject", E3D_CUBEOBJ_ID
| E3D_INVENTOR_FLAG
},
841 { "com.sun.star.drawing.Shape3DSphereObject", E3D_SPHEREOBJ_ID
| E3D_INVENTOR_FLAG
},
842 { "com.sun.star.drawing.Shape3DLatheObject", E3D_LATHEOBJ_ID
| E3D_INVENTOR_FLAG
},
843 { "com.sun.star.drawing.Shape3DExtrudeObject", E3D_EXTRUDEOBJ_ID
| E3D_INVENTOR_FLAG
},
844 { "com.sun.star.drawing.Shape3DPolygonObject", E3D_POLYGONOBJ_ID
| E3D_INVENTOR_FLAG
},
853 OUString
UHashMap::getNameFromId(sal_uInt32 nId
)
855 const UHashMapImpl
&rMap
= GetUHashImpl();
857 auto it
= std::find_if(rMap
.begin(), rMap
.end(),
858 [nId
](const UHashMapImpl::value_type
& rEntry
) { return rEntry
.second
== nId
; });
859 if (it
!= rMap
.end())
861 OSL_FAIL("[CL] unknown SdrObject identifier");
865 uno::Sequence
< OUString
> UHashMap::getServiceNames()
867 return comphelper::mapKeysToSequence( GetUHashImpl() );
870 sal_uInt32
UHashMap::getId( const OUString
& rCompareString
)
872 const UHashMapImpl
&rMap
= GetUHashImpl();
873 UHashMapImpl::const_iterator it
= rMap
.find( rCompareString
);
874 if( it
== rMap
.end() )
875 return UHASHMAP_NOTFOUND
;
882 struct theSvxMapProvider
:
883 public rtl::Static
<SvxUnoPropertyMapProvider
, theSvxMapProvider
>
889 SvxUnoPropertyMapProvider
& getSvxMapProvider()
891 return theSvxMapProvider::get();
895 SvxUnoPropertyMapProvider::SvxUnoPropertyMapProvider()
897 for(sal_uInt16 i
=0;i
<SVXMAP_END
; i
++)
899 aSetArr
[i
] = nullptr;
900 aMapArr
[i
] = nullptr;
904 SvxUnoPropertyMapProvider::~SvxUnoPropertyMapProvider()
909 const SfxItemPropertyMapEntry
* SvxUnoPropertyMapProvider::GetMap(sal_uInt16 nPropertyId
)
911 DBG_ASSERT(nPropertyId
< SVXMAP_END
, "Id ?" );
912 if(!aMapArr
[nPropertyId
]) {
913 switch(nPropertyId
) {
914 case SVXMAP_SHAPE
: aMapArr
[SVXMAP_SHAPE
]=ImplGetSvxShapePropertyMap(); break;
915 case SVXMAP_CONNECTOR
: aMapArr
[SVXMAP_CONNECTOR
]=ImplGetSvxConnectorPropertyMap(); break;
916 case SVXMAP_DIMENSIONING
: aMapArr
[SVXMAP_DIMENSIONING
]=ImplGetSvxDimensioningPropertyMap(); break;
917 case SVXMAP_CIRCLE
: aMapArr
[SVXMAP_CIRCLE
]=ImplGetSvxCirclePropertyMap(); break;
918 case SVXMAP_POLYPOLYGON
: aMapArr
[SVXMAP_POLYPOLYGON
]=ImplGetSvxPolyPolygonPropertyMap(); break;
919 case SVXMAP_GRAPHICOBJECT
: aMapArr
[SVXMAP_GRAPHICOBJECT
]=ImplGetSvxGraphicObjectPropertyMap(); break;
920 case SVXMAP_3DSCENEOBJECT
: aMapArr
[SVXMAP_3DSCENEOBJECT
]=ImplGetSvx3DSceneObjectPropertyMap(); break;
921 case SVXMAP_3DCUBEOBJECT
: aMapArr
[SVXMAP_3DCUBEOBJECT
]=ImplGetSvx3DCubeObjectPropertyMap(); break;
922 case SVXMAP_3DSPHEREOBJECT
: aMapArr
[SVXMAP_3DSPHEREOBJECT
]=ImplGetSvx3DSphereObjectPropertyMap(); break;
923 case SVXMAP_3DLATHEOBJECT
: aMapArr
[SVXMAP_3DLATHEOBJECT
]=ImplGetSvx3DLatheObjectPropertyMap(); break;
924 case SVXMAP_3DEXTRUDEOBJECT
: aMapArr
[SVXMAP_3DEXTRUDEOBJECT
]=ImplGetSvx3DExtrudeObjectPropertyMap(); break;
925 case SVXMAP_3DPOLYGONOBJECT
: aMapArr
[SVXMAP_3DPOLYGONOBJECT
]=ImplGetSvx3DPolygonObjectPropertyMap(); break;
926 case SVXMAP_ALL
: aMapArr
[SVXMAP_ALL
]=ImplGetSvxAllPropertyMap(); break;
927 case SVXMAP_GROUP
: aMapArr
[SVXMAP_GROUP
]=ImplGetSvxGroupPropertyMap(); break;
928 case SVXMAP_CAPTION
: aMapArr
[SVXMAP_CAPTION
]=ImplGetSvxCaptionPropertyMap(); break;
929 case SVXMAP_OLE2
: aMapArr
[SVXMAP_OLE2
]=ImplGetSvxOle2PropertyMap(); break;
930 case SVXMAP_PLUGIN
: aMapArr
[SVXMAP_PLUGIN
]=ImplGetSvxPluginPropertyMap(); break;
931 case SVXMAP_FRAME
: aMapArr
[SVXMAP_FRAME
]=ImplGetSvxFramePropertyMap(); break;
932 case SVXMAP_APPLET
: aMapArr
[SVXMAP_APPLET
]=ImplGetSvxAppletPropertyMap(); break;
933 case SVXMAP_CONTROL
: aMapArr
[SVXMAP_CONTROL
]=ImplGetSvxControlShapePropertyMap(); break;
934 case SVXMAP_TEXT
: aMapArr
[SVXMAP_TEXT
]=ImplGetSvxTextShapePropertyMap(); break;
935 case SVXMAP_CUSTOMSHAPE
: aMapArr
[SVXMAP_CUSTOMSHAPE
]=ImplGetSvxCustomShapePropertyMap(); break;
936 case SVXMAP_MEDIA
: aMapArr
[SVXMAP_MEDIA
]=ImplGetSvxMediaShapePropertyMap(); break;
937 case SVXMAP_TABLE
: aMapArr
[SVXMAP_TABLE
]=ImplGetSvxTableShapePropertyMap(); break;
938 case SVXMAP_PAGE
: aMapArr
[SVXMAP_PAGE
] = ImplGetSvxPageShapePropertyMap(); break;
941 OSL_FAIL( "Unknown property map for SvxUnoPropertyMapProvider!" );
943 // Sort(nPropertyId);
945 return aMapArr
[nPropertyId
];
947 const SvxItemPropertySet
* SvxUnoPropertyMapProvider::GetPropertySet(sal_uInt16 nPropertyId
, SfxItemPool
& rPool
)
949 if( !aSetArr
[nPropertyId
] )
950 aSetArr
[nPropertyId
].reset(new SvxItemPropertySet( GetMap( nPropertyId
), rPool
));
951 return aSetArr
[nPropertyId
].get();
954 /** maps the vcl MapUnit enum to an API constant MeasureUnit.
955 Returns false if conversion is not supported.
957 bool SvxMapUnitToMeasureUnit( const MapUnit eVcl
, short& eApi
) noexcept
961 case MapUnit::Map100thMM
: eApi
= util::MeasureUnit::MM_100TH
; break;
962 case MapUnit::Map10thMM
: eApi
= util::MeasureUnit::MM_10TH
; break;
963 case MapUnit::MapMM
: eApi
= util::MeasureUnit::MM
; break;
964 case MapUnit::MapCM
: eApi
= util::MeasureUnit::CM
; break;
965 case MapUnit::Map1000thInch
: eApi
= util::MeasureUnit::INCH_1000TH
; break;
966 case MapUnit::Map100thInch
: eApi
= util::MeasureUnit::INCH_100TH
; break;
967 case MapUnit::Map10thInch
: eApi
= util::MeasureUnit::INCH_10TH
; break;
968 case MapUnit::MapInch
: eApi
= util::MeasureUnit::INCH
; break;
969 case MapUnit::MapPoint
: eApi
= util::MeasureUnit::POINT
; break;
970 case MapUnit::MapTwip
: eApi
= util::MeasureUnit::TWIP
; break;
971 case MapUnit::MapRelative
: eApi
= util::MeasureUnit::PERCENT
; break;
979 /** maps the API constant MeasureUnit to a vcl MapUnit enum.
980 Returns false if conversion is not supported.
983 bool SvxMeasureUnitToFieldUnit( const short eApi
, FieldUnit
& eVcl
) noexcept
987 case util::MeasureUnit::MM
: eVcl
= FieldUnit::MM
; break;
988 case util::MeasureUnit::CM
: eVcl
= FieldUnit::CM
; break;
989 case util::MeasureUnit::M
: eVcl
= FieldUnit::M
; break;
990 case util::MeasureUnit::KM
: eVcl
= FieldUnit::KM
; break;
991 case util::MeasureUnit::TWIP
: eVcl
= FieldUnit::TWIP
; break;
992 case util::MeasureUnit::POINT
: eVcl
= FieldUnit::POINT
; break;
993 case util::MeasureUnit::PICA
: eVcl
= FieldUnit::PICA
; break;
994 case util::MeasureUnit::INCH
: eVcl
= FieldUnit::INCH
; break;
995 case util::MeasureUnit::FOOT
: eVcl
= FieldUnit::FOOT
; break;
996 case util::MeasureUnit::MILE
: eVcl
= FieldUnit::MILE
; break;
997 case util::MeasureUnit::PERCENT
: eVcl
= FieldUnit::PERCENT
; break;
998 case util::MeasureUnit::MM_100TH
: eVcl
= FieldUnit::MM_100TH
; break;
1006 /** maps the vcl MapUnit enum to an API constant MeasureUnit.
1007 Returns false if conversion is not supported.
1009 bool SvxFieldUnitToMeasureUnit( const FieldUnit eVcl
, short& eApi
) noexcept
1013 case FieldUnit::MM
: eApi
= util::MeasureUnit::MM
; break;
1014 case FieldUnit::CM
: eApi
= util::MeasureUnit::CM
; break;
1015 case FieldUnit::M
: eApi
= util::MeasureUnit::M
; break;
1016 case FieldUnit::KM
: eApi
= util::MeasureUnit::KM
; break;
1017 case FieldUnit::TWIP
: eApi
= util::MeasureUnit::TWIP
; break;
1018 case FieldUnit::POINT
: eApi
= util::MeasureUnit::POINT
; break;
1019 case FieldUnit::PICA
: eApi
= util::MeasureUnit::PICA
; break;
1020 case FieldUnit::INCH
: eApi
= util::MeasureUnit::INCH
; break;
1021 case FieldUnit::FOOT
: eApi
= util::MeasureUnit::FOOT
; break;
1022 case FieldUnit::MILE
: eApi
= util::MeasureUnit::MILE
; break;
1023 case FieldUnit::PERCENT
: eApi
= util::MeasureUnit::PERCENT
; break;
1024 case FieldUnit::MM_100TH
: eApi
= util::MeasureUnit::MM_100TH
; break;
1032 static const char* RID_SVXSTR_BMP_DEF
[] =
1034 RID_SVXSTR_BMP0_DEF
,
1035 RID_SVXSTR_BMP1_DEF
,
1036 RID_SVXSTR_BMP2_DEF
,
1037 RID_SVXSTR_BMP3_DEF
,
1038 RID_SVXSTR_BMP4_DEF
,
1039 RID_SVXSTR_BMP5_DEF
,
1040 RID_SVXSTR_BMP6_DEF
,
1041 RID_SVXSTR_BMP7_DEF
,
1042 RID_SVXSTR_BMP8_DEF
,
1043 RID_SVXSTR_BMP9_DEF
,
1044 RID_SVXSTR_BMP10_DEF
,
1045 RID_SVXSTR_BMP11_DEF
,
1046 RID_SVXSTR_BMP12_DEF
,
1047 RID_SVXSTR_BMP13_DEF
,
1048 RID_SVXSTR_BMP14_DEF
,
1049 RID_SVXSTR_BMP15_DEF
,
1050 RID_SVXSTR_BMP16_DEF
,
1051 RID_SVXSTR_BMP17_DEF
,
1052 RID_SVXSTR_BMP18_DEF
,
1053 RID_SVXSTR_BMP19_DEF
,
1054 RID_SVXSTR_BMP20_DEF
,
1055 RID_SVXSTR_BMP21_DEF
,
1056 RID_SVXSTR_BMP22_DEF
,
1057 RID_SVXSTR_BMP23_DEF
,
1058 RID_SVXSTR_BMP24_DEF
,
1059 RID_SVXSTR_BMP25_DEF
,
1060 RID_SVXSTR_BMP26_DEF
,
1061 RID_SVXSTR_BMP27_DEF
,
1062 RID_SVXSTR_BMP28_DEF
,
1063 RID_SVXSTR_BMP29_DEF
,
1064 RID_SVXSTR_BMP30_DEF
,
1065 RID_SVXSTR_BMP31_DEF
,
1066 RID_SVXSTR_BMP32_DEF
,
1067 RID_SVXSTR_BMP33_DEF
,
1068 RID_SVXSTR_BMP34_DEF
,
1069 RID_SVXSTR_BMP35_DEF
,
1070 RID_SVXSTR_BMP36_DEF
,
1071 RID_SVXSTR_BMP37_DEF
,
1072 RID_SVXSTR_BMP38_DEF
,
1073 RID_SVXSTR_BMP39_DEF
,
1074 RID_SVXSTR_BMP40_DEF
,
1075 RID_SVXSTR_BMP41_DEF
,
1076 RID_SVXSTR_BMP42_DEF
,
1077 RID_SVXSTR_BMP43_DEF
,
1078 RID_SVXSTR_BMP44_DEF
,
1079 RID_SVXSTR_BMP45_DEF
,
1080 RID_SVXSTR_BMP46_DEF
,
1081 RID_SVXSTR_BMP47_DEF
,
1082 RID_SVXSTR_BMP48_DEF
,
1083 RID_SVXSTR_BMP49_DEF
,
1084 RID_SVXSTR_BMP50_DEF
,
1085 RID_SVXSTR_BMP51_DEF
,
1086 RID_SVXSTR_BMP52_DEF
,
1087 RID_SVXSTR_BMP53_DEF
,
1088 RID_SVXSTR_BMP54_DEF
,
1089 RID_SVXSTR_BMP55_DEF
,
1090 RID_SVXSTR_BMP56_DEF
,
1091 RID_SVXSTR_BMP57_DEF
,
1092 RID_SVXSTR_BMP58_DEF
,
1093 RID_SVXSTR_BMP59_DEF
,
1094 RID_SVXSTR_BMP60_DEF
,
1095 RID_SVXSTR_BMP61_DEF
,
1096 RID_SVXSTR_BMP62_DEF
,
1097 RID_SVXSTR_BMP63_DEF
,
1098 RID_SVXSTR_BMP64_DEF
,
1099 RID_SVXSTR_BMP65_DEF
,
1100 RID_SVXSTR_BMP66_DEF
,
1101 RID_SVXSTR_BMP67_DEF
,
1102 RID_SVXSTR_BMP68_DEF
,
1103 RID_SVXSTR_BMP69_DEF
,
1104 RID_SVXSTR_BMP70_DEF
,
1105 RID_SVXSTR_BMP71_DEF
,
1106 RID_SVXSTR_BMP72_DEF
,
1107 RID_SVXSTR_BMP73_DEF
,
1108 RID_SVXSTR_BMP74_DEF
,
1109 RID_SVXSTR_BMP75_DEF
,
1110 RID_SVXSTR_BMP76_DEF
,
1111 RID_SVXSTR_BMP77_DEF
,
1112 RID_SVXSTR_BMP78_DEF
,
1113 RID_SVXSTR_BMP79_DEF
,
1114 RID_SVXSTR_BMP80_DEF
,
1115 RID_SVXSTR_BMP81_DEF
,
1116 RID_SVXSTR_BMP82_DEF
,
1117 RID_SVXSTR_BMP83_DEF
,
1118 RID_SVXSTR_BMP84_DEF
,
1119 RID_SVXSTR_BMP85_DEF
,
1120 RID_SVXSTR_BMP86_DEF
,
1121 RID_SVXSTR_BMP87_DEF
,
1122 RID_SVXSTR_BMP88_DEF
,
1123 RID_SVXSTR_BMP89_DEF
,
1124 RID_SVXSTR_BMP90_DEF
,
1125 RID_SVXSTR_BMP91_DEF
,
1126 RID_SVXSTR_BMP92_DEF
1129 static const char* RID_SVXSTR_BMP
[] =
1226 static const char* RID_SVXSTR_DASH_DEF
[] =
1228 RID_SVXSTR_DASH0_DEF
,
1229 RID_SVXSTR_DASH1_DEF
,
1230 RID_SVXSTR_DASH2_DEF
,
1231 RID_SVXSTR_DASH3_DEF
,
1232 RID_SVXSTR_DASH4_DEF
,
1233 RID_SVXSTR_DASH5_DEF
,
1234 RID_SVXSTR_DASH6_DEF
,
1235 RID_SVXSTR_DASH7_DEF
,
1236 RID_SVXSTR_DASH8_DEF
,
1237 RID_SVXSTR_DASH9_DEF
,
1238 RID_SVXSTR_DASH10_DEF
,
1239 RID_SVXSTR_DASH11_DEF
,
1240 RID_SVXSTR_DASH12_DEF
,
1241 RID_SVXSTR_DASH13_DEF
,
1242 RID_SVXSTR_DASH14_DEF
,
1243 RID_SVXSTR_DASH15_DEF
,
1244 RID_SVXSTR_DASH16_DEF
,
1245 RID_SVXSTR_DASH17_DEF
,
1246 RID_SVXSTR_DASH18_DEF
,
1247 RID_SVXSTR_DASH19_DEF
,
1248 RID_SVXSTR_DASH20_DEF
,
1249 RID_SVXSTR_DASH21_DEF
,
1250 RID_SVXSTR_DASH22_DEF
,
1251 RID_SVXSTR_DASH23_DEF
,
1252 RID_SVXSTR_DASH24_DEF
,
1253 RID_SVXSTR_DASH25_DEF
,
1254 RID_SVXSTR_DASH26_DEF
,
1255 RID_SVXSTR_DASH27_DEF
,
1256 RID_SVXSTR_DASH28_DEF
,
1257 RID_SVXSTR_DASH29_DEF
,
1258 RID_SVXSTR_DASH30_DEF
1262 static const char* RID_SVXSTR_DASH
[] =
1297 static const char* RID_SVXSTR_LEND_DEF
[] =
1299 RID_SVXSTR_LEND0_DEF
,
1300 RID_SVXSTR_LEND1_DEF
,
1301 RID_SVXSTR_LEND2_DEF
,
1302 RID_SVXSTR_LEND3_DEF
,
1303 RID_SVXSTR_LEND4_DEF
,
1304 RID_SVXSTR_LEND5_DEF
,
1305 RID_SVXSTR_LEND6_DEF
,
1306 RID_SVXSTR_LEND7_DEF
,
1307 RID_SVXSTR_LEND8_DEF
,
1308 RID_SVXSTR_LEND9_DEF
,
1309 RID_SVXSTR_LEND10_DEF
,
1310 RID_SVXSTR_LEND11_DEF
,
1311 RID_SVXSTR_LEND12_DEF
,
1312 RID_SVXSTR_LEND13_DEF
,
1313 RID_SVXSTR_LEND14_DEF
,
1314 RID_SVXSTR_LEND15_DEF
,
1315 RID_SVXSTR_LEND16_DEF
,
1316 RID_SVXSTR_LEND17_DEF
,
1317 RID_SVXSTR_LEND18_DEF
,
1318 RID_SVXSTR_LEND19_DEF
,
1319 RID_SVXSTR_LEND20_DEF
,
1320 RID_SVXSTR_LEND21_DEF
,
1321 RID_SVXSTR_LEND22_DEF
,
1322 RID_SVXSTR_LEND23_DEF
,
1323 RID_SVXSTR_LEND24_DEF
,
1324 RID_SVXSTR_LEND25_DEF
,
1325 RID_SVXSTR_LEND26_DEF
,
1326 RID_SVXSTR_LEND27_DEF
,
1327 RID_SVXSTR_LEND28_DEF
,
1328 RID_SVXSTR_LEND29_DEF
,
1329 RID_SVXSTR_LEND30_DEF
,
1330 RID_SVXSTR_LEND31_DEF
1333 static const char* RID_SVXSTR_LEND
[] =
1369 static const char* RID_SVXSTR_GRDT_DEF
[] =
1371 RID_SVXSTR_GRDT0_DEF
,
1372 RID_SVXSTR_GRDT1_DEF
,
1373 RID_SVXSTR_GRDT2_DEF
,
1374 RID_SVXSTR_GRDT3_DEF
,
1375 RID_SVXSTR_GRDT4_DEF
,
1376 RID_SVXSTR_GRDT5_DEF
,
1377 RID_SVXSTR_GRDT6_DEF
,
1378 RID_SVXSTR_GRDT7_DEF
,
1379 RID_SVXSTR_GRDT8_DEF
,
1380 RID_SVXSTR_GRDT9_DEF
,
1381 RID_SVXSTR_GRDT10_DEF
,
1382 RID_SVXSTR_GRDT11_DEF
,
1383 RID_SVXSTR_GRDT12_DEF
,
1384 RID_SVXSTR_GRDT13_DEF
,
1385 RID_SVXSTR_GRDT14_DEF
,
1386 RID_SVXSTR_GRDT15_DEF
,
1387 RID_SVXSTR_GRDT16_DEF
,
1388 RID_SVXSTR_GRDT17_DEF
,
1389 RID_SVXSTR_GRDT18_DEF
,
1390 RID_SVXSTR_GRDT19_DEF
,
1391 RID_SVXSTR_GRDT20_DEF
,
1392 RID_SVXSTR_GRDT21_DEF
,
1393 RID_SVXSTR_GRDT22_DEF
,
1394 RID_SVXSTR_GRDT23_DEF
,
1395 RID_SVXSTR_GRDT24_DEF
,
1396 RID_SVXSTR_GRDT25_DEF
,
1397 RID_SVXSTR_GRDT26_DEF
,
1398 RID_SVXSTR_GRDT27_DEF
,
1399 RID_SVXSTR_GRDT28_DEF
,
1400 RID_SVXSTR_GRDT29_DEF
,
1401 RID_SVXSTR_GRDT30_DEF
,
1402 RID_SVXSTR_GRDT31_DEF
,
1403 RID_SVXSTR_GRDT32_DEF
,
1404 RID_SVXSTR_GRDT33_DEF
,
1405 RID_SVXSTR_GRDT34_DEF
,
1406 RID_SVXSTR_GRDT35_DEF
,
1407 RID_SVXSTR_GRDT36_DEF
,
1408 RID_SVXSTR_GRDT37_DEF
,
1409 RID_SVXSTR_GRDT38_DEF
,
1410 RID_SVXSTR_GRDT39_DEF
,
1411 RID_SVXSTR_GRDT40_DEF
,
1412 RID_SVXSTR_GRDT41_DEF
,
1413 RID_SVXSTR_GRDT42_DEF
,
1414 RID_SVXSTR_GRDT43_DEF
,
1415 RID_SVXSTR_GRDT44_DEF
,
1416 RID_SVXSTR_GRDT45_DEF
,
1417 RID_SVXSTR_GRDT46_DEF
,
1418 RID_SVXSTR_GRDT47_DEF
,
1419 RID_SVXSTR_GRDT48_DEF
,
1420 RID_SVXSTR_GRDT49_DEF
,
1421 RID_SVXSTR_GRDT50_DEF
,
1422 RID_SVXSTR_GRDT51_DEF
,
1423 RID_SVXSTR_GRDT52_DEF
,
1424 RID_SVXSTR_GRDT53_DEF
,
1425 RID_SVXSTR_GRDT54_DEF
,
1426 RID_SVXSTR_GRDT55_DEF
,
1427 RID_SVXSTR_GRDT56_DEF
,
1428 RID_SVXSTR_GRDT57_DEF
,
1429 RID_SVXSTR_GRDT58_DEF
,
1430 RID_SVXSTR_GRDT59_DEF
,
1431 RID_SVXSTR_GRDT60_DEF
,
1432 RID_SVXSTR_GRDT61_DEF
,
1433 RID_SVXSTR_GRDT62_DEF
,
1434 RID_SVXSTR_GRDT63_DEF
,
1435 RID_SVXSTR_GRDT64_DEF
,
1436 RID_SVXSTR_GRDT65_DEF
,
1437 RID_SVXSTR_GRDT66_DEF
,
1438 RID_SVXSTR_GRDT67_DEF
,
1439 RID_SVXSTR_GRDT68_DEF
,
1440 RID_SVXSTR_GRDT69_DEF
,
1441 RID_SVXSTR_GRDT70_DEF
,
1442 RID_SVXSTR_GRDT71_DEF
,
1443 RID_SVXSTR_GRDT72_DEF
,
1444 RID_SVXSTR_GRDT73_DEF
,
1445 RID_SVXSTR_GRDT74_DEF
,
1446 RID_SVXSTR_GRDT75_DEF
,
1447 RID_SVXSTR_GRDT76_DEF
,
1448 RID_SVXSTR_GRDT77_DEF
,
1449 RID_SVXSTR_GRDT78_DEF
,
1450 RID_SVXSTR_GRDT79_DEF
,
1451 RID_SVXSTR_GRDT80_DEF
,
1452 RID_SVXSTR_GRDT81_DEF
,
1453 RID_SVXSTR_GRDT82_DEF
,
1454 RID_SVXSTR_GRDT83_DEF
,
1455 RID_SVXSTR_GRDT84_DEF
1458 static const char* RID_SVXSTR_GRDT
[] =
1547 static const char* RID_SVXSTR_HATCHS_DEF
[] =
1549 RID_SVXSTR_HATCH0_DEF
,
1550 RID_SVXSTR_HATCH1_DEF
,
1551 RID_SVXSTR_HATCH2_DEF
,
1552 RID_SVXSTR_HATCH3_DEF
,
1553 RID_SVXSTR_HATCH4_DEF
,
1554 RID_SVXSTR_HATCH5_DEF
,
1555 RID_SVXSTR_HATCH6_DEF
,
1556 RID_SVXSTR_HATCH7_DEF
,
1557 RID_SVXSTR_HATCH8_DEF
,
1558 RID_SVXSTR_HATCH9_DEF
,
1559 RID_SVXSTR_HATCH10_DEF
,
1560 RID_SVXSTR_HATCH11_DEF
,
1561 RID_SVXSTR_HATCH12_DEF
,
1562 RID_SVXSTR_HATCH13_DEF
,
1563 RID_SVXSTR_HATCH14_DEF
,
1564 RID_SVXSTR_HATCH15_DEF
1567 static const char* RID_SVXSTR_HATCHS
[] =
1587 static const char* RID_SVXSTR_TRASNGR_DEF
[] =
1589 RID_SVXSTR_TRASNGR0_DEF
1592 static const char* RID_SVXSTR_TRASNGR
[] =
1597 static bool SvxUnoGetResourceRanges( const sal_uInt16 nWhich
, const char**& pApiResIds
, const char**& pIntResIds
, int& nCount
) noexcept
1601 case XATTR_FILLBITMAP
:
1602 pApiResIds
= RID_SVXSTR_BMP_DEF
;
1603 pIntResIds
= RID_SVXSTR_BMP
;
1604 nCount
= SAL_N_ELEMENTS(RID_SVXSTR_BMP_DEF
);
1606 case XATTR_LINEDASH
:
1607 pApiResIds
= RID_SVXSTR_DASH_DEF
;
1608 pIntResIds
= RID_SVXSTR_DASH
;
1609 nCount
= SAL_N_ELEMENTS(RID_SVXSTR_DASH_DEF
);
1612 case XATTR_LINESTART
:
1614 pApiResIds
= RID_SVXSTR_LEND_DEF
;
1615 pIntResIds
= RID_SVXSTR_LEND
;
1616 nCount
= SAL_N_ELEMENTS(RID_SVXSTR_LEND_DEF
);
1619 case XATTR_FILLGRADIENT
:
1620 pApiResIds
= RID_SVXSTR_GRDT_DEF
;
1621 pIntResIds
= RID_SVXSTR_GRDT
;
1622 nCount
= SAL_N_ELEMENTS(RID_SVXSTR_GRDT_DEF
);
1625 case XATTR_FILLHATCH
:
1626 pApiResIds
= RID_SVXSTR_HATCHS_DEF
;
1627 pIntResIds
= RID_SVXSTR_HATCHS
;
1628 nCount
= SAL_N_ELEMENTS(RID_SVXSTR_HATCHS_DEF
);
1631 case XATTR_FILLFLOATTRANSPARENCE
:
1632 pApiResIds
= RID_SVXSTR_TRASNGR_DEF
;
1633 pIntResIds
= RID_SVXSTR_TRASNGR
;
1634 nCount
= SAL_N_ELEMENTS(RID_SVXSTR_TRASNGR_DEF
);
1643 /// @throws std::exception
1644 static bool SvxUnoConvertResourceString(const char **pSourceResIds
, const char** pDestResIds
, int nCount
, OUString
& rString
, bool bToApi
)
1646 // first, calculate the search string length without an optional number after the name
1647 sal_Int32 nLength
= rString
.getLength();
1648 while( nLength
> 0 )
1650 const sal_Unicode nChar
= rString
[ nLength
- 1 ];
1651 if( (nChar
< '0') || (nChar
> '9') )
1657 // if we cut off a number, also cut of some spaces
1658 if( nLength
!= rString
.getLength() )
1660 while( nLength
> 0 )
1662 const sal_Unicode nChar
= rString
[ nLength
- 1 ];
1670 const OUString
aShortString( rString
.copy( 0, nLength
) );
1672 for (int i
= 0; i
< nCount
; ++i
)
1676 const OUString
& aCompare
= SvxResId(pSourceResIds
[i
]);
1677 if( aShortString
== aCompare
)
1679 rString
= rString
.replaceAt( 0, aShortString
.getLength(), OUString::createFromAscii(pDestResIds
[i
]) );
1682 else if( rString
== aCompare
)
1684 rString
= OUString::createFromAscii(pDestResIds
[i
]);
1690 auto pCompare
= pSourceResIds
[i
];
1691 if( aShortString
.equalsAscii(pCompare
) )
1693 rString
= rString
.replaceAt( 0, aShortString
.getLength(), SvxResId(pDestResIds
[i
]) );
1696 else if( rString
.equalsAscii(pCompare
) )
1698 rString
= SvxResId(pDestResIds
[i
]);
1708 // #i122649# Some comments on the below arrays:
1709 // - They need to have the same order and count of items
1710 // - They are used to translate between translated and non-translated color names
1711 // - To make longer names be found which start with the same basic string,
1712 // these have to be in front of others
1714 // It would be nice to:
1715 // - evtl. organize these in a single array with 2-dimensional inner to eliminate
1716 // the possibility to define it wrong
1717 // - change the compare to also work when a shorter name is in front of a longer one
1719 static const char* SvxUnoColorNameDefResId
[] =
1721 RID_SVXSTR_COLOR_BLUEGREY_DEF
,
1722 RID_SVXSTR_COLOR_BLACK_DEF
,
1723 RID_SVXSTR_COLOR_BLUE_CLASSIC_DEF
,
1724 RID_SVXSTR_COLOR_BLUE_DEF
,
1725 RID_SVXSTR_COLOR_GREEN_DEF
,
1726 RID_SVXSTR_COLOR_RED_DEF
,
1727 RID_SVXSTR_COLOR_MAGENTA_DEF
,
1728 RID_SVXSTR_COLOR_GREY_DEF
,
1729 RID_SVXSTR_COLOR_YELLOWGREEN_DEF
,
1730 RID_SVXSTR_COLOR_YELLOW_DEF
,
1731 RID_SVXSTR_COLOR_WHITE_DEF
,
1732 RID_SVXSTR_COLOR_ORANGE_DEF
,
1733 RID_SVXSTR_COLOR_BORDEAUX_DEF
,
1734 RID_SVXSTR_COLOR_PALE_YELLOW_DEF
,
1735 RID_SVXSTR_COLOR_PALE_GREEN_DEF
,
1736 RID_SVXSTR_COLOR_DARKVIOLET_DEF
,
1737 RID_SVXSTR_COLOR_SALMON_DEF
,
1738 RID_SVXSTR_COLOR_SEABLUE_DEF
,
1739 RID_SVXSTR_COLOR_CHART_DEF
,
1740 RID_SVXSTR_COLOR_PURPLE_DEF
,
1741 RID_SVXSTR_COLOR_SKYBLUE_DEF
,
1742 RID_SVXSTR_COLOR_PINK_DEF
,
1743 RID_SVXSTR_COLOR_TURQUOISE_DEF
,
1744 RID_SVXSTR_COLOR_GOLD_DEF
,
1745 RID_SVXSTR_COLOR_BRICK_DEF
,
1746 RID_SVXSTR_COLOR_INDIGO_DEF
,
1747 RID_SVXSTR_COLOR_TEAL_DEF
,
1748 RID_SVXSTR_COLOR_LIME_DEF
,
1749 RID_SVXSTR_COLOR_LIGHTGRAY_DEF
,
1750 RID_SVXSTR_COLOR_LIGHTYELLOW_DEF
,
1751 RID_SVXSTR_COLOR_LIGHTGOLD_DEF
,
1752 RID_SVXSTR_COLOR_LIGHTORANGE_DEF
,
1753 RID_SVXSTR_COLOR_LIGHTBRICK_DEF
,
1754 RID_SVXSTR_COLOR_LIGHTRED_DEF
,
1755 RID_SVXSTR_COLOR_LIGHTMAGENTA_DEF
,
1756 RID_SVXSTR_COLOR_LIGHTPURPLE_DEF
,
1757 RID_SVXSTR_COLOR_LIGHTINDIGO_DEF
,
1758 RID_SVXSTR_COLOR_LIGHTBLUE_DEF
,
1759 RID_SVXSTR_COLOR_LIGHTTEAL_DEF
,
1760 RID_SVXSTR_COLOR_LIGHTGREEN_DEF
,
1761 RID_SVXSTR_COLOR_LIGHTLIME_DEF
,
1762 RID_SVXSTR_COLOR_DARKGRAY_DEF
,
1763 RID_SVXSTR_COLOR_DARKYELLOW_DEF
,
1764 RID_SVXSTR_COLOR_DARKGOLD_DEF
,
1765 RID_SVXSTR_COLOR_DARKORANGE_DEF
,
1766 RID_SVXSTR_COLOR_DARKBRICK_DEF
,
1767 RID_SVXSTR_COLOR_DARKRED_DEF
,
1768 RID_SVXSTR_COLOR_DARKMAGENTA_DEF
,
1769 RID_SVXSTR_COLOR_DARKPURPLE_DEF
,
1770 RID_SVXSTR_COLOR_DARKINDIGO_DEF
,
1771 RID_SVXSTR_COLOR_DARKBLUE_DEF
,
1772 RID_SVXSTR_COLOR_DARKTEAL_DEF
,
1773 RID_SVXSTR_COLOR_DARKGREEN_DEF
,
1774 RID_SVXSTR_COLOR_DARKLIME_DEF
,
1775 RID_SVXSTR_COLOR_VIOLET_DEF
,
1776 RID_SVXSTR_COLOR_VIOLET_OUG_DEF
,
1777 RID_SVXSTR_COLOR_BLUE_OUG_DEF
,
1778 RID_SVXSTR_COLOR_AZURE_OUG_DEF
,
1779 RID_SVXSTR_COLOR_SPRINGGREEN_OUG_DEF
,
1780 RID_SVXSTR_COLOR_GREEN_OUG_DEF
,
1781 RID_SVXSTR_COLOR_CHARTREUSEGREEN_OUG_DEF
,
1782 RID_SVXSTR_COLOR_ORANGE_OUG_DEF
,
1783 RID_SVXSTR_COLOR_RED_OUG_DEF
,
1784 RID_SVXSTR_COLOR_ROSE_OUG_DEF
,
1785 RID_SVXSTR_COLOR_AZURE_DEF
,
1786 RID_SVXSTR_COLOR_CYAN_DEF
,
1787 RID_SVXSTR_COLOR_SPRINGGREEN_DEF
,
1788 RID_SVXSTR_COLOR_CHARTREUSEGREEN_DEF
,
1789 RID_SVXSTR_COLOR_ROSE_DEF
,
1790 RID_SVXSTR_COLOR_MATERIAL_GRAY_A_DEF
,
1791 RID_SVXSTR_COLOR_MATERIAL_YELLOW_A_DEF
,
1792 RID_SVXSTR_COLOR_MATERIAL_AMBER_A_DEF
,
1793 RID_SVXSTR_COLOR_MATERIAL_AMBER_DEF
,
1794 RID_SVXSTR_COLOR_MATERIAL_ORANGE_A_DEF
,
1795 RID_SVXSTR_COLOR_MATERIAL_DEEP_ORANGE_A_DEF
,
1796 RID_SVXSTR_COLOR_MATERIAL_DEEP_ORANGE_DEF
,
1797 RID_SVXSTR_COLOR_MATERIAL_RED_A_DEF
,
1798 RID_SVXSTR_COLOR_MATERIAL_PINK_A_DEF
,
1799 RID_SVXSTR_COLOR_MATERIAL_PURPLE_A_DEF
,
1800 RID_SVXSTR_COLOR_MATERIAL_DEEP_PURPLE_A_DEF
,
1801 RID_SVXSTR_COLOR_MATERIAL_DEEP_PURPLE_DEF
,
1802 RID_SVXSTR_COLOR_MATERIAL_INDIGO_A_DEF
,
1803 RID_SVXSTR_COLOR_MATERIAL_BLUE_A_DEF
,
1804 RID_SVXSTR_COLOR_MATERIAL_LIGHT_BLUE_A_DEF
,
1805 RID_SVXSTR_COLOR_MATERIAL_CYAN_A_DEF
,
1806 RID_SVXSTR_COLOR_MATERIAL_TEAL_A_DEF
,
1807 RID_SVXSTR_COLOR_MATERIAL_GREEN_A_DEF
,
1808 RID_SVXSTR_COLOR_MATERIAL_LIGHT_GREEN_A_DEF
,
1809 RID_SVXSTR_COLOR_MATERIAL_LIME_A_DEF
,
1810 RID_SVXSTR_COLOR_MATERIAL_BROWN_A_DEF
,
1811 RID_SVXSTR_COLOR_MATERIAL_BROWN_DEF
,
1812 RID_SVXSTR_COLOR_MATERIAL_BLUE_GRAY_A_DEF
,
1813 RID_SVXSTR_COLOR_MATERIAL_BLUE_GRAY_DEF
,
1814 RID_SVXSTR_COLOR_LIBRE_GREEN_1_DEF
,
1815 RID_SVXSTR_COLOR_LIBRE_GREEN_ACCENT_DEF
,
1816 RID_SVXSTR_COLOR_LIBRE_BLUE_ACCENT_DEF
,
1817 RID_SVXSTR_COLOR_LIBRE_ORANGE_ACCENT_DEF
,
1818 RID_SVXSTR_COLOR_LIBRE_PURPLE_DEF
,
1819 RID_SVXSTR_COLOR_LIBRE_PURPLE_ACCENT_DEF
,
1820 RID_SVXSTR_COLOR_LIBRE_YELLOW_ACCENT_DEF
1823 static const char* SvxUnoColorNameResId
[] =
1825 RID_SVXSTR_COLOR_BLUEGREY
,
1826 RID_SVXSTR_COLOR_BLACK
,
1827 RID_SVXSTR_COLOR_BLUE_CLASSIC
,
1828 RID_SVXSTR_COLOR_BLUE
,
1829 RID_SVXSTR_COLOR_GREEN
,
1830 RID_SVXSTR_COLOR_RED
,
1831 RID_SVXSTR_COLOR_MAGENTA
,
1832 RID_SVXSTR_COLOR_GREY
,
1833 RID_SVXSTR_COLOR_YELLOWGREEN
,
1834 RID_SVXSTR_COLOR_YELLOW
,
1835 RID_SVXSTR_COLOR_WHITE
,
1836 RID_SVXSTR_COLOR_ORANGE
,
1837 RID_SVXSTR_COLOR_BORDEAUX
,
1838 RID_SVXSTR_COLOR_PALE_YELLOW
,
1839 RID_SVXSTR_COLOR_PALE_GREEN
,
1840 RID_SVXSTR_COLOR_DARKVIOLET
,
1841 RID_SVXSTR_COLOR_SALMON
,
1842 RID_SVXSTR_COLOR_SEABLUE
,
1843 RID_SVXSTR_COLOR_CHART
,
1844 RID_SVXSTR_COLOR_PURPLE
,
1845 RID_SVXSTR_COLOR_SKYBLUE
,
1846 RID_SVXSTR_COLOR_PINK
,
1847 RID_SVXSTR_COLOR_TURQUOISE
,
1848 RID_SVXSTR_COLOR_GOLD
,
1849 RID_SVXSTR_COLOR_BRICK
,
1850 RID_SVXSTR_COLOR_INDIGO
,
1851 RID_SVXSTR_COLOR_TEAL
,
1852 RID_SVXSTR_COLOR_LIME
,
1853 RID_SVXSTR_COLOR_LIGHTGRAY
,
1854 RID_SVXSTR_COLOR_LIGHTYELLOW
,
1855 RID_SVXSTR_COLOR_LIGHTGOLD
,
1856 RID_SVXSTR_COLOR_LIGHTORANGE
,
1857 RID_SVXSTR_COLOR_LIGHTBRICK
,
1858 RID_SVXSTR_COLOR_LIGHTRED
,
1859 RID_SVXSTR_COLOR_LIGHTMAGENTA
,
1860 RID_SVXSTR_COLOR_LIGHTPURPLE
,
1861 RID_SVXSTR_COLOR_LIGHTINDIGO
,
1862 RID_SVXSTR_COLOR_LIGHTBLUE
,
1863 RID_SVXSTR_COLOR_LIGHTTEAL
,
1864 RID_SVXSTR_COLOR_LIGHTGREEN
,
1865 RID_SVXSTR_COLOR_LIGHTLIME
,
1866 RID_SVXSTR_COLOR_DARKGRAY
,
1867 RID_SVXSTR_COLOR_DARKYELLOW
,
1868 RID_SVXSTR_COLOR_DARKGOLD
,
1869 RID_SVXSTR_COLOR_DARKORANGE
,
1870 RID_SVXSTR_COLOR_DARKBRICK
,
1871 RID_SVXSTR_COLOR_DARKRED
,
1872 RID_SVXSTR_COLOR_DARKMAGENTA
,
1873 RID_SVXSTR_COLOR_DARKPURPLE
,
1874 RID_SVXSTR_COLOR_DARKINDIGO
,
1875 RID_SVXSTR_COLOR_DARKBLUE
,
1876 RID_SVXSTR_COLOR_DARKTEAL
,
1877 RID_SVXSTR_COLOR_DARKGREEN
,
1878 RID_SVXSTR_COLOR_DARKLIME
,
1879 RID_SVXSTR_COLOR_VIOLET
,
1880 RID_SVXSTR_COLOR_VIOLET_OUG
,
1881 RID_SVXSTR_COLOR_BLUE_OUG
,
1882 RID_SVXSTR_COLOR_AZURE_OUG
,
1883 RID_SVXSTR_COLOR_SPRINGGREEN_OUG
,
1884 RID_SVXSTR_COLOR_GREEN_OUG
,
1885 RID_SVXSTR_COLOR_CHARTREUSEGREEN_OUG
,
1886 RID_SVXSTR_COLOR_ORANGE_OUG
,
1887 RID_SVXSTR_COLOR_RED_OUG
,
1888 RID_SVXSTR_COLOR_ROSE_OUG
,
1889 RID_SVXSTR_COLOR_AZURE
,
1890 RID_SVXSTR_COLOR_CYAN
,
1891 RID_SVXSTR_COLOR_SPRINGGREEN
,
1892 RID_SVXSTR_COLOR_CHARTREUSEGREEN
,
1893 RID_SVXSTR_COLOR_ROSE
,
1894 RID_SVXSTR_COLOR_MATERIAL_GRAY_A
,
1895 RID_SVXSTR_COLOR_MATERIAL_YELLOW_A
,
1896 RID_SVXSTR_COLOR_MATERIAL_AMBER_A
,
1897 RID_SVXSTR_COLOR_MATERIAL_AMBER
,
1898 RID_SVXSTR_COLOR_MATERIAL_ORANGE_A
,
1899 RID_SVXSTR_COLOR_MATERIAL_DEEP_ORANGE_A
,
1900 RID_SVXSTR_COLOR_MATERIAL_DEEP_ORANGE
,
1901 RID_SVXSTR_COLOR_MATERIAL_RED_A
,
1902 RID_SVXSTR_COLOR_MATERIAL_PINK_A
,
1903 RID_SVXSTR_COLOR_MATERIAL_PURPLE_A
,
1904 RID_SVXSTR_COLOR_MATERIAL_DEEP_PURPLE_A
,
1905 RID_SVXSTR_COLOR_MATERIAL_DEEP_PURPLE
,
1906 RID_SVXSTR_COLOR_MATERIAL_INDIGO_A
,
1907 RID_SVXSTR_COLOR_MATERIAL_BLUE_A
,
1908 RID_SVXSTR_COLOR_MATERIAL_LIGHT_BLUE_A
,
1909 RID_SVXSTR_COLOR_MATERIAL_CYAN_A
,
1910 RID_SVXSTR_COLOR_MATERIAL_TEAL_A
,
1911 RID_SVXSTR_COLOR_MATERIAL_GREEN_A
,
1912 RID_SVXSTR_COLOR_MATERIAL_LIGHT_GREEN_A
,
1913 RID_SVXSTR_COLOR_MATERIAL_LIME_A
,
1914 RID_SVXSTR_COLOR_MATERIAL_BROWN_A
,
1915 RID_SVXSTR_COLOR_MATERIAL_BROWN
,
1916 RID_SVXSTR_COLOR_MATERIAL_BLUE_GRAY_A
,
1917 RID_SVXSTR_COLOR_MATERIAL_BLUE_GRAY
,
1918 RID_SVXSTR_COLOR_LIBRE_GREEN_1
,
1919 RID_SVXSTR_COLOR_LIBRE_GREEN_ACCENT
,
1920 RID_SVXSTR_COLOR_LIBRE_BLUE_ACCENT
,
1921 RID_SVXSTR_COLOR_LIBRE_ORANGE_ACCENT
,
1922 RID_SVXSTR_COLOR_LIBRE_PURPLE
,
1923 RID_SVXSTR_COLOR_LIBRE_PURPLE_ACCENT
,
1924 RID_SVXSTR_COLOR_LIBRE_YELLOW_ACCENT
1927 /// @throws std::exception
1928 static bool SvxUnoConvertResourceStringBuiltIn(const char** pSourceResIds
, const char** pDestResIds
, int nCount
, OUString
& rString
, bool bToApi
)
1930 //We replace e.g. "Gray 10%" with the translation of Gray, but we shouldn't
1931 //replace "Red Hat 1" with the translation of Red :-)
1932 sal_Int32 nLength
= rString
.getLength();
1933 while( nLength
> 0 )
1935 const sal_Unicode nChar
= rString
[nLength
-1];
1936 if (nChar
!= '%' && (nChar
< '0' || nChar
> '9'))
1940 OUString sStr
= rString
.copy(0, nLength
).trim();
1942 for(int i
= 0; i
< nCount
; ++i
)
1946 OUString aStrDefName
= SvxResId(pSourceResIds
[i
]);
1947 if( sStr
== aStrDefName
)
1949 OUString aReplace
= OUString::createFromAscii(pDestResIds
[i
]);
1950 rString
= rString
.replaceAt( 0, aStrDefName
.getLength(), aReplace
);
1956 if( sStr
.equalsAscii(pSourceResIds
[i
]) )
1958 OUString aReplace
= SvxResId(pDestResIds
[i
]);
1959 rString
= rString
.replaceAt( 0, strlen(pSourceResIds
[i
]), aReplace
);
1968 /** if the given name is a predefined name for the current language it is replaced by
1969 the corresponding api name.
1971 OUString
SvxUnogetApiNameForItem(const sal_uInt16 nWhich
, const OUString
& rInternalName
)
1973 OUString aNew
= rInternalName
;
1975 if( nWhich
== sal_uInt16(XATTR_LINECOLOR
) )
1977 if (SvxUnoConvertResourceStringBuiltIn(SvxUnoColorNameResId
, SvxUnoColorNameDefResId
, SAL_N_ELEMENTS(SvxUnoColorNameResId
), aNew
, true))
1984 const char** pApiResIds
;
1985 const char** pIntResIds
;
1988 if( SvxUnoGetResourceRanges(nWhich
, pApiResIds
, pIntResIds
, nCount
))
1990 if (SvxUnoConvertResourceString(pIntResIds
, pApiResIds
, nCount
, aNew
, true))
1997 // just use previous name, if nothing else was found.
1998 return rInternalName
;
2001 /** if the given name is a predefined api name it is replaced by the predefined name
2002 for the current language.
2004 OUString
SvxUnogetInternalNameForItem(const sal_uInt16 nWhich
, const OUString
& rApiName
)
2006 OUString aNew
= rApiName
;
2008 if( nWhich
== sal_uInt16(XATTR_LINECOLOR
) )
2010 if (SvxUnoConvertResourceStringBuiltIn(SvxUnoColorNameDefResId
, SvxUnoColorNameResId
, SAL_N_ELEMENTS(SvxUnoColorNameResId
), aNew
, false))
2017 const char** pApiResIds
;
2018 const char** pIntResIds
;
2021 if (SvxUnoGetResourceRanges(nWhich
, pApiResIds
, pIntResIds
, nCount
))
2023 if (SvxUnoConvertResourceString(pApiResIds
, pIntResIds
, nCount
, aNew
, false))
2030 // just use previous name, if nothing else was found.
2035 rtl::Reference
<comphelper::PropertySetInfo
> const & SvxPropertySetInfoPool::getOrCreate( sal_Int32 nServiceId
) noexcept
2037 SolarMutexGuard aGuard
;
2039 assert( nServiceId
<= SVXUNO_SERVICEID_LASTID
);
2041 if( !mxInfos
[ nServiceId
].is() )
2043 mxInfos
[nServiceId
] = new comphelper::PropertySetInfo();
2045 switch( nServiceId
)
2047 case SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS
:
2048 mxInfos
[SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS
]->add( ImplGetSvxDrawingDefaultsPropertyMap() );
2050 case SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER
:
2051 mxInfos
[SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER
]->add( ImplGetSvxDrawingDefaultsPropertyMap() );
2052 mxInfos
[SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER
]->remove( UNO_NAME_EDIT_PARA_IS_HANGING_PUNCTUATION
);
2053 // OD 13.10.2003 #i18732# - add property map for writer item 'IsFollowingTextFlow'
2054 mxInfos
[SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER
]->add( ImplGetAdditionalWriterDrawingDefaultsPropertyMap() );
2058 OSL_FAIL( "unknown service id!" );
2062 return mxInfos
[ nServiceId
];
2065 rtl::Reference
<comphelper::PropertySetInfo
> SvxPropertySetInfoPool::mxInfos
[SVXUNO_SERVICEID_LASTID
+1] = { nullptr };
2067 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */