svl/source/numbers/zformat.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 19fb87c8a1aab9b172f07a1a1526854cfddd8dc5
Author:     Noel Grandin <n...@peralex.com>
AuthorDate: Tue Apr 13 14:27:30 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Apr 13 18:41:42 2021 +0200

    avoid a few string allocations
    
    by moving the buffer creation to only when we actually need it
    
    Change-Id: If5efefdc90452f0e98227f12cb1314732f785606
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114047
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 32fd79aea59b..ade0dac4768f 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -2446,7 +2446,6 @@ bool SvNumberformat::GetOutputString(double fNumber,
                                      const Color** ppColor)
 {
     bool bRes = false;
-    OUStringBuffer sBuff(64);
     OutString.clear();
     *ppColor = nullptr; // No color change
     if (eType & SvNumFormatType::LOGICAL)
@@ -2461,6 +2460,7 @@ bool SvNumberformat::GetOutputString(double fNumber,
         }
         return false;
     }
+    OUStringBuffer sBuff(64);
     if (eType & SvNumFormatType::TEXT)
     {
         ImpGetOutputStandard(fNumber, sBuff);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to