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