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... | |
![]() | |
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... | |
![]() | |
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 * | pData |
SvXMLStylesContext * | pStyles |
std::vector< MyCondition > | aMyConditions |
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 | |
![]() | |
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.
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 aFormatCode, aNumFmtStdColors, SvNumberFormatter::GetKeyword(), SvXMLNumImpData::GetNumberFormatter(), i, NF_KEY_FIRSTCOLOR, nFormatLang, pData, and XML_NUMF_COLORCOUNT.
void SvXMLNumFormatContext::AddCondition | ( | const OUString & | rCondition, |
const OUString & | rApplyName | ||
) |
Definition at line 2072 of file xmlnumfi.cxx.
References 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 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().
void SvXMLNumFormatContext::AddCurrency | ( | const OUString & | rContent, |
LanguageType | nLang | ||
) |
Definition at line 1848 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 1915 of file xmlnumfi.cxx.
References aFormatCode, bDateNoDefault, bHasDateTime, bHasLongDoW, bTruncate, eDateDay, eDateDOW, eDateHours, eDateMins, eDateMonth, eDateSecs, eDateYear, SvNumberFormatter::GetKeyword(), SvXMLNumImpData::GetNumberFormatter(), 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, nFormatLang, nIndex, pData, 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 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(), i, index, SvXMLNumberInfo::m_EmbeddedElements, SvXMLNumberInfo::nBlankInteger, SvXMLNumberInfo::nDecimals, SvXMLNumberInfo::nExpDigits, SvXMLNumberInfo::nExpInterval, nFormatLang, nIndex, SvXMLNumberInfo::nInteger, SvXMLNumberInfo::nMinDecimalDigits, nType, and pData.
void SvXMLNumFormatContext::AddToCode | ( | sal_Unicode | c | ) |
Definition at line 1656 of file xmlnumfi.cxx.
References aFormatCode, and bHasExtraText.
void SvXMLNumFormatContext::AddToCode | ( | std::u16string_view | rString | ) |
Definition at line 1662 of file xmlnumfi.cxx.
References aFormatCode, bHasExtraText, and bHasTrailingEmptyText.
|
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().
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 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 aConditions, AddCondition(), SvXMLNumImpData::AddKey(), aFormatCode, aMyConditions, bAutoDec, bAutoInt, bAutoOrder, bDateNoDefault, bFromSystem, bHasExtraText, bHasTrailingEmptyText, 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(), i, 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.
|
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 bRemoveAfterUse, CreateAndInsert(), SvXMLImportContext::GetImport(), SvXMLStyleContext::GetName(), nKey, pData, and SvXMLNumImpData::SetUsed().
Referenced by XMLTextImportHelper::GetDataStyleKey().
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().
|
inline |
Definition at line 189 of file xmlnumfi.hxx.
References nType.
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 nFormatLang.
Referenced by XMLTextImportHelper::GetDataStyleKey().
|
private |
Definition at line 1447 of file xmlnumfi.cxx.
References CreateAndInsert(), and nKey.
Referenced by CreateAndInsert().
bool SvXMLNumFormatContext::ReplaceNfKeyword | ( | sal_uInt16 | nOld, |
sal_uInt16 | nNew | ||
) |
Definition at line 1991 of file xmlnumfi.cxx.
References aFormatCode, SvNumberFormatter::GetKeyword(), SvXMLNumImpData::GetNumberFormatter(), lcl_IsAtEnd(), nFormatLang, and 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 aFormatCode, aImplicitCalendar, LocaleDataWrapper::doesSecondaryCalendarUseEC(), eImplicitCalendar, LocaleDataWrapper::getDefaultCalendar(), GetLocaleData(), and 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().