diff options
author | Eike Rathke <erack@redhat.com> | 2017-12-01 23:50:23 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-12-02 19:23:56 +0100 |
commit | afbd0960f0b8d8b27cc9582279367540cc8aad84 (patch) | |
tree | 82395c22a4ba483223d0fd635fd2f360c6ab1d64 /include/svl | |
parent | 923ca4efe2095998e3da75c372cd7d716db9abb3 (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 'include/svl')
-rw-r--r-- | include/svl/zforlist.hxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/svl/zforlist.hxx b/include/svl/zforlist.hxx index 3e59064281c2..5b84d0078408 100644 --- a/include/svl/zforlist.hxx +++ b/include/svl/zforlist.hxx @@ -54,6 +54,10 @@ namespace com { namespace sun { namespace star { #define SV_COUNTRY_LANGUAGE_OFFSET 10000 // Max count of formats per country/language #define SV_MAX_COUNT_STANDARD_FORMATS 100 // Max count of builtin default formats per CL +/// The built-in @ Text format, offset within a locale, key in the locale the +/// number formatter was constructed with. +constexpr sal_uInt32 NF_STANDARD_FORMAT_TEXT = SV_MAX_COUNT_STANDARD_FORMATS; + #define NUMBERFORMAT_ENTRY_NOT_FOUND (sal_uInt32)(0xffffffff) /// MAX_ULONG |