summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2021-04-13 14:27:30 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-04-13 18:41:42 +0200
commit19fb87c8a1aab9b172f07a1a1526854cfddd8dc5 (patch)
tree94ca27b24ca8c57c529ce96e1367d17c2ae4a008 /svl
parentaa818a0b977084af21667fb68d1728bd5f300c4b (diff)
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.grandin@collabora.co.uk>
Diffstat (limited to 'svl')
-rw-r--r--svl/source/numbers/zformat.cxx2
1 files changed, 1 insertions, 1 deletions
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);