diff options
author | Eike Rathke <erack@redhat.com> | 2021-07-07 20:50:28 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2021-07-08 00:14:08 +0200 |
commit | 7a58221f800e215934cbcb2d3907c35b44981611 (patch) | |
tree | 2514e42b637285bbb1ae6aa0f4cfd7d82166ef76 /include | |
parent | e30d71fe58a2c06143c65a34b1de8dff45054550 (diff) |
Resolves: tdf#122191 BOOLEAN is a keyword, treat it as such
... to not end up with "BOOL"E"AN" instead, which is a date type
with an era year and literal strings.
This never worked but only was uncovered by
commit ce4fc2fc08be8ea2773194e303ed42d2579e93a0
CommitDate: Fri Mar 2 20:27:45 2018 +0100
Resolves: tdf#115351 convert boolean equivalent format codes to proper Boolean
if the format also had to be converted between locales.
Also preserve boolean equivalent formats during Excel export and
try hard to convert back as much as possible if a literal boolean
string format is a Boolean equivalent of the target locale.
Change-Id: I54f65c276cbf7bb99e960b6d7053c5fa95fbccb6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118591
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
Diffstat (limited to 'include')
-rw-r--r-- | include/svl/nfkeytab.hxx | 2 | ||||
-rw-r--r-- | include/svl/zforlist.hxx | 4 | ||||
-rw-r--r-- | include/svl/zformat.hxx | 3 |
3 files changed, 5 insertions, 4 deletions
diff --git a/include/svl/nfkeytab.hxx b/include/svl/nfkeytab.hxx index fe1e3bb69ec5..3b8140498128 100644 --- a/include/svl/nfkeytab.hxx +++ b/include/svl/nfkeytab.hxx @@ -71,13 +71,13 @@ enum NfKeywordIndex NF_KEY_WW, // week of year, as of version 8, 19.06.98 NF_KEY_THAI_T, // Thai T modifier, speciality of Thai Excel, only used with Thai locale and converted to [NatNum1] NF_KEY_CCC, // currency bank symbol (old version) + NF_KEY_BOOLEAN, // boolean NF_KEY_GENERAL, // General / Standard NF_KEY_LASTKEYWORD = NF_KEY_GENERAL, // Reserved words translated and color names follow: NF_KEY_TRUE, // boolean true NF_KEY_FALSE, // boolean false - NF_KEY_BOOLEAN, // boolean NF_KEY_COLOR, // color NF_KEY_FIRSTCOLOR, NF_KEY_BLACK = NF_KEY_FIRSTCOLOR, // you do know colors, don't you? diff --git a/include/svl/zforlist.hxx b/include/svl/zforlist.hxx index 7a8703873460..c3d82d7b109a 100644 --- a/include/svl/zforlist.hxx +++ b/include/svl/zforlist.hxx @@ -473,7 +473,7 @@ public: nKey contains the index key of the format. */ bool PutEntry( OUString& rString, sal_Int32& nCheckPos, SvNumFormatType& nType, sal_uInt32& nKey, - LanguageType eLnge = LANGUAGE_DONTKNOW ); + LanguageType eLnge = LANGUAGE_DONTKNOW, bool bReplaceBooleanEquivalent = true ); /** Same as <method>PutEntry</method> but the format code string is considered to be of language/country eLnge and is converted to @@ -481,7 +481,7 @@ public: bool PutandConvertEntry( OUString& rString, sal_Int32& nCheckPos, SvNumFormatType& nType, sal_uInt32& nKey, LanguageType eLnge, LanguageType eNewLnge, - bool bConvertDateOrder ); + bool bConvertDateOrder, bool bReplaceBooleanEquivalent = true ); /** Same as <method>PutandConvertEntry</method> but the format code string is considered to be of the System language/country eLnge and is diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx index 543c5967804c..976488257218 100644 --- a/include/svl/zformat.hxx +++ b/include/svl/zformat.hxx @@ -171,7 +171,8 @@ public: ImpSvNumberformatScan* pSc, ImpSvNumberInputScan* pISc, sal_Int32& nCheckPos, - LanguageType& eLan ); + LanguageType& eLan, + bool bReplaceBooleanEquivalent = true ); // Copy ctor SvNumberformat( SvNumberformat const & rFormat ); |