LibreOffice Module xmloff (master)
1
|
#include <xmlnumfi.hxx>
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) |
bool | HasEra () const |
void | UpdateCalendar (const OUString &rNewCalendar, bool bImplicitSecondaryCalendarEC=false) |
const LocaleDataWrapper & | GetLocaleData () 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... | |
![]() | |
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 |
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... | |
![]() | |
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 | 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< 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 () 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 | |
SvXMLNumImpData * | pData |
SvXMLStylesContext * | pStyles |
std::vector< MyCondition > | aMyConditions |
SvXMLStylesTokens | 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 | |
![]() | |
virtual void | SetAttribute (sal_Int32 nElement, const OUString &rValue) |
void | SetFamily (XmlStyleFamily nSet) |
void | SetAutoName (const OUString &rName) |
![]() | |
SvXMLImport & | GetImport () |
const SvXMLImport & | GetImport () const |
Definition at line 116 of file xmlnumfi.hxx.
SvXMLNumFormatContext::SvXMLNumFormatContext | ( | SvXMLImport & | rImport, |
sal_Int32 | nElement, | ||
SvXMLNumImpData * | pNewData, | ||
SvXMLStylesTokens | nNewType, | ||
const css::uno::Reference< css::xml::sax::XFastAttributeList > & | xAttrList, | ||
SvXMLStylesContext & | rStyles | ||
) |
SvXMLNumFormatContext::SvXMLNumFormatContext | ( | SvXMLImport & | rImport, |
const OUString & | rName, | ||
const css::uno::Reference< css::xml::sax::XFastAttributeList > & | xAttrList, | ||
const sal_Int32 | nKey, | ||
LanguageType | nLang, | ||
SvXMLStylesContext & | rStyles | ||
) |
|
overridevirtual |
Definition at line 1279 of file xmlnumfi.cxx.
Definition at line 2027 of file xmlnumfi.cxx.
References aFormatCode, SvNumberFormatter::GetKeyword(), SvXMLNumImpData::GetNumberFormatter(), NF_KEY_FIRSTCOLOR, nFormatLang, pData, and XML_NUMF_COLORCOUNT.
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 1961 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 TEXT_STYLE.
Referenced by CreateAndInsert().
void SvXMLNumFormatContext::AddCondition | ( | const OUString & | rCondition, |
const OUString & | rApplyName | ||
) |
Definition at line 2019 of file xmlnumfi.cxx.
References aMyConditions, MyCondition::sCondition, and MyCondition::sMapName.
void SvXMLNumFormatContext::AddCurrency | ( | const OUString & | rContent, |
LanguageType | nLang | ||
) |
Definition at line 1792 of file xmlnumfi.cxx.
References aFormatCode, SvNumberFormatter::ChangeIntl(), SvNumberFormatter::GetCompatibilityCurrency(), SvXMLNumImpData::GetNumberFormatter(), LANGUAGE_SYSTEM, nFormatLang, nLength, and pData.
void SvXMLNumFormatContext::AddNfKeyword | ( | sal_uInt16 | nIndex | ) |
Definition at line 1859 of file xmlnumfi.cxx.
References aFormatCode, bDateNoDefault, bHasDateTime, bHasEra, bHasLongDoW, bTruncate, eDateDay, eDateDOW, eDateHours, eDateMins, eDateMonth, eDateSecs, eDateYear, SvNumberFormatter::GetKeyword(), SvXMLNumImpData::GetNumberFormatter(), NF_KEY_AMPM, NF_KEY_AP, NF_KEY_DD, NF_KEY_GG, NF_KEY_GGG, NF_KEY_HH, NF_KEY_MM, NF_KEY_MMI, NF_KEY_MMMM, NF_KEY_NNN, NF_KEY_NNNN, NF_KEY_SS, NF_KEY_YY, NF_KEY_YYYY, nFormatLang, pData, XML_DEA_LONG, XML_DEA_SHORT, XML_DEA_TEXTLONG, and XML_DEA_TEXTSHORT.
void SvXMLNumFormatContext::AddNumber | ( | const SvXMLNumberInfo & | rInfo | ) |
...
Definition at line 1630 of file xmlnumfi.cxx.
References aFormatCode, bAutoDec, bAutoInt, SvXMLNumberInfo::bDecAlign, SvXMLNumberInfo::bDecReplace, SvXMLNumberInfo::bGrouping, CURRENCY_STYLE, SvXMLNumberInfo::fDisplayFactor, SvNumberFormatter::GenerateFormat(), LocaleDataWrapper::getCurrDigits(), SvXMLNumImpData::GetLocaleData(), SvXMLNumImpData::GetNumberFormatter(), SvNumberFormatter::GetNumDecimalSep(), LocaleDataWrapper::getNumDecimalSep(), LocaleDataWrapper::getNumThousandSep(), SvNumberFormatter::GetStandardIndex(), SvNumberFormatter::GetStandardName(), index, SvXMLNumberInfo::m_EmbeddedElements, SvXMLNumberInfo::nDecimals, SvXMLNumberInfo::nExpDigits, SvXMLNumberInfo::nExpInterval, nFormatLang, nIndex, SvXMLNumberInfo::nInteger, SvXMLNumberInfo::nMinDecimalDigits, nType, and pData.
void SvXMLNumFormatContext::AddToCode | ( | const OUString & | rString | ) |
Definition at line 1624 of file xmlnumfi.cxx.
References aFormatCode, and bHasExtraText.
void SvXMLNumFormatContext::AddToCode | ( | sal_Unicode | c | ) |
Definition at line 1618 of file xmlnumfi.cxx.
References aFormatCode, and bHasExtraText.
|
overridevirtual |
Reimplemented from SvXMLStyleContext.
Definition at line 1451 of file xmlnumfi.cxx.
References SvXMLNumImpData::GetNumberFormatter(), nKey, and pData.
Referenced by CreateAndInsert(), GetKey(), and PrivateGetKey().
sal_Int32 SvXMLNumFormatContext::CreateAndInsert | ( | SvNumberFormatter * | pFormatter | ) |
only if two decimal places was set?
I18N doesn't provide SYSTEM or extended date information yet
Definition at line 1457 of file xmlnumfi.cxx.
References aConditions, AddCondition(), SvXMLNumImpData::AddKey(), SvXMLImport::AddNumberStyle(), aFormatCode, aMyConditions, bAutoDec, bAutoInt, bAutoOrder, bDateNoDefault, bFromSystem, bHasExtraText, BOOLEAN_STYLE, bRemoveAfterUse, DATA_STYLE, DATE_STYLE, eDateDay, eDateDOW, eDateHours, eDateMins, eDateMonth, eDateSecs, eDateYear, SvXMLStylesContext::FindStyleChildContext(), SvXMLNumFmtDefaults::GetDefaultDateFormat(), SvNumberFormatter::GetEntry(), SvNumberFormatter::GetEntryKey(), SvNumberFormatter::GetFormatIndex(), SvNumberformat::GetFormatstring(), SvXMLImportContext::GetImport(), SvNumberFormatter::GetIndexTableOffset(), SvXMLStyleContext::GetName(), SvNumberFormatter::GetStandardIndex(), NF_BOOLEAN, NF_DATE_DIN_DMMMMYYYY, NF_DATE_DIN_DMMMYYYY, NF_DATE_SYS_DMMMMYYYY, NF_DATE_SYS_DMMMYYYY, NF_INDEX_TABLE_RESERVED_START, NF_NUMBER_SYSTEM, nFormatLang, nIndex, nKey, nType, NUMBER_STYLE, NUMBERFORMAT_ENTRY_NOT_FOUND, pData, PrivateGetKey(), pStyles, SvNumberFormatter::PutEntry(), SAL_INFO, SvNumberformat::SetComment(), and sFormatTitle.
sal_Int32 SvXMLNumFormatContext::CreateAndInsert | ( | css::uno::Reference< css::util::XNumberFormatsSupplier > const & | xFormatsSupplier | ) |
Definition at line 1432 of file xmlnumfi.cxx.
References CreateAndInsert(), SvNumberFormatsSupplierObj::GetNumberFormatter(), and nKey.
|
overridevirtual |
Reimplemented from SvXMLImportContext.
Reimplemented in SdXMLNumberFormatImportContext.
Definition at line 1283 of file xmlnumfi.cxx.
References SvXMLImportContext::GetImport(), SvXMLImport::getPrefixAndNameFromToken(), NUMBER, SAL_WARN, STYLE, SvXMLImportContext::SvXMLImportContext(), xmloff::token::XML_AM_PM, xmloff::token::XML_BOOLEAN, xmloff::token::XML_CURRENCY_SYMBOL, xmloff::token::XML_DAY, xmloff::token::XML_DAY_OF_WEEK, XML_ELEMENT, xmloff::token::XML_ERA, xmloff::token::XML_FILL_CHARACTER, xmloff::token::XML_FRACTION, xmloff::token::XML_HOURS, xmloff::token::XML_MAP, xmloff::token::XML_MINUTES, xmloff::token::XML_MONTH, xmloff::token::XML_NUMBER, xmloff::token::XML_QUARTER, xmloff::token::XML_SCIENTIFIC_NUMBER, xmloff::token::XML_SECONDS, xmloff::token::XML_TEXT, xmloff::token::XML_TEXT_CONTENT, xmloff::token::XML_TEXT_PROPERTIES, xmloff::token::XML_WEEK_OF_YEAR, and xmloff::token::XML_YEAR.
Referenced by SdXMLNumberFormatImportContext::createFastChildContext().
sal_Int32 SvXMLNumFormatContext::GetKey | ( | ) |
Definition at line 1393 of file xmlnumfi.cxx.
References SvXMLImport::AddNumberStyle(), bRemoveAfterUse, CreateAndInsert(), SvXMLImportContext::GetImport(), SvXMLStyleContext::GetName(), nKey, pData, and SvXMLNumImpData::SetUsed().
Referenced by XMLTextImportHelper::GetDataStyleKey().
const LocaleDataWrapper & SvXMLNumFormatContext::GetLocaleData | ( | ) | const |
Definition at line 1613 of file xmlnumfi.cxx.
References SvXMLNumImpData::GetLocaleData(), nFormatLang, and pData.
Referenced by AddCondition(), and lcl_ValidChar().
|
inline |
Definition at line 175 of file xmlnumfi.hxx.
Referenced by lcl_EnquoteIfNecessary(), and lcl_ValidChar().
|
inline |
Definition at line 179 of file xmlnumfi.hxx.
|
inline |
Definition at line 177 of file xmlnumfi.hxx.
bool SvXMLNumFormatContext::IsSystemLanguage | ( | ) | const |
determine whether number format uses the system language
Definition at line 2063 of file xmlnumfi.cxx.
References LANGUAGE_SYSTEM, and nFormatLang.
Referenced by XMLTextImportHelper::GetDataStyleKey().
|
private |
Definition at line 1419 of file xmlnumfi.cxx.
References CreateAndInsert(), and nKey.
Referenced by CreateAndInsert().
bool SvXMLNumFormatContext::ReplaceNfKeyword | ( | sal_uInt16 | nOld, |
sal_uInt16 | nNew | ||
) |
Definition at line 1938 of file xmlnumfi.cxx.
References aFormatCode, SvNumberFormatter::GetKeyword(), SvXMLNumImpData::GetNumberFormatter(), lcl_IsAtEnd(), nFormatLang, and pData.
|
inline |
Definition at line 178 of file xmlnumfi.hxx.
void SvXMLNumFormatContext::UpdateCalendar | ( | const OUString & | rNewCalendar, |
bool | bImplicitSecondaryCalendarEC = false |
||
) |
Definition at line 2049 of file xmlnumfi.cxx.
References aFormatCode, and sCalendar.
|
private |
Definition at line 135 of file xmlnumfi.hxx.
Referenced by AddCondition(), and CreateAndInsert().
|
private |
Definition at line 134 of file xmlnumfi.hxx.
Referenced by AddColor(), AddCurrency(), AddNfKeyword(), AddNumber(), AddToCode(), CreateAndInsert(), ReplaceNfKeyword(), and UpdateCalendar().
|
private |
Definition at line 120 of file xmlnumfi.hxx.
Referenced by AddCondition(), and CreateAndInsert().
|
private |
Definition at line 131 of file xmlnumfi.hxx.
Referenced by AddNumber(), and CreateAndInsert().
|
private |
Definition at line 132 of file xmlnumfi.hxx.
Referenced by AddNumber(), and CreateAndInsert().
|
private |
Definition at line 128 of file xmlnumfi.hxx.
Referenced by CreateAndInsert().
|
private |
Definition at line 149 of file xmlnumfi.hxx.
Referenced by AddNfKeyword(), and CreateAndInsert().
|
private |
Definition at line 129 of file xmlnumfi.hxx.
Referenced by CreateAndInsert().
|
private |
Definition at line 138 of file xmlnumfi.hxx.
Referenced by AddNfKeyword().
|
private |
Definition at line 137 of file xmlnumfi.hxx.
Referenced by AddNfKeyword().
|
private |
Definition at line 133 of file xmlnumfi.hxx.
Referenced by AddToCode(), and CreateAndInsert().
|
private |
Definition at line 136 of file xmlnumfi.hxx.
Referenced by AddNfKeyword().
|
private |
Definition at line 139 of file xmlnumfi.hxx.
Referenced by CreateAndInsert(), and GetKey().
|
private |
Definition at line 130 of file xmlnumfi.hxx.
Referenced by AddNfKeyword().
|
private |
Definition at line 143 of file xmlnumfi.hxx.
Referenced by AddNfKeyword(), and CreateAndInsert().
|
private |
Definition at line 142 of file xmlnumfi.hxx.
Referenced by AddNfKeyword(), and CreateAndInsert().
|
private |
Definition at line 146 of file xmlnumfi.hxx.
Referenced by AddNfKeyword(), and CreateAndInsert().
|
private |
Definition at line 147 of file xmlnumfi.hxx.
Referenced by AddNfKeyword(), and CreateAndInsert().
|
private |
Definition at line 144 of file xmlnumfi.hxx.
Referenced by AddNfKeyword(), and CreateAndInsert().
|
private |
Definition at line 148 of file xmlnumfi.hxx.
Referenced by AddNfKeyword(), and CreateAndInsert().
|
private |
Definition at line 145 of file xmlnumfi.hxx.
Referenced by AddNfKeyword(), and CreateAndInsert().
|
private |
Definition at line 127 of file xmlnumfi.hxx.
Referenced by AddColor(), AddCurrency(), AddNfKeyword(), AddNumber(), CreateAndInsert(), GetLocaleData(), IsSystemLanguage(), and ReplaceNfKeyword().
|
private |
Definition at line 122 of file xmlnumfi.hxx.
Referenced by CreateAndInsert(), GetKey(), and PrivateGetKey().
|
private |
Definition at line 121 of file xmlnumfi.hxx.
Referenced by AddCondition(), AddNumber(), and CreateAndInsert().
|
private |
Definition at line 118 of file xmlnumfi.hxx.
Referenced by AddColor(), AddCondition(), AddCurrency(), AddNfKeyword(), AddNumber(), CreateAndInsert(), GetKey(), GetLocaleData(), and ReplaceNfKeyword().
|
private |
Definition at line 119 of file xmlnumfi.hxx.
Referenced by CreateAndInsert().
|
private |
Definition at line 126 of file xmlnumfi.hxx.
Referenced by UpdateCalendar().
|
private |
Definition at line 124 of file xmlnumfi.hxx.
Referenced by CreateAndInsert().