diff options
author | Eike Rathke <erack@redhat.com> | 2018-05-03 14:31:08 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2018-05-04 00:30:45 +0200 |
commit | 16a8d9f45449d0ef7efbdbff8ae29d97441eb044 (patch) | |
tree | f67cbed345c829ffe81c34840b09244f5495c135 | |
parent | 3f8fa788a28abdbf58b0e7577e6a5632001f6181 (diff) |
Avoid number scanner overhead for all General formats
Change-Id: If28276a1f707c3eb462a013b5604a92ce56038d2
Reviewed-on: https://gerrit.libreoffice.org/53792
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
-rw-r--r-- | svl/source/numbers/zforlist.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index 178c3e853d71..de7a808324e0 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -1095,6 +1095,13 @@ bool SvNumberFormatter::IsNumberFormat(const OUString& sString, FType = SvNumFormatType::DEFINED; } ChangeIntl(pFormat->GetLanguage()); + // Avoid scanner overhead with the General format of any locale. + // These are never substituded above so safe to ignore. + if ((F_Index % SV_COUNTRY_LANGUAGE_OFFSET) == 0) + { + assert(FType == SvNumFormatType::NUMBER); + pFormat = nullptr; + } } bool res; |