/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "svx/unoapi.hxx" #include #include #include #include "svx/globl3d.hxx" #include #include #include using namespace ::rtl; using namespace ::com::sun::star; using namespace ::com::sun::star::beans::PropertyAttribute; using ::com::sun::star::drawing::TextVerticalAdjust; SfxItemPropertyMapEntry* ImplGetSvxShapePropertyMap() { static SfxItemPropertyMapEntry aShapePropertyMap_Impl[] = { EDGERADIUS_PROPERTIES FILL_PROPERTIES LINE_PROPERTIES LINE_PROPERTIES_START_END SHAPE_DESCRIPTOR_PROPERTIES MISC_OBJ_PROPERTIES LINKTARGET_PROPERTIES SHADOW_PROPERTIES TEXT_PROPERTIES // #FontWork# FONTWORK_PROPERTIES CUSTOMSHAPE_PROPERTIES { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, {0,0,0,0,0,0} }; return aShapePropertyMap_Impl; } SfxItemPropertyMapEntry* ImplGetSvxTextShapePropertyMap() { static SfxItemPropertyMapEntry aTextShapePropertyMap_Impl[] = { EDGERADIUS_PROPERTIES FILL_PROPERTIES LINE_PROPERTIES LINE_PROPERTIES_START_END SHAPE_DESCRIPTOR_PROPERTIES MISC_OBJ_PROPERTIES_NO_SHEAR LINKTARGET_PROPERTIES SHADOW_PROPERTIES TEXT_PROPERTIES // #FontWork# FONTWORK_PROPERTIES CUSTOMSHAPE_PROPERTIES { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, {0,0,0,0,0,0} }; return aTextShapePropertyMap_Impl; } SfxItemPropertyMapEntry* ImplGetSvxConnectorPropertyMap() { static SfxItemPropertyMapEntry aConnectorPropertyMap_Impl[] = { SPECIAL_CONNECTOR_PROPERTIES EDGERADIUS_PROPERTIES FILL_PROPERTIES LINE_PROPERTIES LINE_PROPERTIES_START_END SHAPE_DESCRIPTOR_PROPERTIES MISC_OBJ_PROPERTIES LINKTARGET_PROPERTIES SHADOW_PROPERTIES TEXT_PROPERTIES // #FontWork# FONTWORK_PROPERTIES { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, {0,0,0,0,0,0} }; return aConnectorPropertyMap_Impl; } SfxItemPropertyMapEntry* ImplGetSvxDimensioningPropertyMap() { static SfxItemPropertyMapEntry aDimensioningPropertyMap_Impl[] = { SPECIAL_DIMENSIONING_PROPERTIES EDGERADIUS_PROPERTIES FILL_PROPERTIES LINE_PROPERTIES LINE_PROPERTIES_START_END SHAPE_DESCRIPTOR_PROPERTIES MISC_OBJ_PROPERTIES LINKTARGET_PROPERTIES SHADOW_PROPERTIES TEXT_PROPERTIES // #FontWork# FONTWORK_PROPERTIES { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, {0,0,0,0,0,0} }; return aDimensioningPropertyMap_Impl; } SfxItemPropertyMapEntry* ImplGetSvxCirclePropertyMap() { static SfxItemPropertyMapEntry aCirclePropertyMap_Impl[] = { SPECIAL_CIRCLE_PROPERTIES EDGERADIUS_PROPERTIES FILL_PROPERTIES LINE_PROPERTIES LINE_PROPERTIES_START_END SHAPE_DESCRIPTOR_PROPERTIES MISC_OBJ_PROPERTIES LINKTARGET_PROPERTIES SHADOW_PROPERTIES TEXT_PROPERTIES // #FontWork# FONTWORK_PROPERTIES CUSTOMSHAPE_PROPERTIES { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, {0,0,0,0,0,0} }; return aCirclePropertyMap_Impl; } SfxItemPropertyMapEntry* ImplGetSvxPolyPolygonPropertyMap() { static SfxItemPropertyMapEntry aPolyPolygonPropertyMap_Impl[] = { { MAP_CHAR_LEN("Geometry"), OWN_ATTR_BASE_GEOMETRY, SEQTYPE(::getCppuType((const ::com::sun::star::drawing::PointSequenceSequence*)0)), 0, 0 }, SPECIAL_POLYGON_PROPERTIES SPECIAL_POLYPOLYGON_PROPERTIES FILL_PROPERTIES LINE_PROPERTIES LINE_PROPERTIES_START_END SHAPE_DESCRIPTOR_PROPERTIES MISC_OBJ_PROPERTIES LINKTARGET_PROPERTIES SHADOW_PROPERTIES TEXT_PROPERTIES // #FontWork# FONTWORK_PROPERTIES CUSTOMSHAPE_PROPERTIES { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, {0,0,0,0,0,0} }; return aPolyPolygonPropertyMap_Impl; } SfxItemPropertyMapEntry* ImplGetSvxPolyPolygonBezierPropertyMap() { static SfxItemPropertyMapEntry aPolyPolygonBezierPropertyMap_Impl[] = { { MAP_CHAR_LEN("Geometry"), OWN_ATTR_BASE_GEOMETRY, &::getCppuType((const ::com::sun::star::drawing::PolyPolygonBezierCoords*)0), 0, 0 }, SPECIAL_POLYGON_PROPERTIES SPECIAL_POLYPOLYGONBEZIER_PROPERTIES FILL_PROPERTIES LINE_PROPERTIES LINE_PROPERTIES_START_END SHAPE_DESCRIPTOR_PROPERTIES MISC_OBJ_PROPERTIES LINKTARGET_PROPERTIES SHADOW_PROPERTIES TEXT_PROPERTIES // #FontWork# FONTWORK_PROPERTIES CUSTOMSHAPE_PROPERTIES { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, {0,0,0,0,0,0} }; return aPolyPolygonBezierPropertyMap_Impl; } SfxItemPropertyMapEntry* ImplGetSvxGraphicObjectPropertyMap() { static SfxItemPropertyMapEntry aGraphicObjectPropertyMap_Impl[] = { SPECIAL_GRAPHOBJ_PROPERTIES // #i25616# FILL_PROPERTIES LINE_PROPERTIES LINE_PROPERTIES_START_END SHAPE_DESCRIPTOR_PROPERTIES // #i118485# Full properties now, shear included MISC_OBJ_PROPERTIES LINKTARGET_PROPERTIES SHADOW_PROPERTIES TEXT_PROPERTIES // #FontWork# FONTWORK_PROPERTIES { MAP_CHAR_LEN("IsMirrored"), OWN_ATTR_MIRRORED , &::getCppuBooleanType(), 0, 0}, { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, {MAP_CHAR_LEN("GraphicStream"), OWN_ATTR_GRAPHIC_STREAM, &::com::sun::star::io::XInputStream::static_type(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, {0,0,0,0,0,0} }; return aGraphicObjectPropertyMap_Impl; } SfxItemPropertyMapEntry* ImplGetSvx3DSceneObjectPropertyMap() { static SfxItemPropertyMapEntry a3DSceneObjectPropertyMap_Impl[] = { SPECIAL_3DSCENEOBJECT_PROPERTIES FILL_PROPERTIES LINE_PROPERTIES LINE_PROPERTIES_START_END SHAPE_DESCRIPTOR_PROPERTIES MISC_OBJ_PROPERTIES LINKTARGET_PROPERTIES SHADOW_PROPERTIES {0,0,0,0,0,0} }; return a3DSceneObjectPropertyMap_Impl; } SfxItemPropertyMapEntry* ImplGetSvx3DCubeObjectPropertyMap() { static SfxItemPropertyMapEntry a3DCubeObjectPropertyMap_Impl[] = { SPECIAL_3DCUBEOBJECT_PROPERTIES MISC_3D_OBJ_PROPERTIES FILL_PROPERTIES LINE_PROPERTIES LINE_PROPERTIES_START_END SHAPE_DESCRIPTOR_PROPERTIES MISC_OBJ_PROPERTIES LINKTARGET_PROPERTIES SHADOW_PROPERTIES { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, {0,0,0,0,0,0} }; return a3DCubeObjectPropertyMap_Impl; } SfxItemPropertyMapEntry* ImplGetSvx3DSphereObjectPropertyMap() { static SfxItemPropertyMapEntry a3DSphereObjectPropertyMap_Impl[] = { SPECIAL_3DSPHEREOBJECT_PROPERTIES MISC_3D_OBJ_PROPERTIES FILL_PROPERTIES LINE_PROPERTIES LINE_PROPERTIES_START_END SHAPE_DESCRIPTOR_PROPERTIES MISC_OBJ_PROPERTIES LINKTARGET_PROPERTIES SHADOW_PROPERTIES { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, {0,0,0,0,0,0} }; return a3DSphereObjectPropertyMap_Impl; } SfxItemPropertyMapEntry* ImplGetSvx3DLatheObjectPropertyMap() { static SfxItemPropertyMapEntry a3DLatheObjectPropertyMap_Impl[] = { SPECIAL_3DLATHEOBJECT_PROPERTIES // #107245# New 3D properties which are possible for lathe and extrude 3d objects SPECIAL_3DLATHEANDEXTRUDEOBJ_PROPERTIES SPECIAL_3DBACKSCALE_PROPERTIES MISC_3D_OBJ_PROPERTIES FILL_PROPERTIES LINE_PROPERTIES LINE_PROPERTIES_START_END SHAPE_DESCRIPTOR_PROPERTIES MISC_OBJ_PROPERTIES LINKTARGET_PROPERTIES SHADOW_PROPERTIES { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, {0,0,0,0,0,0} }; return a3DLatheObjectPropertyMap_Impl; } SfxItemPropertyMapEntry* ImplGetSvx3DExtrudeObjectPropertyMap() { static SfxItemPropertyMapEntry a3DExtrudeObjectPropertyMap_Impl[] = { SPECIAL_3DEXTRUDEOBJECT_PROPERTIES // #107245# New 3D properties which are possible for lathe and extrude 3d objects SPECIAL_3DLATHEANDEXTRUDEOBJ_PROPERTIES SPECIAL_3DBACKSCALE_PROPERTIES MISC_3D_OBJ_PROPERTIES FILL_PROPERTIES LINE_PROPERTIES LINE_PROPERTIES_START_END SHAPE_DESCRIPTOR_PROPERTIES MISC_OBJ_PROPERTIES LINKTARGET_PROPERTIES SHADOW_PROPERTIES { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, {0,0,0,0,0,0} }; return a3DExtrudeObjectPropertyMap_Impl; } SfxItemPropertyMapEntry* ImplGetSvx3DPolygonObjectPropertyMap() { static SfxItemPropertyMapEntry a3DPolygonObjectPropertyMap_Impl[] = { SPECIAL_3DPOLYGONOBJECT_PROPERTIES MISC_3D_OBJ_PROPERTIES FILL_PROPERTIES LINE_PROPERTIES LINE_PROPERTIES_START_END SHAPE_DESCRIPTOR_PROPERTIES MISC_OBJ_PROPERTIES LINKTARGET_PROPERTIES SHADOW_PROPERTIES { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, {0,0,0,0,0,0} }; return a3DPolygonObjectPropertyMap_Impl; } SfxItemPropertyMapEntry* ImplGetSvxAllPropertyMap() { static SfxItemPropertyMapEntry aAllPropertyMap_Impl[] = { SHADOW_PROPERTIES LINE_PROPERTIES LINE_PROPERTIES_START_END FILL_PROPERTIES EDGERADIUS_PROPERTIES TEXT_PROPERTIES // #FontWork# FONTWORK_PROPERTIES SHAPE_DESCRIPTOR_PROPERTIES MISC_OBJ_PROPERTIES LINKTARGET_PROPERTIES SPECIAL_CONNECTOR_PROPERTIES SPECIAL_DIMENSIONING_PROPERTIES SPECIAL_CIRCLE_PROPERTIES SPECIAL_POLYGON_PROPERTIES SPECIAL_POLYPOLYGON_PROPERTIES SPECIAL_POLYPOLYGONBEZIER_PROPERTIES SPECIAL_GRAPHOBJ_PROPERTIES SPECIAL_3DSCENEOBJECT_PROPERTIES MISC_3D_OBJ_PROPERTIES SPECIAL_3DCUBEOBJECT_PROPERTIES SPECIAL_3DSPHEREOBJECT_PROPERTIES SPECIAL_3DLATHEOBJECT_PROPERTIES SPECIAL_3DEXTRUDEOBJECT_PROPERTIES // #107245# New 3D properties which are possible for lathe and extrude 3d objects SPECIAL_3DLATHEANDEXTRUDEOBJ_PROPERTIES SPECIAL_3DBACKSCALE_PROPERTIES SPECIAL_3DPOLYGONOBJECT_PROPERTIES CUSTOMSHAPE_PROPERTIES { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, {0,0,0,0,0,0} }; return aAllPropertyMap_Impl; } SfxItemPropertyMapEntry* ImplGetSvxGroupPropertyMap() { static SfxItemPropertyMapEntry aGroupPropertyMap_Impl[] = { SHAPE_DESCRIPTOR_PROPERTIES MISC_OBJ_PROPERTIES LINKTARGET_PROPERTIES {0,0,0,0,0,0} }; return aGroupPropertyMap_Impl; } SfxItemPropertyMapEntry* ImplGetSvxOle2PropertyMap() { static SfxItemPropertyMapEntry aOle2PropertyMap_Impl[] = { // #i118485# Adding properties for line, fill, text, shadow, fontwork, rotate, shear FILL_PROPERTIES LINE_PROPERTIES LINE_PROPERTIES_START_END SHAPE_DESCRIPTOR_PROPERTIES MISC_OBJ_PROPERTIES LINKTARGET_PROPERTIES SHADOW_PROPERTIES TEXT_PROPERTIES FONTWORK_PROPERTIES { MAP_CHAR_LEN("ThumbnailGraphicURL"), OWN_ATTR_THUMBNAIL , &::getCppuType(( const OUString*)0), 0, 0 }, { MAP_CHAR_LEN("Model"), OWN_ATTR_OLEMODEL , &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, { MAP_CHAR_LEN("EmbeddedObject"), OWN_ATTR_OLE_EMBEDDED_OBJECT , &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject >*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, { MAP_CHAR_LEN("EmbeddedObjectNoNewClient"),OWN_ATTR_OLE_EMBEDDED_OBJECT_NONEWCLIENT, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject >*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, { MAP_CHAR_LEN("OriginalSize"), OWN_ATTR_OLESIZE , &::getCppuType(( const ::com::sun::star::awt::Size*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, { MAP_CHAR_LEN("CLSID"), OWN_ATTR_CLSID , &::getCppuType(( const OUString*)0), 0, 0 }, { MAP_CHAR_LEN("IsInternal"), OWN_ATTR_INTERNAL_OLE , &::getBooleanCppuType() , ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, { MAP_CHAR_LEN("VisibleArea"), OWN_ATTR_OLE_VISAREA , &::getCppuType((const ::com::sun::star::awt::Rectangle*)0), 0, 0}, { MAP_CHAR_LEN("Aspect"), OWN_ATTR_OLE_ASPECT , &::getCppuType((const sal_Int64*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_OLE2_PERSISTNAME), OWN_ATTR_PERSISTNAME , &::getCppuType(( const OUString*)0), 0, 0 }, { MAP_CHAR_LEN("LinkURL"), OWN_ATTR_OLE_LINKURL , &::getCppuType(( const OUString*)0), 0, 0 }, { MAP_CHAR_LEN(UNO_NAME_GRAPHOBJ_GRAPHIC), OWN_ATTR_VALUE_GRAPHIC , &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic>*)0), 0, 0}, {0,0,0,0,0,0} }; return aOle2PropertyMap_Impl; } SfxItemPropertyMapEntry* ImplGetSvxPluginPropertyMap() { static SfxItemPropertyMapEntry aPluginPropertyMap_Impl[] = { { MAP_CHAR_LEN("PluginMimeType"), OWN_ATTR_PLUGIN_MIMETYPE , &::getCppuType((const OUString*)0), 0, 0}, { MAP_CHAR_LEN("PluginURL"), OWN_ATTR_PLUGIN_URL , &::getCppuType((const OUString*)0), 0, 0}, { MAP_CHAR_LEN("PluginCommands"), OWN_ATTR_PLUGIN_COMMANDS , SEQTYPE(::getCppuType((::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >*)0)), 0, 0}, { MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION , &::getCppuType((const struct com::sun::star::drawing::HomogenMatrix3*)0), 0, 0 }, \ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER , &::getCppuType((const sal_Int32*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID , &::getCppuType((const sal_Int16*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERNAME),SDRATTR_LAYERNAME , &::getCppuType((const OUString*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYBITMAP), OWN_ATTR_LDBITMAP , &::getCppuType(( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap >*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYNAME), OWN_ATTR_LDNAME , &::getCppuType(( const OUString*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, { MAP_CHAR_LEN(UNO_NAME_OLE2_METAFILE), OWN_ATTR_METAFILE , SEQTYPE(::getCppuType((::com::sun::star::uno::Sequence*)0)), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, { MAP_CHAR_LEN("ThumbnailGraphicURL"), OWN_ATTR_THUMBNAIL , &::getCppuType(( const OUString*)0), 0, 0 }, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, &::getBooleanCppuType(),0, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, &::getBooleanCppuType(),0, 0}, { MAP_CHAR_LEN(UNO_NAME_OLE2_PERSISTNAME), OWN_ATTR_PERSISTNAME , &::getCppuType(( const OUString*)0), 0, 0 }, { MAP_CHAR_LEN("LinkURL"), OWN_ATTR_OLE_LINKURL , &::getCppuType(( const OUString*)0), 0, 0 }, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_BOUNDRECT), OWN_ATTR_BOUNDRECT, &::getCppuType((const ::com::sun::star::awt::Rectangle*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, { MAP_CHAR_LEN("VisibleArea"), OWN_ATTR_OLE_VISAREA , &::getCppuType((const ::com::sun::star::awt::Rectangle*)0), 0, 0}, // #i68101# { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_TITLE), OWN_ATTR_MISC_OBJ_TITLE , &::getCppuType((const OUString*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , &::getCppuType((const OUString*)0), 0, 0}, {0,0,0,0,0,0} }; return aPluginPropertyMap_Impl; } SfxItemPropertyMapEntry* ImplGetSvxFramePropertyMap() { //TODO/LATER: new properties for ScrollingMode and DefaultBorder static SfxItemPropertyMapEntry aFramePropertyMap_Impl[] = { { MAP_CHAR_LEN("FrameURL"), OWN_ATTR_FRAME_URL , &::getCppuType((const OUString*)0), 0, 0}, { MAP_CHAR_LEN("FrameName"), OWN_ATTR_FRAME_NAME , &::getCppuType((const OUString*)0), 0, 0}, { MAP_CHAR_LEN("FrameIsAutoScroll"), OWN_ATTR_FRAME_ISAUTOSCROLL , &::getBooleanCppuType() , ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0}, { MAP_CHAR_LEN("FrameIsBorder"), OWN_ATTR_FRAME_ISBORDER , &::getBooleanCppuType() , 0, 0}, { MAP_CHAR_LEN("FrameMarginWidth"), OWN_ATTR_FRAME_MARGIN_WIDTH , &::getCppuType((const sal_Int32*)0), 0, 0}, { MAP_CHAR_LEN("FrameMarginHeight"), OWN_ATTR_FRAME_MARGIN_HEIGHT, &::getCppuType((const sal_Int32*)0), 0, 0}, { MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION , &::getCppuType((const struct com::sun::star::drawing::HomogenMatrix3*)0), 0, 0 }, \ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER , &::getCppuType((const sal_Int32*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID , &::getCppuType((const sal_Int16*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERNAME),SDRATTR_LAYERNAME , &::getCppuType((const OUString*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYBITMAP), OWN_ATTR_LDBITMAP , &::getCppuType(( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap >*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYNAME), OWN_ATTR_LDNAME , &::getCppuType(( const OUString*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, { MAP_CHAR_LEN(UNO_NAME_OLE2_METAFILE), OWN_ATTR_METAFILE , SEQTYPE(::getCppuType((::com::sun::star::uno::Sequence*)0)), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, { MAP_CHAR_LEN("ThumbnailGraphicURL"), OWN_ATTR_THUMBNAIL , &::getCppuType(( const OUString*)0), 0, 0 }, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, &::getBooleanCppuType(),0, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, &::getBooleanCppuType(),0, 0}, { MAP_CHAR_LEN(UNO_NAME_OLE2_PERSISTNAME), OWN_ATTR_PERSISTNAME , &::getCppuType(( const OUString*)0), 0, 0 }, { MAP_CHAR_LEN("LinkURL"), OWN_ATTR_OLE_LINKURL , &::getCppuType(( const OUString*)0), 0, 0 }, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_BOUNDRECT), OWN_ATTR_BOUNDRECT, &::getCppuType((const ::com::sun::star::awt::Rectangle*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, { MAP_CHAR_LEN("VisibleArea"), OWN_ATTR_OLE_VISAREA , &::getCppuType((const ::com::sun::star::awt::Rectangle*)0), 0, 0}, // #i68101# { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_TITLE), OWN_ATTR_MISC_OBJ_TITLE , &::getCppuType((const OUString*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , &::getCppuType((const OUString*)0), 0, 0}, {0,0,0,0,0,0} }; return aFramePropertyMap_Impl; } SfxItemPropertyMapEntry* ImplGetSvxAppletPropertyMap() { static SfxItemPropertyMapEntry aAppletPropertyMap_Impl[] = { { MAP_CHAR_LEN("AppletCodeBase"), OWN_ATTR_APPLET_CODEBASE , &::getCppuType(( const OUString*)0), 0, 0}, { MAP_CHAR_LEN("AppletName"), OWN_ATTR_APPLET_NAME , &::getCppuType(( const OUString*)0), 0, 0}, { MAP_CHAR_LEN("AppletCode"), OWN_ATTR_APPLET_CODE , &::getCppuType(( const OUString*)0), 0, 0}, { MAP_CHAR_LEN("AppletCommands"), OWN_ATTR_APPLET_COMMANDS , SEQTYPE(::getCppuType((::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >*)0)), 0, 0}, { MAP_CHAR_LEN("AppletDocBase"), OWN_ATTR_APPLET_DOCBASE , &::getCppuType(( const OUString*)0), 0, 0}, { MAP_CHAR_LEN("AppletIsScript"), OWN_ATTR_APPLET_ISSCRIPT , &::getBooleanCppuType(), 0, 0 }, { MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION , &::getCppuType((const struct com::sun::star::drawing::HomogenMatrix3*)0), 0, 0 }, \ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER , &::getCppuType((const sal_Int32*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID , &::getCppuType((const sal_Int16*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERNAME),SDRATTR_LAYERNAME , &::getCppuType((const OUString*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYBITMAP), OWN_ATTR_LDBITMAP , &::getCppuType(( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap >*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYNAME), OWN_ATTR_LDNAME , &::getCppuType(( const OUString*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, { MAP_CHAR_LEN(UNO_NAME_OLE2_METAFILE), OWN_ATTR_METAFILE , SEQTYPE(::getCppuType((::com::sun::star::uno::Sequence*)0)), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, { MAP_CHAR_LEN("ThumbnailGraphicURL"), OWN_ATTR_THUMBNAIL , &::getCppuType(( const OUString*)0), 0, 0 }, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, &::getBooleanCppuType(),0, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, &::getBooleanCppuType(),0, 0}, { MAP_CHAR_LEN(UNO_NAME_OLE2_PERSISTNAME), OWN_ATTR_PERSISTNAME , &::getCppuType(( const OUString*)0), 0, 0 }, { MAP_CHAR_LEN("LinkURL"), OWN_ATTR_OLE_LINKURL , &::getCppuType(( const OUString*)0), 0, 0 }, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_BOUNDRECT), OWN_ATTR_BOUNDRECT, &::getCppuType((const ::com::sun::star::awt::Rectangle*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, { MAP_CHAR_LEN("VisibleArea"), OWN_ATTR_OLE_VISAREA , &::getCppuType((const ::com::sun::star::awt::Rectangle*)0), 0, 0}, // #i68101# { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_TITLE), OWN_ATTR_MISC_OBJ_TITLE , &::getCppuType((const OUString*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , &::getCppuType((const OUString*)0), 0, 0}, {0,0,0,0,0,0} }; return aAppletPropertyMap_Impl; } SfxItemPropertyMapEntry* ImplGetSvxControlShapePropertyMap() { static SfxItemPropertyMapEntry aControlPropertyMap_Impl[] = { // the following properties are mapped to the XControl Model of this shape { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTNAME), 0, &::getCppuType((const OUString*)0), 0, 0 }, { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTSTYLENAME), 0, &::getCppuType((const OUString*)0), 0, 0 }, { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTFAMILY), 0, &::getCppuType((const sal_Int16*)0), 0, 0 }, { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTCHARSET), 0, &::getCppuType((const sal_Int16*)0), 0, 0 }, { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_HEIGHT), 0, &::getCppuType((const float*)0), 0, 0 }, { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTPITCH), 0, &::getCppuType((const sal_Int16*)0), 0, 0 }, { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_POSTURE), 0, &::getCppuType((const ::com::sun::star::awt::FontSlant*)0),0, 0 }, { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_WEIGHT), 0, &::getCppuType((const float*)0), 0, 0 }, { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_UNDERLINE), 0, &::getCppuType((const sal_Int16*)0), 0, 0 }, { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_STRIKEOUT), 0, &::getCppuType((const sal_Int16*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_COLOR), 0, &::getCppuType((const sal_Int32*)0), 0, 0 }, { MAP_CHAR_LEN("CharRelief"), 0, &::getCppuType((const sal_Int16*)0), 0, 0 }, { MAP_CHAR_LEN("CharUnderlineColor"), 0, &::getCppuType((const sal_Int32*)0), 0, 0 }, { MAP_CHAR_LEN("CharKerning"), 0, &::getCppuType((const sal_Int16*)0), 0, 0 }, { MAP_CHAR_LEN("CharWordMode"), 0, &::getBooleanCppuType(), 0, 0 }, { MAP_CHAR_LEN(UNO_NAME_EDIT_PARA_ADJUST), 0, &::getCppuType((const sal_Int16*)0), 0, 0 }, { MAP_CHAR_LEN("TextVerticalAdjust"), 0, &::getCppuType((const TextVerticalAdjust*)0), MAYBEVOID, 0 }, { MAP_CHAR_LEN("ControlBackground"), 0, &::getCppuType((const sal_Int32*)0), 0, 0 }, { MAP_CHAR_LEN("ControlBorder"), 0, &::getCppuType((const sal_Int16*)0), 0, 0 }, { MAP_CHAR_LEN("ControlBorderColor"), 0, &::getCppuType((const sal_Int32*)0), 0, 0 }, { MAP_CHAR_LEN("ControlSymbolColor"), 0, &::getCppuType((const sal_Int16*)0), 0, 0 }, { MAP_CHAR_LEN("ImageScaleMode"), 0, &::getCppuType((const sal_Int16*)0), 0, 0 }, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, &::getBooleanCppuType(),0, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, &::getBooleanCppuType(),0, 0}, { MAP_CHAR_LEN("ControlTextEmphasis"), 0, &::getCppuType((const sal_Int16*)0), 0, 0 }, { MAP_CHAR_LEN("ControlWritingMode"), 0, &::cppu::UnoType< sal_Int16 >::get(), 0, 0}, // the following properties are handled by SvxShape { MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION , &::getCppuType((const struct com::sun::star::drawing::HomogenMatrix3*)0), 0, 0 }, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER , &::getCppuType((const sal_Int32*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID , &::getCppuType((const sal_Int16*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERNAME),SDRATTR_LAYERNAME , &::getCppuType((const OUString*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYBITMAP), OWN_ATTR_LDBITMAP , &::getCppuType(( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap >*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYNAME), OWN_ATTR_LDNAME , &::getCppuType(( const OUString*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_BOUNDRECT), OWN_ATTR_BOUNDRECT, &::getCppuType((const ::com::sun::star::awt::Rectangle*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, // #i68101# { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_TITLE), OWN_ATTR_MISC_OBJ_TITLE , &::getCppuType((const OUString*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , &::getCppuType((const OUString*)0), 0, 0}, // #i112587# { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_PRINTABLE), SDRATTR_OBJPRINTABLE , &::getBooleanCppuType(), 0, 0}, \ { MAP_CHAR_LEN("Visible"), SDRATTR_OBJVISIBLE , &::getBooleanCppuType(), 0, 0}, \ {0,0,0,0,0,0} }; return aControlPropertyMap_Impl; } SfxItemPropertyMapEntry* ImplGetSvxPageShapePropertyMap() { static SfxItemPropertyMapEntry aPageShapePropertyMap_Impl[] = { { MAP_CHAR_LEN("PageNumber"), OWN_ATTR_PAGE_NUMBER , &::getCppuType((const sal_Int32*)0), 0, 0}, { MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION , &::getCppuType((const struct com::sun::star::drawing::HomogenMatrix3*)0), 0, 0 }, \ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER , &::getCppuType((const sal_Int32*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID , &::getCppuType((const sal_Int16*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERNAME),SDRATTR_LAYERNAME , &::getCppuType((const OUString*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYBITMAP), OWN_ATTR_LDBITMAP , &::getCppuType(( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap >*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYNAME), OWN_ATTR_LDNAME , &::getCppuType(( const OUString*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, &::getBooleanCppuType(),0, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, &::getBooleanCppuType(),0, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_BOUNDRECT), OWN_ATTR_BOUNDRECT, &::getCppuType((const ::com::sun::star::awt::Rectangle*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, // #i68101# { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_TITLE), OWN_ATTR_MISC_OBJ_TITLE , &::getCppuType((const OUString*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , &::getCppuType((const OUString*)0), 0, 0}, {0,0,0,0,0,0} }; return aPageShapePropertyMap_Impl; } SfxItemPropertyMapEntry* ImplGetSvxCaptionPropertyMap() { static SfxItemPropertyMapEntry aCaptionPropertyMap_Impl[] = { { MAP_CHAR_LEN("CaptionPoint"), OWN_ATTR_CAPTION_POINT, &::getCppuType((const com::sun::star::awt::Point*)0), 0, 0 }, { MAP_CHAR_LEN("CaptionType"), SDRATTR_CAPTIONTYPE, &::getCppuType((const sal_Int16*)0), 0, 0}, { MAP_CHAR_LEN("CaptionIsFixedAngle"), SDRATTR_CAPTIONFIXEDANGLE, &::getBooleanCppuType(), 0, 0}, { MAP_CHAR_LEN("CaptionAngle"), SDRATTR_CAPTIONANGLE, &::getCppuType((const sal_Int32*)0), 0, 0}, { MAP_CHAR_LEN("CaptionGap"), SDRATTR_CAPTIONGAP, &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM}, { MAP_CHAR_LEN("CaptionEscapeDirection"), SDRATTR_CAPTIONESCDIR, &::getCppuType((const sal_Int32*)0), 0, 0}, { MAP_CHAR_LEN("CaptionIsEscapeRelative"), SDRATTR_CAPTIONESCISREL, &::getBooleanCppuType(), 0, 0}, { MAP_CHAR_LEN("CaptionEscapeRelative"), SDRATTR_CAPTIONESCREL, &::getCppuType((const sal_Int32*)0), 0, 0}, { MAP_CHAR_LEN("CaptionEscapeAbsolute"), SDRATTR_CAPTIONESCABS, &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM}, { MAP_CHAR_LEN("CaptionLineLength"), SDRATTR_CAPTIONLINELEN, &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM}, { MAP_CHAR_LEN("CaptionIsFitLineLength"), SDRATTR_CAPTIONFITLINELEN, &::getBooleanCppuType(), 0, 0}, EDGERADIUS_PROPERTIES FILL_PROPERTIES LINE_PROPERTIES LINE_PROPERTIES_START_END SHAPE_DESCRIPTOR_PROPERTIES MISC_OBJ_PROPERTIES LINKTARGET_PROPERTIES SHADOW_PROPERTIES TEXT_PROPERTIES // #FontWork# FONTWORK_PROPERTIES { MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, {0,0,0,0,0,0} }; return aCaptionPropertyMap_Impl; } SfxItemPropertyMapEntry* ImplGetSvxCustomShapePropertyMap() { static SfxItemPropertyMapEntry aCustomShapePropertyMap_Impl[] = { { MAP_CHAR_LEN("CustomShapeEngine"), SDRATTR_CUSTOMSHAPE_ENGINE, &::getCppuType((const OUString*)0), 0, 0 }, { MAP_CHAR_LEN("CustomShapeData"), SDRATTR_CUSTOMSHAPE_DATA, &::getCppuType((const OUString*)0), 0, 0 }, { MAP_CHAR_LEN("CustomShapeGeometry"), SDRATTR_CUSTOMSHAPE_GEOMETRY, SEQTYPE(::getCppuType((::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >*)0)), 0, 0 }, { MAP_CHAR_LEN("CustomShapeGraphicURL"), SDRATTR_CUSTOMSHAPE_REPLACEMENT_URL, &::getCppuType((const OUString*)0), 0, 0}, CUSTOMSHAPE_PROPERTIES FILL_PROPERTIES LINE_PROPERTIES LINE_PROPERTIES_START_END SHAPE_DESCRIPTOR_PROPERTIES MISC_OBJ_PROPERTIES LINKTARGET_PROPERTIES SHADOW_PROPERTIES TEXT_PROPERTIES {MAP_CHAR_LEN("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, {0,0,0,0,0,0} }; return aCustomShapePropertyMap_Impl; } SfxItemPropertyMapEntry* ImplGetSvxMediaShapePropertyMap() { static SfxItemPropertyMapEntry aMediaShapePropertyMap_Impl[] = { { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER, &::getCppuType((const sal_Int32*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID, &::getCppuType((const sal_Int16*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERNAME), SDRATTR_LAYERNAME, &::getCppuType((const OUString*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYBITMAP), OWN_ATTR_LDBITMAP, &::getCppuType(( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap >*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYNAME), OWN_ATTR_LDNAME, &::getCppuType(( const OUString*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, { MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION, &::getCppuType((const struct com::sun::star::drawing::HomogenMatrix3*)0), 0, 0 }, { MAP_CHAR_LEN("MediaURL"), OWN_ATTR_MEDIA_URL, &::getCppuType((const OUString*)0), 0, 0}, { MAP_CHAR_LEN("PreferredSize"), OWN_ATTR_MEDIA_PREFERREDSIZE, &::getCppuType((const ::com::sun::star::awt::Size*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, { MAP_CHAR_LEN("Loop"), OWN_ATTR_MEDIA_LOOP, &::getCppuType((const sal_Bool*)0), 0, 0}, { MAP_CHAR_LEN("Mute"), OWN_ATTR_MEDIA_MUTE, &::getCppuType((const sal_Bool*)0), 0, 0}, { MAP_CHAR_LEN("VolumeDB"), OWN_ATTR_MEDIA_VOLUMEDB, &::getCppuType((const sal_Int16*)0), 0, 0}, { MAP_CHAR_LEN("Zoom"), OWN_ATTR_MEDIA_ZOOM, &::getCppuType((const ::com::sun::star::media::ZoomLevel*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, &::getBooleanCppuType(),0, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, &::getBooleanCppuType(),0, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_BOUNDRECT), OWN_ATTR_BOUNDRECT, &::getCppuType((const ::com::sun::star::awt::Rectangle*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, // #i68101# { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_TITLE), OWN_ATTR_MISC_OBJ_TITLE , &::getCppuType((const OUString*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , &::getCppuType((const OUString*)0), 0, 0}, {MAP_CHAR_LEN("PrivateStream"), OWN_ATTR_MEDIA_STREAM, &::com::sun::star::io::XInputStream::static_type(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, {MAP_CHAR_LEN("PrivateTempFileURL"), OWN_ATTR_MEDIA_TEMPFILEURL, &::getCppuType((const OUString*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, {0,0,0,0,0,0} }; return aMediaShapePropertyMap_Impl; } SfxItemPropertyMapEntry* ImplGetSvxTableShapePropertyMap() { static SfxItemPropertyMapEntry aTableShapePropertyMap_Impl[] = { { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER, &::getCppuType((const sal_Int32*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID, &::getCppuType((const sal_Int16*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERNAME), SDRATTR_LAYERNAME, &::getCppuType((const OUString*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYBITMAP), OWN_ATTR_LDBITMAP, &::com::sun::star::awt::XBitmap::static_type(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYNAME), OWN_ATTR_LDNAME, &::getCppuType(( const OUString*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, { MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION, &::getCppuType((const struct com::sun::star::drawing::HomogenMatrix3*)0), 0, 0 }, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, &::getBooleanCppuType(),0, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, &::getBooleanCppuType(),0, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_BOUNDRECT), OWN_ATTR_BOUNDRECT, &::getCppuType((const ::com::sun::star::awt::Rectangle*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_TITLE), OWN_ATTR_MISC_OBJ_TITLE , &::getCppuType((const OUString*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , &::getCppuType((const OUString*)0), 0, 0}, { MAP_CHAR_LEN("Model"), OWN_ATTR_OLEMODEL , &::com::sun::star::table::XTable::static_type(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, { MAP_CHAR_LEN("TableTemplate"), OWN_ATTR_TABLETEMPLATE , &::com::sun::star::container::XIndexAccess::static_type(), 0, 0}, { MAP_CHAR_LEN("UseFirstRowStyle"), OWN_ATTR_TABLETEMPLATE_FIRSTROW, &::getBooleanCppuType(),0, 0}, { MAP_CHAR_LEN("UseLastRowStyle"), OWN_ATTR_TABLETEMPLATE_LASTROW, &::getBooleanCppuType(),0, 0}, { MAP_CHAR_LEN("UseFirstColumnStyle"), OWN_ATTR_TABLETEMPLATE_FIRSTCOLUMN, &::getBooleanCppuType(),0, 0}, { MAP_CHAR_LEN("UseLastColumnStyle"), OWN_ATTR_TABLETEMPLATE_LASTCOLUMN, &::getBooleanCppuType(),0, 0}, { MAP_CHAR_LEN("UseBandingRowStyle"), OWN_ATTR_TABLETEMPLATE_BANDINGROWS, &::getBooleanCppuType(),0, 0}, { MAP_CHAR_LEN("UseBandingColumnStyle"), OWN_ATTR_TABLETEMPLATE_BANDINGCOULUMNS, &::getBooleanCppuType(),0, 0}, { MAP_CHAR_LEN("ReplacementGraphic"), OWN_ATTR_BITMAP, &::com::sun::star::graphic::XGraphic::static_type(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, {0,0,0,0,0,0} }; return aTableShapePropertyMap_Impl; } comphelper::PropertyMapEntry* ImplGetSvxDrawingDefaultsPropertyMap() { static comphelper::PropertyMapEntry aSvxDrawingDefaultsPropertyMap_Impl[] = { SHADOW_PROPERTIES LINE_PROPERTIES_DEFAULTS FILL_PROPERTIES_BMP FILL_PROPERTIES_DEFAULTS EDGERADIUS_PROPERTIES TEXT_PROPERTIES_DEFAULTS CONNECTOR_PROPERTIES SPECIAL_DIMENSIONING_PROPERTIES_DEFAULTS MISC_3D_OBJ_PROPERTIES SPECIAL_3DBACKSCALE_PROPERTIES {0,0,0,0,0,0} }; return aSvxDrawingDefaultsPropertyMap_Impl; } comphelper::PropertyMapEntry* ImplGetAdditionalWriterDrawingDefaultsPropertyMap() { static comphelper::PropertyMapEntry aSvxAdditionalDefaultsPropertyMap_Impl[] = { { MAP_CHAR_LEN("IsFollowingTextFlow"), SID_SW_FOLLOW_TEXT_FLOW, &::getBooleanCppuType(), 0, 0}, {0,0,0,0,0,0} }; return aSvxAdditionalDefaultsPropertyMap_Impl; } /*********************************************************************** * class UHashMap * ***********************************************************************/ typedef ::boost::unordered_map< OUString, sal_uInt32, OUStringHash > UHashMapImpl; namespace { static const UHashMapImpl &GetUHashImpl() { static UHashMapImpl aImpl(63); static bool bInited = false; if (!bInited) { struct { const char *name; sal_Int32 length; sal_uInt32 id; } aInit[] = { { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.RectangleShape"), OBJ_RECT }, { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.EllipseShape"), OBJ_CIRC }, { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.ControlShape"), OBJ_UNO }, { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.ConnectorShape"), OBJ_EDGE }, { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.MeasureShape"), OBJ_MEASURE }, { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.LineShape"), OBJ_LINE }, { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PolyPolygonShape"), OBJ_POLY }, { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PolyLineShape"), OBJ_PLIN }, { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.OpenBezierShape"), OBJ_PATHLINE }, { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.ClosedBezierShape"), OBJ_PATHFILL }, { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.OpenFreeHandShape"), OBJ_FREELINE }, { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.ClosedFreeHandShape"), OBJ_FREEFILL }, { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PolyPolygonPathShape"), OBJ_PATHPOLY }, { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PolyLinePathShape"), OBJ_PATHPLIN }, { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.GraphicObjectShape"), OBJ_GRAF }, { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.GroupShape"), OBJ_GRUP }, { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.TextShape"), OBJ_TEXT }, { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.OLE2Shape"), OBJ_OLE2 }, { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PageShape"), OBJ_PAGE }, { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.CaptionShape"), OBJ_CAPTION }, { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.FrameShape"), OBJ_FRAME }, { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PluginShape"), OBJ_OLE2_PLUGIN }, { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.AppletShape"), OBJ_OLE2_APPLET }, { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.CustomShape"), OBJ_CUSTOMSHAPE }, { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.MediaShape"), OBJ_MEDIA }, { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DSceneObject"), E3D_POLYSCENE_ID | E3D_INVENTOR_FLAG }, { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DCubeObject"), E3D_CUBEOBJ_ID | E3D_INVENTOR_FLAG }, { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DSphereObject"), E3D_SPHEREOBJ_ID | E3D_INVENTOR_FLAG }, { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DLatheObject"), E3D_LATHEOBJ_ID | E3D_INVENTOR_FLAG }, { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DExtrudeObject"), E3D_EXTRUDEOBJ_ID | E3D_INVENTOR_FLAG }, { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DPolygonObject"), E3D_POLYGONOBJ_ID | E3D_INVENTOR_FLAG }, }; for (sal_uInt32 i = 0; i < sizeof(aInit)/sizeof(aInit[0]); i++) aImpl[OUString( aInit[i].name, aInit[i].length, RTL_TEXTENCODING_ASCII_US ) ] = aInit[i].id; bInited = true; } return aImpl; } } //---------------------------------------------------------------------- OUString UHashMap::getNameFromId(sal_uInt32 nId) { const UHashMapImpl &rMap = GetUHashImpl(); for (UHashMapImpl::const_iterator it = rMap.begin(); it != rMap.end(); ++it) { if (it->second == nId) return it->first; } OSL_FAIL("[CL] unknown SdrObjekt identifier"); return OUString(); } uno::Sequence< OUString > UHashMap::getServiceNames() { const UHashMapImpl &rMap = GetUHashImpl(); uno::Sequence< OUString > aSeq( rMap.size() ); OUString* pStrings = aSeq.getArray(); int i = 0; for (UHashMapImpl::const_iterator it = rMap.begin(); it != rMap.end(); ++it) pStrings[i++] = it->first; return aSeq; } sal_uInt32 UHashMap::getId( const OUString& rCompareString ) { const UHashMapImpl &rMap = GetUHashImpl(); UHashMapImpl::const_iterator it = rMap.find( rCompareString ); if( it == rMap.end() ) return UHASHMAP_NOTFOUND; else return it->second; } /*********************************************************************** * class SvxUnoPropertyMapProvider * ***********************************************************************/ struct theSvxMapProvider : public rtl::Static { }; SvxUnoPropertyMapProvider& getSvxMapProvider() { return theSvxMapProvider::get(); } // --------------------------------------------------------------------- SvxUnoPropertyMapProvider::SvxUnoPropertyMapProvider() { for(sal_uInt16 i=0;i 0 ) { const sal_Unicode nChar = rString.GetChar( nLength - 1 ); if( (nChar < '0') || (nChar > '9') ) break; nLength--; } // if we cut off a number, also cut of some spaces if( nLength != rString.Len() ) { while( nLength > 0 ) { const sal_Unicode nChar = rString.GetChar( nLength - 1 ); if( nChar != ' ' ) break; nLength--; } } const String aShortString( rString.Copy( 0, nLength ) ); int i; for( i = 0; i < nCount; i++ ) { sal_uInt16 nResId = (sal_uInt16)(nSourceResIds + i); const ResId aRes( SVX_RES(nResId)); const String aCompare( aRes ); if( aShortString == aCompare ) { sal_uInt16 nNewResId = (sal_uInt16)(nDestResIds + i); ResId aNewRes( SVX_RES( nNewResId )); rString.Replace( 0, aShortString.Len(), String( aNewRes ) ); return sal_True; } else if( rString == aCompare ) { sal_uInt16 nNewResId = (sal_uInt16)(nDestResIds + i); ResId aNewRes( SVX_RES( nNewResId )); rString = String( aNewRes ); return sal_True; } } return sal_False; } static sal_uInt16 SvxUnoColorNameDefResId[] = { RID_SVXSTR_BLUEGREY_DEF, RID_SVXSTR_BLACK_DEF, RID_SVXSTR_BLUE_DEF, RID_SVXSTR_GREEN_DEF, RID_SVXSTR_CYAN_DEF, RID_SVXSTR_RED_DEF, RID_SVXSTR_MAGENTA_DEF, RID_SVXSTR_BROWN_DEF, RID_SVXSTR_GREY_DEF, RID_SVXSTR_LIGHTGREY_DEF, RID_SVXSTR_LIGHTBLUE_DEF, RID_SVXSTR_LIGHTGREEN_DEF, RID_SVXSTR_LIGHTCYAN_DEF, RID_SVXSTR_LIGHTRED_DEF, RID_SVXSTR_LIGHTMAGENTA_DEF, RID_SVXSTR_YELLOW_DEF, RID_SVXSTR_WHITE_DEF, RID_SVXSTR_ORANGE_DEF, RID_SVXSTR_VIOLET_DEF, RID_SVXSTR_BORDEAUX_DEF, RID_SVXSTR_PALE_YELLOW_DEF, RID_SVXSTR_PALE_GREEN_DEF, RID_SVXSTR_DKVIOLET_DEF, RID_SVXSTR_SALMON_DEF, RID_SVXSTR_SEABLUE_DEF, RID_SVXSTR_COLOR_SUN_DEF, RID_SVXSTR_COLOR_CHART_DEF, RID_SVXSTR_LIBRE_GREEN_1_DEF, RID_SVXSTR_LIBRE_GREEN_ACCENT_DEF, RID_SVXSTR_LIBRE_BLUE_ACCENT_DEF, RID_SVXSTR_LIBRE_ORANGE_ACCENT_DEF, RID_SVXSTR_LIBRE_PURPLE_DEF, RID_SVXSTR_LIBRE_PURPLE_ACCENT_DEF, RID_SVXSTR_LIBRE_YELLOW_ACCENT_DEF, RID_SVXSTR_TANGO_BUTTER_DEF, RID_SVXSTR_TANGO_ORANGE_DEF, RID_SVXSTR_TANGO_CHOCOLATE_DEF, RID_SVXSTR_TANGO_CHAMELEON_DEF, RID_SVXSTR_TANGO_SKY_BLUE_DEF, RID_SVXSTR_TANGO_PLUM_DEF, RID_SVXSTR_TANGO_SCARLET_RED_DEF, RID_SVXSTR_TANGO_ALUMINIUM_DEF }; static sal_uInt16 SvxUnoColorNameResId[] = { RID_SVXSTR_BLUEGREY, RID_SVXSTR_BLACK, RID_SVXSTR_BLUE, RID_SVXSTR_GREEN, RID_SVXSTR_CYAN, RID_SVXSTR_RED, RID_SVXSTR_MAGENTA, RID_SVXSTR_BROWN, RID_SVXSTR_GREY, RID_SVXSTR_LIGHTGREY, RID_SVXSTR_LIGHTBLUE, RID_SVXSTR_LIGHTGREEN, RID_SVXSTR_LIGHTCYAN, RID_SVXSTR_LIGHTRED, RID_SVXSTR_LIGHTMAGENTA, RID_SVXSTR_YELLOW, RID_SVXSTR_WHITE, RID_SVXSTR_ORANGE, RID_SVXSTR_VIOLET, RID_SVXSTR_BORDEAUX, RID_SVXSTR_PALE_YELLOW, RID_SVXSTR_PALE_GREEN, RID_SVXSTR_DKVIOLET, RID_SVXSTR_SALMON, RID_SVXSTR_SEABLUE, RID_SVXSTR_COLOR_SUN, RID_SVXSTR_COLOR_CHART, RID_SVXSTR_LIBRE_GREEN_1, RID_SVXSTR_LIBRE_GREEN_ACCENT, RID_SVXSTR_LIBRE_BLUE_ACCENT, RID_SVXSTR_LIBRE_ORANGE_ACCENT, RID_SVXSTR_LIBRE_PURPLE, RID_SVXSTR_LIBRE_PURPLE_ACCENT, RID_SVXSTR_LIBRE_YELLOW_ACCENT, RID_SVXSTR_TANGO_BUTTER, RID_SVXSTR_TANGO_ORANGE, RID_SVXSTR_TANGO_CHOCOLATE, RID_SVXSTR_TANGO_CHAMELEON, RID_SVXSTR_TANGO_SKY_BLUE, RID_SVXSTR_TANGO_PLUM, RID_SVXSTR_TANGO_SCARLET_RED, RID_SVXSTR_TANGO_ALUMINIUM }; bool SvxUnoConvertResourceString( sal_uInt16* pSourceResIds, sal_uInt16* pDestResIds, int nCount, String& rString ) throw() { //We replace e.g. "Gray 10%" with the translation of Gray, but we shouldn't //replace "Red Hat 1" with the translation of Red :-) OUString sStr(rString); const sal_Unicode *pStr = sStr.getStr(); sal_Int32 nLength = sStr.getLength(); while( nLength > 0 ) { const sal_Unicode nChar = pStr[nLength-1]; if (nChar != '%' && (nChar < '0' || nChar > '9')) break; nLength--; } sStr = OUString(pStr, nLength).trim(); for(int i = 0; i < nCount; ++i ) { String aStrDefName = SVX_RESSTR( pSourceResIds[i] ); if( sStr.equals( aStrDefName ) ) { String aReplace = SVX_RESSTR( pDestResIds[i] ); rString.Replace( 0, aStrDefName.Len(), aReplace ); return true; } } return false; } /** if the given name is a predefined name for the current language it is replaced by the corresponding api name. */ OUString SvxUnogetApiNameForItem(const sal_Int16 nWhich, const OUString& rInternalName) throw() { String aNew = rInternalName; if( nWhich == XATTR_LINECOLOR ) { if( SvxUnoConvertResourceString( (sal_uInt16*)SvxUnoColorNameResId, (sal_uInt16*)SvxUnoColorNameDefResId, sizeof( SvxUnoColorNameResId ) / sizeof( sal_uInt16 ), aNew ) ) { return aNew; } } else { int nApiResIds; int nIntResIds; int nCount; if( SvxUnoGetResourceRanges( nWhich, nApiResIds, nIntResIds, nCount ) ) { if(SvxUnoConvertResourceString( nIntResIds, nApiResIds, nCount, aNew ) ) { return aNew; } } } // just use previous name, if nothing else was found. return rInternalName; } /** if the given name is a predefined api name it is replaced by the predefined name for the current language. */ OUString SvxUnogetInternalNameForItem(const sal_Int16 nWhich, const OUString& rApiName) throw() { String aNew = rApiName; if( nWhich == XATTR_LINECOLOR ) { if( SvxUnoConvertResourceString( (sal_uInt16*)SvxUnoColorNameDefResId, (sal_uInt16*)SvxUnoColorNameResId, sizeof( SvxUnoColorNameResId ) / sizeof( sal_uInt16 ), aNew ) ) { return aNew; } } else { int nApiResIds; int nIntResIds; int nCount; if( SvxUnoGetResourceRanges( nWhich, nApiResIds, nIntResIds, nCount ) ) { if(SvxUnoConvertResourceString( nApiResIds, nIntResIds, nCount, aNew ) ) { return aNew; } } } // just use previous name, if nothing else was found. return rApiName; } /////////////////////////////////////////////////////////////////////// comphelper::PropertySetInfo* SvxPropertySetInfoPool::getOrCreate( sal_Int32 nServiceId ) throw() { SolarMutexGuard aGuard; if( nServiceId > SVXUNO_SERVICEID_LASTID ) { OSL_FAIL( "unknown service id!" ); return NULL; } if( mpInfos[ nServiceId ] == NULL ) { mpInfos[nServiceId] = new comphelper::PropertySetInfo(); mpInfos[nServiceId]->acquire(); switch( nServiceId ) { case SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS: mpInfos[SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS]->add( ImplGetSvxDrawingDefaultsPropertyMap() ); break; case SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER: mpInfos[SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER]->add( ImplGetSvxDrawingDefaultsPropertyMap() ); mpInfos[SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER]->remove( OUString( RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_EDIT_PARA_IS_HANGING_PUNCTUATION ) ) ); // OD 13.10.2003 #i18732# - add property map for writer item 'IsFollowingTextFlow' mpInfos[SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER]->add( ImplGetAdditionalWriterDrawingDefaultsPropertyMap() ); break; default: OSL_FAIL( "unknown service id!" ); } } return mpInfos[ nServiceId ]; } comphelper::PropertySetInfo* SvxPropertySetInfoPool::mpInfos[SVXUNO_SERVICEID_LASTID+1] = { NULL }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */