Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / svx / source / unodraw / unoprov.cxx
blob105ed7a2d60eb037a44d9e17e345f2fbb4ca838d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/config.h>
22 #include <cassert>
24 #include <sal/macros.h>
25 #include <com/sun/star/table/XTable.hpp>
26 #include <com/sun/star/container/XIndexAccess.hpp>
27 #include <com/sun/star/container/XNameContainer.hpp>
28 #include <com/sun/star/frame/XModel.hpp>
29 #include <com/sun/star/embed/XEmbeddedObject.hpp>
30 #include <com/sun/star/util/MeasureUnit.hpp>
31 #include <com/sun/star/drawing/TextVerticalAdjust.hpp>
32 #include <com/sun/star/media/ZoomLevel.hpp>
33 #include <com/sun/star/io/XInputStream.hpp>
34 #include <com/sun/star/beans/PropertyAttribute.hpp>
35 #include <com/sun/star/lang/Locale.hpp>
36 #include <tools/fldunit.hxx>
37 #include <vcl/svapp.hxx>
38 #include <comphelper/propertysetinfo.hxx>
39 #include <comphelper/sequence.hxx>
40 #include <svx/dialmgr.hxx>
41 #include <svx/unoapi.hxx>
42 #include <svx/unoshprp.hxx>
43 #include <svx/svxids.hrc>
44 #include <svx/svdobjkind.hxx>
45 #include <svx/strings.hrc>
46 #include <o3tl/string_view.hxx>
47 #include <strings.hxx>
49 #include "shapeimpl.hxx"
50 #include <unordered_map>
52 using namespace ::com::sun::star;
53 using namespace ::com::sun::star::beans::PropertyAttribute;
54 using ::com::sun::star::drawing::TextVerticalAdjust;
56 static o3tl::span<SfxItemPropertyMapEntry const> ImplGetSvxShapePropertyMap()
58 static SfxItemPropertyMapEntry const aShapePropertyMap_Impl[] =
60 EDGERADIUS_PROPERTIES
61 FILL_PROPERTIES
62 LINE_PROPERTIES
63 LINE_PROPERTIES_START_END
64 SHAPE_DESCRIPTOR_PROPERTIES
65 MISC_OBJ_PROPERTIES
66 LINKTARGET_PROPERTIES
67 GLOW_PROPERTIES
68 SOFTEDGE_PROPERTIES
69 SHADOW_PROPERTIES
70 TEXT_PROPERTIES
71 // #FontWork#
72 FONTWORK_PROPERTIES
73 { u"UserDefinedAttributes", SDRATTR_XMLATTRIBUTES, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
74 { u"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
77 return aShapePropertyMap_Impl;
80 static o3tl::span<SfxItemPropertyMapEntry const> ImplGetSvxTextShapePropertyMap()
82 static SfxItemPropertyMapEntry const aTextShapePropertyMap_Impl[] =
84 EDGERADIUS_PROPERTIES
85 FILL_PROPERTIES
86 LINE_PROPERTIES
87 LINE_PROPERTIES_START_END
88 SHAPE_DESCRIPTOR_PROPERTIES
89 MISC_OBJ_PROPERTIES_NO_SHEAR
90 LINKTARGET_PROPERTIES
91 GLOW_PROPERTIES
92 SOFTEDGE_PROPERTIES
93 SHADOW_PROPERTIES
94 TEXT_PROPERTIES
95 // #FontWork#
96 FONTWORK_PROPERTIES
97 { u"UserDefinedAttributes", SDRATTR_XMLATTRIBUTES, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
98 { u"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
101 return aTextShapePropertyMap_Impl;
104 static o3tl::span<SfxItemPropertyMapEntry const> ImplGetSvxConnectorPropertyMap()
106 static SfxItemPropertyMapEntry const aConnectorPropertyMap_Impl[] =
108 SPECIAL_CONNECTOR_PROPERTIES
109 EDGERADIUS_PROPERTIES
110 FILL_PROPERTIES
111 LINE_PROPERTIES
112 LINE_PROPERTIES_START_END
113 SHAPE_DESCRIPTOR_PROPERTIES
114 MISC_OBJ_PROPERTIES
115 LINKTARGET_PROPERTIES
116 GLOW_PROPERTIES
117 SOFTEDGE_PROPERTIES
118 SHADOW_PROPERTIES
119 TEXT_PROPERTIES
120 // #FontWork#
121 FONTWORK_PROPERTIES
122 { u"UserDefinedAttributes", SDRATTR_XMLATTRIBUTES, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
123 { u"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
126 return aConnectorPropertyMap_Impl;
129 static o3tl::span<SfxItemPropertyMapEntry const> ImplGetSvxDimensioningPropertyMap()
131 static SfxItemPropertyMapEntry const aDimensioningPropertyMap_Impl[] =
133 SPECIAL_DIMENSIONING_PROPERTIES
134 EDGERADIUS_PROPERTIES
135 FILL_PROPERTIES
136 LINE_PROPERTIES
137 LINE_PROPERTIES_START_END
138 SHAPE_DESCRIPTOR_PROPERTIES
139 MISC_OBJ_PROPERTIES
140 LINKTARGET_PROPERTIES
141 GLOW_PROPERTIES
142 SOFTEDGE_PROPERTIES
143 SHADOW_PROPERTIES
144 TEXT_PROPERTIES
145 // #FontWork#
146 FONTWORK_PROPERTIES
147 { u"UserDefinedAttributes", SDRATTR_XMLATTRIBUTES, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
148 { u"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
151 return aDimensioningPropertyMap_Impl;
154 static o3tl::span<SfxItemPropertyMapEntry const> ImplGetSvxCirclePropertyMap()
156 static SfxItemPropertyMapEntry const aCirclePropertyMap_Impl[] =
158 SPECIAL_CIRCLE_PROPERTIES
159 EDGERADIUS_PROPERTIES
160 FILL_PROPERTIES
161 LINE_PROPERTIES
162 LINE_PROPERTIES_START_END
163 SHAPE_DESCRIPTOR_PROPERTIES
164 MISC_OBJ_PROPERTIES
165 LINKTARGET_PROPERTIES
166 GLOW_PROPERTIES
167 SOFTEDGE_PROPERTIES
168 SHADOW_PROPERTIES
169 TEXT_PROPERTIES
170 // #FontWork#
171 FONTWORK_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},
176 return aCirclePropertyMap_Impl;
179 static o3tl::span<SfxItemPropertyMapEntry const> ImplGetSvxPolyPolygonPropertyMap()
181 static SfxItemPropertyMapEntry const aPolyPolygonPropertyMap_Impl[] =
183 { u"Geometry", OWN_ATTR_BASE_GEOMETRY, cppu::UnoType<css::drawing::PointSequenceSequence>::get(), 0, 0 },
184 SPECIAL_POLYGON_PROPERTIES
185 SPECIAL_POLYPOLYGON_PROPERTIES
186 SPECIAL_POLYPOLYGONBEZIER_PROPERTIES
187 FILL_PROPERTIES
188 LINE_PROPERTIES
189 LINE_PROPERTIES_START_END
190 SHAPE_DESCRIPTOR_PROPERTIES
191 MISC_OBJ_PROPERTIES
192 LINKTARGET_PROPERTIES
193 GLOW_PROPERTIES
194 SOFTEDGE_PROPERTIES
195 SHADOW_PROPERTIES
196 TEXT_PROPERTIES
197 // #FontWork#
198 FONTWORK_PROPERTIES
199 { u"UserDefinedAttributes", SDRATTR_XMLATTRIBUTES, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
200 { u"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
203 return aPolyPolygonPropertyMap_Impl;
206 static o3tl::span<SfxItemPropertyMapEntry const> ImplGetSvxGraphicObjectPropertyMap()
208 static SfxItemPropertyMapEntry const aGraphicObjectPropertyMap_Impl[] =
210 SPECIAL_GRAPHOBJ_PROPERTIES
212 // #i25616#
213 FILL_PROPERTIES
215 LINE_PROPERTIES
216 LINE_PROPERTIES_START_END
217 SHAPE_DESCRIPTOR_PROPERTIES
219 // #i118485# Full properties now, shear included
220 MISC_OBJ_PROPERTIES
222 LINKTARGET_PROPERTIES
223 GLOW_PROPERTIES
224 SOFTEDGE_PROPERTIES
225 SHADOW_PROPERTIES
226 TEXT_PROPERTIES
227 // #FontWork#
228 FONTWORK_PROPERTIES
229 { u"IsMirrored", OWN_ATTR_MIRRORED, cppu::UnoType<bool>::get(), 0, 0},
230 { u"UserDefinedAttributes", SDRATTR_XMLATTRIBUTES, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
231 { u"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
232 { u"GraphicStream", OWN_ATTR_GRAPHIC_STREAM, cppu::UnoType<css::io::XInputStream>::get(), css::beans::PropertyAttribute::READONLY, 0},
235 return aGraphicObjectPropertyMap_Impl;
238 static o3tl::span<SfxItemPropertyMapEntry const> ImplGetSvx3DSceneObjectPropertyMap()
240 static SfxItemPropertyMapEntry const a3DSceneObjectPropertyMap_Impl[] =
242 SPECIAL_3DSCENEOBJECT_PROPERTIES
243 FILL_PROPERTIES
244 LINE_PROPERTIES
245 LINE_PROPERTIES_START_END
246 SHAPE_DESCRIPTOR_PROPERTIES
247 MISC_OBJ_PROPERTIES
248 LINKTARGET_PROPERTIES
249 SHADOW_PROPERTIES
252 return a3DSceneObjectPropertyMap_Impl;
255 static o3tl::span<SfxItemPropertyMapEntry const> ImplGetSvx3DCubeObjectPropertyMap()
257 static SfxItemPropertyMapEntry const a3DCubeObjectPropertyMap_Impl[] =
259 SPECIAL_3DCUBEOBJECT_PROPERTIES
260 MISC_3D_OBJ_PROPERTIES
261 FILL_PROPERTIES
262 LINE_PROPERTIES
263 LINE_PROPERTIES_START_END
264 SHAPE_DESCRIPTOR_PROPERTIES
265 MISC_OBJ_PROPERTIES
266 LINKTARGET_PROPERTIES
267 SHADOW_PROPERTIES
268 { u"UserDefinedAttributes", SDRATTR_XMLATTRIBUTES, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
269 { u"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
272 return a3DCubeObjectPropertyMap_Impl;
275 static o3tl::span<SfxItemPropertyMapEntry const> ImplGetSvx3DSphereObjectPropertyMap()
277 static SfxItemPropertyMapEntry const a3DSphereObjectPropertyMap_Impl[] =
279 SPECIAL_3DSPHEREOBJECT_PROPERTIES
280 MISC_3D_OBJ_PROPERTIES
281 FILL_PROPERTIES
282 LINE_PROPERTIES
283 LINE_PROPERTIES_START_END
284 SHAPE_DESCRIPTOR_PROPERTIES
285 MISC_OBJ_PROPERTIES
286 LINKTARGET_PROPERTIES
287 SHADOW_PROPERTIES
288 { u"UserDefinedAttributes", SDRATTR_XMLATTRIBUTES, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
289 { u"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
291 return a3DSphereObjectPropertyMap_Impl;
294 static o3tl::span<SfxItemPropertyMapEntry const> ImplGetSvx3DLatheObjectPropertyMap()
296 static SfxItemPropertyMapEntry const a3DLatheObjectPropertyMap_Impl[] =
298 SPECIAL_3DLATHEOBJECT_PROPERTIES
300 // #107245# New 3D properties which are possible for lathe and extrude 3d objects
301 SPECIAL_3DLATHEANDEXTRUDEOBJ_PROPERTIES
303 SPECIAL_3DBACKSCALE_PROPERTIES
304 MISC_3D_OBJ_PROPERTIES
305 FILL_PROPERTIES
306 LINE_PROPERTIES
307 LINE_PROPERTIES_START_END
308 SHAPE_DESCRIPTOR_PROPERTIES
309 MISC_OBJ_PROPERTIES
310 LINKTARGET_PROPERTIES
311 SHADOW_PROPERTIES
312 { u"UserDefinedAttributes", SDRATTR_XMLATTRIBUTES, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
313 { u"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
316 return a3DLatheObjectPropertyMap_Impl;
319 static o3tl::span<SfxItemPropertyMapEntry const> ImplGetSvx3DExtrudeObjectPropertyMap()
321 static SfxItemPropertyMapEntry const a3DExtrudeObjectPropertyMap_Impl[] =
323 SPECIAL_3DEXTRUDEOBJECT_PROPERTIES
325 // #107245# New 3D properties which are possible for lathe and extrude 3d objects
326 SPECIAL_3DLATHEANDEXTRUDEOBJ_PROPERTIES
328 SPECIAL_3DBACKSCALE_PROPERTIES
329 MISC_3D_OBJ_PROPERTIES
330 FILL_PROPERTIES
331 LINE_PROPERTIES
332 LINE_PROPERTIES_START_END
333 SHAPE_DESCRIPTOR_PROPERTIES
334 MISC_OBJ_PROPERTIES
335 LINKTARGET_PROPERTIES
336 SHADOW_PROPERTIES
337 { u"UserDefinedAttributes", SDRATTR_XMLATTRIBUTES, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
338 { u"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
341 return a3DExtrudeObjectPropertyMap_Impl;
344 static o3tl::span<SfxItemPropertyMapEntry const> ImplGetSvx3DPolygonObjectPropertyMap()
346 static SfxItemPropertyMapEntry const a3DPolygonObjectPropertyMap_Impl[] =
348 SPECIAL_3DPOLYGONOBJECT_PROPERTIES
349 MISC_3D_OBJ_PROPERTIES
350 FILL_PROPERTIES
351 LINE_PROPERTIES
352 LINE_PROPERTIES_START_END
353 SHAPE_DESCRIPTOR_PROPERTIES
354 MISC_OBJ_PROPERTIES
355 LINKTARGET_PROPERTIES
356 SHADOW_PROPERTIES
357 { u"UserDefinedAttributes", SDRATTR_XMLATTRIBUTES, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
358 { u"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
361 return a3DPolygonObjectPropertyMap_Impl;
364 static o3tl::span<SfxItemPropertyMapEntry const> ImplGetSvxAllPropertyMap()
366 static SfxItemPropertyMapEntry const aAllPropertyMap_Impl[] =
368 GLOW_PROPERTIES
369 SOFTEDGE_PROPERTIES
370 SHADOW_PROPERTIES
371 LINE_PROPERTIES
372 LINE_PROPERTIES_START_END
373 FILL_PROPERTIES
374 EDGERADIUS_PROPERTIES
375 TEXT_PROPERTIES
376 // #FontWork#
377 FONTWORK_PROPERTIES
378 SHAPE_DESCRIPTOR_PROPERTIES
379 MISC_OBJ_PROPERTIES
380 LINKTARGET_PROPERTIES
381 SPECIAL_CONNECTOR_PROPERTIES
382 SPECIAL_DIMENSIONING_PROPERTIES
383 SPECIAL_CIRCLE_PROPERTIES
384 SPECIAL_POLYGON_PROPERTIES
385 SPECIAL_POLYPOLYGON_PROPERTIES
386 SPECIAL_POLYPOLYGONBEZIER_PROPERTIES
387 SPECIAL_GRAPHOBJ_PROPERTIES
388 SPECIAL_3DSCENEOBJECT_PROPERTIES
389 MISC_3D_OBJ_PROPERTIES
390 SPECIAL_3DCUBEOBJECT_PROPERTIES
391 SPECIAL_3DSPHEREOBJECT_PROPERTIES
392 SPECIAL_3DLATHEOBJECT_PROPERTIES
393 SPECIAL_3DEXTRUDEOBJECT_PROPERTIES
395 // #107245# New 3D properties which are possible for lathe and extrude 3d objects
396 SPECIAL_3DLATHEANDEXTRUDEOBJ_PROPERTIES
398 SPECIAL_3DBACKSCALE_PROPERTIES
399 SPECIAL_3DPOLYGONOBJECT_PROPERTIES
400 { u"UserDefinedAttributes", SDRATTR_XMLATTRIBUTES, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
401 { u"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
404 return aAllPropertyMap_Impl;
407 static o3tl::span<SfxItemPropertyMapEntry const> ImplGetSvxGroupPropertyMap()
409 static SfxItemPropertyMapEntry const aGroupPropertyMap_Impl[] =
411 SHAPE_DESCRIPTOR_PROPERTIES
412 MISC_OBJ_PROPERTIES
413 LINKTARGET_PROPERTIES
416 return aGroupPropertyMap_Impl;
419 static o3tl::span<SfxItemPropertyMapEntry const> ImplGetSvxOle2PropertyMap()
421 static SfxItemPropertyMapEntry const aOle2PropertyMap_Impl[] =
423 // #i118485# Adding properties for line, fill, text, shadow, fontwork, rotate, shear
424 FILL_PROPERTIES
425 LINE_PROPERTIES
426 LINE_PROPERTIES_START_END
427 SHAPE_DESCRIPTOR_PROPERTIES
428 MISC_OBJ_PROPERTIES
429 LINKTARGET_PROPERTIES
430 GLOW_PROPERTIES
431 SOFTEDGE_PROPERTIES
432 SHADOW_PROPERTIES
433 TEXT_PROPERTIES
434 FONTWORK_PROPERTIES
436 { u"ThumbnailGraphic", OWN_ATTR_THUMBNAIL , cppu::UnoType<css::graphic::XGraphic>::get(), 0, 0 },
437 { u"Model", OWN_ATTR_OLEMODEL , cppu::UnoType<css::frame::XModel>::get(), css::beans::PropertyAttribute::READONLY, 0},
438 { u"EmbeddedObject", OWN_ATTR_OLE_EMBEDDED_OBJECT, cppu::UnoType<css::embed::XEmbeddedObject>::get(), css::beans::PropertyAttribute::READONLY, 0},
439 { u"EmbeddedObjectNoNewClient",OWN_ATTR_OLE_EMBEDDED_OBJECT_NONEWCLIENT, cppu::UnoType<css::embed::XEmbeddedObject>::get(), css::beans::PropertyAttribute::READONLY, 0},
440 { u"OriginalSize", OWN_ATTR_OLESIZE , cppu::UnoType<css::awt::Size>::get(), css::beans::PropertyAttribute::READONLY, 0},
441 { u"CLSID", OWN_ATTR_CLSID , cppu::UnoType<OUString>::get(), 0, 0 },
442 { u"IsInternal", OWN_ATTR_INTERNAL_OLE , cppu::UnoType<bool>::get() , css::beans::PropertyAttribute::READONLY, 0},
443 { u"VisibleArea", OWN_ATTR_OLE_VISAREA , cppu::UnoType<css::awt::Rectangle>::get(), 0, 0},
444 { u"Aspect", OWN_ATTR_OLE_ASPECT , cppu::UnoType<sal_Int64>::get(), 0, 0},
445 { UNO_NAME_OLE2_PERSISTNAME, OWN_ATTR_PERSISTNAME , cppu::UnoType<OUString>::get(), 0, 0 },
446 { u"LinkURL", OWN_ATTR_OLE_LINKURL , cppu::UnoType<OUString>::get(), 0, 0 },
447 { UNO_NAME_GRAPHOBJ_GRAPHIC, OWN_ATTR_VALUE_GRAPHIC , cppu::UnoType<css::graphic::XGraphic>::get(), 0, 0},
450 return aOle2PropertyMap_Impl;
453 static o3tl::span<SfxItemPropertyMapEntry const> ImplGetSvxPluginPropertyMap()
455 static SfxItemPropertyMapEntry const aPluginPropertyMap_Impl[] =
457 { u"PluginMimeType", OWN_ATTR_PLUGIN_MIMETYPE , cppu::UnoType<OUString>::get(), 0, 0},
458 { u"PluginURL", OWN_ATTR_PLUGIN_URL , cppu::UnoType<OUString>::get(), 0, 0},
459 { u"PluginCommands", OWN_ATTR_PLUGIN_COMMANDS , cppu::UnoType<css::uno::Sequence< css::beans::PropertyValue >>::get(), 0, 0},
460 { u"Transformation", OWN_ATTR_TRANSFORMATION , cppu::UnoType<css::drawing::HomogenMatrix3>::get(), 0, 0 },
461 { UNO_NAME_MISC_OBJ_ZORDER, OWN_ATTR_ZORDER , cppu::UnoType<sal_Int32>::get(), 0, 0},
462 { UNO_NAME_MISC_OBJ_LAYERID, SDRATTR_LAYERID , cppu::UnoType<sal_Int16>::get(), 0, 0},
463 { UNO_NAME_MISC_OBJ_LAYERNAME,SDRATTR_LAYERNAME , cppu::UnoType<OUString>::get(), 0, 0},
464 { UNO_NAME_LINKDISPLAYBITMAP, OWN_ATTR_LDBITMAP , cppu::UnoType<css::awt::XBitmap>::get(), css::beans::PropertyAttribute::READONLY, 0},
465 { UNO_NAME_LINKDISPLAYNAME, OWN_ATTR_LDNAME , cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY, 0},
466 { UNO_NAME_OLE2_METAFILE, OWN_ATTR_METAFILE , cppu::UnoType<css::uno::Sequence<sal_Int8>>::get(), css::beans::PropertyAttribute::READONLY, 0},
467 { u"ThumbnailGraphic", OWN_ATTR_THUMBNAIL , cppu::UnoType<css::graphic::XGraphic>::get(), 0, 0 },
468 { UNO_NAME_MISC_OBJ_MOVEPROTECT, SDRATTR_OBJMOVEPROTECT, cppu::UnoType<bool>::get(),0, 0},
469 { UNO_NAME_MISC_OBJ_SIZEPROTECT, SDRATTR_OBJSIZEPROTECT, cppu::UnoType<bool>::get(),0, 0},
470 { UNO_NAME_OLE2_PERSISTNAME, OWN_ATTR_PERSISTNAME , cppu::UnoType<OUString>::get(), 0, 0 },
471 { u"LinkURL", OWN_ATTR_OLE_LINKURL , cppu::UnoType<OUString>::get(), 0, 0 },
472 { UNO_NAME_MISC_OBJ_BOUNDRECT, OWN_ATTR_BOUNDRECT, cppu::UnoType<css::awt::Rectangle>::get(), css::beans::PropertyAttribute::READONLY, 0},
473 { u"VisibleArea", OWN_ATTR_OLE_VISAREA , cppu::UnoType<css::awt::Rectangle>::get(), 0, 0},
474 { u"UINameSingular", OWN_ATTR_UINAME_SINGULAR , ::cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY, 0},
475 // #i68101#
476 { UNO_NAME_MISC_OBJ_TITLE, OWN_ATTR_MISC_OBJ_TITLE , cppu::UnoType<OUString>::get(), 0, 0},
477 { UNO_NAME_MISC_OBJ_DESCRIPTION, OWN_ATTR_MISC_OBJ_DESCRIPTION , cppu::UnoType<OUString>::get(), 0, 0},
478 { u"Decorative", OWN_ATTR_MISC_OBJ_DECORATIVE, ::cppu::UnoType<bool>::get(), 0, 0 },
481 return aPluginPropertyMap_Impl;
484 static o3tl::span<SfxItemPropertyMapEntry const> ImplGetSvxFramePropertyMap()
486 //TODO/LATER: new properties for ScrollingMode and DefaultBorder
487 static SfxItemPropertyMapEntry const aFramePropertyMap_Impl[] =
489 { u"FrameURL", OWN_ATTR_FRAME_URL , cppu::UnoType<OUString>::get(), 0, 0},
490 { u"FrameName", OWN_ATTR_FRAME_NAME , cppu::UnoType<OUString>::get(), 0, 0},
491 { u"FrameIsAutoScroll", OWN_ATTR_FRAME_ISAUTOSCROLL , cppu::UnoType<bool>::get() , css::beans::PropertyAttribute::MAYBEVOID, 0},
492 { u"FrameIsBorder", OWN_ATTR_FRAME_ISBORDER , cppu::UnoType<bool>::get() , 0, 0},
493 { u"FrameMarginWidth", OWN_ATTR_FRAME_MARGIN_WIDTH , cppu::UnoType<sal_Int32>::get(), 0, 0},
494 { u"FrameMarginHeight", OWN_ATTR_FRAME_MARGIN_HEIGHT, cppu::UnoType<sal_Int32>::get(), 0, 0},
495 { u"Transformation", OWN_ATTR_TRANSFORMATION , cppu::UnoType<css::drawing::HomogenMatrix3>::get(), 0, 0 },
496 { UNO_NAME_MISC_OBJ_ZORDER, OWN_ATTR_ZORDER , cppu::UnoType<sal_Int32>::get(), 0, 0},
497 { UNO_NAME_MISC_OBJ_LAYERID, SDRATTR_LAYERID , cppu::UnoType<sal_Int16>::get(), 0, 0},
498 { UNO_NAME_MISC_OBJ_LAYERNAME,SDRATTR_LAYERNAME , cppu::UnoType<OUString>::get(), 0, 0},
499 { UNO_NAME_LINKDISPLAYBITMAP, OWN_ATTR_LDBITMAP , cppu::UnoType<css::awt::XBitmap>::get(), css::beans::PropertyAttribute::READONLY, 0},
500 { UNO_NAME_LINKDISPLAYNAME, OWN_ATTR_LDNAME , cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY, 0},
501 { UNO_NAME_OLE2_METAFILE, OWN_ATTR_METAFILE , cppu::UnoType<css::uno::Sequence<sal_Int8>>::get(), css::beans::PropertyAttribute::READONLY, 0},
502 { u"ThumbnailGraphic", OWN_ATTR_THUMBNAIL , cppu::UnoType<css::graphic::XGraphic>::get(), 0, 0 },
503 { UNO_NAME_MISC_OBJ_MOVEPROTECT, SDRATTR_OBJMOVEPROTECT, cppu::UnoType<bool>::get(),0, 0},
504 { UNO_NAME_MISC_OBJ_SIZEPROTECT, SDRATTR_OBJSIZEPROTECT, cppu::UnoType<bool>::get(),0, 0},
505 { UNO_NAME_OLE2_PERSISTNAME, OWN_ATTR_PERSISTNAME , cppu::UnoType<OUString>::get(), 0, 0 },
506 { u"LinkURL", OWN_ATTR_OLE_LINKURL , cppu::UnoType<OUString>::get(), 0, 0 },
507 { UNO_NAME_MISC_OBJ_BOUNDRECT, OWN_ATTR_BOUNDRECT, cppu::UnoType<css::awt::Rectangle>::get(), css::beans::PropertyAttribute::READONLY, 0},
508 { u"VisibleArea", OWN_ATTR_OLE_VISAREA , cppu::UnoType<css::awt::Rectangle>::get(), 0, 0},
509 { u"UINameSingular", OWN_ATTR_UINAME_SINGULAR , ::cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY, 0},
510 // #i68101#
511 { UNO_NAME_MISC_OBJ_TITLE, OWN_ATTR_MISC_OBJ_TITLE , cppu::UnoType<OUString>::get(), 0, 0},
512 { UNO_NAME_MISC_OBJ_DESCRIPTION, OWN_ATTR_MISC_OBJ_DESCRIPTION , cppu::UnoType<OUString>::get(), 0, 0},
513 { u"Decorative", OWN_ATTR_MISC_OBJ_DECORATIVE, ::cppu::UnoType<bool>::get(), 0, 0 },
516 return aFramePropertyMap_Impl;
519 static o3tl::span<SfxItemPropertyMapEntry const> ImplGetSvxAppletPropertyMap()
521 static SfxItemPropertyMapEntry const aAppletPropertyMap_Impl[] =
523 { u"AppletCodeBase", OWN_ATTR_APPLET_CODEBASE , cppu::UnoType<OUString>::get(), 0, 0},
524 { u"AppletName", OWN_ATTR_APPLET_NAME , cppu::UnoType<OUString>::get(), 0, 0},
525 { u"AppletCode", OWN_ATTR_APPLET_CODE , cppu::UnoType<OUString>::get(), 0, 0},
526 { u"AppletCommands", OWN_ATTR_APPLET_COMMANDS , cppu::UnoType<css::uno::Sequence< css::beans::PropertyValue >>::get(), 0, 0},
527 { u"AppletDocBase", OWN_ATTR_APPLET_DOCBASE , cppu::UnoType<OUString>::get(), 0, 0},
528 { u"AppletIsScript", OWN_ATTR_APPLET_ISSCRIPT , cppu::UnoType<bool>::get(), 0, 0 },
529 { u"Transformation", OWN_ATTR_TRANSFORMATION , cppu::UnoType<css::drawing::HomogenMatrix3>::get(), 0, 0 },
530 { UNO_NAME_MISC_OBJ_ZORDER, OWN_ATTR_ZORDER , cppu::UnoType<sal_Int32>::get(), 0, 0},
531 { UNO_NAME_MISC_OBJ_LAYERID, SDRATTR_LAYERID , cppu::UnoType<sal_Int16>::get(), 0, 0},
532 { UNO_NAME_MISC_OBJ_LAYERNAME,SDRATTR_LAYERNAME , cppu::UnoType<OUString>::get(), 0, 0},
533 { UNO_NAME_LINKDISPLAYBITMAP, OWN_ATTR_LDBITMAP , cppu::UnoType<css::awt::XBitmap>::get(), css::beans::PropertyAttribute::READONLY, 0},
534 { UNO_NAME_LINKDISPLAYNAME, OWN_ATTR_LDNAME , cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY, 0},
535 { UNO_NAME_OLE2_METAFILE, OWN_ATTR_METAFILE , cppu::UnoType<css::uno::Sequence<sal_Int8>>::get(), css::beans::PropertyAttribute::READONLY, 0},
536 { u"ThumbnailGraphic", OWN_ATTR_THUMBNAIL , cppu::UnoType<css::graphic::XGraphic>::get(), 0, 0 },
537 { UNO_NAME_MISC_OBJ_MOVEPROTECT, SDRATTR_OBJMOVEPROTECT, cppu::UnoType<bool>::get(),0, 0},
538 { UNO_NAME_MISC_OBJ_SIZEPROTECT, SDRATTR_OBJSIZEPROTECT, cppu::UnoType<bool>::get(),0, 0},
539 { UNO_NAME_OLE2_PERSISTNAME, OWN_ATTR_PERSISTNAME , cppu::UnoType<OUString>::get(), 0, 0 },
540 { u"LinkURL", OWN_ATTR_OLE_LINKURL , cppu::UnoType<OUString>::get(), 0, 0 },
541 { UNO_NAME_MISC_OBJ_BOUNDRECT, OWN_ATTR_BOUNDRECT, cppu::UnoType<css::awt::Rectangle>::get(), css::beans::PropertyAttribute::READONLY, 0},
542 { u"VisibleArea", OWN_ATTR_OLE_VISAREA , cppu::UnoType<css::awt::Rectangle>::get(), 0, 0},
543 { u"UINameSingular", OWN_ATTR_UINAME_SINGULAR , ::cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY, 0},
544 // #i68101#
545 { UNO_NAME_MISC_OBJ_TITLE, OWN_ATTR_MISC_OBJ_TITLE , cppu::UnoType<OUString>::get(), 0, 0},
546 { UNO_NAME_MISC_OBJ_DESCRIPTION, OWN_ATTR_MISC_OBJ_DESCRIPTION , cppu::UnoType<OUString>::get(), 0, 0},
547 { u"Decorative", OWN_ATTR_MISC_OBJ_DECORATIVE, ::cppu::UnoType<bool>::get(), 0, 0 },
550 return aAppletPropertyMap_Impl;
553 static o3tl::span<SfxItemPropertyMapEntry const> ImplGetSvxControlShapePropertyMap()
555 static SfxItemPropertyMapEntry const aControlPropertyMap_Impl[] =
557 // the following properties are mapped to the XControl Model of this shape
558 { UNO_NAME_EDIT_CHAR_FONTNAME, 0, cppu::UnoType<OUString>::get(), 0, 0 },
559 { UNO_NAME_EDIT_CHAR_FONTSTYLENAME, 0, cppu::UnoType<OUString>::get(), 0, 0 },
560 { UNO_NAME_EDIT_CHAR_FONTFAMILY, 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
561 { UNO_NAME_EDIT_CHAR_FONTCHARSET, 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
562 { UNO_NAME_EDIT_CHAR_HEIGHT, 0, cppu::UnoType<float>::get(), 0, 0 },
563 { UNO_NAME_EDIT_CHAR_FONTPITCH, 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
564 { UNO_NAME_EDIT_CHAR_POSTURE, 0, cppu::UnoType<css::awt::FontSlant>::get(),0, 0 },
565 { UNO_NAME_EDIT_CHAR_WEIGHT, 0, cppu::UnoType<float>::get(), 0, 0 },
566 { UNO_NAME_EDIT_CHAR_UNDERLINE, 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
567 { UNO_NAME_EDIT_CHAR_STRIKEOUT, 0, cppu::UnoType<sal_Int16>::get(), 0, 0},
568 { UNO_NAME_EDIT_CHAR_CASEMAP, 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
569 { UNO_NAME_EDIT_CHAR_COLOR, 0, cppu::UnoType<sal_Int32>::get(), 0, MID_COLOR_RGB },
570 { UNO_NAME_EDIT_CHAR_COLOR_THEME, 0, cppu::UnoType<sal_Int16>::get(), 0, MID_COLOR_THEME_INDEX },
571 { UNO_NAME_EDIT_CHAR_COLOR_TINT_OR_SHADE, 0, cppu::UnoType<sal_Int16>::get(), 0, MID_COLOR_TINT_OR_SHADE },
572 { UNO_NAME_EDIT_CHAR_COMPLEX_COLOR, 0, cppu::UnoType<css::util::XComplexColor>::get(), 0, MID_COMPLEX_COLOR },
573 { u"CharBackColor", 0, cppu::UnoType<sal_Int32>::get(), 0, 0 },
574 { u"CharBackTransparent", 0, cppu::UnoType<bool>::get(), 0, 0 },
575 { u"CharRelief", 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
576 { u"CharUnderlineColor", 0, cppu::UnoType<sal_Int32>::get(), 0, 0 },
577 { u"CharKerning", 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
578 { u"CharWordMode", 0, cppu::UnoType<bool>::get(), 0, 0 },
579 { UNO_NAME_EDIT_PARA_ADJUST, 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
580 { u"TextVerticalAdjust", 0, cppu::UnoType<TextVerticalAdjust>::get(), MAYBEVOID, 0 },
581 { u"ControlBackground", 0, cppu::UnoType<sal_Int32>::get(), 0, 0 },
582 { u"ControlBorder", 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
583 { u"ControlBorderColor", 0, cppu::UnoType<sal_Int32>::get(), 0, 0 },
584 { u"ControlSymbolColor", 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
585 { u"ImageScaleMode", 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
586 { UNO_NAME_MISC_OBJ_MOVEPROTECT, SDRATTR_OBJMOVEPROTECT, cppu::UnoType<bool>::get(),0, 0},
587 { UNO_NAME_MISC_OBJ_SIZEPROTECT, SDRATTR_OBJSIZEPROTECT, cppu::UnoType<bool>::get(),0, 0},
588 { u"ControlTextEmphasis", 0, cppu::UnoType<sal_Int16>::get(), 0, 0 },
589 { u"ControlWritingMode", 0, cppu::UnoType< sal_Int16 >::get(), 0, 0},
590 // the following properties are handled by SvxShape
591 { u"Transformation", OWN_ATTR_TRANSFORMATION , cppu::UnoType<css::drawing::HomogenMatrix3>::get(), 0, 0 },
592 { UNO_NAME_MISC_OBJ_ZORDER, OWN_ATTR_ZORDER , cppu::UnoType<sal_Int32>::get(), 0, 0},
593 { UNO_NAME_MISC_OBJ_LAYERID, SDRATTR_LAYERID , cppu::UnoType<sal_Int16>::get(), 0, 0},
594 { UNO_NAME_MISC_OBJ_LAYERNAME,SDRATTR_LAYERNAME , cppu::UnoType<OUString>::get(), 0, 0},
595 { UNO_NAME_LINKDISPLAYBITMAP, OWN_ATTR_LDBITMAP , cppu::UnoType<css::awt::XBitmap>::get(), css::beans::PropertyAttribute::READONLY, 0},
596 { UNO_NAME_LINKDISPLAYNAME, OWN_ATTR_LDNAME , cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY, 0},
597 { u"UserDefinedAttributes", SDRATTR_XMLATTRIBUTES, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
598 {u"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
599 { UNO_NAME_MISC_OBJ_BOUNDRECT, OWN_ATTR_BOUNDRECT, cppu::UnoType<css::awt::Rectangle>::get(), css::beans::PropertyAttribute::READONLY, 0},
600 { u"UINameSingular", OWN_ATTR_UINAME_SINGULAR , ::cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY, 0},
601 // #i68101#
602 { UNO_NAME_MISC_OBJ_TITLE, OWN_ATTR_MISC_OBJ_TITLE , cppu::UnoType<OUString>::get(), 0, 0},
603 { UNO_NAME_MISC_OBJ_DESCRIPTION, OWN_ATTR_MISC_OBJ_DESCRIPTION , cppu::UnoType<OUString>::get(), 0, 0},
604 { u"Decorative", OWN_ATTR_MISC_OBJ_DECORATIVE, ::cppu::UnoType<bool>::get(), 0, 0 },
605 // #i112587#
606 { UNO_NAME_MISC_OBJ_PRINTABLE, SDRATTR_OBJPRINTABLE , cppu::UnoType<bool>::get(), 0, 0},
607 { u"Visible", SDRATTR_OBJVISIBLE , cppu::UnoType<bool>::get(), 0, 0},
608 { UNO_NAME_MISC_OBJ_INTEROPGRABBAG, OWN_ATTR_INTEROPGRABBAG, cppu::UnoType<css::uno::Sequence< css::beans::PropertyValue >>::get(), 0, 0},
611 return aControlPropertyMap_Impl;
614 static o3tl::span<SfxItemPropertyMapEntry const> ImplGetSvxPageShapePropertyMap()
616 static SfxItemPropertyMapEntry const aPageShapePropertyMap_Impl[] =
618 { u"PageNumber", OWN_ATTR_PAGE_NUMBER , cppu::UnoType<sal_Int32>::get(), 0, 0},
619 { u"Transformation", OWN_ATTR_TRANSFORMATION , cppu::UnoType<css::drawing::HomogenMatrix3>::get(), 0, 0 },
620 { UNO_NAME_MISC_OBJ_ZORDER, OWN_ATTR_ZORDER , cppu::UnoType<sal_Int32>::get(), 0, 0},
621 { UNO_NAME_MISC_OBJ_LAYERID, SDRATTR_LAYERID , cppu::UnoType<sal_Int16>::get(), 0, 0},
622 { UNO_NAME_MISC_OBJ_LAYERNAME,SDRATTR_LAYERNAME , cppu::UnoType<OUString>::get(), 0, 0},
623 { UNO_NAME_LINKDISPLAYBITMAP, OWN_ATTR_LDBITMAP , cppu::UnoType<css::awt::XBitmap>::get(), css::beans::PropertyAttribute::READONLY, 0},
624 { UNO_NAME_LINKDISPLAYNAME, OWN_ATTR_LDNAME , cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY, 0},
625 { UNO_NAME_MISC_OBJ_MOVEPROTECT, SDRATTR_OBJMOVEPROTECT, cppu::UnoType<bool>::get(),0, 0},
626 { UNO_NAME_MISC_OBJ_SIZEPROTECT, SDRATTR_OBJSIZEPROTECT, cppu::UnoType<bool>::get(),0, 0},
627 { UNO_NAME_MISC_OBJ_BOUNDRECT, OWN_ATTR_BOUNDRECT, cppu::UnoType<css::awt::Rectangle>::get(), css::beans::PropertyAttribute::READONLY, 0},
628 // #i68101#
629 { UNO_NAME_MISC_OBJ_TITLE, OWN_ATTR_MISC_OBJ_TITLE , cppu::UnoType<OUString>::get(), 0, 0},
630 { UNO_NAME_MISC_OBJ_DESCRIPTION, OWN_ATTR_MISC_OBJ_DESCRIPTION , cppu::UnoType<OUString>::get(), 0, 0},
631 { u"Decorative", OWN_ATTR_MISC_OBJ_DECORATIVE, ::cppu::UnoType<bool>::get(), 0, 0 },
634 return aPageShapePropertyMap_Impl;
637 static o3tl::span<SfxItemPropertyMapEntry const> ImplGetSvxCaptionPropertyMap()
639 static SfxItemPropertyMapEntry const aCaptionPropertyMap_Impl[] =
641 { u"CaptionPoint", OWN_ATTR_CAPTION_POINT, cppu::UnoType<css::awt::Point>::get(), 0, 0 },
642 { u"CaptionType", SDRATTR_CAPTIONTYPE, cppu::UnoType<sal_Int16>::get(), 0, 0},
643 { u"CaptionIsFixedAngle", SDRATTR_CAPTIONFIXEDANGLE, cppu::UnoType<bool>::get(), 0, 0},
644 { u"CaptionAngle", SDRATTR_CAPTIONANGLE, cppu::UnoType<sal_Int32>::get(), 0, 0},
645 { u"CaptionGap", SDRATTR_CAPTIONGAP, cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM},
646 { u"CaptionEscapeDirection", SDRATTR_CAPTIONESCDIR, cppu::UnoType<sal_Int32>::get(), 0, 0},
647 { u"CaptionIsEscapeRelative", SDRATTR_CAPTIONESCISREL, cppu::UnoType<bool>::get(), 0, 0},
648 { u"CaptionEscapeRelative", SDRATTR_CAPTIONESCREL, cppu::UnoType<sal_Int32>::get(), 0, 0},
649 { u"CaptionEscapeAbsolute", SDRATTR_CAPTIONESCABS, cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM},
650 { u"CaptionLineLength", SDRATTR_CAPTIONLINELEN, cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM},
651 { u"CaptionIsFitLineLength", SDRATTR_CAPTIONFITLINELEN, cppu::UnoType<bool>::get(), 0, 0},
652 EDGERADIUS_PROPERTIES
653 FILL_PROPERTIES
654 LINE_PROPERTIES
655 LINE_PROPERTIES_START_END
656 SHAPE_DESCRIPTOR_PROPERTIES
657 MISC_OBJ_PROPERTIES
658 LINKTARGET_PROPERTIES
659 SHADOW_PROPERTIES
660 TEXT_PROPERTIES
661 // #FontWork#
662 FONTWORK_PROPERTIES
663 { u"UserDefinedAttributes", SDRATTR_XMLATTRIBUTES, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
664 {u"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
667 return aCaptionPropertyMap_Impl;
670 static o3tl::span<SfxItemPropertyMapEntry const> ImplGetSvxCustomShapePropertyMap()
672 static SfxItemPropertyMapEntry const aCustomShapePropertyMap_Impl[] =
674 { u"CustomShapeEngine", SDRATTR_CUSTOMSHAPE_ENGINE, cppu::UnoType<OUString>::get(), 0, 0 },
675 { u"CustomShapeData", SDRATTR_CUSTOMSHAPE_DATA, cppu::UnoType<OUString>::get(), 0, 0 },
676 { u"CustomShapeGeometry", SDRATTR_CUSTOMSHAPE_GEOMETRY,
677 cppu::UnoType<css::uno::Sequence< css::beans::PropertyValue >>::get(), 0, 0 },
678 FILL_PROPERTIES
679 LINE_PROPERTIES
680 LINE_PROPERTIES_START_END
681 SHAPE_DESCRIPTOR_PROPERTIES
682 MISC_OBJ_PROPERTIES
683 LINKTARGET_PROPERTIES
684 GLOW_PROPERTIES
685 SOFTEDGE_PROPERTIES
686 SHADOW_PROPERTIES
687 TEXT_PROPERTIES
688 {u"UserDefinedAttributes", SDRATTR_XMLATTRIBUTES, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
689 {u"ParaUserDefinedAttributes", EE_PARA_XMLATTRIBS, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
691 return aCustomShapePropertyMap_Impl;
694 static o3tl::span<SfxItemPropertyMapEntry const> ImplGetSvxMediaShapePropertyMap()
696 static SfxItemPropertyMapEntry const aMediaShapePropertyMap_Impl[] =
698 { UNO_NAME_MISC_OBJ_ZORDER, OWN_ATTR_ZORDER, cppu::UnoType<sal_Int32>::get(), 0, 0},
699 { UNO_NAME_MISC_OBJ_LAYERID, SDRATTR_LAYERID, cppu::UnoType<sal_Int16>::get(), 0, 0},
700 { UNO_NAME_MISC_OBJ_LAYERNAME, SDRATTR_LAYERNAME, cppu::UnoType<OUString>::get(), 0, 0},
701 { UNO_NAME_LINKDISPLAYBITMAP, OWN_ATTR_LDBITMAP, cppu::UnoType<css::awt::XBitmap>::get(), css::beans::PropertyAttribute::READONLY, 0},
702 { UNO_NAME_LINKDISPLAYNAME, OWN_ATTR_LDNAME, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY, 0},
703 { u"Transformation", OWN_ATTR_TRANSFORMATION, cppu::UnoType<css::drawing::HomogenMatrix3>::get(), 0, 0 },
704 { u"MediaURL", OWN_ATTR_MEDIA_URL, cppu::UnoType<OUString>::get(), 0, 0},
705 { u"PreferredSize", OWN_ATTR_MEDIA_PREFERREDSIZE, cppu::UnoType<css::awt::Size>::get(), css::beans::PropertyAttribute::READONLY, 0},
706 { u"Loop", OWN_ATTR_MEDIA_LOOP, cppu::UnoType<sal_Bool>::get(), 0, 0},
707 { u"Mute", OWN_ATTR_MEDIA_MUTE, cppu::UnoType<sal_Bool>::get(), 0, 0},
708 { u"VolumeDB", OWN_ATTR_MEDIA_VOLUMEDB, cppu::UnoType<sal_Int16>::get(), 0, 0},
709 { u"Zoom", OWN_ATTR_MEDIA_ZOOM, cppu::UnoType<css::media::ZoomLevel>::get(), 0, 0},
710 { UNO_NAME_MISC_OBJ_MOVEPROTECT, SDRATTR_OBJMOVEPROTECT, cppu::UnoType<bool>::get(),0, 0},
711 { UNO_NAME_MISC_OBJ_SIZEPROTECT, SDRATTR_OBJSIZEPROTECT, cppu::UnoType<bool>::get(),0, 0},
712 { UNO_NAME_MISC_OBJ_BOUNDRECT, OWN_ATTR_BOUNDRECT, cppu::UnoType<css::awt::Rectangle>::get(), css::beans::PropertyAttribute::READONLY, 0},
713 { u"UINameSingular", OWN_ATTR_UINAME_SINGULAR , ::cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY, 0},
714 // #i68101#
715 { UNO_NAME_MISC_OBJ_TITLE, OWN_ATTR_MISC_OBJ_TITLE , cppu::UnoType<OUString>::get(), 0, 0},
716 { UNO_NAME_MISC_OBJ_DESCRIPTION, OWN_ATTR_MISC_OBJ_DESCRIPTION , cppu::UnoType<OUString>::get(), 0, 0},
717 { u"Decorative", OWN_ATTR_MISC_OBJ_DECORATIVE, ::cppu::UnoType<bool>::get(), 0, 0 },
718 {u"PrivateStream", OWN_ATTR_MEDIA_STREAM, cppu::UnoType<css::io::XInputStream>::get(), 0, 0},
719 {u"PrivateTempFileURL", OWN_ATTR_MEDIA_TEMPFILEURL, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY, 0},
720 { u"MediaMimeType", OWN_ATTR_MEDIA_MIMETYPE, cppu::UnoType<OUString>::get(), 0, 0},
721 { u"FallbackGraphic", OWN_ATTR_FALLBACK_GRAPHIC, cppu::UnoType<css::graphic::XGraphic>::get(), css::beans::PropertyAttribute::READONLY, 0},
722 { UNO_NAME_GRAPHOBJ_GRAPHIC, OWN_ATTR_VALUE_GRAPHIC , cppu::UnoType<css::graphic::XGraphic>::get(), 0, 0},
723 { UNO_NAME_GRAPHIC_GRAPHICCROP, SDRATTR_GRAFCROP , cppu::UnoType<css::text::GraphicCrop>::get(), 0, 0},
726 return aMediaShapePropertyMap_Impl;
729 static o3tl::span<SfxItemPropertyMapEntry const> ImplGetSvxTableShapePropertyMap()
731 static SfxItemPropertyMapEntry const aTableShapePropertyMap_Impl[] =
733 SHADOW_PROPERTIES
734 { UNO_NAME_MISC_OBJ_ZORDER, OWN_ATTR_ZORDER, cppu::UnoType<sal_Int32>::get(), 0, 0},
735 { UNO_NAME_MISC_OBJ_LAYERID, SDRATTR_LAYERID, cppu::UnoType<sal_Int16>::get(), 0, 0},
736 { UNO_NAME_MISC_OBJ_LAYERNAME, SDRATTR_LAYERNAME, cppu::UnoType<OUString>::get(), 0, 0},
737 { UNO_NAME_LINKDISPLAYBITMAP, OWN_ATTR_LDBITMAP, cppu::UnoType<css::awt::XBitmap>::get(), css::beans::PropertyAttribute::READONLY, 0},
738 { UNO_NAME_LINKDISPLAYNAME, OWN_ATTR_LDNAME, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY, 0},
739 { u"Transformation", OWN_ATTR_TRANSFORMATION, cppu::UnoType<css::drawing::HomogenMatrix3>::get(), 0, 0 },
740 { UNO_NAME_MISC_OBJ_MOVEPROTECT, SDRATTR_OBJMOVEPROTECT, cppu::UnoType<bool>::get(),0, 0},
741 { UNO_NAME_MISC_OBJ_SIZEPROTECT, SDRATTR_OBJSIZEPROTECT, cppu::UnoType<bool>::get(),0, 0},
742 { UNO_NAME_MISC_OBJ_BOUNDRECT, OWN_ATTR_BOUNDRECT, cppu::UnoType<css::awt::Rectangle>::get(), css::beans::PropertyAttribute::READONLY, 0},
743 { UNO_NAME_MISC_OBJ_NAME, SDRATTR_OBJECTNAME, cppu::UnoType<OUString>::get(), 0, 0},
744 { u"UINameSingular", OWN_ATTR_UINAME_SINGULAR , ::cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY, 0},
745 { UNO_NAME_MISC_OBJ_TITLE, OWN_ATTR_MISC_OBJ_TITLE , cppu::UnoType<OUString>::get(), 0, 0},
746 { UNO_NAME_MISC_OBJ_DESCRIPTION, OWN_ATTR_MISC_OBJ_DESCRIPTION , cppu::UnoType<OUString>::get(), 0, 0},
747 { u"Decorative", OWN_ATTR_MISC_OBJ_DECORATIVE, ::cppu::UnoType<bool>::get(), 0, 0 },
748 { u"Model", OWN_ATTR_OLEMODEL , cppu::UnoType<css::table::XTable>::get(), css::beans::PropertyAttribute::READONLY, 0},
749 { u"TableTemplate", OWN_ATTR_TABLETEMPLATE , cppu::UnoType<css::container::XIndexAccess>::get(), 0, 0},
750 { u"UseFirstRowStyle", OWN_ATTR_TABLETEMPLATE_FIRSTROW, cppu::UnoType<bool>::get(),0, 0},
751 { u"UseLastRowStyle", OWN_ATTR_TABLETEMPLATE_LASTROW, cppu::UnoType<bool>::get(),0, 0},
752 { u"UseFirstColumnStyle", OWN_ATTR_TABLETEMPLATE_FIRSTCOLUMN, cppu::UnoType<bool>::get(),0, 0},
753 { u"UseLastColumnStyle", OWN_ATTR_TABLETEMPLATE_LASTCOLUMN, cppu::UnoType<bool>::get(),0, 0},
754 { u"UseBandingRowStyle", OWN_ATTR_TABLETEMPLATE_BANDINGROWS, cppu::UnoType<bool>::get(),0, 0},
755 { u"UseBandingColumnStyle", OWN_ATTR_TABLETEMPLATE_BANDINGCOLUMNS, cppu::UnoType<bool>::get(),0, 0},
756 { u"ReplacementGraphic", OWN_ATTR_REPLACEMENT_GRAPHIC, cppu::UnoType<css::graphic::XGraphic>::get(), css::beans::PropertyAttribute::READONLY, 0},
759 return aTableShapePropertyMap_Impl;
762 static o3tl::span<comphelper::PropertyMapEntry const> ImplGetSvxDrawingDefaultsPropertyMap()
764 static comphelper::PropertyMapEntry const aSvxDrawingDefaultsPropertyMap_Impl[] =
766 GLOW_PROPERTIES
767 SOFTEDGE_PROPERTIES
768 SHADOW_PROPERTIES
769 LINE_PROPERTIES_DEFAULTS
770 FILL_PROPERTIES_BMP
771 FILL_PROPERTIES_DEFAULTS
772 EDGERADIUS_PROPERTIES
773 TEXT_PROPERTIES_DEFAULTS
774 CONNECTOR_PROPERTIES
775 SPECIAL_DIMENSIONING_PROPERTIES_DEFAULTS
776 MISC_3D_OBJ_PROPERTIES
777 SPECIAL_3DBACKSCALE_PROPERTIES
780 return aSvxDrawingDefaultsPropertyMap_Impl;
783 static o3tl::span<comphelper::PropertyMapEntry const> ImplGetAdditionalWriterDrawingDefaultsPropertyMap()
785 static comphelper::PropertyMapEntry const aSvxAdditionalDefaultsPropertyMap_Impl[] =
787 { "IsFollowingTextFlow", SID_SW_FOLLOW_TEXT_FLOW, cppu::UnoType<bool>::get(), 0, 0},
790 return aSvxAdditionalDefaultsPropertyMap_Impl;
793 typedef std::unordered_map< OUString, SdrObjKind > UHashMapImpl;
795 namespace {
797 const UHashMapImpl& GetUHashImpl()
799 static UHashMapImpl const aImpl
801 { "com.sun.star.drawing.RectangleShape", SdrObjKind::Rectangle },
802 { "com.sun.star.drawing.EllipseShape", SdrObjKind::CircleOrEllipse },
803 { "com.sun.star.drawing.ControlShape", SdrObjKind::UNO },
804 { "com.sun.star.drawing.ConnectorShape", SdrObjKind::Edge },
805 { "com.sun.star.drawing.MeasureShape", SdrObjKind::Measure },
806 { "com.sun.star.drawing.LineShape", SdrObjKind::Line },
807 { "com.sun.star.drawing.PolyPolygonShape", SdrObjKind::Polygon },
808 { "com.sun.star.drawing.PolyLineShape", SdrObjKind::PolyLine },
809 { "com.sun.star.drawing.OpenBezierShape", SdrObjKind::PathLine },
810 { "com.sun.star.drawing.ClosedBezierShape", SdrObjKind::PathFill },
811 { "com.sun.star.drawing.OpenFreeHandShape", SdrObjKind::FreehandLine },
812 { "com.sun.star.drawing.ClosedFreeHandShape", SdrObjKind::FreehandFill },
813 { "com.sun.star.drawing.PolyPolygonPathShape", SdrObjKind::PathPoly },
814 { "com.sun.star.drawing.PolyLinePathShape", SdrObjKind::PathPolyLine },
815 { "com.sun.star.drawing.GraphicObjectShape", SdrObjKind::Graphic },
816 { "com.sun.star.drawing.GroupShape", SdrObjKind::Group },
817 { "com.sun.star.drawing.TextShape", SdrObjKind::Text },
818 { "com.sun.star.drawing.OLE2Shape", SdrObjKind::OLE2 },
819 { "com.sun.star.drawing.PageShape", SdrObjKind::Page },
820 { "com.sun.star.drawing.CaptionShape", SdrObjKind::Caption },
821 { "com.sun.star.drawing.FrameShape", SdrObjKind::OLEPluginFrame },
822 { "com.sun.star.drawing.PluginShape", SdrObjKind::OLE2Plugin },
823 { "com.sun.star.drawing.AppletShape", SdrObjKind::OLE2Applet },
824 { "com.sun.star.drawing.CustomShape", SdrObjKind::CustomShape },
825 { "com.sun.star.drawing.MediaShape", SdrObjKind::Media },
827 { "com.sun.star.drawing.Shape3DSceneObject", SdrObjKind::E3D_Scene },
828 { "com.sun.star.drawing.Shape3DCubeObject", SdrObjKind::E3D_Cube },
829 { "com.sun.star.drawing.Shape3DSphereObject", SdrObjKind::E3D_Sphere },
830 { "com.sun.star.drawing.Shape3DLatheObject", SdrObjKind::E3D_Lathe },
831 { "com.sun.star.drawing.Shape3DExtrudeObject", SdrObjKind::E3D_Extrusion },
832 { "com.sun.star.drawing.Shape3DPolygonObject", SdrObjKind::E3D_Polygon },
835 return aImpl;
841 OUString UHashMap::getNameFromId(SdrObjKind nId)
843 const UHashMapImpl &rMap = GetUHashImpl();
845 auto it = std::find_if(rMap.begin(), rMap.end(),
846 [nId](const UHashMapImpl::value_type& rEntry) { return rEntry.second == nId; });
847 if (it != rMap.end())
848 return it->first;
849 SAL_WARN("svx", "[CL] unknown SdrObjKind identifier " << static_cast<int>(nId));
850 return OUString();
853 uno::Sequence< OUString > UHashMap::getServiceNames()
855 return comphelper::mapKeysToSequence( GetUHashImpl() );
858 std::optional<SdrObjKind> UHashMap::getId( const OUString& rCompareString )
860 const UHashMapImpl &rMap = GetUHashImpl();
861 UHashMapImpl::const_iterator it = rMap.find( rCompareString );
862 if( it == rMap.end() )
863 return {};
864 else
865 return it->second;
868 SvxUnoPropertyMapProvider& getSvxMapProvider()
870 static SvxUnoPropertyMapProvider theSvxMapProvider;
871 return theSvxMapProvider;
875 SvxUnoPropertyMapProvider::SvxUnoPropertyMapProvider()
877 for(sal_uInt16 i=0;i<SVXMAP_END; i++)
878 aSetArr[i] = nullptr;
881 SvxUnoPropertyMapProvider::~SvxUnoPropertyMapProvider()
886 o3tl::span<const SfxItemPropertyMapEntry> SvxUnoPropertyMapProvider::GetMap(sal_uInt16 nPropertyId)
888 assert(nPropertyId < SVXMAP_END);
889 if(aMapArr[nPropertyId].empty()) {
890 switch(nPropertyId) {
891 case SVXMAP_SHAPE: aMapArr[SVXMAP_SHAPE]=ImplGetSvxShapePropertyMap(); break;
892 case SVXMAP_CONNECTOR: aMapArr[SVXMAP_CONNECTOR]=ImplGetSvxConnectorPropertyMap(); break;
893 case SVXMAP_DIMENSIONING: aMapArr[SVXMAP_DIMENSIONING]=ImplGetSvxDimensioningPropertyMap(); break;
894 case SVXMAP_CIRCLE: aMapArr[SVXMAP_CIRCLE]=ImplGetSvxCirclePropertyMap(); break;
895 case SVXMAP_POLYPOLYGON: aMapArr[SVXMAP_POLYPOLYGON]=ImplGetSvxPolyPolygonPropertyMap(); break;
896 case SVXMAP_GRAPHICOBJECT: aMapArr[SVXMAP_GRAPHICOBJECT]=ImplGetSvxGraphicObjectPropertyMap(); break;
897 case SVXMAP_3DSCENEOBJECT: aMapArr[SVXMAP_3DSCENEOBJECT]=ImplGetSvx3DSceneObjectPropertyMap(); break;
898 case SVXMAP_3DCUBEOBJECT: aMapArr[SVXMAP_3DCUBEOBJECT]=ImplGetSvx3DCubeObjectPropertyMap(); break;
899 case SVXMAP_3DSPHEREOBJECT: aMapArr[SVXMAP_3DSPHEREOBJECT]=ImplGetSvx3DSphereObjectPropertyMap(); break;
900 case SVXMAP_3DLATHEOBJECT: aMapArr[SVXMAP_3DLATHEOBJECT]=ImplGetSvx3DLatheObjectPropertyMap(); break;
901 case SVXMAP_3DEXTRUDEOBJECT: aMapArr[SVXMAP_3DEXTRUDEOBJECT]=ImplGetSvx3DExtrudeObjectPropertyMap(); break;
902 case SVXMAP_3DPOLYGONOBJECT: aMapArr[SVXMAP_3DPOLYGONOBJECT]=ImplGetSvx3DPolygonObjectPropertyMap(); break;
903 case SVXMAP_ALL: aMapArr[SVXMAP_ALL]=ImplGetSvxAllPropertyMap(); break;
904 case SVXMAP_GROUP: aMapArr[SVXMAP_GROUP]=ImplGetSvxGroupPropertyMap(); break;
905 case SVXMAP_CAPTION: aMapArr[SVXMAP_CAPTION]=ImplGetSvxCaptionPropertyMap(); break;
906 case SVXMAP_OLE2: aMapArr[SVXMAP_OLE2]=ImplGetSvxOle2PropertyMap(); break;
907 case SVXMAP_PLUGIN: aMapArr[SVXMAP_PLUGIN]=ImplGetSvxPluginPropertyMap(); break;
908 case SVXMAP_FRAME: aMapArr[SVXMAP_FRAME]=ImplGetSvxFramePropertyMap(); break;
909 case SVXMAP_APPLET: aMapArr[SVXMAP_APPLET]=ImplGetSvxAppletPropertyMap(); break;
910 case SVXMAP_CONTROL: aMapArr[SVXMAP_CONTROL]=ImplGetSvxControlShapePropertyMap(); break;
911 case SVXMAP_TEXT: aMapArr[SVXMAP_TEXT]=ImplGetSvxTextShapePropertyMap(); break;
912 case SVXMAP_CUSTOMSHAPE: aMapArr[SVXMAP_CUSTOMSHAPE]=ImplGetSvxCustomShapePropertyMap(); break;
913 case SVXMAP_MEDIA: aMapArr[SVXMAP_MEDIA]=ImplGetSvxMediaShapePropertyMap(); break;
914 case SVXMAP_TABLE: aMapArr[SVXMAP_TABLE]=ImplGetSvxTableShapePropertyMap(); break;
915 case SVXMAP_PAGE: aMapArr[SVXMAP_PAGE] = ImplGetSvxPageShapePropertyMap(); break;
917 default:
918 OSL_FAIL( "Unknown property map for SvxUnoPropertyMapProvider!" );
920 // Sort(nPropertyId);
922 return aMapArr[nPropertyId];
924 const SvxItemPropertySet* SvxUnoPropertyMapProvider::GetPropertySet(sal_uInt16 nPropertyId, SfxItemPool& rPool)
926 if( !aSetArr[nPropertyId] )
927 aSetArr[nPropertyId].reset(new SvxItemPropertySet( GetMap( nPropertyId ), rPool ));
928 return aSetArr[nPropertyId].get();
931 /** maps the vcl MapUnit enum to an API constant MeasureUnit.
932 Returns false if conversion is not supported.
934 bool SvxMapUnitToMeasureUnit( const MapUnit eVcl, short& eApi ) noexcept
936 switch( eVcl )
938 case MapUnit::Map100thMM: eApi = util::MeasureUnit::MM_100TH; break;
939 case MapUnit::Map10thMM: eApi = util::MeasureUnit::MM_10TH; break;
940 case MapUnit::MapMM: eApi = util::MeasureUnit::MM; break;
941 case MapUnit::MapCM: eApi = util::MeasureUnit::CM; break;
942 case MapUnit::Map1000thInch: eApi = util::MeasureUnit::INCH_1000TH; break;
943 case MapUnit::Map100thInch: eApi = util::MeasureUnit::INCH_100TH; break;
944 case MapUnit::Map10thInch: eApi = util::MeasureUnit::INCH_10TH; break;
945 case MapUnit::MapInch: eApi = util::MeasureUnit::INCH; break;
946 case MapUnit::MapPoint: eApi = util::MeasureUnit::POINT; break;
947 case MapUnit::MapTwip: eApi = util::MeasureUnit::TWIP; break;
948 case MapUnit::MapRelative: eApi = util::MeasureUnit::PERCENT; break;
949 default:
950 return false;
953 return true;
956 /** maps the API constant MeasureUnit to a vcl MapUnit enum.
957 Returns false if conversion is not supported.
960 bool SvxMeasureUnitToFieldUnit( const short eApi, FieldUnit& eVcl ) noexcept
962 switch( eApi )
964 case util::MeasureUnit::MM: eVcl = FieldUnit::MM; break;
965 case util::MeasureUnit::CM: eVcl = FieldUnit::CM; break;
966 case util::MeasureUnit::M: eVcl = FieldUnit::M; break;
967 case util::MeasureUnit::KM: eVcl = FieldUnit::KM; break;
968 case util::MeasureUnit::TWIP: eVcl = FieldUnit::TWIP; break;
969 case util::MeasureUnit::POINT: eVcl = FieldUnit::POINT; break;
970 case util::MeasureUnit::PICA: eVcl = FieldUnit::PICA; break;
971 case util::MeasureUnit::INCH: eVcl = FieldUnit::INCH; break;
972 case util::MeasureUnit::FOOT: eVcl = FieldUnit::FOOT; break;
973 case util::MeasureUnit::MILE: eVcl = FieldUnit::MILE; break;
974 case util::MeasureUnit::PERCENT: eVcl = FieldUnit::PERCENT; break;
975 case util::MeasureUnit::MM_100TH: eVcl = FieldUnit::MM_100TH; break;
976 default:
977 return false;
980 return true;
983 /** maps the vcl MapUnit enum to an API constant MeasureUnit.
984 Returns false if conversion is not supported.
986 bool SvxFieldUnitToMeasureUnit( const FieldUnit eVcl, short& eApi ) noexcept
988 switch( eVcl )
990 case FieldUnit::MM: eApi = util::MeasureUnit::MM; break;
991 case FieldUnit::CM: eApi = util::MeasureUnit::CM; break;
992 case FieldUnit::M: eApi = util::MeasureUnit::M; break;
993 case FieldUnit::KM: eApi = util::MeasureUnit::KM; break;
994 case FieldUnit::TWIP: eApi = util::MeasureUnit::TWIP; break;
995 case FieldUnit::POINT: eApi = util::MeasureUnit::POINT; break;
996 case FieldUnit::PICA: eApi = util::MeasureUnit::PICA; break;
997 case FieldUnit::INCH: eApi = util::MeasureUnit::INCH; break;
998 case FieldUnit::FOOT: eApi = util::MeasureUnit::FOOT; break;
999 case FieldUnit::MILE: eApi = util::MeasureUnit::MILE; break;
1000 case FieldUnit::PERCENT: eApi = util::MeasureUnit::PERCENT; break;
1001 case FieldUnit::MM_100TH: eApi = util::MeasureUnit::MM_100TH; break;
1002 default:
1003 return false;
1006 return true;
1009 constexpr rtl::OUStringConstExpr RID_SVXSTR_BMP_DEF[] =
1011 RID_SVXSTR_BMP0_DEF,
1012 RID_SVXSTR_BMP1_DEF,
1013 RID_SVXSTR_BMP2_DEF,
1014 RID_SVXSTR_BMP3_DEF,
1015 RID_SVXSTR_BMP4_DEF,
1016 RID_SVXSTR_BMP5_DEF,
1017 RID_SVXSTR_BMP6_DEF,
1018 RID_SVXSTR_BMP7_DEF,
1019 RID_SVXSTR_BMP8_DEF,
1020 RID_SVXSTR_BMP9_DEF,
1021 RID_SVXSTR_BMP10_DEF,
1022 RID_SVXSTR_BMP11_DEF,
1023 RID_SVXSTR_BMP12_DEF,
1024 RID_SVXSTR_BMP13_DEF,
1025 RID_SVXSTR_BMP14_DEF,
1026 RID_SVXSTR_BMP15_DEF,
1027 RID_SVXSTR_BMP16_DEF,
1028 RID_SVXSTR_BMP17_DEF,
1029 RID_SVXSTR_BMP18_DEF,
1030 RID_SVXSTR_BMP19_DEF,
1031 RID_SVXSTR_BMP20_DEF,
1032 RID_SVXSTR_BMP21_DEF,
1033 RID_SVXSTR_BMP22_DEF,
1034 RID_SVXSTR_BMP23_DEF,
1035 RID_SVXSTR_BMP24_DEF,
1036 RID_SVXSTR_BMP25_DEF,
1037 RID_SVXSTR_BMP26_DEF,
1038 RID_SVXSTR_BMP27_DEF,
1039 RID_SVXSTR_BMP28_DEF,
1040 RID_SVXSTR_BMP29_DEF,
1041 RID_SVXSTR_BMP30_DEF,
1042 RID_SVXSTR_BMP31_DEF,
1043 RID_SVXSTR_BMP32_DEF,
1044 RID_SVXSTR_BMP33_DEF,
1045 RID_SVXSTR_BMP34_DEF,
1046 RID_SVXSTR_BMP35_DEF,
1047 RID_SVXSTR_BMP36_DEF,
1048 RID_SVXSTR_BMP37_DEF,
1049 RID_SVXSTR_BMP38_DEF,
1050 RID_SVXSTR_BMP39_DEF,
1051 RID_SVXSTR_BMP40_DEF,
1052 RID_SVXSTR_BMP41_DEF,
1053 RID_SVXSTR_BMP42_DEF,
1054 RID_SVXSTR_BMP43_DEF,
1055 RID_SVXSTR_BMP44_DEF,
1056 RID_SVXSTR_BMP45_DEF,
1057 RID_SVXSTR_BMP46_DEF,
1058 RID_SVXSTR_BMP47_DEF,
1059 RID_SVXSTR_BMP48_DEF,
1060 RID_SVXSTR_BMP49_DEF,
1061 RID_SVXSTR_BMP50_DEF,
1062 RID_SVXSTR_BMP51_DEF,
1063 RID_SVXSTR_BMP52_DEF,
1064 RID_SVXSTR_BMP53_DEF,
1065 RID_SVXSTR_BMP54_DEF,
1066 RID_SVXSTR_BMP55_DEF,
1067 RID_SVXSTR_BMP56_DEF,
1068 RID_SVXSTR_BMP57_DEF,
1069 RID_SVXSTR_BMP58_DEF,
1070 RID_SVXSTR_BMP59_DEF,
1071 RID_SVXSTR_BMP60_DEF,
1072 RID_SVXSTR_BMP61_DEF,
1073 RID_SVXSTR_BMP62_DEF,
1074 RID_SVXSTR_BMP63_DEF,
1075 RID_SVXSTR_BMP64_DEF,
1076 RID_SVXSTR_BMP65_DEF,
1077 RID_SVXSTR_BMP66_DEF,
1078 RID_SVXSTR_BMP67_DEF,
1079 RID_SVXSTR_BMP68_DEF,
1080 RID_SVXSTR_BMP69_DEF,
1081 RID_SVXSTR_BMP70_DEF,
1082 RID_SVXSTR_BMP71_DEF,
1083 RID_SVXSTR_BMP72_DEF,
1084 RID_SVXSTR_BMP73_DEF,
1085 RID_SVXSTR_BMP74_DEF,
1086 RID_SVXSTR_BMP75_DEF,
1087 RID_SVXSTR_BMP76_DEF,
1088 RID_SVXSTR_BMP77_DEF,
1089 RID_SVXSTR_BMP78_DEF,
1090 RID_SVXSTR_BMP79_DEF,
1091 RID_SVXSTR_BMP80_DEF,
1092 RID_SVXSTR_BMP81_DEF,
1093 RID_SVXSTR_BMP82_DEF,
1094 RID_SVXSTR_BMP83_DEF,
1095 RID_SVXSTR_BMP84_DEF,
1096 RID_SVXSTR_BMP85_DEF,
1097 RID_SVXSTR_BMP86_DEF,
1098 RID_SVXSTR_BMP87_DEF,
1099 RID_SVXSTR_BMP88_DEF,
1100 RID_SVXSTR_BMP89_DEF,
1101 RID_SVXSTR_BMP90_DEF,
1102 RID_SVXSTR_BMP91_DEF,
1103 RID_SVXSTR_BMP92_DEF
1106 const TranslateId RID_SVXSTR_BMP[] =
1108 RID_SVXSTR_BMP0,
1109 RID_SVXSTR_BMP1,
1110 RID_SVXSTR_BMP2,
1111 RID_SVXSTR_BMP3,
1112 RID_SVXSTR_BMP4,
1113 RID_SVXSTR_BMP5,
1114 RID_SVXSTR_BMP6,
1115 RID_SVXSTR_BMP7,
1116 RID_SVXSTR_BMP8,
1117 RID_SVXSTR_BMP9,
1118 RID_SVXSTR_BMP10,
1119 RID_SVXSTR_BMP11,
1120 RID_SVXSTR_BMP12,
1121 RID_SVXSTR_BMP13,
1122 RID_SVXSTR_BMP14,
1123 RID_SVXSTR_BMP15,
1124 RID_SVXSTR_BMP16,
1125 RID_SVXSTR_BMP17,
1126 RID_SVXSTR_BMP18,
1127 RID_SVXSTR_BMP19,
1128 RID_SVXSTR_BMP20,
1129 RID_SVXSTR_BMP21,
1130 RID_SVXSTR_BMP22,
1131 RID_SVXSTR_BMP23,
1132 RID_SVXSTR_BMP24,
1133 RID_SVXSTR_BMP25,
1134 RID_SVXSTR_BMP26,
1135 RID_SVXSTR_BMP27,
1136 RID_SVXSTR_BMP28,
1137 RID_SVXSTR_BMP29,
1138 RID_SVXSTR_BMP30,
1139 RID_SVXSTR_BMP31,
1140 RID_SVXSTR_BMP32,
1141 RID_SVXSTR_BMP33,
1142 RID_SVXSTR_BMP34,
1143 RID_SVXSTR_BMP35,
1144 RID_SVXSTR_BMP36,
1145 RID_SVXSTR_BMP37,
1146 RID_SVXSTR_BMP38,
1147 RID_SVXSTR_BMP39,
1148 RID_SVXSTR_BMP40,
1149 RID_SVXSTR_BMP41,
1150 RID_SVXSTR_BMP42,
1151 RID_SVXSTR_BMP43,
1152 RID_SVXSTR_BMP44,
1153 RID_SVXSTR_BMP45,
1154 RID_SVXSTR_BMP46,
1155 RID_SVXSTR_BMP47,
1156 RID_SVXSTR_BMP48,
1157 RID_SVXSTR_BMP49,
1158 RID_SVXSTR_BMP50,
1159 RID_SVXSTR_BMP51,
1160 RID_SVXSTR_BMP52,
1161 RID_SVXSTR_BMP53,
1162 RID_SVXSTR_BMP54,
1163 RID_SVXSTR_BMP55,
1164 RID_SVXSTR_BMP56,
1165 RID_SVXSTR_BMP57,
1166 RID_SVXSTR_BMP58,
1167 RID_SVXSTR_BMP59,
1168 RID_SVXSTR_BMP60,
1169 RID_SVXSTR_BMP61,
1170 RID_SVXSTR_BMP62,
1171 RID_SVXSTR_BMP63,
1172 RID_SVXSTR_BMP64,
1173 RID_SVXSTR_BMP65,
1174 RID_SVXSTR_BMP66,
1175 RID_SVXSTR_BMP67,
1176 RID_SVXSTR_BMP68,
1177 RID_SVXSTR_BMP69,
1178 RID_SVXSTR_BMP70,
1179 RID_SVXSTR_BMP71,
1180 RID_SVXSTR_BMP72,
1181 RID_SVXSTR_BMP73,
1182 RID_SVXSTR_BMP74,
1183 RID_SVXSTR_BMP75,
1184 RID_SVXSTR_BMP76,
1185 RID_SVXSTR_BMP77,
1186 RID_SVXSTR_BMP78,
1187 RID_SVXSTR_BMP79,
1188 RID_SVXSTR_BMP80,
1189 RID_SVXSTR_BMP81,
1190 RID_SVXSTR_BMP82,
1191 RID_SVXSTR_BMP83,
1192 RID_SVXSTR_BMP84,
1193 RID_SVXSTR_BMP85,
1194 RID_SVXSTR_BMP86,
1195 RID_SVXSTR_BMP87,
1196 RID_SVXSTR_BMP88,
1197 RID_SVXSTR_BMP89,
1198 RID_SVXSTR_BMP90,
1199 RID_SVXSTR_BMP91,
1200 RID_SVXSTR_BMP92
1203 constexpr rtl::OUStringConstExpr RID_SVXSTR_DASH_DEF[] =
1205 RID_SVXSTR_DASH0_DEF,
1206 RID_SVXSTR_DASH1_DEF,
1207 RID_SVXSTR_DASH2_DEF,
1208 RID_SVXSTR_DASH3_DEF,
1209 RID_SVXSTR_DASH4_DEF,
1210 RID_SVXSTR_DASH5_DEF,
1211 RID_SVXSTR_DASH6_DEF,
1212 RID_SVXSTR_DASH7_DEF,
1213 RID_SVXSTR_DASH8_DEF,
1214 RID_SVXSTR_DASH9_DEF,
1215 RID_SVXSTR_DASH10_DEF,
1216 RID_SVXSTR_DASH11_DEF,
1217 RID_SVXSTR_DASH12_DEF,
1218 RID_SVXSTR_DASH13_DEF,
1219 RID_SVXSTR_DASH14_DEF,
1220 RID_SVXSTR_DASH15_DEF,
1221 RID_SVXSTR_DASH16_DEF,
1222 RID_SVXSTR_DASH17_DEF,
1223 RID_SVXSTR_DASH18_DEF,
1224 RID_SVXSTR_DASH19_DEF,
1225 RID_SVXSTR_DASH20_DEF,
1226 RID_SVXSTR_DASH21_DEF,
1227 RID_SVXSTR_DASH22_DEF,
1228 RID_SVXSTR_DASH23_DEF,
1229 RID_SVXSTR_DASH24_DEF,
1230 RID_SVXSTR_DASH25_DEF,
1231 RID_SVXSTR_DASH26_DEF,
1232 RID_SVXSTR_DASH27_DEF,
1233 RID_SVXSTR_DASH28_DEF,
1234 RID_SVXSTR_DASH29_DEF,
1235 RID_SVXSTR_DASH30_DEF
1239 const TranslateId RID_SVXSTR_DASH[] =
1241 RID_SVXSTR_DASH0,
1242 RID_SVXSTR_DASH1,
1243 RID_SVXSTR_DASH2,
1244 RID_SVXSTR_DASH3,
1245 RID_SVXSTR_DASH4,
1246 RID_SVXSTR_DASH5,
1247 RID_SVXSTR_DASH6,
1248 RID_SVXSTR_DASH7,
1249 RID_SVXSTR_DASH8,
1250 RID_SVXSTR_DASH9,
1251 RID_SVXSTR_DASH10,
1252 RID_SVXSTR_DASH11,
1253 RID_SVXSTR_DASH12,
1254 RID_SVXSTR_DASH13,
1255 RID_SVXSTR_DASH14,
1256 RID_SVXSTR_DASH15,
1257 RID_SVXSTR_DASH16,
1258 RID_SVXSTR_DASH17,
1259 RID_SVXSTR_DASH18,
1260 RID_SVXSTR_DASH19,
1261 RID_SVXSTR_DASH20,
1262 RID_SVXSTR_DASH21,
1263 RID_SVXSTR_DASH22,
1264 RID_SVXSTR_DASH23,
1265 RID_SVXSTR_DASH24,
1266 RID_SVXSTR_DASH25,
1267 RID_SVXSTR_DASH26,
1268 RID_SVXSTR_DASH27,
1269 RID_SVXSTR_DASH28,
1270 RID_SVXSTR_DASH29,
1271 RID_SVXSTR_DASH30
1274 constexpr rtl::OUStringConstExpr RID_SVXSTR_LEND_DEF[] =
1276 RID_SVXSTR_LEND0_DEF,
1277 RID_SVXSTR_LEND1_DEF,
1278 RID_SVXSTR_LEND2_DEF,
1279 RID_SVXSTR_LEND3_DEF,
1280 RID_SVXSTR_LEND4_DEF,
1281 RID_SVXSTR_LEND5_DEF,
1282 RID_SVXSTR_LEND6_DEF,
1283 RID_SVXSTR_LEND7_DEF,
1284 RID_SVXSTR_LEND8_DEF,
1285 RID_SVXSTR_LEND9_DEF,
1286 RID_SVXSTR_LEND10_DEF,
1287 RID_SVXSTR_LEND11_DEF,
1288 RID_SVXSTR_LEND12_DEF,
1289 RID_SVXSTR_LEND13_DEF,
1290 RID_SVXSTR_LEND14_DEF,
1291 RID_SVXSTR_LEND15_DEF,
1292 RID_SVXSTR_LEND16_DEF,
1293 RID_SVXSTR_LEND17_DEF,
1294 RID_SVXSTR_LEND18_DEF,
1295 RID_SVXSTR_LEND19_DEF,
1296 RID_SVXSTR_LEND20_DEF,
1297 RID_SVXSTR_LEND21_DEF,
1298 RID_SVXSTR_LEND22_DEF,
1299 RID_SVXSTR_LEND23_DEF,
1300 RID_SVXSTR_LEND24_DEF,
1301 RID_SVXSTR_LEND25_DEF,
1302 RID_SVXSTR_LEND26_DEF,
1303 RID_SVXSTR_LEND27_DEF,
1304 RID_SVXSTR_LEND28_DEF,
1305 RID_SVXSTR_LEND29_DEF,
1306 RID_SVXSTR_LEND30_DEF,
1307 RID_SVXSTR_LEND31_DEF
1310 const TranslateId RID_SVXSTR_LEND[] =
1312 RID_SVXSTR_LEND0,
1313 RID_SVXSTR_LEND1,
1314 RID_SVXSTR_LEND2,
1315 RID_SVXSTR_LEND3,
1316 RID_SVXSTR_LEND4,
1317 RID_SVXSTR_LEND5,
1318 RID_SVXSTR_LEND6,
1319 RID_SVXSTR_LEND7,
1320 RID_SVXSTR_LEND8,
1321 RID_SVXSTR_LEND9,
1322 RID_SVXSTR_LEND10,
1323 RID_SVXSTR_LEND11,
1324 RID_SVXSTR_LEND12,
1325 RID_SVXSTR_LEND13,
1326 RID_SVXSTR_LEND14,
1327 RID_SVXSTR_LEND15,
1328 RID_SVXSTR_LEND16,
1329 RID_SVXSTR_LEND17,
1330 RID_SVXSTR_LEND18,
1331 RID_SVXSTR_LEND19,
1332 RID_SVXSTR_LEND20,
1333 RID_SVXSTR_LEND21,
1334 RID_SVXSTR_LEND22,
1335 RID_SVXSTR_LEND23,
1336 RID_SVXSTR_LEND24,
1337 RID_SVXSTR_LEND25,
1338 RID_SVXSTR_LEND26,
1339 RID_SVXSTR_LEND27,
1340 RID_SVXSTR_LEND28,
1341 RID_SVXSTR_LEND29,
1342 RID_SVXSTR_LEND30,
1343 RID_SVXSTR_LEND31
1346 constexpr rtl::OUStringConstExpr RID_SVXSTR_GRDT_DEF[] =
1348 RID_SVXSTR_GRDT0_DEF,
1349 RID_SVXSTR_GRDT1_DEF,
1350 RID_SVXSTR_GRDT2_DEF,
1351 RID_SVXSTR_GRDT3_DEF,
1352 RID_SVXSTR_GRDT4_DEF,
1353 RID_SVXSTR_GRDT5_DEF,
1354 RID_SVXSTR_GRDT6_DEF,
1355 RID_SVXSTR_GRDT7_DEF,
1356 RID_SVXSTR_GRDT8_DEF,
1357 RID_SVXSTR_GRDT9_DEF,
1358 RID_SVXSTR_GRDT10_DEF,
1359 RID_SVXSTR_GRDT11_DEF,
1360 RID_SVXSTR_GRDT12_DEF,
1361 RID_SVXSTR_GRDT13_DEF,
1362 RID_SVXSTR_GRDT14_DEF,
1363 RID_SVXSTR_GRDT15_DEF,
1364 RID_SVXSTR_GRDT16_DEF,
1365 RID_SVXSTR_GRDT17_DEF,
1366 RID_SVXSTR_GRDT18_DEF,
1367 RID_SVXSTR_GRDT19_DEF,
1368 RID_SVXSTR_GRDT20_DEF,
1369 RID_SVXSTR_GRDT21_DEF,
1370 RID_SVXSTR_GRDT22_DEF,
1371 RID_SVXSTR_GRDT23_DEF,
1372 RID_SVXSTR_GRDT24_DEF,
1373 RID_SVXSTR_GRDT25_DEF,
1374 RID_SVXSTR_GRDT26_DEF,
1375 RID_SVXSTR_GRDT27_DEF,
1376 RID_SVXSTR_GRDT28_DEF,
1377 RID_SVXSTR_GRDT29_DEF,
1378 RID_SVXSTR_GRDT30_DEF,
1379 RID_SVXSTR_GRDT31_DEF,
1380 RID_SVXSTR_GRDT32_DEF,
1381 RID_SVXSTR_GRDT33_DEF,
1382 RID_SVXSTR_GRDT34_DEF,
1383 RID_SVXSTR_GRDT35_DEF,
1384 RID_SVXSTR_GRDT36_DEF,
1385 RID_SVXSTR_GRDT37_DEF,
1386 RID_SVXSTR_GRDT38_DEF,
1387 RID_SVXSTR_GRDT39_DEF,
1388 RID_SVXSTR_GRDT40_DEF,
1389 RID_SVXSTR_GRDT41_DEF,
1390 RID_SVXSTR_GRDT42_DEF,
1391 RID_SVXSTR_GRDT43_DEF,
1392 RID_SVXSTR_GRDT44_DEF,
1393 RID_SVXSTR_GRDT45_DEF,
1394 RID_SVXSTR_GRDT46_DEF,
1395 RID_SVXSTR_GRDT47_DEF,
1396 RID_SVXSTR_GRDT48_DEF,
1397 RID_SVXSTR_GRDT49_DEF,
1398 RID_SVXSTR_GRDT50_DEF,
1399 RID_SVXSTR_GRDT51_DEF,
1400 RID_SVXSTR_GRDT52_DEF,
1401 RID_SVXSTR_GRDT53_DEF,
1402 RID_SVXSTR_GRDT54_DEF,
1403 RID_SVXSTR_GRDT55_DEF,
1404 RID_SVXSTR_GRDT56_DEF,
1405 RID_SVXSTR_GRDT57_DEF,
1406 RID_SVXSTR_GRDT58_DEF,
1407 RID_SVXSTR_GRDT59_DEF,
1408 RID_SVXSTR_GRDT60_DEF,
1409 RID_SVXSTR_GRDT61_DEF,
1410 RID_SVXSTR_GRDT62_DEF,
1411 RID_SVXSTR_GRDT63_DEF,
1412 RID_SVXSTR_GRDT64_DEF,
1413 RID_SVXSTR_GRDT65_DEF,
1414 RID_SVXSTR_GRDT66_DEF,
1415 RID_SVXSTR_GRDT67_DEF,
1416 RID_SVXSTR_GRDT68_DEF,
1417 RID_SVXSTR_GRDT69_DEF,
1418 RID_SVXSTR_GRDT70_DEF,
1419 RID_SVXSTR_GRDT71_DEF,
1420 RID_SVXSTR_GRDT72_DEF,
1421 RID_SVXSTR_GRDT73_DEF,
1422 RID_SVXSTR_GRDT74_DEF,
1423 RID_SVXSTR_GRDT75_DEF,
1424 RID_SVXSTR_GRDT76_DEF,
1425 RID_SVXSTR_GRDT77_DEF,
1426 RID_SVXSTR_GRDT78_DEF,
1427 RID_SVXSTR_GRDT79_DEF,
1428 RID_SVXSTR_GRDT80_DEF,
1429 RID_SVXSTR_GRDT81_DEF,
1430 RID_SVXSTR_GRDT82_DEF,
1431 RID_SVXSTR_GRDT83_DEF,
1432 RID_SVXSTR_GRDT84_DEF
1435 const TranslateId RID_SVXSTR_GRDT[] =
1437 RID_SVXSTR_GRDT0,
1438 RID_SVXSTR_GRDT1,
1439 RID_SVXSTR_GRDT2,
1440 RID_SVXSTR_GRDT3,
1441 RID_SVXSTR_GRDT4,
1442 RID_SVXSTR_GRDT5,
1443 RID_SVXSTR_GRDT6,
1444 RID_SVXSTR_GRDT7,
1445 RID_SVXSTR_GRDT8,
1446 RID_SVXSTR_GRDT9,
1447 RID_SVXSTR_GRDT10,
1448 RID_SVXSTR_GRDT11,
1449 RID_SVXSTR_GRDT12,
1450 RID_SVXSTR_GRDT13,
1451 RID_SVXSTR_GRDT14,
1452 RID_SVXSTR_GRDT15,
1453 RID_SVXSTR_GRDT16,
1454 RID_SVXSTR_GRDT17,
1455 RID_SVXSTR_GRDT18,
1456 RID_SVXSTR_GRDT19,
1457 RID_SVXSTR_GRDT20,
1458 RID_SVXSTR_GRDT21,
1459 RID_SVXSTR_GRDT22,
1460 RID_SVXSTR_GRDT23,
1461 RID_SVXSTR_GRDT24,
1462 RID_SVXSTR_GRDT25,
1463 RID_SVXSTR_GRDT26,
1464 RID_SVXSTR_GRDT27,
1465 RID_SVXSTR_GRDT28,
1466 RID_SVXSTR_GRDT29,
1467 RID_SVXSTR_GRDT30,
1468 RID_SVXSTR_GRDT31,
1469 RID_SVXSTR_GRDT32,
1470 RID_SVXSTR_GRDT33,
1471 RID_SVXSTR_GRDT34,
1472 RID_SVXSTR_GRDT35,
1473 RID_SVXSTR_GRDT36,
1474 RID_SVXSTR_GRDT37,
1475 RID_SVXSTR_GRDT38,
1476 RID_SVXSTR_GRDT39,
1477 RID_SVXSTR_GRDT40,
1478 RID_SVXSTR_GRDT41,
1479 RID_SVXSTR_GRDT42,
1480 RID_SVXSTR_GRDT43,
1481 RID_SVXSTR_GRDT44,
1482 RID_SVXSTR_GRDT45,
1483 RID_SVXSTR_GRDT46,
1484 RID_SVXSTR_GRDT47,
1485 RID_SVXSTR_GRDT48,
1486 RID_SVXSTR_GRDT49,
1487 RID_SVXSTR_GRDT50,
1488 RID_SVXSTR_GRDT51,
1489 RID_SVXSTR_GRDT52,
1490 RID_SVXSTR_GRDT53,
1491 RID_SVXSTR_GRDT54,
1492 RID_SVXSTR_GRDT55,
1493 RID_SVXSTR_GRDT56,
1494 RID_SVXSTR_GRDT57,
1495 RID_SVXSTR_GRDT58,
1496 RID_SVXSTR_GRDT59,
1497 RID_SVXSTR_GRDT60,
1498 RID_SVXSTR_GRDT61,
1499 RID_SVXSTR_GRDT62,
1500 RID_SVXSTR_GRDT63,
1501 RID_SVXSTR_GRDT64,
1502 RID_SVXSTR_GRDT65,
1503 RID_SVXSTR_GRDT66,
1504 RID_SVXSTR_GRDT67,
1505 RID_SVXSTR_GRDT68,
1506 RID_SVXSTR_GRDT69,
1507 RID_SVXSTR_GRDT70,
1508 RID_SVXSTR_GRDT71,
1509 RID_SVXSTR_GRDT72,
1510 RID_SVXSTR_GRDT73,
1511 RID_SVXSTR_GRDT74,
1512 RID_SVXSTR_GRDT75,
1513 RID_SVXSTR_GRDT76,
1514 RID_SVXSTR_GRDT77,
1515 RID_SVXSTR_GRDT78,
1516 RID_SVXSTR_GRDT79,
1517 RID_SVXSTR_GRDT80,
1518 RID_SVXSTR_GRDT81,
1519 RID_SVXSTR_GRDT82,
1520 RID_SVXSTR_GRDT83,
1521 RID_SVXSTR_GRDT84
1524 constexpr rtl::OUStringConstExpr RID_SVXSTR_HATCHS_DEF[] =
1526 RID_SVXSTR_HATCH0_DEF,
1527 RID_SVXSTR_HATCH1_DEF,
1528 RID_SVXSTR_HATCH2_DEF,
1529 RID_SVXSTR_HATCH3_DEF,
1530 RID_SVXSTR_HATCH4_DEF,
1531 RID_SVXSTR_HATCH5_DEF,
1532 RID_SVXSTR_HATCH6_DEF,
1533 RID_SVXSTR_HATCH7_DEF,
1534 RID_SVXSTR_HATCH8_DEF,
1535 RID_SVXSTR_HATCH9_DEF,
1536 RID_SVXSTR_HATCH10_DEF,
1537 RID_SVXSTR_HATCH11_DEF,
1538 RID_SVXSTR_HATCH12_DEF,
1539 RID_SVXSTR_HATCH13_DEF,
1540 RID_SVXSTR_HATCH14_DEF,
1541 RID_SVXSTR_HATCH15_DEF
1544 const TranslateId RID_SVXSTR_HATCHS[] =
1546 RID_SVXSTR_HATCH0,
1547 RID_SVXSTR_HATCH1,
1548 RID_SVXSTR_HATCH2,
1549 RID_SVXSTR_HATCH3,
1550 RID_SVXSTR_HATCH4,
1551 RID_SVXSTR_HATCH5,
1552 RID_SVXSTR_HATCH6,
1553 RID_SVXSTR_HATCH7,
1554 RID_SVXSTR_HATCH8,
1555 RID_SVXSTR_HATCH9,
1556 RID_SVXSTR_HATCH10,
1557 RID_SVXSTR_HATCH11,
1558 RID_SVXSTR_HATCH12,
1559 RID_SVXSTR_HATCH13,
1560 RID_SVXSTR_HATCH14,
1561 RID_SVXSTR_HATCH15
1564 constexpr rtl::OUStringConstExpr RID_SVXSTR_TRASNGR_DEF[] =
1566 RID_SVXSTR_TRASNGR0_DEF
1569 const TranslateId RID_SVXSTR_TRASNGR[] =
1571 RID_SVXSTR_TRASNGR0
1574 static bool SvxUnoGetResourceRanges( const sal_uInt16 nWhich, const rtl::OUStringConstExpr*& pApiResIds, const TranslateId*& pIntResIds, int& nCount ) noexcept
1576 switch( nWhich )
1578 case XATTR_FILLBITMAP:
1579 pApiResIds = RID_SVXSTR_BMP_DEF;
1580 pIntResIds = RID_SVXSTR_BMP;
1581 nCount = SAL_N_ELEMENTS(RID_SVXSTR_BMP_DEF);
1582 break;
1583 case XATTR_LINEDASH:
1584 pApiResIds = RID_SVXSTR_DASH_DEF;
1585 pIntResIds = RID_SVXSTR_DASH;
1586 nCount = SAL_N_ELEMENTS(RID_SVXSTR_DASH_DEF);
1587 break;
1589 case XATTR_LINESTART:
1590 case XATTR_LINEEND:
1591 pApiResIds = RID_SVXSTR_LEND_DEF;
1592 pIntResIds = RID_SVXSTR_LEND;
1593 nCount = SAL_N_ELEMENTS(RID_SVXSTR_LEND_DEF);
1594 break;
1596 case XATTR_FILLGRADIENT:
1597 pApiResIds = RID_SVXSTR_GRDT_DEF;
1598 pIntResIds = RID_SVXSTR_GRDT;
1599 nCount = SAL_N_ELEMENTS(RID_SVXSTR_GRDT_DEF);
1600 break;
1602 case XATTR_FILLHATCH:
1603 pApiResIds = RID_SVXSTR_HATCHS_DEF;
1604 pIntResIds = RID_SVXSTR_HATCHS;
1605 nCount = SAL_N_ELEMENTS(RID_SVXSTR_HATCHS_DEF);
1606 break;
1608 case XATTR_FILLFLOATTRANSPARENCE:
1609 pApiResIds = RID_SVXSTR_TRASNGR_DEF;
1610 pIntResIds = RID_SVXSTR_TRASNGR;
1611 nCount = SAL_N_ELEMENTS(RID_SVXSTR_TRASNGR_DEF);
1612 break;
1614 default:
1615 return false;
1617 return true;
1620 /// @throws std::exception
1621 static bool SvxUnoConvertResourceStringToApi(const TranslateId* pSourceResIds, const rtl::OUStringConstExpr* pDestResIds, int nCount, OUString& rString)
1623 // first, calculate the search string length without an optional number after the name
1624 sal_Int32 nLength = rString.getLength();
1625 while( nLength > 0 )
1627 const sal_Unicode nChar = rString[ nLength - 1 ];
1628 if( (nChar < '0') || (nChar > '9') )
1629 break;
1631 nLength--;
1634 // if we cut off a number, also cut of some spaces
1635 if( nLength != rString.getLength() )
1637 while( nLength > 0 )
1639 const sal_Unicode nChar = rString[ nLength - 1 ];
1640 if( nChar != ' ' )
1641 break;
1643 nLength--;
1647 const std::u16string_view aShortString( rString.subView( 0, nLength ) );
1649 for (int i = 0; i < nCount; ++i)
1651 const OUString & aCompare = SvxResId(pSourceResIds[i]);
1652 if( aShortString == aCompare )
1654 rString = rString.replaceAt( 0, aShortString.size(), OUString(pDestResIds[i]) );
1655 return true;
1657 else if( rString == aCompare )
1659 rString = pDestResIds[i];
1660 return true;
1664 return false;
1667 static bool SvxUnoConvertResourceStringFromApi(const rtl::OUStringConstExpr* pSourceResIds, const TranslateId* pDestResIds, int nCount, OUString& rString)
1669 // first, calculate the search string length without an optional number after the name
1670 sal_Int32 nLength = rString.getLength();
1671 while( nLength > 0 )
1673 const sal_Unicode nChar = rString[ nLength - 1 ];
1674 if( (nChar < '0') || (nChar > '9') )
1675 break;
1677 nLength--;
1680 // if we cut off a number, also cut of some spaces
1681 if( nLength != rString.getLength() )
1683 while( nLength > 0 )
1685 const sal_Unicode nChar = rString[ nLength - 1 ];
1686 if( nChar != ' ' )
1687 break;
1689 nLength--;
1693 const std::u16string_view aShortString( rString.subView( 0, nLength ) );
1695 for (int i = 0; i < nCount; ++i)
1697 auto pCompare = pSourceResIds[i];
1698 if( aShortString == pCompare.asView() )
1700 rString = rString.replaceAt( 0, aShortString.size(), SvxResId(pDestResIds[i]) );
1701 return true;
1703 else if( rString == pCompare )
1705 rString = SvxResId(pDestResIds[i]);
1706 return true;
1710 return false;
1713 // #i122649# Some comments on the below arrays:
1714 // - They need to have the same order and count of items
1715 // - They are used to translate between translated and non-translated color names
1716 // - To make longer names be found which start with the same basic string,
1717 // these have to be in front of others
1719 // It would be nice to:
1720 // - evtl. organize these in a single array with 2-dimensional inner to eliminate
1721 // the possibility to define it wrong
1722 // - change the compare to also work when a shorter name is in front of a longer one
1724 constexpr rtl::OUStringConstExpr SvxUnoColorNameDefResId[] =
1726 RID_SVXSTR_COLOR_BLUEGREY_DEF,
1727 RID_SVXSTR_COLOR_BLACK_DEF,
1728 RID_SVXSTR_COLOR_BLUE_CLASSIC_DEF,
1729 RID_SVXSTR_COLOR_BLUE_DEF,
1730 RID_SVXSTR_COLOR_GREEN_DEF,
1731 RID_SVXSTR_COLOR_RED_DEF,
1732 RID_SVXSTR_COLOR_MAGENTA_DEF,
1733 RID_SVXSTR_COLOR_GREY_DEF,
1734 RID_SVXSTR_COLOR_YELLOWGREEN_DEF,
1735 RID_SVXSTR_COLOR_YELLOW_DEF,
1736 RID_SVXSTR_COLOR_WHITE_DEF,
1737 RID_SVXSTR_COLOR_ORANGE_DEF,
1738 RID_SVXSTR_COLOR_BORDEAUX_DEF,
1739 RID_SVXSTR_COLOR_PALE_YELLOW_DEF,
1740 RID_SVXSTR_COLOR_PALE_GREEN_DEF,
1741 RID_SVXSTR_COLOR_DARKVIOLET_DEF,
1742 RID_SVXSTR_COLOR_SALMON_DEF,
1743 RID_SVXSTR_COLOR_SEABLUE_DEF,
1744 RID_SVXSTR_COLOR_CHART_DEF,
1745 RID_SVXSTR_COLOR_PURPLE_DEF,
1746 RID_SVXSTR_COLOR_SKYBLUE_DEF,
1747 RID_SVXSTR_COLOR_PINK_DEF,
1748 RID_SVXSTR_COLOR_TURQUOISE_DEF,
1749 RID_SVXSTR_COLOR_GOLD_DEF,
1750 RID_SVXSTR_COLOR_BRICK_DEF,
1751 RID_SVXSTR_COLOR_INDIGO_DEF,
1752 RID_SVXSTR_COLOR_TEAL_DEF,
1753 RID_SVXSTR_COLOR_LIME_DEF,
1754 RID_SVXSTR_COLOR_LIGHTGRAY_DEF,
1755 RID_SVXSTR_COLOR_LIGHTYELLOW_DEF,
1756 RID_SVXSTR_COLOR_LIGHTGOLD_DEF,
1757 RID_SVXSTR_COLOR_LIGHTORANGE_DEF,
1758 RID_SVXSTR_COLOR_LIGHTBRICK_DEF,
1759 RID_SVXSTR_COLOR_LIGHTRED_DEF,
1760 RID_SVXSTR_COLOR_LIGHTMAGENTA_DEF,
1761 RID_SVXSTR_COLOR_LIGHTPURPLE_DEF,
1762 RID_SVXSTR_COLOR_LIGHTINDIGO_DEF,
1763 RID_SVXSTR_COLOR_LIGHTBLUE_DEF,
1764 RID_SVXSTR_COLOR_LIGHTTEAL_DEF,
1765 RID_SVXSTR_COLOR_LIGHTGREEN_DEF,
1766 RID_SVXSTR_COLOR_LIGHTLIME_DEF,
1767 RID_SVXSTR_COLOR_DARKGRAY_DEF,
1768 RID_SVXSTR_COLOR_DARKYELLOW_DEF,
1769 RID_SVXSTR_COLOR_DARKGOLD_DEF,
1770 RID_SVXSTR_COLOR_DARKORANGE_DEF,
1771 RID_SVXSTR_COLOR_DARKBRICK_DEF,
1772 RID_SVXSTR_COLOR_DARKRED_DEF,
1773 RID_SVXSTR_COLOR_DARKMAGENTA_DEF,
1774 RID_SVXSTR_COLOR_DARKPURPLE_DEF,
1775 RID_SVXSTR_COLOR_DARKINDIGO_DEF,
1776 RID_SVXSTR_COLOR_DARKBLUE_DEF,
1777 RID_SVXSTR_COLOR_DARKTEAL_DEF,
1778 RID_SVXSTR_COLOR_DARKGREEN_DEF,
1779 RID_SVXSTR_COLOR_DARKLIME_DEF,
1780 RID_SVXSTR_COLOR_VIOLET_DEF,
1781 RID_SVXSTR_COLOR_VIOLET_OUG_DEF,
1782 RID_SVXSTR_COLOR_BLUE_OUG_DEF,
1783 RID_SVXSTR_COLOR_AZURE_OUG_DEF,
1784 RID_SVXSTR_COLOR_SPRINGGREEN_OUG_DEF,
1785 RID_SVXSTR_COLOR_GREEN_OUG_DEF,
1786 RID_SVXSTR_COLOR_CHARTREUSEGREEN_OUG_DEF,
1787 RID_SVXSTR_COLOR_ORANGE_OUG_DEF,
1788 RID_SVXSTR_COLOR_RED_OUG_DEF,
1789 RID_SVXSTR_COLOR_ROSE_OUG_DEF,
1790 RID_SVXSTR_COLOR_AZURE_DEF,
1791 RID_SVXSTR_COLOR_CYAN_DEF,
1792 RID_SVXSTR_COLOR_SPRINGGREEN_DEF,
1793 RID_SVXSTR_COLOR_CHARTREUSEGREEN_DEF,
1794 RID_SVXSTR_COLOR_ROSE_DEF,
1795 RID_SVXSTR_COLOR_MATERIAL_GRAY_A_DEF,
1796 RID_SVXSTR_COLOR_MATERIAL_YELLOW_A_DEF,
1797 RID_SVXSTR_COLOR_MATERIAL_AMBER_A_DEF,
1798 RID_SVXSTR_COLOR_MATERIAL_AMBER_DEF,
1799 RID_SVXSTR_COLOR_MATERIAL_ORANGE_A_DEF,
1800 RID_SVXSTR_COLOR_MATERIAL_DEEP_ORANGE_A_DEF,
1801 RID_SVXSTR_COLOR_MATERIAL_DEEP_ORANGE_DEF,
1802 RID_SVXSTR_COLOR_MATERIAL_RED_A_DEF,
1803 RID_SVXSTR_COLOR_MATERIAL_PINK_A_DEF,
1804 RID_SVXSTR_COLOR_MATERIAL_PURPLE_A_DEF,
1805 RID_SVXSTR_COLOR_MATERIAL_DEEP_PURPLE_A_DEF,
1806 RID_SVXSTR_COLOR_MATERIAL_DEEP_PURPLE_DEF,
1807 RID_SVXSTR_COLOR_MATERIAL_INDIGO_A_DEF,
1808 RID_SVXSTR_COLOR_MATERIAL_BLUE_A_DEF,
1809 RID_SVXSTR_COLOR_MATERIAL_LIGHT_BLUE_A_DEF,
1810 RID_SVXSTR_COLOR_MATERIAL_CYAN_A_DEF,
1811 RID_SVXSTR_COLOR_MATERIAL_TEAL_A_DEF,
1812 RID_SVXSTR_COLOR_MATERIAL_GREEN_A_DEF,
1813 RID_SVXSTR_COLOR_MATERIAL_LIGHT_GREEN_A_DEF,
1814 RID_SVXSTR_COLOR_MATERIAL_LIME_A_DEF,
1815 RID_SVXSTR_COLOR_MATERIAL_BROWN_A_DEF,
1816 RID_SVXSTR_COLOR_MATERIAL_BROWN_DEF,
1817 RID_SVXSTR_COLOR_MATERIAL_BLUE_GRAY_A_DEF,
1818 RID_SVXSTR_COLOR_MATERIAL_BLUE_GRAY_DEF,
1819 RID_SVXSTR_COLOR_LIBRE_GREEN_1_DEF,
1820 RID_SVXSTR_COLOR_LIBRE_GREEN_ACCENT_DEF,
1821 RID_SVXSTR_COLOR_LIBRE_BLUE_ACCENT_DEF,
1822 RID_SVXSTR_COLOR_LIBRE_ORANGE_ACCENT_DEF,
1823 RID_SVXSTR_COLOR_LIBRE_PURPLE_DEF,
1824 RID_SVXSTR_COLOR_LIBRE_PURPLE_ACCENT_DEF,
1825 RID_SVXSTR_COLOR_LIBRE_YELLOW_ACCENT_DEF
1828 const TranslateId SvxUnoColorNameResId[] =
1830 RID_SVXSTR_COLOR_BLUEGREY,
1831 RID_SVXSTR_COLOR_BLACK,
1832 RID_SVXSTR_COLOR_BLUE_CLASSIC,
1833 RID_SVXSTR_COLOR_BLUE,
1834 RID_SVXSTR_COLOR_GREEN,
1835 RID_SVXSTR_COLOR_RED,
1836 RID_SVXSTR_COLOR_MAGENTA,
1837 RID_SVXSTR_COLOR_GREY,
1838 RID_SVXSTR_COLOR_YELLOWGREEN,
1839 RID_SVXSTR_COLOR_YELLOW,
1840 RID_SVXSTR_COLOR_WHITE,
1841 RID_SVXSTR_COLOR_ORANGE,
1842 RID_SVXSTR_COLOR_BORDEAUX,
1843 RID_SVXSTR_COLOR_PALE_YELLOW,
1844 RID_SVXSTR_COLOR_PALE_GREEN,
1845 RID_SVXSTR_COLOR_DARKVIOLET,
1846 RID_SVXSTR_COLOR_SALMON,
1847 RID_SVXSTR_COLOR_SEABLUE,
1848 RID_SVXSTR_COLOR_CHART,
1849 RID_SVXSTR_COLOR_PURPLE,
1850 RID_SVXSTR_COLOR_SKYBLUE,
1851 RID_SVXSTR_COLOR_PINK,
1852 RID_SVXSTR_COLOR_TURQUOISE,
1853 RID_SVXSTR_COLOR_GOLD,
1854 RID_SVXSTR_COLOR_BRICK,
1855 RID_SVXSTR_COLOR_INDIGO,
1856 RID_SVXSTR_COLOR_TEAL,
1857 RID_SVXSTR_COLOR_LIME,
1858 RID_SVXSTR_COLOR_LIGHTGRAY,
1859 RID_SVXSTR_COLOR_LIGHTYELLOW,
1860 RID_SVXSTR_COLOR_LIGHTGOLD,
1861 RID_SVXSTR_COLOR_LIGHTORANGE,
1862 RID_SVXSTR_COLOR_LIGHTBRICK,
1863 RID_SVXSTR_COLOR_LIGHTRED,
1864 RID_SVXSTR_COLOR_LIGHTMAGENTA,
1865 RID_SVXSTR_COLOR_LIGHTPURPLE,
1866 RID_SVXSTR_COLOR_LIGHTINDIGO,
1867 RID_SVXSTR_COLOR_LIGHTBLUE,
1868 RID_SVXSTR_COLOR_LIGHTTEAL,
1869 RID_SVXSTR_COLOR_LIGHTGREEN,
1870 RID_SVXSTR_COLOR_LIGHTLIME,
1871 RID_SVXSTR_COLOR_DARKGRAY,
1872 RID_SVXSTR_COLOR_DARKYELLOW,
1873 RID_SVXSTR_COLOR_DARKGOLD,
1874 RID_SVXSTR_COLOR_DARKORANGE,
1875 RID_SVXSTR_COLOR_DARKBRICK,
1876 RID_SVXSTR_COLOR_DARKRED,
1877 RID_SVXSTR_COLOR_DARKMAGENTA,
1878 RID_SVXSTR_COLOR_DARKPURPLE,
1879 RID_SVXSTR_COLOR_DARKINDIGO,
1880 RID_SVXSTR_COLOR_DARKBLUE,
1881 RID_SVXSTR_COLOR_DARKTEAL,
1882 RID_SVXSTR_COLOR_DARKGREEN,
1883 RID_SVXSTR_COLOR_DARKLIME,
1884 RID_SVXSTR_COLOR_VIOLET,
1885 RID_SVXSTR_COLOR_VIOLET_OUG,
1886 RID_SVXSTR_COLOR_BLUE_OUG,
1887 RID_SVXSTR_COLOR_AZURE_OUG,
1888 RID_SVXSTR_COLOR_SPRINGGREEN_OUG,
1889 RID_SVXSTR_COLOR_GREEN_OUG,
1890 RID_SVXSTR_COLOR_CHARTREUSEGREEN_OUG,
1891 RID_SVXSTR_COLOR_ORANGE_OUG,
1892 RID_SVXSTR_COLOR_RED_OUG,
1893 RID_SVXSTR_COLOR_ROSE_OUG,
1894 RID_SVXSTR_COLOR_AZURE,
1895 RID_SVXSTR_COLOR_CYAN,
1896 RID_SVXSTR_COLOR_SPRINGGREEN,
1897 RID_SVXSTR_COLOR_CHARTREUSEGREEN,
1898 RID_SVXSTR_COLOR_ROSE,
1899 RID_SVXSTR_COLOR_MATERIAL_GRAY_A,
1900 RID_SVXSTR_COLOR_MATERIAL_YELLOW_A,
1901 RID_SVXSTR_COLOR_MATERIAL_AMBER_A,
1902 RID_SVXSTR_COLOR_MATERIAL_AMBER,
1903 RID_SVXSTR_COLOR_MATERIAL_ORANGE_A,
1904 RID_SVXSTR_COLOR_MATERIAL_DEEP_ORANGE_A,
1905 RID_SVXSTR_COLOR_MATERIAL_DEEP_ORANGE,
1906 RID_SVXSTR_COLOR_MATERIAL_RED_A,
1907 RID_SVXSTR_COLOR_MATERIAL_PINK_A,
1908 RID_SVXSTR_COLOR_MATERIAL_PURPLE_A,
1909 RID_SVXSTR_COLOR_MATERIAL_DEEP_PURPLE_A,
1910 RID_SVXSTR_COLOR_MATERIAL_DEEP_PURPLE,
1911 RID_SVXSTR_COLOR_MATERIAL_INDIGO_A,
1912 RID_SVXSTR_COLOR_MATERIAL_BLUE_A,
1913 RID_SVXSTR_COLOR_MATERIAL_LIGHT_BLUE_A,
1914 RID_SVXSTR_COLOR_MATERIAL_CYAN_A,
1915 RID_SVXSTR_COLOR_MATERIAL_TEAL_A,
1916 RID_SVXSTR_COLOR_MATERIAL_GREEN_A,
1917 RID_SVXSTR_COLOR_MATERIAL_LIGHT_GREEN_A,
1918 RID_SVXSTR_COLOR_MATERIAL_LIME_A,
1919 RID_SVXSTR_COLOR_MATERIAL_BROWN_A,
1920 RID_SVXSTR_COLOR_MATERIAL_BROWN,
1921 RID_SVXSTR_COLOR_MATERIAL_BLUE_GRAY_A,
1922 RID_SVXSTR_COLOR_MATERIAL_BLUE_GRAY,
1923 RID_SVXSTR_COLOR_LIBRE_GREEN_1,
1924 RID_SVXSTR_COLOR_LIBRE_GREEN_ACCENT,
1925 RID_SVXSTR_COLOR_LIBRE_BLUE_ACCENT,
1926 RID_SVXSTR_COLOR_LIBRE_ORANGE_ACCENT,
1927 RID_SVXSTR_COLOR_LIBRE_PURPLE,
1928 RID_SVXSTR_COLOR_LIBRE_PURPLE_ACCENT,
1929 RID_SVXSTR_COLOR_LIBRE_YELLOW_ACCENT
1932 /// @throws std::exception
1933 static bool SvxUnoConvertResourceStringBuiltInToApi(const TranslateId* pSourceResIds, rtl::OUStringConstExpr const *pDestResIds, int nCount, OUString& rString)
1935 //We replace e.g. "Gray 10%" with the translation of Gray, but we shouldn't
1936 //replace "Red Hat 1" with the translation of Red :-)
1937 sal_Int32 nLength = rString.getLength();
1938 while( nLength > 0 )
1940 const sal_Unicode nChar = rString[nLength-1];
1941 if (nChar != '%' && (nChar < '0' || nChar > '9'))
1942 break;
1943 nLength--;
1945 std::u16string_view sStr = o3tl::trim(rString.subView(0, nLength));
1947 for(int i = 0; i < nCount; ++i )
1949 OUString aStrDefName = SvxResId(pSourceResIds[i]);
1950 if( sStr == aStrDefName )
1952 OUString aReplace = pDestResIds[i];
1953 rString = rString.replaceAt( 0, aStrDefName.getLength(), aReplace );
1954 return true;
1958 return false;
1961 static bool SvxUnoConvertResourceStringBuiltInFromApi(rtl::OUStringConstExpr const *pSourceResIds, const TranslateId* pDestResIds, int nCount, OUString& rString)
1963 //We replace e.g. "Gray 10%" with the translation of Gray, but we shouldn't
1964 //replace "Red Hat 1" with the translation of Red :-)
1965 sal_Int32 nLength = rString.getLength();
1966 while( nLength > 0 )
1968 const sal_Unicode nChar = rString[nLength-1];
1969 if (nChar != '%' && (nChar < '0' || nChar > '9'))
1970 break;
1971 nLength--;
1973 std::u16string_view sStr = o3tl::trim(rString.subView(0, nLength));
1975 for(int i = 0; i < nCount; ++i )
1977 if( sStr == pSourceResIds[i].asView() )
1979 OUString aReplace = SvxResId(pDestResIds[i]);
1980 rString = aReplace + rString.subView( pSourceResIds[i].asView().size() );
1981 return true;
1985 return false;
1988 /** if the given name is a predefined name for the current language it is replaced by
1989 the corresponding api name.
1991 OUString SvxUnogetApiNameForItem(const sal_uInt16 nWhich, const OUString& rInternalName)
1993 OUString aNew = rInternalName;
1995 if( nWhich == sal_uInt16(XATTR_LINECOLOR) )
1997 if (SvxUnoConvertResourceStringBuiltInToApi(SvxUnoColorNameResId, SvxUnoColorNameDefResId, SAL_N_ELEMENTS(SvxUnoColorNameResId), aNew))
1999 return aNew;
2002 else
2004 const rtl::OUStringConstExpr* pApiResIds;
2005 const TranslateId* pIntResIds;
2006 int nCount;
2008 if( SvxUnoGetResourceRanges(nWhich, pApiResIds, pIntResIds, nCount))
2010 if (SvxUnoConvertResourceStringToApi(pIntResIds, pApiResIds, nCount, aNew))
2012 return aNew;
2017 // just use previous name, if nothing else was found.
2018 return rInternalName;
2021 /** if the given name is a predefined api name it is replaced by the predefined name
2022 for the current language.
2024 OUString SvxUnogetInternalNameForItem(const sal_uInt16 nWhich, const OUString& rApiName)
2026 OUString aNew = rApiName;
2028 if( nWhich == sal_uInt16(XATTR_LINECOLOR) )
2030 if (SvxUnoConvertResourceStringBuiltInFromApi(SvxUnoColorNameDefResId, SvxUnoColorNameResId, SAL_N_ELEMENTS(SvxUnoColorNameResId), aNew))
2032 return aNew;
2035 else
2037 const rtl::OUStringConstExpr* pApiResIds;
2038 const TranslateId* pIntResIds;
2039 int nCount;
2041 if (SvxUnoGetResourceRanges(nWhich, pApiResIds, pIntResIds, nCount))
2043 if (SvxUnoConvertResourceStringFromApi(pApiResIds, pIntResIds, nCount, aNew))
2045 return aNew;
2050 // just use previous name, if nothing else was found.
2051 return rApiName;
2055 rtl::Reference<comphelper::PropertySetInfo> const & SvxPropertySetInfoPool::getDrawingDefaults() noexcept
2057 static rtl::Reference<comphelper::PropertySetInfo> xDrawingDefaults = []()
2059 rtl::Reference<comphelper::PropertySetInfo> xTmp = new comphelper::PropertySetInfo();
2060 xTmp->add( ImplGetSvxDrawingDefaultsPropertyMap() );
2061 return xTmp;
2062 }();
2064 return xDrawingDefaults;
2067 rtl::Reference<comphelper::PropertySetInfo> const & SvxPropertySetInfoPool::getWriterDrawingDefaults() noexcept
2069 static rtl::Reference<comphelper::PropertySetInfo> xDrawingDefaults = []()
2071 rtl::Reference<comphelper::PropertySetInfo> xTmp = new comphelper::PropertySetInfo();
2072 xTmp->add( ImplGetSvxDrawingDefaultsPropertyMap() );
2073 xTmp->remove( UNO_NAME_EDIT_PARA_IS_HANGING_PUNCTUATION );
2074 // OD 13.10.2003 #i18732# - add property map for writer item 'IsFollowingTextFlow'
2075 xTmp->add( ImplGetAdditionalWriterDrawingDefaultsPropertyMap() );
2076 return xTmp;
2077 }();
2079 return xDrawingDefaults;
2082 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */