svl/source/numbers/zforlist.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 3f8fa788a28abdbf58b0e7577e6a5632001f6181
Author: Eike Rathke <er...@redhat.com>
Date:   Thu May 3 14:18:44 2018 +0200

    Avoid number scanner overhead for the 0 General format
    
    Change-Id: Iec25db8caaccacfef760f269dd1a349f51455052
    Reviewed-on: https://gerrit.libreoffice.org/53791
    Reviewed-by: Eike Rathke <er...@redhat.com>
    Tested-by: Eike Rathke <er...@redhat.com>

diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index c22807fc9cd4..178c3e853d71 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -1079,7 +1079,9 @@ bool SvNumberFormatter::IsNumberFormat(const OUString& 
sString,
     ::osl::MutexGuard aGuard( GetInstanceMutex() );
 
     SvNumFormatType FType;
-    const SvNumberformat* pFormat = ImpSubstituteEntry( 
GetFormatEntry(F_Index));
+    // For the 0 General format directly use the init/system locale and avoid
+    // all overhead that is associated with a format passed to the scanner.
+    const SvNumberformat* pFormat = (F_Index == 0 ? nullptr : 
ImpSubstituteEntry( GetFormatEntry(F_Index)));
     if (!pFormat)
     {
         ChangeIntl(IniLnge);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to