|
LibreOffice Module xmloff (master) 1
|
#include <xmlnumfi.hxx>
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 LocaleDataWrapper & | GetLocaleData () 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 | |
| SvXMLNumImpData * | m_pData |
| SvXMLStylesContext * | m_pStyles |
| std::vector< MyCondition > | m_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 | |
| SvXMLImport & | GetImport () |
| const SvXMLImport & | GetImport () const |
Definition at line 116 of file xmlnumfi.hxx.
| Enumerator | |
|---|---|
| DEFAULT | |
| SECONDARY | |
| OTHER | |
| DEFAULT_FROM_OTHER | |
| SECONDARY_FROM_OTHER | |
Definition at line 119 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 1307 of file xmlnumfi.cxx.
| void SvXMLNumFormatContext::AddColor | ( | Color | nColor | ) |
Definition at line 2080 of file xmlnumfi.cxx.
References aNumFmtStdColors, SvNumberFormatter::GetKeyword(), SvXMLNumImpData::GetNumberFormatter(), i, m_aFormatCode, m_nFormatLang, m_pData, NF_KEY_FIRSTCOLOR, and XML_NUMF_COLORCOUNT.
| 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.
| 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().
| void SvXMLNumFormatContext::AddCurrency | ( | const OUString & | rContent, |
| LanguageType | nLang | ||
| ) |
Definition at line 1848 of file xmlnumfi.cxx.
References SvNumberFormatter::ChangeIntl(), SvNumberFormatter::GetCompatibilityCurrency(), SvXMLNumImpData::GetNumberFormatter(), LANGUAGE_SYSTEM, m_aFormatCode, m_nFormatLang, m_pData, and nLength.
| void SvXMLNumFormatContext::AddNfKeyword | ( | sal_uInt16 | nIndex | ) |
Definition at line 1915 of file xmlnumfi.cxx.
References SvNumberFormatter::GetKeyword(), SvXMLNumImpData::GetNumberFormatter(), m_aFormatCode, m_bDateNoDefault, m_bHasDateTime, m_bHasLongDoW, m_bTruncate, m_eDateDay, m_eDateDOW, m_eDateHours, m_eDateMins, m_eDateMonth, m_eDateSecs, m_eDateYear, m_nFormatLang, m_pData, NF_KEY_AMPM, NF_KEY_AP, NF_KEY_D, NF_KEY_DD, NF_KEY_H, NF_KEY_HH, NF_KEY_M, NF_KEY_MI, NF_KEY_MM, NF_KEY_MMI, NF_KEY_MMM, NF_KEY_MMMM, NF_KEY_NN, NF_KEY_NNN, NF_KEY_NNNN, NF_KEY_S, NF_KEY_SS, NF_KEY_YY, NF_KEY_YYYY, nIndex, XML_DEA_LONG, XML_DEA_SHORT, XML_DEA_TEXTLONG, and XML_DEA_TEXTSHORT.
| void SvXMLNumFormatContext::AddNumber | ( | const SvXMLNumberInfo & | rInfo | ) |
...
Definition at line 1669 of file xmlnumfi.cxx.
References 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(), i, index, m_aFormatCode, m_bAutoDec, m_bAutoInt, SvXMLNumberInfo::m_EmbeddedElements, m_nFormatLang, m_nType, m_pData, SvXMLNumberInfo::nBlankInteger, SvXMLNumberInfo::nDecimals, SvXMLNumberInfo::nExpDigits, SvXMLNumberInfo::nExpInterval, nIndex, SvXMLNumberInfo::nInteger, and SvXMLNumberInfo::nMinDecimalDigits.
| void SvXMLNumFormatContext::AddToCode | ( | sal_Unicode | c | ) |
Definition at line 1656 of file xmlnumfi.cxx.
References m_aFormatCode, and m_bHasExtraText.
| void SvXMLNumFormatContext::AddToCode | ( | std::u16string_view | rString | ) |
Definition at line 1662 of file xmlnumfi.cxx.
References m_aFormatCode, m_bHasExtraText, and m_bHasTrailingEmptyText.
|
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().
| sal_Int32 SvXMLNumFormatContext::CreateAndInsert | ( | css::uno::Reference< css::util::XNumberFormatsSupplier > const & | xFormatsSupplier | ) |
Definition at line 1460 of file xmlnumfi.cxx.
References CreateAndInsert(), SvNumberFormatsSupplierObj::GetNumberFormatter(), and m_nKey.
| 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 1485 of file xmlnumfi.cxx.
References AddCondition(), SvXMLNumImpData::AddKey(), BOOLEAN_STYLE, DATA_STYLE, DATE_STYLE, SvXMLStylesContext::FindStyleChildContext(), SvXMLNumFmtDefaults::GetDefaultDateFormat(), SvNumberFormatter::GetEntry(), SvNumberFormatter::GetEntryKey(), SvNumberFormatter::GetFormatIndex(), SvNumberformat::GetFormatstring(), SvXMLImportContext::GetImport(), SvNumberFormatter::GetIndexTableOffset(), SvXMLStyleContext::GetName(), SvNumberFormatter::GetStandardIndex(), i, m_aConditions, m_aFormatCode, m_aMyConditions, m_bAutoDec, m_bAutoInt, m_bAutoOrder, m_bDateNoDefault, m_bFromSystem, m_bHasExtraText, m_bHasTrailingEmptyText, m_bRemoveAfterUse, m_eDateDay, m_eDateDOW, m_eDateHours, m_eDateMins, m_eDateMonth, m_eDateSecs, m_eDateYear, m_nFormatLang, m_nKey, m_nType, m_pData, m_pStyles, m_sFormatTitle, 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, nIndex, NUMBER_STYLE, NUMBERFORMAT_ENTRY_NOT_FOUND, PrivateGetKey(), SvNumberFormatter::PutEntry(), SAL_INFO, and SvNumberformat::SetComment().
|
overridevirtual |
Reimplemented from SvXMLImportContext.
Reimplemented in SdXMLNumberFormatImportContext.
Definition at line 1311 of file xmlnumfi.cxx.
References SvXMLImportContext::GetImport(), 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().
|
inline |
Definition at line 196 of file xmlnumfi.hxx.
| sal_Int32 SvXMLNumFormatContext::GetKey | ( | ) |
Definition at line 1421 of file xmlnumfi.cxx.
References CreateAndInsert(), SvXMLImportContext::GetImport(), SvXMLStyleContext::GetName(), m_bRemoveAfterUse, m_nKey, m_pData, and SvXMLNumImpData::SetUsed().
Referenced by XMLTextImportHelper::GetDataStyleKey().
| 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().
|
inline |
Definition at line 189 of file xmlnumfi.hxx.
Referenced by lcl_EnquoteIfNecessary(), and lcl_ValidChar().
|
inline |
Definition at line 191 of file xmlnumfi.hxx.
| 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().
|
private |
Definition at line 1447 of file xmlnumfi.cxx.
References CreateAndInsert(), and m_nKey.
Referenced by CreateAndInsert().
| bool SvXMLNumFormatContext::ReplaceNfKeyword | ( | sal_uInt16 | nOld, |
| sal_uInt16 | nNew | ||
| ) |
Definition at line 1991 of file xmlnumfi.cxx.
References SvNumberFormatter::GetKeyword(), SvXMLNumImpData::GetNumberFormatter(), lcl_IsAtEnd(), m_aFormatCode, m_nFormatLang, and m_pData.
|
inline |
Definition at line 192 of file xmlnumfi.hxx.
|
inline |
Definition at line 193 of file xmlnumfi.hxx.
| void SvXMLNumFormatContext::UpdateCalendar | ( | const OUString & | rNewCalendar | ) |
Definition at line 2102 of file xmlnumfi.cxx.
References LocaleDataWrapper::doesSecondaryCalendarUseEC(), LocaleDataWrapper::getDefaultCalendar(), GetLocaleData(), m_aFormatCode, m_aImplicitCalendar, m_eImplicitCalendar, and m_sCalendar.
|
private |
Definition at line 150 of file xmlnumfi.hxx.
Referenced by AddCondition(), and CreateAndInsert().
|
private |
Definition at line 149 of file xmlnumfi.hxx.
Referenced by AddColor(), AddCurrency(), AddNfKeyword(), AddNumber(), AddToCode(), CreateAndInsert(), ReplaceNfKeyword(), and UpdateCalendar().
|
private |
Definition at line 139 of file xmlnumfi.hxx.
Referenced by UpdateCalendar().
|
private |
Definition at line 132 of file xmlnumfi.hxx.
Referenced by AddCondition(), and CreateAndInsert().
|
private |
Definition at line 145 of file xmlnumfi.hxx.
Referenced by AddNumber(), and CreateAndInsert().
|
private |
Definition at line 146 of file xmlnumfi.hxx.
Referenced by AddNumber(), and CreateAndInsert().
|
private |
Definition at line 142 of file xmlnumfi.hxx.
Referenced by CreateAndInsert().
|
private |
Definition at line 163 of file xmlnumfi.hxx.
Referenced by AddNfKeyword(), and CreateAndInsert().
|
private |
Definition at line 143 of file xmlnumfi.hxx.
Referenced by CreateAndInsert().
|
private |
Definition at line 152 of file xmlnumfi.hxx.
Referenced by AddNfKeyword().
|
private |
Definition at line 147 of file xmlnumfi.hxx.
Referenced by AddToCode(), and CreateAndInsert().
|
private |
Definition at line 151 of file xmlnumfi.hxx.
Referenced by AddNfKeyword().
|
private |
Definition at line 148 of file xmlnumfi.hxx.
Referenced by AddToCode(), and CreateAndInsert().
|
private |
Definition at line 153 of file xmlnumfi.hxx.
Referenced by CreateAndInsert(), and GetKey().
|
private |
Definition at line 144 of file xmlnumfi.hxx.
Referenced by AddNfKeyword().
|
private |
Definition at line 157 of file xmlnumfi.hxx.
Referenced by AddNfKeyword(), and CreateAndInsert().
|
private |
Definition at line 156 of file xmlnumfi.hxx.
Referenced by AddNfKeyword(), and CreateAndInsert().
|
private |
Definition at line 160 of file xmlnumfi.hxx.
Referenced by AddNfKeyword(), and CreateAndInsert().
|
private |
Definition at line 161 of file xmlnumfi.hxx.
Referenced by AddNfKeyword(), and CreateAndInsert().
|
private |
Definition at line 158 of file xmlnumfi.hxx.
Referenced by AddNfKeyword(), and CreateAndInsert().
|
private |
Definition at line 162 of file xmlnumfi.hxx.
Referenced by AddNfKeyword(), and CreateAndInsert().
|
private |
Definition at line 159 of file xmlnumfi.hxx.
Referenced by AddNfKeyword(), and CreateAndInsert().
|
private |
Definition at line 140 of file xmlnumfi.hxx.
Referenced by UpdateCalendar().
|
private |
Definition at line 141 of file xmlnumfi.hxx.
Referenced by AddColor(), AddCurrency(), AddNfKeyword(), AddNumber(), CreateAndInsert(), GetLocaleData(), IsSystemLanguage(), and ReplaceNfKeyword().
|
private |
Definition at line 134 of file xmlnumfi.hxx.
Referenced by CreateAndInsert(), GetKey(), and PrivateGetKey().
|
private |
Definition at line 133 of file xmlnumfi.hxx.
Referenced by AddCondition(), AddNumber(), and CreateAndInsert().
|
private |
Definition at line 130 of file xmlnumfi.hxx.
Referenced by AddColor(), AddCondition(), AddCurrency(), AddNfKeyword(), AddNumber(), CreateAndInsert(), GetKey(), GetLocaleData(), and ReplaceNfKeyword().
|
private |
Definition at line 131 of file xmlnumfi.hxx.
Referenced by CreateAndInsert().
|
private |
Definition at line 138 of file xmlnumfi.hxx.
Referenced by UpdateCalendar().
|
private |
Definition at line 136 of file xmlnumfi.hxx.
Referenced by CreateAndInsert().