LibreOffice Module extensions (master) 1
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
pcr::DefaultEnumRepresentation Class Reference

an implementation of the IPropertyEnumRepresentation More...

#include <formmetadata.hxx>

Inheritance diagram for pcr::DefaultEnumRepresentation:
[legend]
Collaboration diagram for pcr::DefaultEnumRepresentation:
[legend]

Public Member Functions

 DefaultEnumRepresentation (const IPropertyInfoService &_rInfo, const css::uno::Type &_rType, sal_Int32 _nPropertyId)
 constructs an instance More...
 
virtual std::vector< OUString > getDescriptions () const =0
 retrieves all descriptions of all possible values of the enumeration property More...
 
virtual void getValueFromDescription (const OUString &_rDescription, css::uno::Any &_out_rValue) const =0
 converts a given description into a property value More...
 
virtual OUString getDescriptionForValue (const css::uno::Any &_rEnumValue) const =0
 converts a given property value into a description More...
 
- Public Member Functions inherited from salhelper::SimpleReferenceObject
 SimpleReferenceObject ()
 
void acquire ()
 
void release ()
 

Protected Member Functions

virtual ~DefaultEnumRepresentation () override
 
virtual std::vector< OUString > getDescriptions () const override
 retrieves all descriptions of all possible values of the enumeration property More...
 
virtual void getValueFromDescription (const OUString &_rDescription, css::uno::Any &_out_rValue) const override
 converts a given description into a property value More...
 
virtual OUString getDescriptionForValue (const css::uno::Any &_rEnumValue) const override
 converts a given property value into a description More...
 
- Protected Member Functions inherited from salhelper::SimpleReferenceObject
virtual ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE
 

Private Member Functions

 DefaultEnumRepresentation (const DefaultEnumRepresentation &)=delete
 
DefaultEnumRepresentationoperator= (const DefaultEnumRepresentation &)=delete
 

Private Attributes

const IPropertyInfoServicem_rMetaData
 
css::uno::Type m_aType
 
const sal_Int32 m_nPropertyId
 

Additional Inherited Members

- Static Public Member Functions inherited from salhelper::SimpleReferenceObject
static void * operator new (std::size_t nSize)
 
static void * operator new (std::size_t nSize, std::nothrow_t const &rNothrow)
 
static void operator delete (void *pPtr)
 
static void operator delete (void *pPtr, std::nothrow_t const &rNothrow)
 
- Protected Attributes inherited from salhelper::SimpleReferenceObject
oslInterlockedCount m_nCount
 

Detailed Description

an implementation of the IPropertyEnumRepresentation

To be used with properties which, in formmetadata.cxx, are declared as ENUM.

Definition at line 67 of file formmetadata.hxx.

Constructor & Destructor Documentation

◆ DefaultEnumRepresentation() [1/2]

pcr::DefaultEnumRepresentation::DefaultEnumRepresentation ( const IPropertyInfoService _rInfo,
const css::uno::Type &  _rType,
sal_Int32  _nPropertyId 
)

constructs an instance

Parameters
_rInfoAn instance implementing IPropertyInfoService. Must live at least as long as the DefaultEnumRepresentation should live.

◆ ~DefaultEnumRepresentation()

pcr::DefaultEnumRepresentation::~DefaultEnumRepresentation ( )
overrideprotectedvirtual

Definition at line 613 of file formmetadata.cxx.

◆ DefaultEnumRepresentation() [2/2]

pcr::DefaultEnumRepresentation::DefaultEnumRepresentation ( const DefaultEnumRepresentation )
privatedelete

Member Function Documentation

◆ getDescriptionForValue()

OUString pcr::DefaultEnumRepresentation::getDescriptionForValue ( const css::uno::Any &  _rEnumValue) const
overrideprotectedvirtual

◆ getDescriptions()

std::vector< OUString > pcr::DefaultEnumRepresentation::getDescriptions ( ) const
overrideprotectedvirtual

retrieves all descriptions of all possible values of the enumeration property

Implements pcr::IPropertyEnumRepresentation.

Definition at line 618 of file formmetadata.cxx.

References pcr::IPropertyInfoService::getPropertyEnumRepresentations(), m_nPropertyId, and m_rMetaData.

◆ getValueFromDescription()

void pcr::DefaultEnumRepresentation::getValueFromDescription ( const OUString &  _rDescription,
css::uno::Any &  _out_rValue 
) const
overrideprotectedvirtual

◆ operator=()

DefaultEnumRepresentation & pcr::DefaultEnumRepresentation::operator= ( const DefaultEnumRepresentation )
privatedelete

Member Data Documentation

◆ m_aType

css::uno::Type pcr::DefaultEnumRepresentation::m_aType
private

Definition at line 71 of file formmetadata.hxx.

Referenced by getValueFromDescription().

◆ m_nPropertyId

const sal_Int32 pcr::DefaultEnumRepresentation::m_nPropertyId
private

◆ m_rMetaData

const IPropertyInfoService& pcr::DefaultEnumRepresentation::m_rMetaData
private

The documentation for this class was generated from the following files: