summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2021-03-16 21:12:29 +0100
committerEike Rathke <erack@redhat.com>2021-03-21 12:36:02 +0100
commit010d6d1562f309a2aee728f8e5590385cc6ce8fd (patch)
treec32388f446512d77a115dd6ee495e54f1ed44ad5 /include
parent53c4a93e32a5bcdc06a580e9652cde535134b3f6 (diff)
ODF load: suppress calendar modifiers in format codes if possible
... for switching to/from implicit secondary calendar, like ja-JP explicit [~gengou] and [~gregorian] most times are superfluous and GE or YYYY are used. In preparation for https://gerrit.libreoffice.org/c/core/+/108532 Change-Id: I8eb412c0fbba0927741bb305f91eb575b5f1bb13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112596 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
Diffstat (limited to 'include')
-rw-r--r--include/xmloff/xmlnumfi.hxx17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/xmloff/xmlnumfi.hxx b/include/xmloff/xmlnumfi.hxx
index 1bf6c9228ed6..c863304bc293 100644
--- a/include/xmloff/xmlnumfi.hxx
+++ b/include/xmloff/xmlnumfi.hxx
@@ -115,6 +115,18 @@ struct MyCondition
class XMLOFF_DLLPUBLIC SvXMLNumFormatContext : public SvXMLStyleContext
{
+public:
+ enum ImplicitCalendar
+ {
+ DEFAULT,
+ SECONDARY,
+ OTHER,
+ DEFAULT_FROM_OTHER,
+ SECONDARY_FROM_OTHER
+ };
+
+private:
+
SvXMLNumImpData* pData;
SvXMLStylesContext* pStyles;
std::vector <MyCondition> aMyConditions;
@@ -124,6 +136,8 @@ class XMLOFF_DLLPUBLIC SvXMLNumFormatContext : public SvXMLStyleContext
OUString sFormatTitle;
// OUString sMapName;
OUString sCalendar;
+ OUString aImplicitCalendar[2];
+ ImplicitCalendar eImplicitCalendar;
LanguageType nFormatLang;
bool bAutoOrder;
bool bFromSystem;
@@ -178,7 +192,8 @@ public:
void SetHasLongDoW(bool bSet) { bHasLongDoW = bSet; }
bool HasEra() const { return bHasEra; }
- void UpdateCalendar( const OUString& rNewCalendar, bool bImplicitSecondaryCalendarEC = false );
+ void UpdateCalendar( const OUString& rNewCalendar );
+ ImplicitCalendar GetImplicitCalendarState() const { return eImplicitCalendar; }
const LocaleDataWrapper& GetLocaleData() const;