LibreOffice Module forms (master) 1
Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
frm::OLimitedFormats Class Reference

maintains translation tables format key <-> enum value More...

#include <limitedformats.hxx>

Inheritance diagram for frm::OLimitedFormats:
[legend]

Protected Member Functions

 OLimitedFormats (const css::uno::Reference< css::uno::XComponentContext > &_rxContext, const sal_Int16 _nClassId)
 ctor More...
 
 ~OLimitedFormats ()
 
void setAggregateSet (const css::uno::Reference< css::beans::XFastPropertySet > &_rxAggregate, sal_Int32 _nOriginalPropertyHandle)
 
void getFormatKeyPropertyValue (css::uno::Any &_rValue) const
 
bool convertFormatKeyPropertyValue (css::uno::Any &_rConvertedValue, css::uno::Any &_rOldValue, const css::uno::Any &_rNewValue)
 
void setFormatKeyPropertyValue (const css::uno::Any &_rNewValue)
 
const css::uno::Reference< css::util::XNumberFormatsSupplier > & getFormatsSupplier () const
 

Private Member Functions

void acquireSupplier (const css::uno::Reference< css::uno::XComponentContext > &_rxContext)
 
void releaseSupplier ()
 

Static Private Member Functions

static void ensureTableInitialized (const sal_Int16 _nTableId)
 
static void clearTable (const sal_Int16 _nTableId)
 

Private Attributes

sal_Int32 m_nFormatEnumPropertyHandle
 
const sal_Int16 m_nTableId
 
css::uno::Reference< css::beans::XFastPropertySet > m_xAggregate
 

Static Private Attributes

static sal_Int32 s_nInstanceCount
 
::osl::Mutex s_aMutex
 
static css::uno::Reference< css::util::XNumberFormatsSupplier > s_xStandardFormats
 

Detailed Description

maintains translation tables format key <-> enum value

Used for controls which provide a limited number for (standard) formats, which should be available as format keys.

Definition at line 38 of file limitedformats.hxx.

Constructor & Destructor Documentation

◆ OLimitedFormats()

frm::OLimitedFormats::OLimitedFormats ( const css::uno::Reference< css::uno::XComponentContext > &  _rxContext,
const sal_Int16  _nClassId 
)
protected

ctor

The class id is used to determine the translation table to use. All instances which pass the same value here share one table.

Definition at line 132 of file limitedformats.cxx.

References acquireSupplier(), ensureTableInitialized(), and m_nTableId.

◆ ~OLimitedFormats()

frm::OLimitedFormats::~OLimitedFormats ( )
protected

Definition at line 142 of file limitedformats.cxx.

References releaseSupplier().

Member Function Documentation

◆ acquireSupplier()

void frm::OLimitedFormats::acquireSupplier ( const css::uno::Reference< css::uno::XComponentContext > &  _rxContext)
private

Definition at line 352 of file limitedformats.cxx.

References frm::getLocale(), s_aMutex, s_nInstanceCount, and s_xStandardFormats.

Referenced by OLimitedFormats().

◆ clearTable()

void frm::OLimitedFormats::clearTable ( const sal_Int16  _nTableId)
staticprivate

Definition at line 202 of file limitedformats.cxx.

References frm::lcl_getFormatTable(), and s_aMutex.

Referenced by releaseSupplier().

◆ convertFormatKeyPropertyValue()

bool frm::OLimitedFormats::convertFormatKeyPropertyValue ( css::uno::Any &  _rConvertedValue,
css::uno::Any &  _rOldValue,
const css::uno::Any &  _rNewValue 
)
protected

◆ ensureTableInitialized()

void frm::OLimitedFormats::ensureTableInitialized ( const sal_Int16  _nTableId)
staticprivate

◆ getFormatKeyPropertyValue()

void frm::OLimitedFormats::getFormatKeyPropertyValue ( css::uno::Any &  _rValue) const
protected

◆ getFormatsSupplier()

const css::uno::Reference< css::util::XNumberFormatsSupplier > & frm::OLimitedFormats::getFormatsSupplier ( ) const
inlineprotected

◆ releaseSupplier()

void frm::OLimitedFormats::releaseSupplier ( )
private

Definition at line 362 of file limitedformats.cxx.

References clearTable(), s_aMutex, s_nInstanceCount, and s_xStandardFormats.

Referenced by ~OLimitedFormats().

◆ setAggregateSet()

void frm::OLimitedFormats::setAggregateSet ( const css::uno::Reference< css::beans::XFastPropertySet > &  _rxAggregate,
sal_Int32  _nOriginalPropertyHandle 
)
protected

◆ setFormatKeyPropertyValue()

void frm::OLimitedFormats::setFormatKeyPropertyValue ( const css::uno::Any &  _rNewValue)
protected

Member Data Documentation

◆ m_nFormatEnumPropertyHandle

sal_Int32 frm::OLimitedFormats::m_nFormatEnumPropertyHandle
private

◆ m_nTableId

const sal_Int16 frm::OLimitedFormats::m_nTableId
private

◆ m_xAggregate

css::uno::Reference< css::beans::XFastPropertySet > frm::OLimitedFormats::m_xAggregate
private

◆ s_aMutex

osl::Mutex frm::OLimitedFormats::s_aMutex
staticprivate

◆ s_nInstanceCount

sal_Int32 frm::OLimitedFormats::s_nInstanceCount
staticprivate

Definition at line 41 of file limitedformats.hxx.

Referenced by acquireSupplier(), and releaseSupplier().

◆ s_xStandardFormats

Reference< XNumberFormatsSupplier > frm::OLimitedFormats::s_xStandardFormats
staticprivate

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