LibreOffice Module xmloff (master) 1
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
SvXMLNumFormatContext Class Reference

#include <xmlnumfi.hxx>

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

Public Types

enum  ImplicitCalendar {
  DEFAULT ,
  SECONDARY ,
  OTHER ,
  DEFAULT_FROM_OTHER ,
  SECONDARY_FROM_OTHER
}
 

Public Member Functions

 SvXMLNumFormatContext (SvXMLImport &rImport, sal_Int32 nElement, SvXMLNumImpData *pNewData, SvXMLStylesTokens nNewType, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList, SvXMLStylesContext &rStyles)
 
 SvXMLNumFormatContext (SvXMLImport &rImport, const OUString &rName, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList, const sal_Int32 nKey, LanguageType nLang, SvXMLStylesContext &rStyles)
 
virtual ~SvXMLNumFormatContext () override
 
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext (sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
 
virtual void CreateAndInsert (bool bOverwrite) override
 
sal_Int32 GetKey ()
 
sal_Int32 CreateAndInsert (SvNumberFormatter *pFormatter)
 
sal_Int32 CreateAndInsert (css::uno::Reference< css::util::XNumberFormatsSupplier > const &xFormatsSupplier)
 
SvXMLStylesTokens GetType () const
 
bool HasLongDoW () const
 
void SetHasLongDoW (bool bSet)
 
void SetHasTrailingEmptyText (bool bSet)
 
void UpdateCalendar (const OUString &rNewCalendar)
 
ImplicitCalendar GetImplicitCalendarState () const
 
const LocaleDataWrapperGetLocaleData () const
 
void AddToCode (std::u16string_view rString)
 
void AddToCode (sal_Unicode c)
 
void AddNumber (const SvXMLNumberInfo &rInfo)
 
void AddCurrency (const OUString &rContent, LanguageType nLang)
 
void AddNfKeyword (sal_uInt16 nIndex)
 
bool ReplaceNfKeyword (sal_uInt16 nOld, sal_uInt16 nNew)
 
void AddCondition (const sal_Int32 nIndex)
 
void AddCondition (const OUString &rCondition, const OUString &rApplyName)
 
void AddColor (Color nColor)
 
bool IsSystemLanguage () const
 determine whether number format uses the system language More...
 
- Public Member Functions inherited from SvXMLStyleContext
 SvXMLStyleContext (SvXMLImport &rImport, XmlStyleFamily nFamily=XmlStyleFamily::DATA_STYLE, bool bDefaultStyle=false)
 
virtual ~SvXMLStyleContext () override
 
virtual void SAL_CALL startFastElement (sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &) override
 
const OUString & GetName () const
 
const OUString & GetDisplayName () const
 
const css::uno::Any & GetAutoName () const
 
const OUString & GetParentName () const
 
const OUString & GetFollow () const
 
const OUString & GetLinked () const
 
XmlStyleFamily GetFamily () const
 
bool IsValid () const
 
void SetValid (bool b)
 
bool IsNew () const
 
void SetNew (bool b)
 
bool IsHidden () const
 
virtual void SetDefaults ()
 
virtual void CreateAndInsert (bool bOverwrite)
 
virtual void CreateAndInsertLate (bool bOverwrite)
 
virtual void Finish (bool bOverwrite)
 
bool IsDefaultStyle () const
 
virtual bool IsTransient () const
 if this method returns true, its parent styles context should not add it to its container. More...
 
- Public Member Functions inherited from SvXMLImportContext
 SvXMLImportContext (SvXMLImport &rImport)
 A contexts constructor does anything that is required if an element starts. More...
 
virtual ~SvXMLImportContext ()
 A contexts destructor does anything that is required if an element ends. More...
 
virtual void SAL_CALL startFastElement (sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
 
virtual void SAL_CALL startUnknownElement (const OUString &Namespace, const OUString &Name, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
 
virtual void SAL_CALL endFastElement (sal_Int32 Element) override
 endFastElement is called before a context will be destructed, but after an elements context has been parsed. More...
 
virtual void SAL_CALL endUnknownElement (const OUString &Namespace, const OUString &Name) override
 
virtual css::uno::Reference< XFastContextHandler > SAL_CALL createFastChildContext (sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
 
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createUnknownChildContext (const OUString &Namespace, const OUString &Name, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
 
virtual void SAL_CALL characters (const OUString &aChars) override
 This method is called for all characters that are contained in the current element. More...
 
virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &aType) final override
 
virtual void SAL_CALL acquire () noexcept final override
 
virtual void SAL_CALL release () noexcept final override
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () final override
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () final override
 

Private Member Functions

SAL_DLLPRIVATE sal_Int32 PrivateGetKey ()
 

Private Attributes

SvXMLNumImpDatam_pData
 
SvXMLStylesContextm_pStyles
 
std::vector< MyConditionm_aMyConditions
 
SvXMLStylesTokens m_nType
 
sal_Int32 m_nKey
 
OUString m_sFormatTitle
 
OUString m_sCalendar
 
OUString m_aImplicitCalendar [2]
 
ImplicitCalendar m_eImplicitCalendar
 
LanguageType m_nFormatLang
 
bool m_bAutoOrder
 
bool m_bFromSystem
 
bool m_bTruncate
 
bool m_bAutoDec
 
bool m_bAutoInt
 
bool m_bHasExtraText
 
bool m_bHasTrailingEmptyText
 
OUStringBuffer m_aFormatCode {64}
 
OUStringBuffer m_aConditions {32}
 
bool m_bHasLongDoW
 
bool m_bHasDateTime
 
bool m_bRemoveAfterUse
 
SvXMLDateElementAttributes m_eDateDOW
 
SvXMLDateElementAttributes m_eDateDay
 
SvXMLDateElementAttributes m_eDateMonth
 
SvXMLDateElementAttributes m_eDateYear
 
SvXMLDateElementAttributes m_eDateHours
 
SvXMLDateElementAttributes m_eDateMins
 
SvXMLDateElementAttributes m_eDateSecs
 
bool m_bDateNoDefault
 

Additional Inherited Members

- Protected Member Functions inherited from SvXMLStyleContext
virtual void SetAttribute (sal_Int32 nElement, const OUString &rValue)
 
void SetFamily (XmlStyleFamily nSet)
 
void SetAutoName (const css::uno::Any &rName)
 
- Protected Member Functions inherited from SvXMLImportContext
SvXMLImportGetImport ()
 
const SvXMLImportGetImport () const
 

Detailed Description

Definition at line 116 of file xmlnumfi.hxx.

Member Enumeration Documentation

◆ ImplicitCalendar

Enumerator
DEFAULT 
SECONDARY 
OTHER 
DEFAULT_FROM_OTHER 
SECONDARY_FROM_OTHER 

Definition at line 119 of file xmlnumfi.hxx.

Constructor & Destructor Documentation

◆ SvXMLNumFormatContext() [1/2]

SvXMLNumFormatContext::SvXMLNumFormatContext ( SvXMLImport rImport,
sal_Int32  nElement,
SvXMLNumImpData pNewData,
SvXMLStylesTokens  nNewType,
const css::uno::Reference< css::xml::sax::XFastAttributeList > &  xAttrList,
SvXMLStylesContext rStyles 
)

◆ SvXMLNumFormatContext() [2/2]

SvXMLNumFormatContext::SvXMLNumFormatContext ( SvXMLImport rImport,
const OUString &  rName,
const css::uno::Reference< css::xml::sax::XFastAttributeList > &  xAttrList,
const sal_Int32  nKey,
LanguageType  nLang,
SvXMLStylesContext rStyles 
)

◆ ~SvXMLNumFormatContext()

SvXMLNumFormatContext::~SvXMLNumFormatContext ( )
overridevirtual

Definition at line 1307 of file xmlnumfi.cxx.

Member Function Documentation

◆ AddColor()

void SvXMLNumFormatContext::AddColor ( Color  nColor)

◆ AddCondition() [1/2]

void SvXMLNumFormatContext::AddCondition ( const OUString &  rCondition,
const OUString &  rApplyName 
)

Definition at line 2072 of file xmlnumfi.cxx.

References m_aMyConditions, MyCondition::sCondition, and MyCondition::sMapName.

◆ AddCondition() [2/2]

void SvXMLNumFormatContext::AddCondition ( const sal_Int32  nIndex)

test for valid conditions test for default conditions

collect all conditions first and adjust default to >=0, >0 or <0 depending on count allow blanks in conditions

Definition at line 2014 of file xmlnumfi.cxx.

References SvNumberFormatter::GetEntry(), SvNumberformat::GetFormatstring(), SvXMLNumImpData::GetKeyForName(), GetLocaleData(), SvXMLNumImpData::GetNumberFormatter(), LocaleDataWrapper::getNumDecimalSep(), m_aConditions, m_aMyConditions, m_nType, m_pData, nIndex, nPos, NUMBERFORMAT_ENTRY_NOT_FOUND, TEXT_STYLE, and u.

Referenced by CreateAndInsert().

◆ AddCurrency()

void SvXMLNumFormatContext::AddCurrency ( const OUString &  rContent,
LanguageType  nLang 
)

◆ AddNfKeyword()

void SvXMLNumFormatContext::AddNfKeyword ( sal_uInt16  nIndex)

◆ AddNumber()

void SvXMLNumFormatContext::AddNumber ( const SvXMLNumberInfo rInfo)

◆ AddToCode() [1/2]

void SvXMLNumFormatContext::AddToCode ( sal_Unicode  c)

Definition at line 1656 of file xmlnumfi.cxx.

References m_aFormatCode, and m_bHasExtraText.

◆ AddToCode() [2/2]

void SvXMLNumFormatContext::AddToCode ( std::u16string_view  rString)

Definition at line 1662 of file xmlnumfi.cxx.

References m_aFormatCode, m_bHasExtraText, and m_bHasTrailingEmptyText.

◆ CreateAndInsert() [1/3]

void SvXMLNumFormatContext::CreateAndInsert ( bool  bOverwrite)
overridevirtual

Reimplemented from SvXMLStyleContext.

Definition at line 1479 of file xmlnumfi.cxx.

References CreateAndInsert(), SvXMLNumImpData::GetNumberFormatter(), m_nKey, and m_pData.

Referenced by CreateAndInsert(), GetKey(), and PrivateGetKey().

◆ CreateAndInsert() [2/3]

sal_Int32 SvXMLNumFormatContext::CreateAndInsert ( css::uno::Reference< css::util::XNumberFormatsSupplier > const &  xFormatsSupplier)

◆ CreateAndInsert() [3/3]

sal_Int32 SvXMLNumFormatContext::CreateAndInsert ( SvNumberFormatter pFormatter)

◆ createFastChildContext()

css::uno::Reference< css::xml::sax::XFastContextHandler > SvXMLNumFormatContext::createFastChildContext ( sal_Int32  nElement,
const css::uno::Reference< css::xml::sax::XFastAttributeList > &  AttrList 
)
overridevirtual

◆ GetImplicitCalendarState()

ImplicitCalendar SvXMLNumFormatContext::GetImplicitCalendarState ( ) const
inline

Definition at line 196 of file xmlnumfi.hxx.

◆ GetKey()

sal_Int32 SvXMLNumFormatContext::GetKey ( )

◆ GetLocaleData()

const LocaleDataWrapper & SvXMLNumFormatContext::GetLocaleData ( ) const

Definition at line 1651 of file xmlnumfi.cxx.

References SvXMLNumImpData::GetLocaleData(), m_nFormatLang, and m_pData.

Referenced by AddCondition(), lcl_ValidChar(), and UpdateCalendar().

◆ GetType()

SvXMLStylesTokens SvXMLNumFormatContext::GetType ( ) const
inline

Definition at line 189 of file xmlnumfi.hxx.

Referenced by lcl_EnquoteIfNecessary(), and lcl_ValidChar().

◆ HasLongDoW()

bool SvXMLNumFormatContext::HasLongDoW ( ) const
inline

Definition at line 191 of file xmlnumfi.hxx.

◆ IsSystemLanguage()

bool SvXMLNumFormatContext::IsSystemLanguage ( ) const

determine whether number format uses the system language

Definition at line 2168 of file xmlnumfi.cxx.

References LANGUAGE_SYSTEM, and m_nFormatLang.

Referenced by XMLTextImportHelper::GetDataStyleKey().

◆ PrivateGetKey()

sal_Int32 SvXMLNumFormatContext::PrivateGetKey ( )
private

Definition at line 1447 of file xmlnumfi.cxx.

References CreateAndInsert(), and m_nKey.

Referenced by CreateAndInsert().

◆ ReplaceNfKeyword()

bool SvXMLNumFormatContext::ReplaceNfKeyword ( sal_uInt16  nOld,
sal_uInt16  nNew 
)

◆ SetHasLongDoW()

void SvXMLNumFormatContext::SetHasLongDoW ( bool  bSet)
inline

Definition at line 192 of file xmlnumfi.hxx.

◆ SetHasTrailingEmptyText()

void SvXMLNumFormatContext::SetHasTrailingEmptyText ( bool  bSet)
inline

Definition at line 193 of file xmlnumfi.hxx.

◆ UpdateCalendar()

void SvXMLNumFormatContext::UpdateCalendar ( const OUString &  rNewCalendar)

Member Data Documentation

◆ m_aConditions

OUStringBuffer SvXMLNumFormatContext::m_aConditions {32}
private

Definition at line 150 of file xmlnumfi.hxx.

Referenced by AddCondition(), and CreateAndInsert().

◆ m_aFormatCode

OUStringBuffer SvXMLNumFormatContext::m_aFormatCode {64}
private

◆ m_aImplicitCalendar

OUString SvXMLNumFormatContext::m_aImplicitCalendar[2]
private

Definition at line 139 of file xmlnumfi.hxx.

Referenced by UpdateCalendar().

◆ m_aMyConditions

std::vector<MyCondition> SvXMLNumFormatContext::m_aMyConditions
private

Definition at line 132 of file xmlnumfi.hxx.

Referenced by AddCondition(), and CreateAndInsert().

◆ m_bAutoDec

bool SvXMLNumFormatContext::m_bAutoDec
private

Definition at line 145 of file xmlnumfi.hxx.

Referenced by AddNumber(), and CreateAndInsert().

◆ m_bAutoInt

bool SvXMLNumFormatContext::m_bAutoInt
private

Definition at line 146 of file xmlnumfi.hxx.

Referenced by AddNumber(), and CreateAndInsert().

◆ m_bAutoOrder

bool SvXMLNumFormatContext::m_bAutoOrder
private

Definition at line 142 of file xmlnumfi.hxx.

Referenced by CreateAndInsert().

◆ m_bDateNoDefault

bool SvXMLNumFormatContext::m_bDateNoDefault
private

Definition at line 163 of file xmlnumfi.hxx.

Referenced by AddNfKeyword(), and CreateAndInsert().

◆ m_bFromSystem

bool SvXMLNumFormatContext::m_bFromSystem
private

Definition at line 143 of file xmlnumfi.hxx.

Referenced by CreateAndInsert().

◆ m_bHasDateTime

bool SvXMLNumFormatContext::m_bHasDateTime
private

Definition at line 152 of file xmlnumfi.hxx.

Referenced by AddNfKeyword().

◆ m_bHasExtraText

bool SvXMLNumFormatContext::m_bHasExtraText
private

Definition at line 147 of file xmlnumfi.hxx.

Referenced by AddToCode(), and CreateAndInsert().

◆ m_bHasLongDoW

bool SvXMLNumFormatContext::m_bHasLongDoW
private

Definition at line 151 of file xmlnumfi.hxx.

Referenced by AddNfKeyword().

◆ m_bHasTrailingEmptyText

bool SvXMLNumFormatContext::m_bHasTrailingEmptyText
private

Definition at line 148 of file xmlnumfi.hxx.

Referenced by AddToCode(), and CreateAndInsert().

◆ m_bRemoveAfterUse

bool SvXMLNumFormatContext::m_bRemoveAfterUse
private

Definition at line 153 of file xmlnumfi.hxx.

Referenced by CreateAndInsert(), and GetKey().

◆ m_bTruncate

bool SvXMLNumFormatContext::m_bTruncate
private

Definition at line 144 of file xmlnumfi.hxx.

Referenced by AddNfKeyword().

◆ m_eDateDay

SvXMLDateElementAttributes SvXMLNumFormatContext::m_eDateDay
private

Definition at line 157 of file xmlnumfi.hxx.

Referenced by AddNfKeyword(), and CreateAndInsert().

◆ m_eDateDOW

SvXMLDateElementAttributes SvXMLNumFormatContext::m_eDateDOW
private

Definition at line 156 of file xmlnumfi.hxx.

Referenced by AddNfKeyword(), and CreateAndInsert().

◆ m_eDateHours

SvXMLDateElementAttributes SvXMLNumFormatContext::m_eDateHours
private

Definition at line 160 of file xmlnumfi.hxx.

Referenced by AddNfKeyword(), and CreateAndInsert().

◆ m_eDateMins

SvXMLDateElementAttributes SvXMLNumFormatContext::m_eDateMins
private

Definition at line 161 of file xmlnumfi.hxx.

Referenced by AddNfKeyword(), and CreateAndInsert().

◆ m_eDateMonth

SvXMLDateElementAttributes SvXMLNumFormatContext::m_eDateMonth
private

Definition at line 158 of file xmlnumfi.hxx.

Referenced by AddNfKeyword(), and CreateAndInsert().

◆ m_eDateSecs

SvXMLDateElementAttributes SvXMLNumFormatContext::m_eDateSecs
private

Definition at line 162 of file xmlnumfi.hxx.

Referenced by AddNfKeyword(), and CreateAndInsert().

◆ m_eDateYear

SvXMLDateElementAttributes SvXMLNumFormatContext::m_eDateYear
private

Definition at line 159 of file xmlnumfi.hxx.

Referenced by AddNfKeyword(), and CreateAndInsert().

◆ m_eImplicitCalendar

ImplicitCalendar SvXMLNumFormatContext::m_eImplicitCalendar
private

Definition at line 140 of file xmlnumfi.hxx.

Referenced by UpdateCalendar().

◆ m_nFormatLang

LanguageType SvXMLNumFormatContext::m_nFormatLang
private

◆ m_nKey

sal_Int32 SvXMLNumFormatContext::m_nKey
private

Definition at line 134 of file xmlnumfi.hxx.

Referenced by CreateAndInsert(), GetKey(), and PrivateGetKey().

◆ m_nType

SvXMLStylesTokens SvXMLNumFormatContext::m_nType
private

Definition at line 133 of file xmlnumfi.hxx.

Referenced by AddCondition(), AddNumber(), and CreateAndInsert().

◆ m_pData

SvXMLNumImpData* SvXMLNumFormatContext::m_pData
private

◆ m_pStyles

SvXMLStylesContext* SvXMLNumFormatContext::m_pStyles
private

Definition at line 131 of file xmlnumfi.hxx.

Referenced by CreateAndInsert().

◆ m_sCalendar

OUString SvXMLNumFormatContext::m_sCalendar
private

Definition at line 138 of file xmlnumfi.hxx.

Referenced by UpdateCalendar().

◆ m_sFormatTitle

OUString SvXMLNumFormatContext::m_sFormatTitle
private

Definition at line 136 of file xmlnumfi.hxx.

Referenced by CreateAndInsert().


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