LCOV - code coverage report
Current view: top level - svx/source/unodraw - unoprov.cxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 670 748 89.6 %
Date: 2014-11-03 Functions: 73 76 96.1 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.10