LibreOffice Module svx (master) 1
Typedefs | Functions | Variables
unoprov.cxx File Reference
#include <sal/config.h>
#include <cassert>
#include <sal/macros.h>
#include <com/sun/star/table/XTable.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/embed/XEmbeddedObject.hpp>
#include <com/sun/star/util/MeasureUnit.hpp>
#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
#include <com/sun/star/media/ZoomLevel.hpp>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/lang/Locale.hpp>
#include <tools/fldunit.hxx>
#include <vcl/svapp.hxx>
#include <comphelper/propertysetinfo.hxx>
#include <comphelper/sequence.hxx>
#include <svx/dialmgr.hxx>
#include <svx/unoapi.hxx>
#include <svx/unoshprp.hxx>
#include <svx/svxids.hrc>
#include <svx/svdobjkind.hxx>
#include <svx/strings.hrc>
#include <o3tl/string_view.hxx>
#include <strings.hxx>
#include "shapeimpl.hxx"
#include <unordered_map>
Include dependency graph for unoprov.cxx:

Go to the source code of this file.

Typedefs

typedef std::unordered_map< OUString, SdrObjKindUHashMapImpl
 

Functions

static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxShapePropertyMap ()
 
static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxTextShapePropertyMap ()
 
static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxConnectorPropertyMap ()
 
static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxDimensioningPropertyMap ()
 
static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxCirclePropertyMap ()
 
static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxPolyPolygonPropertyMap ()
 
static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxGraphicObjectPropertyMap ()
 
static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvx3DSceneObjectPropertyMap ()
 
static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvx3DCubeObjectPropertyMap ()
 
static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvx3DSphereObjectPropertyMap ()
 
static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvx3DLatheObjectPropertyMap ()
 
static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvx3DExtrudeObjectPropertyMap ()
 
static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvx3DPolygonObjectPropertyMap ()
 
static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxAllPropertyMap ()
 
static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxGroupPropertyMap ()
 
static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxOle2PropertyMap ()
 
static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxPluginPropertyMap ()
 
static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxFramePropertyMap ()
 
static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxAppletPropertyMap ()
 
static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxControlShapePropertyMap ()
 
static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxPageShapePropertyMap ()
 
static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxCaptionPropertyMap ()
 
static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxCustomShapePropertyMap ()
 
static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxMediaShapePropertyMap ()
 
static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxTableShapePropertyMap ()
 
static o3tl::span< comphelper::PropertyMapEntry const > ImplGetSvxDrawingDefaultsPropertyMap ()
 
static o3tl::span< comphelper::PropertyMapEntry const > ImplGetAdditionalWriterDrawingDefaultsPropertyMap ()
 
SvxUnoPropertyMapProvidergetSvxMapProvider ()
 
bool SvxMapUnitToMeasureUnit (const MapUnit eVcl, short &eApi) noexcept
 maps the vcl MapUnit enum to an API constant MeasureUnit. More...
 
bool SvxMeasureUnitToFieldUnit (const short eApi, FieldUnit &eVcl) noexcept
 maps the API constant MeasureUnit to a vcl MapUnit enum. More...
 
bool SvxFieldUnitToMeasureUnit (const FieldUnit eVcl, short &eApi) noexcept
 maps the vcl MapUnit enum to an API constant MeasureUnit. More...
 
static bool SvxUnoGetResourceRanges (const sal_uInt16 nWhich, const rtl::OUStringConstExpr *&pApiResIds, const TranslateId *&pIntResIds, int &nCount) noexcept
 
static bool SvxUnoConvertResourceStringToApi (const TranslateId *pSourceResIds, const rtl::OUStringConstExpr *pDestResIds, int nCount, OUString &rString)
 
static bool SvxUnoConvertResourceStringFromApi (const rtl::OUStringConstExpr *pSourceResIds, const TranslateId *pDestResIds, int nCount, OUString &rString)
 
static bool SvxUnoConvertResourceStringBuiltInToApi (const TranslateId *pSourceResIds, rtl::OUStringConstExpr const *pDestResIds, int nCount, OUString &rString)
 
static bool SvxUnoConvertResourceStringBuiltInFromApi (rtl::OUStringConstExpr const *pSourceResIds, const TranslateId *pDestResIds, int nCount, OUString &rString)
 
OUString SvxUnogetApiNameForItem (const sal_uInt16 nWhich, const OUString &rInternalName)
 if the given name is a predefined name for the current language it is replaced by the corresponding api name. More...
 
OUString SvxUnogetInternalNameForItem (const sal_uInt16 nWhich, const OUString &rApiName)
 if the given name is a predefined api name it is replaced by the predefined name for the current language. More...
 

Variables

constexpr rtl::OUStringConstExpr RID_SVXSTR_BMP_DEF []
 
const TranslateId RID_SVXSTR_BMP []
 
constexpr rtl::OUStringConstExpr RID_SVXSTR_DASH_DEF []
 
const TranslateId RID_SVXSTR_DASH []
 
constexpr rtl::OUStringConstExpr RID_SVXSTR_LEND_DEF []
 
const TranslateId RID_SVXSTR_LEND []
 
constexpr rtl::OUStringConstExpr RID_SVXSTR_GRDT_DEF []
 
const TranslateId RID_SVXSTR_GRDT []
 
constexpr rtl::OUStringConstExpr RID_SVXSTR_HATCHS_DEF []
 
const TranslateId RID_SVXSTR_HATCHS []
 
constexpr rtl::OUStringConstExpr RID_SVXSTR_TRASNGR_DEF []
 
const TranslateId RID_SVXSTR_TRASNGR []
 
constexpr rtl::OUStringConstExpr SvxUnoColorNameDefResId []
 
const TranslateId SvxUnoColorNameResId []
 

Typedef Documentation

◆ UHashMapImpl

typedef std::unordered_map< OUString, SdrObjKind > UHashMapImpl

Definition at line 793 of file unoprov.cxx.

Function Documentation

◆ getSvxMapProvider()

SvxUnoPropertyMapProvider & getSvxMapProvider ( )

Definition at line 868 of file unoprov.cxx.

Referenced by SvxDrawPage::CreateShapeByTypeAndInventor().

◆ ImplGetAdditionalWriterDrawingDefaultsPropertyMap()

static o3tl::span< comphelper::PropertyMapEntry const > ImplGetAdditionalWriterDrawingDefaultsPropertyMap ( )
static

◆ ImplGetSvx3DCubeObjectPropertyMap()

static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvx3DCubeObjectPropertyMap ( )
static

◆ ImplGetSvx3DExtrudeObjectPropertyMap()

static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvx3DExtrudeObjectPropertyMap ( )
static

◆ ImplGetSvx3DLatheObjectPropertyMap()

static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvx3DLatheObjectPropertyMap ( )
static

◆ ImplGetSvx3DPolygonObjectPropertyMap()

static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvx3DPolygonObjectPropertyMap ( )
static

◆ ImplGetSvx3DSceneObjectPropertyMap()

static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvx3DSceneObjectPropertyMap ( )
static

◆ ImplGetSvx3DSphereObjectPropertyMap()

static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvx3DSphereObjectPropertyMap ( )
static

◆ ImplGetSvxAllPropertyMap()

static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxAllPropertyMap ( )
static

◆ ImplGetSvxAppletPropertyMap()

static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxAppletPropertyMap ( )
static

◆ ImplGetSvxCaptionPropertyMap()

static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxCaptionPropertyMap ( )
static

◆ ImplGetSvxCirclePropertyMap()

static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxCirclePropertyMap ( )
static

◆ ImplGetSvxConnectorPropertyMap()

static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxConnectorPropertyMap ( )
static

◆ ImplGetSvxControlShapePropertyMap()

static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxControlShapePropertyMap ( )
static

◆ ImplGetSvxCustomShapePropertyMap()

static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxCustomShapePropertyMap ( )
static

◆ ImplGetSvxDimensioningPropertyMap()

static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxDimensioningPropertyMap ( )
static

◆ ImplGetSvxDrawingDefaultsPropertyMap()

static o3tl::span< comphelper::PropertyMapEntry const > ImplGetSvxDrawingDefaultsPropertyMap ( )
static

◆ ImplGetSvxFramePropertyMap()

static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxFramePropertyMap ( )
static

◆ ImplGetSvxGraphicObjectPropertyMap()

static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxGraphicObjectPropertyMap ( )
static

◆ ImplGetSvxGroupPropertyMap()

static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxGroupPropertyMap ( )
static

◆ ImplGetSvxMediaShapePropertyMap()

static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxMediaShapePropertyMap ( )
static

◆ ImplGetSvxOle2PropertyMap()

static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxOle2PropertyMap ( )
static

◆ ImplGetSvxPageShapePropertyMap()

static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxPageShapePropertyMap ( )
static

◆ ImplGetSvxPluginPropertyMap()

static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxPluginPropertyMap ( )
static

◆ ImplGetSvxPolyPolygonPropertyMap()

static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxPolyPolygonPropertyMap ( )
static

◆ ImplGetSvxShapePropertyMap()

static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxShapePropertyMap ( )
static

◆ ImplGetSvxTableShapePropertyMap()

static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxTableShapePropertyMap ( )
static

◆ ImplGetSvxTextShapePropertyMap()

static o3tl::span< SfxItemPropertyMapEntry const > ImplGetSvxTextShapePropertyMap ( )
static

◆ SvxFieldUnitToMeasureUnit()

bool SvxFieldUnitToMeasureUnit ( const FieldUnit  eVcl,
short &  eApi 
)
noexcept

maps the vcl MapUnit enum to an API constant MeasureUnit.

Maps the vcl MapUnit enum to an API constant MeasureUnit.

Returns false if conversion is not supported.

Definition at line 986 of file unoprov.cxx.

◆ SvxMapUnitToMeasureUnit()

bool SvxMapUnitToMeasureUnit ( const MapUnit  eVcl,
short &  eApi 
)
noexcept

maps the vcl MapUnit enum to an API constant MeasureUnit.

Maps the vcl MapUnit enum to an API constant MeasureUnit.

Returns false if conversion is not supported.

Definition at line 934 of file unoprov.cxx.

◆ SvxMeasureUnitToFieldUnit()

bool SvxMeasureUnitToFieldUnit ( const short  eApi,
FieldUnit eVcl 
)
noexcept

maps the API constant MeasureUnit to a vcl MapUnit enum.

Maps the API constant MeasureUnit to a vcl MapUnit enum.

Returns false if conversion is not supported.

Definition at line 960 of file unoprov.cxx.

◆ SvxUnoConvertResourceStringBuiltInFromApi()

static bool SvxUnoConvertResourceStringBuiltInFromApi ( rtl::OUStringConstExpr const *  pSourceResIds,
const TranslateId pDestResIds,
int  nCount,
OUString &  rString 
)
static

Definition at line 1961 of file unoprov.cxx.

References i, nCount, nLength, size, SvxResId(), and o3tl::trim().

Referenced by SvxUnogetInternalNameForItem().

◆ SvxUnoConvertResourceStringBuiltInToApi()

static bool SvxUnoConvertResourceStringBuiltInToApi ( const TranslateId pSourceResIds,
rtl::OUStringConstExpr const *  pDestResIds,
int  nCount,
OUString &  rString 
)
static
Exceptions
std::exception

Definition at line 1933 of file unoprov.cxx.

References i, nCount, nLength, SvxResId(), and o3tl::trim().

Referenced by SvxUnogetApiNameForItem().

◆ SvxUnoConvertResourceStringFromApi()

static bool SvxUnoConvertResourceStringFromApi ( const rtl::OUStringConstExpr *  pSourceResIds,
const TranslateId pDestResIds,
int  nCount,
OUString &  rString 
)
static

Definition at line 1667 of file unoprov.cxx.

References i, nCount, nLength, and SvxResId().

Referenced by SvxUnogetInternalNameForItem().

◆ SvxUnoConvertResourceStringToApi()

static bool SvxUnoConvertResourceStringToApi ( const TranslateId pSourceResIds,
const rtl::OUStringConstExpr *  pDestResIds,
int  nCount,
OUString &  rString 
)
static
Exceptions
std::exception

Definition at line 1621 of file unoprov.cxx.

References i, nCount, nLength, and SvxResId().

Referenced by SvxUnogetApiNameForItem().

◆ SvxUnogetApiNameForItem()

OUString SvxUnogetApiNameForItem ( const sal_uInt16  nWhich,
const OUString &  rInternalName 
)

if the given name is a predefined name for the current language it is replaced by the corresponding api name.

If the given name is a predefined name for the current language it is replaced by the corresponding API name.

Definition at line 1991 of file unoprov.cxx.

References nCount, SAL_N_ELEMENTS, SvxUnoColorNameDefResId, SvxUnoColorNameResId, SvxUnoConvertResourceStringBuiltInToApi(), SvxUnoConvertResourceStringToApi(), SvxUnoGetResourceRanges(), and XATTR_LINECOLOR().

Referenced by createNamesForPool(), SvxUnoNameItemTable::getElementNames(), XFillBitmapItem::QueryValue(), XFillGradientItem::QueryValue(), XFillHatchItem::QueryValue(), XLineDashItem::QueryValue(), XLineEndItem::QueryValue(), and XLineStartItem::QueryValue().

◆ SvxUnogetInternalNameForItem()

OUString SvxUnogetInternalNameForItem ( const sal_uInt16  nWhich,
const OUString &  rApiName 
)

if the given name is a predefined api name it is replaced by the predefined name for the current language.

If the given name is a predefined API name it is replaced by the predefined name for the current language.

Definition at line 2024 of file unoprov.cxx.

References nCount, SAL_N_ELEMENTS, SvxUnoColorNameDefResId, SvxUnoColorNameResId, SvxUnoConvertResourceStringBuiltInFromApi(), SvxUnoConvertResourceStringFromApi(), SvxUnoGetResourceRanges(), and XATTR_LINECOLOR().

Referenced by NameOrIndex::CheckNamedItem(), SvxUnoNameItemTable::getByName(), SvxUnoNameItemTable::hasByName(), SvxUnoNameItemTable::insertByName(), SvxUnoNameItemTable::removeByName(), SvxUnoNameItemTable::replaceByName(), and SvxShape::SetFillAttribute().

◆ SvxUnoGetResourceRanges()

static bool SvxUnoGetResourceRanges ( const sal_uInt16  nWhich,
const rtl::OUStringConstExpr *&  pApiResIds,
const TranslateId *&  pIntResIds,
int nCount 
)
staticnoexcept

Variable Documentation

◆ RID_SVXSTR_BMP

const TranslateId RID_SVXSTR_BMP[]

Definition at line 1106 of file unoprov.cxx.

Referenced by SvxUnoGetResourceRanges().

◆ RID_SVXSTR_BMP_DEF

constexpr rtl::OUStringConstExpr RID_SVXSTR_BMP_DEF[]
constexpr

Definition at line 1009 of file unoprov.cxx.

Referenced by SvxUnoGetResourceRanges().

◆ RID_SVXSTR_DASH

const TranslateId RID_SVXSTR_DASH[]

Definition at line 1239 of file unoprov.cxx.

Referenced by SvxUnoGetResourceRanges().

◆ RID_SVXSTR_DASH_DEF

constexpr rtl::OUStringConstExpr RID_SVXSTR_DASH_DEF[]
constexpr

Definition at line 1203 of file unoprov.cxx.

Referenced by SvxUnoGetResourceRanges().

◆ RID_SVXSTR_GRDT

const TranslateId RID_SVXSTR_GRDT[]

Definition at line 1435 of file unoprov.cxx.

Referenced by SvxUnoGetResourceRanges().

◆ RID_SVXSTR_GRDT_DEF

constexpr rtl::OUStringConstExpr RID_SVXSTR_GRDT_DEF[]
constexpr

Definition at line 1346 of file unoprov.cxx.

Referenced by SvxUnoGetResourceRanges().

◆ RID_SVXSTR_HATCHS

const TranslateId RID_SVXSTR_HATCHS[]
Initial value:
=
{
RID_SVXSTR_HATCH0,
RID_SVXSTR_HATCH1,
RID_SVXSTR_HATCH2,
RID_SVXSTR_HATCH3,
RID_SVXSTR_HATCH4,
RID_SVXSTR_HATCH5,
RID_SVXSTR_HATCH6,
RID_SVXSTR_HATCH7,
RID_SVXSTR_HATCH8,
RID_SVXSTR_HATCH9,
RID_SVXSTR_HATCH10,
RID_SVXSTR_HATCH11,
RID_SVXSTR_HATCH12,
RID_SVXSTR_HATCH13,
RID_SVXSTR_HATCH14,
RID_SVXSTR_HATCH15
}

Definition at line 1544 of file unoprov.cxx.

Referenced by SvxUnoGetResourceRanges().

◆ RID_SVXSTR_HATCHS_DEF

constexpr rtl::OUStringConstExpr RID_SVXSTR_HATCHS_DEF[]
constexpr
Initial value:
=
{
}
constexpr OUStringLiteral RID_SVXSTR_HATCH8_DEF
Definition: strings.hxx:215
constexpr OUStringLiteral RID_SVXSTR_HATCH11_DEF
Definition: strings.hxx:218
constexpr OUStringLiteral RID_SVXSTR_HATCH12_DEF
Definition: strings.hxx:219
constexpr OUStringLiteral RID_SVXSTR_HATCH14_DEF
Definition: strings.hxx:221
constexpr OUStringLiteral RID_SVXSTR_HATCH10_DEF
Definition: strings.hxx:217
constexpr OUStringLiteral RID_SVXSTR_HATCH0_DEF
Definition: strings.hxx:207
constexpr OUStringLiteral RID_SVXSTR_HATCH3_DEF
Definition: strings.hxx:210
constexpr OUStringLiteral RID_SVXSTR_HATCH9_DEF
Definition: strings.hxx:216
constexpr OUStringLiteral RID_SVXSTR_HATCH5_DEF
Definition: strings.hxx:212
constexpr OUStringLiteral RID_SVXSTR_HATCH15_DEF
Definition: strings.hxx:222
constexpr OUStringLiteral RID_SVXSTR_HATCH2_DEF
Definition: strings.hxx:209
constexpr OUStringLiteral RID_SVXSTR_HATCH13_DEF
Definition: strings.hxx:220
constexpr OUStringLiteral RID_SVXSTR_HATCH6_DEF
Definition: strings.hxx:213
constexpr OUStringLiteral RID_SVXSTR_HATCH4_DEF
Definition: strings.hxx:211
constexpr OUStringLiteral RID_SVXSTR_HATCH7_DEF
Definition: strings.hxx:214
constexpr OUStringLiteral RID_SVXSTR_HATCH1_DEF
Definition: strings.hxx:208

Definition at line 1524 of file unoprov.cxx.

Referenced by SvxUnoGetResourceRanges().

◆ RID_SVXSTR_LEND

const TranslateId RID_SVXSTR_LEND[]

Definition at line 1310 of file unoprov.cxx.

Referenced by SvxUnoGetResourceRanges().

◆ RID_SVXSTR_LEND_DEF

constexpr rtl::OUStringConstExpr RID_SVXSTR_LEND_DEF[]
constexpr

Definition at line 1274 of file unoprov.cxx.

Referenced by SvxUnoGetResourceRanges().

◆ RID_SVXSTR_TRASNGR

const TranslateId RID_SVXSTR_TRASNGR[]
Initial value:
=
{
RID_SVXSTR_TRASNGR0
}

Definition at line 1569 of file unoprov.cxx.

Referenced by SvxUnoGetResourceRanges().

◆ RID_SVXSTR_TRASNGR_DEF

constexpr rtl::OUStringConstExpr RID_SVXSTR_TRASNGR_DEF[]
constexpr
Initial value:
=
{
}
constexpr OUStringLiteral RID_SVXSTR_TRASNGR0_DEF
Definition: strings.hxx:385

Definition at line 1564 of file unoprov.cxx.

Referenced by SvxUnoGetResourceRanges().

◆ SvxUnoColorNameDefResId

constexpr rtl::OUStringConstExpr SvxUnoColorNameDefResId[]
constexpr

Definition at line 1724 of file unoprov.cxx.

Referenced by SvxUnogetApiNameForItem(), and SvxUnogetInternalNameForItem().

◆ SvxUnoColorNameResId

const TranslateId SvxUnoColorNameResId[]

Definition at line 1828 of file unoprov.cxx.

Referenced by SvxUnogetApiNameForItem(), and SvxUnogetInternalNameForItem().