LibreOffice Module i18npool (master) 1
Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
NumberFormatCodeMapper Class Referencefinal

#include <numberformatcode.hxx>

Inheritance diagram for NumberFormatCodeMapper:
[legend]
Collaboration diagram for NumberFormatCodeMapper:
[legend]

Public Member Functions

 NumberFormatCodeMapper (const css::uno::Reference< css::uno::XComponentContext > &rxContext)
 
virtual ~NumberFormatCodeMapper () override
 
virtual css::i18n::NumberFormatCode SAL_CALL getDefault (sal_Int16 nFormatType, sal_Int16 nFormatUsage, const css::lang::Locale &rLocale) override
 
virtual css::i18n::NumberFormatCode SAL_CALL getFormatCode (sal_Int16 nFormatIndex, const css::lang::Locale &rLocale) override
 
virtual css::uno::Sequence< css::i18n::NumberFormatCode > SAL_CALL getAllFormatCode (sal_Int16 nFormatUsage, const css::lang::Locale &rLocale) override
 
virtual css::uno::Sequence< css::i18n::NumberFormatCode > SAL_CALL getAllFormatCodes (const css::lang::Locale &rLocale) override
 
virtual OUString SAL_CALL getImplementationName () override
 
virtual sal_Bool SAL_CALL supportsService (const OUString &ServiceName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 

Private Types

typedef std::pair< css::lang::Locale, css::uno::Sequence< css::i18n::FormatElement > > FormatElementCacheItem
 

Private Member Functions

const css::uno::Sequence< css::i18n::FormatElement > & getFormats (const css::lang::Locale &rLocale)
 

Static Private Member Functions

static OUString mapElementTypeShortToString (sal_Int16 formatType)
 
static sal_Int16 mapElementTypeStringToShort (std::u16string_view formatType)
 
static OUString mapElementUsageShortToString (sal_Int16 formatUsage)
 
static sal_Int16 mapElementUsageStringToShort (std::u16string_view formatUsage)
 

Private Attributes

std::mutex maMutex
 
css::uno::Reference< css::i18n::XLocaleData5 > m_xLocaleData
 
std::deque< FormatElementCacheItemm_aFormatElementCache
 

Detailed Description

Definition at line 36 of file numberformatcode.hxx.

Member Typedef Documentation

◆ FormatElementCacheItem

typedef std::pair< css::lang::Locale, css::uno::Sequence< css::i18n::FormatElement > > NumberFormatCodeMapper::FormatElementCacheItem
private

Definition at line 60 of file numberformatcode.hxx.

Constructor & Destructor Documentation

◆ NumberFormatCodeMapper()

NumberFormatCodeMapper::NumberFormatCodeMapper ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext)

Definition at line 27 of file numberformatcode.cxx.

References m_xLocaleData.

◆ ~NumberFormatCodeMapper()

NumberFormatCodeMapper::~NumberFormatCodeMapper ( )
overridevirtual

Definition at line 34 of file numberformatcode.cxx.

Member Function Documentation

◆ getAllFormatCode()

css::uno::Sequence< css::i18n::NumberFormatCode > SAL_CALL NumberFormatCodeMapper::getAllFormatCode ( sal_Int16  nFormatUsage,
const css::lang::Locale &  rLocale 
)
overridevirtual

◆ getAllFormatCodes()

css::uno::Sequence< css::i18n::NumberFormatCode > SAL_CALL NumberFormatCodeMapper::getAllFormatCodes ( const css::lang::Locale &  rLocale)
overridevirtual

Definition at line 114 of file numberformatcode.cxx.

References getFormats(), and maMutex.

◆ getDefault()

css::i18n::NumberFormatCode SAL_CALL NumberFormatCodeMapper::getDefault ( sal_Int16  nFormatType,
sal_Int16  nFormatUsage,
const css::lang::Locale &  rLocale 
)
overridevirtual

◆ getFormatCode()

css::i18n::NumberFormatCode SAL_CALL NumberFormatCodeMapper::getFormatCode ( sal_Int16  nFormatIndex,
const css::lang::Locale &  rLocale 
)
overridevirtual

◆ getFormats()

const css::uno::Sequence< css::i18n::FormatElement > & NumberFormatCodeMapper::getFormats ( const css::lang::Locale &  rLocale)
private

◆ getImplementationName()

OUString SAL_CALL NumberFormatCodeMapper::getImplementationName ( )
overridevirtual

Definition at line 241 of file numberformatcode.cxx.

◆ getSupportedServiceNames()

css::uno::Sequence< OUString > SAL_CALL NumberFormatCodeMapper::getSupportedServiceNames ( )
overridevirtual

Definition at line 252 of file numberformatcode.cxx.

◆ mapElementTypeShortToString()

OUString NumberFormatCodeMapper::mapElementTypeShortToString ( sal_Int16  formatType)
staticprivate

Definition at line 162 of file numberformatcode.cxx.

Referenced by getDefault().

◆ mapElementTypeStringToShort()

sal_Int16 NumberFormatCodeMapper::mapElementTypeStringToShort ( std::u16string_view  formatType)
staticprivate

Definition at line 178 of file numberformatcode.cxx.

References u.

Referenced by getAllFormatCode(), and getFormatCode().

◆ mapElementUsageShortToString()

OUString NumberFormatCodeMapper::mapElementUsageShortToString ( sal_Int16  formatUsage)
staticprivate

Definition at line 191 of file numberformatcode.cxx.

Referenced by getDefault().

◆ mapElementUsageStringToShort()

sal_Int16 NumberFormatCodeMapper::mapElementUsageStringToShort ( std::u16string_view  formatUsage)
staticprivate

Definition at line 217 of file numberformatcode.cxx.

References u.

Referenced by getAllFormatCode(), and getFormatCode().

◆ supportsService()

sal_Bool SAL_CALL NumberFormatCodeMapper::supportsService ( const OUString &  ServiceName)
overridevirtual

Definition at line 246 of file numberformatcode.cxx.

References cppu::supportsService().

Member Data Documentation

◆ m_aFormatElementCache

std::deque< FormatElementCacheItem > NumberFormatCodeMapper::m_aFormatElementCache
private

Definition at line 61 of file numberformatcode.hxx.

Referenced by getFormats().

◆ m_xLocaleData

css::uno::Reference< css::i18n::XLocaleData5 > NumberFormatCodeMapper::m_xLocaleData
private

Definition at line 59 of file numberformatcode.hxx.

Referenced by getFormats(), and NumberFormatCodeMapper().

◆ maMutex

std::mutex NumberFormatCodeMapper::maMutex
private

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