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 SfxItemPropertyMapEntry const * ImplGetSvxShapePropertyMap ()
 
static SfxItemPropertyMapEntry const * ImplGetSvxTextShapePropertyMap ()
 
static SfxItemPropertyMapEntry const * ImplGetSvxConnectorPropertyMap ()
 
static SfxItemPropertyMapEntry const * ImplGetSvxDimensioningPropertyMap ()
 
static SfxItemPropertyMapEntry const * ImplGetSvxCirclePropertyMap ()
 
static SfxItemPropertyMapEntry const * ImplGetSvxPolyPolygonPropertyMap ()
 
static SfxItemPropertyMapEntry const * ImplGetSvxGraphicObjectPropertyMap ()
 
static SfxItemPropertyMapEntry const * ImplGetSvx3DSceneObjectPropertyMap ()
 
static SfxItemPropertyMapEntry const * ImplGetSvx3DCubeObjectPropertyMap ()
 
static SfxItemPropertyMapEntry const * ImplGetSvx3DSphereObjectPropertyMap ()
 
static SfxItemPropertyMapEntry const * ImplGetSvx3DLatheObjectPropertyMap ()
 
static SfxItemPropertyMapEntry const * ImplGetSvx3DExtrudeObjectPropertyMap ()
 
static SfxItemPropertyMapEntry const * ImplGetSvx3DPolygonObjectPropertyMap ()
 
static SfxItemPropertyMapEntry const * ImplGetSvxAllPropertyMap ()
 
static SfxItemPropertyMapEntry const * ImplGetSvxGroupPropertyMap ()
 
static SfxItemPropertyMapEntry const * ImplGetSvxOle2PropertyMap ()
 
static SfxItemPropertyMapEntry const * ImplGetSvxPluginPropertyMap ()
 
static SfxItemPropertyMapEntry const * ImplGetSvxFramePropertyMap ()
 
static SfxItemPropertyMapEntry const * ImplGetSvxAppletPropertyMap ()
 
static SfxItemPropertyMapEntry const * ImplGetSvxControlShapePropertyMap ()
 
static SfxItemPropertyMapEntry const * ImplGetSvxPageShapePropertyMap ()
 
static SfxItemPropertyMapEntry const * ImplGetSvxCaptionPropertyMap ()
 
static SfxItemPropertyMapEntry const * ImplGetSvxCustomShapePropertyMap ()
 
static SfxItemPropertyMapEntry const * ImplGetSvxMediaShapePropertyMap ()
 
static 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

typedef std::unordered_map< OUString, SdrObjKind > UHashMapImpl

Definition at line 809 of file unoprov.cxx.

Function Documentation

SvxUnoPropertyMapProvider& getSvxMapProvider ( )

Definition at line 884 of file unoprov.cxx.

Referenced by SvxDrawPage::CreateShapeByTypeAndInventor().

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

Definition at line 799 of file unoprov.cxx.

References cppu::UnoType< class >::get().

static SfxItemPropertyMapEntry const* ImplGetSvx3DCubeObjectPropertyMap ( )
static
static SfxItemPropertyMapEntry const* ImplGetSvx3DExtrudeObjectPropertyMap ( )
static
static SfxItemPropertyMapEntry const* ImplGetSvx3DLatheObjectPropertyMap ( )
static
static SfxItemPropertyMapEntry const* ImplGetSvx3DPolygonObjectPropertyMap ( )
static
static SfxItemPropertyMapEntry const* ImplGetSvx3DSceneObjectPropertyMap ( )
static
static SfxItemPropertyMapEntry const* ImplGetSvx3DSphereObjectPropertyMap ( )
static
static SfxItemPropertyMapEntry const* ImplGetSvxAllPropertyMap ( )
static
static SfxItemPropertyMapEntry const* ImplGetSvxAppletPropertyMap ( )
static
static SfxItemPropertyMapEntry const* ImplGetSvxCaptionPropertyMap ( )
static
static SfxItemPropertyMapEntry const* ImplGetSvxCirclePropertyMap ( )
static
static SfxItemPropertyMapEntry const* ImplGetSvxConnectorPropertyMap ( )
static
static SfxItemPropertyMapEntry const* ImplGetSvxControlShapePropertyMap ( )
static
static SfxItemPropertyMapEntry const* ImplGetSvxCustomShapePropertyMap ( )
static
static SfxItemPropertyMapEntry const* ImplGetSvxDimensioningPropertyMap ( )
static
static o3tl::span<comphelper::PropertyMapEntry const> ImplGetSvxDrawingDefaultsPropertyMap ( )
static
static SfxItemPropertyMapEntry const* ImplGetSvxFramePropertyMap ( )
static
static SfxItemPropertyMapEntry const* ImplGetSvxGraphicObjectPropertyMap ( )
static
static SfxItemPropertyMapEntry const* ImplGetSvxGroupPropertyMap ( )
static
static SfxItemPropertyMapEntry const* ImplGetSvxMediaShapePropertyMap ( )
static
static SfxItemPropertyMapEntry const* ImplGetSvxOle2PropertyMap ( )
static
static SfxItemPropertyMapEntry const* ImplGetSvxPageShapePropertyMap ( )
static
static SfxItemPropertyMapEntry const* ImplGetSvxPluginPropertyMap ( )
static
static SfxItemPropertyMapEntry const* ImplGetSvxPolyPolygonPropertyMap ( )
static
static SfxItemPropertyMapEntry const* ImplGetSvxShapePropertyMap ( )
static
static SfxItemPropertyMapEntry const* ImplGetSvxTableShapePropertyMap ( )
static
static SfxItemPropertyMapEntry const* ImplGetSvxTextShapePropertyMap ( )
static
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 1005 of file unoprov.cxx.

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 953 of file unoprov.cxx.

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 979 of file unoprov.cxx.

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

Definition at line 1980 of file unoprov.cxx.

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

Referenced by SvxUnogetInternalNameForItem().

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

Definition at line 1952 of file unoprov.cxx.

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

Referenced by SvxUnogetApiNameForItem().

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

Definition at line 1686 of file unoprov.cxx.

References i, nLength, and SvxResId().

Referenced by SvxUnogetInternalNameForItem().

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

Definition at line 1640 of file unoprov.cxx.

References i, nLength, and SvxResId().

Referenced by 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 2010 of file unoprov.cxx.

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

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

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 2043 of file unoprov.cxx.

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

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

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

Variable Documentation

const TranslateId RID_SVXSTR_BMP[]

Definition at line 1125 of file unoprov.cxx.

Referenced by SvxUnoGetResourceRanges().

constexpr rtl::OUStringConstExpr RID_SVXSTR_BMP_DEF[]

Definition at line 1028 of file unoprov.cxx.

Referenced by SvxUnoGetResourceRanges().

const TranslateId RID_SVXSTR_DASH[]

Definition at line 1258 of file unoprov.cxx.

Referenced by SvxUnoGetResourceRanges().

constexpr rtl::OUStringConstExpr RID_SVXSTR_DASH_DEF[]

Definition at line 1222 of file unoprov.cxx.

Referenced by SvxUnoGetResourceRanges().

const TranslateId RID_SVXSTR_GRDT[]

Definition at line 1454 of file unoprov.cxx.

Referenced by SvxUnoGetResourceRanges().

constexpr rtl::OUStringConstExpr RID_SVXSTR_GRDT_DEF[]

Definition at line 1365 of file unoprov.cxx.

Referenced by SvxUnoGetResourceRanges().

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 1563 of file unoprov.cxx.

Referenced by SvxUnoGetResourceRanges().

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

Definition at line 1543 of file unoprov.cxx.

Referenced by SvxUnoGetResourceRanges().

const TranslateId RID_SVXSTR_LEND[]

Definition at line 1329 of file unoprov.cxx.

Referenced by SvxUnoGetResourceRanges().

constexpr rtl::OUStringConstExpr RID_SVXSTR_LEND_DEF[]

Definition at line 1293 of file unoprov.cxx.

Referenced by SvxUnoGetResourceRanges().

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

Definition at line 1588 of file unoprov.cxx.

Referenced by SvxUnoGetResourceRanges().

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

Definition at line 1583 of file unoprov.cxx.

Referenced by SvxUnoGetResourceRanges().

constexpr rtl::OUStringConstExpr SvxUnoColorNameDefResId[]

Definition at line 1743 of file unoprov.cxx.

Referenced by SvxUnogetApiNameForItem(), and SvxUnogetInternalNameForItem().

const TranslateId SvxUnoColorNameResId[]

Definition at line 1847 of file unoprov.cxx.