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 OUString & 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

SvXMLNumImpDatapData
 
SvXMLStylesContextpStyles
 
std::vector< MyConditionaMyConditions
 
SvXMLStylesTokens nType
 
sal_Int32 nKey
 
OUString sFormatTitle
 
OUString sCalendar
 
OUString aImplicitCalendar [2]
 
ImplicitCalendar eImplicitCalendar
 
LanguageType nFormatLang
 
bool bAutoOrder
 
bool bFromSystem
 
bool bTruncate
 
bool bAutoDec
 
bool bAutoInt
 
bool bHasExtraText
 
bool bHasTrailingEmptyText
 
OUStringBuffer aFormatCode {64}
 
OUStringBuffer aConditions {32}
 
bool bHasLongDoW
 
bool bHasDateTime
 
bool bRemoveAfterUse
 
SvXMLDateElementAttributes eDateDOW
 
SvXMLDateElementAttributes eDateDay
 
SvXMLDateElementAttributes eDateMonth
 
SvXMLDateElementAttributes eDateYear
 
SvXMLDateElementAttributes eDateHours
 
SvXMLDateElementAttributes eDateMins
 
SvXMLDateElementAttributes eDateSecs
 
bool 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 OUString &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 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 aConditions, aMyConditions, SvNumberFormatter::GetEntry(), SvNumberformat::GetFormatstring(), SvXMLNumImpData::GetKeyForName(), GetLocaleData(), SvXMLNumImpData::GetNumberFormatter(), LocaleDataWrapper::getNumDecimalSep(), nIndex, nPos, nType, NUMBERFORMAT_ENTRY_NOT_FOUND, pData, 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 aFormatCode, and bHasExtraText.

◆ AddToCode() [2/2]

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

Definition at line 1662 of file xmlnumfi.cxx.

References aFormatCode, bHasExtraText, and 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(), nKey, and 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(), nFormatLang, and pData.

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

◆ GetType()

SvXMLStylesTokens SvXMLNumFormatContext::GetType ( ) const
inline

Definition at line 189 of file xmlnumfi.hxx.

References nType.

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 nFormatLang.

Referenced by XMLTextImportHelper::GetDataStyleKey().

◆ PrivateGetKey()

sal_Int32 SvXMLNumFormatContext::PrivateGetKey ( )
private

Definition at line 1447 of file xmlnumfi.cxx.

References CreateAndInsert(), and 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

◆ aConditions

OUStringBuffer SvXMLNumFormatContext::aConditions {32}
private

Definition at line 150 of file xmlnumfi.hxx.

Referenced by AddCondition(), and CreateAndInsert().

◆ aFormatCode

OUStringBuffer SvXMLNumFormatContext::aFormatCode {64}
private

◆ aImplicitCalendar

OUString SvXMLNumFormatContext::aImplicitCalendar[2]
private

Definition at line 139 of file xmlnumfi.hxx.

Referenced by UpdateCalendar().

◆ aMyConditions

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

Definition at line 132 of file xmlnumfi.hxx.

Referenced by AddCondition(), and CreateAndInsert().

◆ bAutoDec

bool SvXMLNumFormatContext::bAutoDec
private

Definition at line 145 of file xmlnumfi.hxx.

Referenced by AddNumber(), and CreateAndInsert().

◆ bAutoInt

bool SvXMLNumFormatContext::bAutoInt
private

Definition at line 146 of file xmlnumfi.hxx.

Referenced by AddNumber(), and CreateAndInsert().

◆ bAutoOrder

bool SvXMLNumFormatContext::bAutoOrder
private

Definition at line 142 of file xmlnumfi.hxx.

Referenced by CreateAndInsert().

◆ bDateNoDefault

bool SvXMLNumFormatContext::bDateNoDefault
private

Definition at line 163 of file xmlnumfi.hxx.

Referenced by AddNfKeyword(), and CreateAndInsert().

◆ bFromSystem

bool SvXMLNumFormatContext::bFromSystem
private

Definition at line 143 of file xmlnumfi.hxx.

Referenced by CreateAndInsert().

◆ bHasDateTime

bool SvXMLNumFormatContext::bHasDateTime
private

Definition at line 152 of file xmlnumfi.hxx.

Referenced by AddNfKeyword().

◆ bHasExtraText

bool SvXMLNumFormatContext::bHasExtraText
private

Definition at line 147 of file xmlnumfi.hxx.

Referenced by AddToCode(), and CreateAndInsert().

◆ bHasLongDoW

bool SvXMLNumFormatContext::bHasLongDoW
private

Definition at line 151 of file xmlnumfi.hxx.

Referenced by AddNfKeyword().

◆ bHasTrailingEmptyText

bool SvXMLNumFormatContext::bHasTrailingEmptyText
private

Definition at line 148 of file xmlnumfi.hxx.

Referenced by AddToCode(), and CreateAndInsert().

◆ bRemoveAfterUse

bool SvXMLNumFormatContext::bRemoveAfterUse
private

Definition at line 153 of file xmlnumfi.hxx.

Referenced by CreateAndInsert(), and GetKey().

◆ bTruncate

bool SvXMLNumFormatContext::bTruncate
private

Definition at line 144 of file xmlnumfi.hxx.

Referenced by AddNfKeyword().

◆ eDateDay

SvXMLDateElementAttributes SvXMLNumFormatContext::eDateDay
private

Definition at line 157 of file xmlnumfi.hxx.

Referenced by AddNfKeyword(), and CreateAndInsert().

◆ eDateDOW

SvXMLDateElementAttributes SvXMLNumFormatContext::eDateDOW
private

Definition at line 156 of file xmlnumfi.hxx.

Referenced by AddNfKeyword(), and CreateAndInsert().

◆ eDateHours

SvXMLDateElementAttributes SvXMLNumFormatContext::eDateHours
private

Definition at line 160 of file xmlnumfi.hxx.

Referenced by AddNfKeyword(), and CreateAndInsert().

◆ eDateMins

SvXMLDateElementAttributes SvXMLNumFormatContext::eDateMins
private

Definition at line 161 of file xmlnumfi.hxx.

Referenced by AddNfKeyword(), and CreateAndInsert().

◆ eDateMonth

SvXMLDateElementAttributes SvXMLNumFormatContext::eDateMonth
private

Definition at line 158 of file xmlnumfi.hxx.

Referenced by AddNfKeyword(), and CreateAndInsert().

◆ eDateSecs

SvXMLDateElementAttributes SvXMLNumFormatContext::eDateSecs
private

Definition at line 162 of file xmlnumfi.hxx.

Referenced by AddNfKeyword(), and CreateAndInsert().

◆ eDateYear

SvXMLDateElementAttributes SvXMLNumFormatContext::eDateYear
private

Definition at line 159 of file xmlnumfi.hxx.

Referenced by AddNfKeyword(), and CreateAndInsert().

◆ eImplicitCalendar

ImplicitCalendar SvXMLNumFormatContext::eImplicitCalendar
private

Definition at line 140 of file xmlnumfi.hxx.

Referenced by UpdateCalendar().

◆ nFormatLang

LanguageType SvXMLNumFormatContext::nFormatLang
private

◆ nKey

sal_Int32 SvXMLNumFormatContext::nKey
private

Definition at line 134 of file xmlnumfi.hxx.

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

◆ nType

SvXMLStylesTokens SvXMLNumFormatContext::nType
private

Definition at line 133 of file xmlnumfi.hxx.

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

◆ pData

SvXMLNumImpData* SvXMLNumFormatContext::pData
private

◆ pStyles

SvXMLStylesContext* SvXMLNumFormatContext::pStyles
private

Definition at line 131 of file xmlnumfi.hxx.

Referenced by CreateAndInsert().

◆ sCalendar

OUString SvXMLNumFormatContext::sCalendar
private

Definition at line 138 of file xmlnumfi.hxx.

Referenced by UpdateCalendar().

◆ sFormatTitle

OUString SvXMLNumFormatContext::sFormatTitle
private

Definition at line 136 of file xmlnumfi.hxx.

Referenced by CreateAndInsert().


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