diff options
author | Eike Rathke <erack@redhat.com> | 2019-08-19 18:28:19 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2019-08-19 19:50:03 +0200 |
commit | 3eb837565878ebb2da5a11c3286a1f1ef0899183 (patch) | |
tree | 9f1ec60928f5b07bf709b131c0a8a4e00ec8291d /i18npool | |
parent | 8efd46ed867b66f9fbc31dbaa1d46bc91ea29ae2 (diff) |
Add build time check for NF_INDEX_TABLE_ENTRIES <= nFirstFreeFormatIndex
This was just tribal knowledge..
Change-Id: I3d4d93d6eae01c2f3f73a309043bf59dcca10ff6
Reviewed-on: https://gerrit.libreoffice.org/77749
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
Diffstat (limited to 'i18npool')
-rw-r--r-- | i18npool/source/localedata/LocaleNode.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx index c79c2dae88bf..11a12bd3d6eb 100644 --- a/i18npool/source/localedata/LocaleNode.cxx +++ b/i18npool/source/localedata/LocaleNode.cxx @@ -28,6 +28,7 @@ #include <sal/macros.h> #include "LocaleNode.hxx" +#include <i18npool/reservedconstants.hxx> #include <com/sun/star/i18n/NumberFormatIndex.hpp> #include <com/sun/star/xml/sax/XAttributeList.hpp> @@ -574,7 +575,6 @@ void LCFormatNode::generateCode (const OFileWriter &of) const bool bCtypeIsRef = false; bool bHaveEngineering = false; bool bShowNextFreeFormatIndex = false; - const sal_Int16 nFirstFreeFormatIndex = 60; for (sal_Int32 i = 0; i< getNumberOfChildren() ; i++, formatCount++) { @@ -621,7 +621,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const sal_Int16 formatindex = static_cast<sal_Int16>(aFormatIndex.toInt32()); // Ensure the new reserved range is not used anymore, free usage start // was up'ed from 50 to 60. - if (50 <= formatindex && formatindex < nFirstFreeFormatIndex) + if (50 <= formatindex && formatindex < i18npool::nFirstFreeFormatIndex) { incErrorInt( "Error: Reserved formatindex=\"%d\" in FormatElement.\n", formatindex); bShowNextFreeFormatIndex = true; @@ -828,7 +828,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const if (bShowNextFreeFormatIndex) { - sal_Int16 nNext = nFirstFreeFormatIndex; + sal_Int16 nNext = i18npool::nFirstFreeFormatIndex; std::set<sal_Int16>::const_iterator it( aFormatIndexSet.find( nNext)); if (it != aFormatIndexSet.end()) { |