summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-12-01 23:50:23 +0100
committerEike Rathke <erack@redhat.com>2017-12-02 19:23:56 +0100
commitafbd0960f0b8d8b27cc9582279367540cc8aad84 (patch)
tree82395c22a4ba483223d0fd635fd2f360c6ab1d64 /svl
parent923ca4efe2095998e3da75c372cd7d716db9abb3 (diff)
Get rid of the css::util::NumberFormat::TEXT abuse as "special" "key"
It is a bit, not a key, which demanded special treatment at all places, and a key with the same value could not be handled at all. Abusing the css::util::NumberFormat::TEXT flag as number format key to signal the "special" meaning, having a number format key equal to that value would had resulted in undesired behaviour. The bit value is 256 and a key 256 means 156 user defined number formats in the default locale, rarely in the wild but can happen. Change-Id: Idfd5b07d524c222df3491d201095ef65ad4a46c9 Reviewed-on: https://gerrit.libreoffice.org/45705 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'svl')
-rw-r--r--svl/source/numbers/zforlist.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index a6e7af89562f..bfa23d2f5f58 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -86,6 +86,8 @@ using namespace ::std;
#define ZF_STANDARD_LOGICAL SV_MAX_COUNT_STANDARD_FORMATS-1 // 99
#define ZF_STANDARD_TEXT SV_MAX_COUNT_STANDARD_FORMATS // 100
+static_assert( ZF_STANDARD_TEXT == NF_STANDARD_FORMAT_TEXT, "definition mismatch" );
+
/* Locale that is set if an unknown locale (from another system) is loaded of
* legacy documents. Can not be SYSTEM because else, for example, a German "DM"
* (old currency) is recognized as a date (#53155#). */