LibreOffice Module xmloff (master)  1
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 Member Functions

 SvXMLNumFormatContext (SvXMLImport &rImport, sal_uInt16 nPrfx, const OUString &rLName, SvXMLNumImpData *pNewData, sal_uInt16 nNewType, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList, SvXMLStylesContext &rStyles)
 
 SvXMLNumFormatContext (SvXMLImport &rImport, sal_uInt16 nPrfx, const OUString &rLName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList, const sal_Int32 nKey, LanguageType nLang, SvXMLStylesContext &rStyles)
 
virtual ~SvXMLNumFormatContext () override
 
virtual SvXMLImportContextRef CreateChildContext (sal_uInt16 nPrefix, const OUString &rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList) override
 Create a children element context. More...
 
virtual void CreateAndInsert (bool bOverwrite) override
 
SvXMLNumImpDataGetData () const
 
sal_Int32 GetKey ()
 
sal_Int32 CreateAndInsert (SvNumberFormatter *pFormatter)
 
sal_Int32 CreateAndInsert (css::uno::Reference< css::util::XNumberFormatsSupplier > const &xFormatsSupplier)
 
sal_uInt16 GetType () const
 
bool HasLongDoW () const
 
void SetHasLongDoW (bool bSet)
 
bool HasEra () const
 
void UpdateCalendar (const OUString &rNewCalendar, bool bImplicitSecondaryCalendarEC=false)
 
const LocaleDataWrapperGetLocaleData () const
 
void AddToCode (const OUString &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, sal_uInt16 nPrfx, const OUString &rLName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList, XmlStyleFamily nFamily=XmlStyleFamily::DATA_STYLE, bool bDefaultStyle=false)
 
 SvXMLStyleContext (SvXMLImport &rImport, sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList, XmlStyleFamily nFamily=XmlStyleFamily::DATA_STYLE, bool bDefaultStyle=false)
 
virtual ~SvXMLStyleContext () override
 
virtual void StartElement (const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList) final override
 StartElement is called after a context has been constructed and before an elements context is parsed. More...
 
const OUString & GetName () const
 
const OUString & GetDisplayName () const
 
const OUString & GetAutoName () const
 
const OUString & GetParentName () const
 
const OUString & GetFollow () 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 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
bool IsPrefixFilledIn () const
 
sal_uInt16 GetPrefix () const
 
const OUString & GetLocalName () const
 
 SvXMLImportContext (SvXMLImport &rImport, sal_uInt16 nPrfx, const OUString &rLName)
 A contexts constructor does anything that is required if an element starts. More...
 
 SvXMLImportContext (SvXMLImport &rImport)
 
virtual ~SvXMLImportContext ()
 A contexts destructor does anything that is required if an element ends. More...
 
virtual void EndElement ()
 EndElement is called before a context will be destructed, but after an elements context has been parsed. More...
 
virtual void Characters (const OUString &rChars)
 This method is called for all characters that are contained in the current element. 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
 
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
 
virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &aType) final override
 
virtual void SAL_CALL acquire () final override throw ()
 
virtual void SAL_CALL release () final override throw ()
 
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
 
sal_uInt16 nType
 
sal_Int32 nKey
 
OUString sFormatTitle
 
OUString sCalendar
 
LanguageType nFormatLang
 
bool bAutoOrder
 
bool bFromSystem
 
bool bTruncate
 
bool bAutoDec
 
bool bAutoInt
 
bool bHasExtraText
 
OUStringBuffer aFormatCode
 
OUStringBuffer aConditions {32}
 
bool bHasLongDoW
 
bool bHasEra
 
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_uInt16 nPrefixKey, const OUString &rLocalName, 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 118 of file xmlnumfi.hxx.

Constructor & Destructor Documentation

SvXMLNumFormatContext::SvXMLNumFormatContext ( SvXMLImport rImport,
sal_uInt16  nPrfx,
const OUString &  rLName,
SvXMLNumImpData pNewData,
sal_uInt16  nNewType,
const css::uno::Reference< css::xml::sax::XAttributeList > &  xAttrList,
SvXMLStylesContext rStyles 
)
SvXMLNumFormatContext::SvXMLNumFormatContext ( SvXMLImport rImport,
sal_uInt16  nPrfx,
const OUString &  rLName,
const css::uno::Reference< css::xml::sax::XAttributeList > &  xAttrList,
const sal_Int32  nKey,
LanguageType  nLang,
SvXMLStylesContext rStyles 
)
SvXMLNumFormatContext::~SvXMLNumFormatContext ( )
overridevirtual

Definition at line 1504 of file xmlnumfi.cxx.

Member Function Documentation

void SvXMLNumFormatContext::AddColor ( Color  nColor)
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 2132 of file xmlnumfi.cxx.

References aConditions, aMyConditions, SvNumberFormatter::GetEntry(), SvNumberformat::GetFormatstring(), SvXMLNumImpData::GetKeyForName(), GetLocaleData(), SvXMLNumImpData::GetNumberFormatter(), LocaleDataWrapper::getNumDecimalSep(), nPos, nType, NUMBERFORMAT_ENTRY_NOT_FOUND, pData, and XML_TOK_STYLES_TEXT_STYLE.

Referenced by CreateAndInsert().

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

Definition at line 2190 of file xmlnumfi.cxx.

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

void SvXMLNumFormatContext::AddCurrency ( const OUString &  rContent,
LanguageType  nLang 
)
void SvXMLNumFormatContext::AddNfKeyword ( sal_uInt16  nIndex)
void SvXMLNumFormatContext::AddNumber ( const SvXMLNumberInfo rInfo)
void SvXMLNumFormatContext::AddToCode ( const OUString &  rString)

Definition at line 1795 of file xmlnumfi.cxx.

References aFormatCode, and bHasExtraText.

void SvXMLNumFormatContext::AddToCode ( sal_Unicode  c)

Definition at line 1789 of file xmlnumfi.cxx.

References aFormatCode, and bHasExtraText.

void SvXMLNumFormatContext::CreateAndInsert ( bool  bOverwrite)
overridevirtual

Reimplemented from SvXMLStyleContext.

Definition at line 1622 of file xmlnumfi.cxx.

References SvXMLNumImpData::GetNumberFormatter(), nKey, and pData.

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

sal_Int32 SvXMLNumFormatContext::CreateAndInsert ( SvNumberFormatter pFormatter)
sal_Int32 SvXMLNumFormatContext::CreateAndInsert ( css::uno::Reference< css::util::XNumberFormatsSupplier > const &  xFormatsSupplier)
SvXMLImportContextRef SvXMLNumFormatContext::CreateChildContext ( sal_uInt16  nPrefix,
const OUString &  rLocalName,
const css::uno::Reference< css::xml::sax::XAttributeList > &  xAttrList 
)
overridevirtual

Create a children element context.

By default, the import's CreateContext method is called to create a new default context.

Reimplemented from SvXMLImportContext.

Reimplemented in SdXMLNumberFormatImportContext.

Definition at line 1508 of file xmlnumfi.cxx.

References SvXMLTokenMap::Get(), SvXMLImportContext::GetImport(), SvXMLNumImpData::GetStyleElemTokenMap(), pData, SAL_WARN, and SvXMLImportContext::SvXMLImportContext().

Referenced by SdXMLNumberFormatImportContext::CreateChildContext().

SvXMLNumImpData* SvXMLNumFormatContext::GetData ( ) const
inline

Definition at line 177 of file xmlnumfi.hxx.

sal_Int32 SvXMLNumFormatContext::GetKey ( )
const LocaleDataWrapper & SvXMLNumFormatContext::GetLocaleData ( ) const

Definition at line 1784 of file xmlnumfi.cxx.

References SvXMLNumImpData::GetLocaleData(), nFormatLang, and pData.

Referenced by AddCondition(), and lcl_ValidChar().

sal_uInt16 SvXMLNumFormatContext::GetType ( ) const
inline

Definition at line 181 of file xmlnumfi.hxx.

Referenced by lcl_EnquoteIfNecessary(), and lcl_ValidChar().

bool SvXMLNumFormatContext::HasEra ( ) const
inline

Definition at line 185 of file xmlnumfi.hxx.

bool SvXMLNumFormatContext::HasLongDoW ( ) const
inline

Definition at line 183 of file xmlnumfi.hxx.

bool SvXMLNumFormatContext::IsSystemLanguage ( ) const

determine whether number format uses the system language

Definition at line 2234 of file xmlnumfi.cxx.

References LANGUAGE_SYSTEM, and nFormatLang.

Referenced by XMLTextImportHelper::GetDataStyleKey().

sal_Int32 SvXMLNumFormatContext::PrivateGetKey ( )
private

Definition at line 1590 of file xmlnumfi.cxx.

References CreateAndInsert(), and nKey.

Referenced by CreateAndInsert().

bool SvXMLNumFormatContext::ReplaceNfKeyword ( sal_uInt16  nOld,
sal_uInt16  nNew 
)
void SvXMLNumFormatContext::SetHasLongDoW ( bool  bSet)
inline

Definition at line 184 of file xmlnumfi.hxx.

void SvXMLNumFormatContext::UpdateCalendar ( const OUString &  rNewCalendar,
bool  bImplicitSecondaryCalendarEC = false 
)

Definition at line 2220 of file xmlnumfi.cxx.

References aFormatCode, and sCalendar.

Member Data Documentation

OUStringBuffer SvXMLNumFormatContext::aConditions {32}
private

Definition at line 137 of file xmlnumfi.hxx.

Referenced by AddCondition(), and CreateAndInsert().

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

Definition at line 122 of file xmlnumfi.hxx.

Referenced by AddCondition(), and CreateAndInsert().

bool SvXMLNumFormatContext::bAutoDec
private

Definition at line 133 of file xmlnumfi.hxx.

Referenced by AddNumber(), and CreateAndInsert().

bool SvXMLNumFormatContext::bAutoInt
private

Definition at line 134 of file xmlnumfi.hxx.

Referenced by AddNumber(), and CreateAndInsert().

bool SvXMLNumFormatContext::bAutoOrder
private

Definition at line 130 of file xmlnumfi.hxx.

Referenced by CreateAndInsert().

bool SvXMLNumFormatContext::bDateNoDefault
private

Definition at line 151 of file xmlnumfi.hxx.

Referenced by AddNfKeyword(), and CreateAndInsert().

bool SvXMLNumFormatContext::bFromSystem
private

Definition at line 131 of file xmlnumfi.hxx.

Referenced by CreateAndInsert().

bool SvXMLNumFormatContext::bHasDateTime
private

Definition at line 140 of file xmlnumfi.hxx.

Referenced by AddNfKeyword().

bool SvXMLNumFormatContext::bHasEra
private

Definition at line 139 of file xmlnumfi.hxx.

Referenced by AddNfKeyword().

bool SvXMLNumFormatContext::bHasExtraText
private

Definition at line 135 of file xmlnumfi.hxx.

Referenced by AddToCode(), and CreateAndInsert().

bool SvXMLNumFormatContext::bHasLongDoW
private

Definition at line 138 of file xmlnumfi.hxx.

Referenced by AddNfKeyword().

bool SvXMLNumFormatContext::bRemoveAfterUse
private

Definition at line 141 of file xmlnumfi.hxx.

Referenced by CreateAndInsert(), and GetKey().

bool SvXMLNumFormatContext::bTruncate
private

Definition at line 132 of file xmlnumfi.hxx.

Referenced by AddNfKeyword().

SvXMLDateElementAttributes SvXMLNumFormatContext::eDateDay
private

Definition at line 145 of file xmlnumfi.hxx.

Referenced by AddNfKeyword(), and CreateAndInsert().

SvXMLDateElementAttributes SvXMLNumFormatContext::eDateDOW
private

Definition at line 144 of file xmlnumfi.hxx.

Referenced by AddNfKeyword(), and CreateAndInsert().

SvXMLDateElementAttributes SvXMLNumFormatContext::eDateHours
private

Definition at line 148 of file xmlnumfi.hxx.

Referenced by AddNfKeyword(), and CreateAndInsert().

SvXMLDateElementAttributes SvXMLNumFormatContext::eDateMins
private

Definition at line 149 of file xmlnumfi.hxx.

Referenced by AddNfKeyword(), and CreateAndInsert().

SvXMLDateElementAttributes SvXMLNumFormatContext::eDateMonth
private

Definition at line 146 of file xmlnumfi.hxx.

Referenced by AddNfKeyword(), and CreateAndInsert().

SvXMLDateElementAttributes SvXMLNumFormatContext::eDateSecs
private

Definition at line 150 of file xmlnumfi.hxx.

Referenced by AddNfKeyword(), and CreateAndInsert().

SvXMLDateElementAttributes SvXMLNumFormatContext::eDateYear
private

Definition at line 147 of file xmlnumfi.hxx.

Referenced by AddNfKeyword(), and CreateAndInsert().

LanguageType SvXMLNumFormatContext::nFormatLang
private
sal_Int32 SvXMLNumFormatContext::nKey
private

Definition at line 124 of file xmlnumfi.hxx.

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

sal_uInt16 SvXMLNumFormatContext::nType
private

Definition at line 123 of file xmlnumfi.hxx.

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

SvXMLNumImpData* SvXMLNumFormatContext::pData
private
SvXMLStylesContext* SvXMLNumFormatContext::pStyles
private

Definition at line 121 of file xmlnumfi.hxx.

Referenced by CreateAndInsert().

OUString SvXMLNumFormatContext::sCalendar
private

Definition at line 128 of file xmlnumfi.hxx.

Referenced by UpdateCalendar().

OUString SvXMLNumFormatContext::sFormatTitle
private

Definition at line 126 of file xmlnumfi.hxx.

Referenced by CreateAndInsert().


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