diff options
author | Eike Rathke <erack@redhat.com> | 2021-08-22 22:13:23 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2021-08-22 23:12:57 +0200 |
commit | c6f15d228489ccfd0628ca80b45a5c2faaacc7d3 (patch) | |
tree | d329fdedd2bd5664efe0980c254a0e6215cbbcc1 /include | |
parent | 4250958a492b300a52a83e68dd599f9c36c5086e (diff) |
Resolves: tdf#143979 Write and read empty text element in number formats
... as they may be significant as separators between keywords of
same letters.
Also strip trailing empty text as meaningless, except if the only
element.
>General;General<
earlier both General were written as
<number:number-style style:name="N111P0" style:volatile="true">
<number:number number:min-integer-digits="1"/>
<number:text/>
</number:number-style>
for which now <number:text> is not.
Change-Id: I4809b1c784667994303b49d8e4ab0e857367e2cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120856
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
Diffstat (limited to 'include')
-rw-r--r-- | include/xmloff/xmlnumfe.hxx | 3 | ||||
-rw-r--r-- | include/xmloff/xmlnumfi.hxx | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/include/xmloff/xmlnumfe.hxx b/include/xmloff/xmlnumfe.hxx index 98584ac93873..28bfe8d1a2ad 100644 --- a/include/xmloff/xmlnumfe.hxx +++ b/include/xmloff/xmlnumfe.hxx @@ -50,7 +50,8 @@ private: SvXMLExport& rExport; OUString sPrefix; SvNumberFormatter* pFormatter; - OUStringBuffer sTextContent; + OUStringBuffer sTextContent; + bool bHasText; std::unique_ptr<SvXMLNumUsedList_Impl> pUsedList; std::unique_ptr<CharClass> pCharClass; std::unique_ptr<LocaleDataWrapper> pLocaleData; diff --git a/include/xmloff/xmlnumfi.hxx b/include/xmloff/xmlnumfi.hxx index 0f6384f3b785..8026b4e1846b 100644 --- a/include/xmloff/xmlnumfi.hxx +++ b/include/xmloff/xmlnumfi.hxx @@ -145,6 +145,7 @@ private: bool bAutoDec; // set in AddNumber bool bAutoInt; // set in AddNumber bool bHasExtraText; + bool bHasTrailingEmptyText; OUStringBuffer aFormatCode{64}; OUStringBuffer aConditions{32}; bool bHasLongDoW; @@ -189,6 +190,7 @@ public: bool HasLongDoW() const { return bHasLongDoW; } void SetHasLongDoW(bool bSet) { bHasLongDoW = bSet; } + void SetHasTrailingEmptyText(bool bSet) { bHasTrailingEmptyText = bSet; } void UpdateCalendar( const OUString& rNewCalendar ); ImplicitCalendar GetImplicitCalendarState() const { return eImplicitCalendar; } |