summaryrefslogtreecommitdiff
path: root/vcl/source/control/fmtfield.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2022-02-06 14:30:02 +0100
committerMike Kaganski <mike.kaganski@collabora.com>2022-02-06 16:25:13 +0100
commit423174a7830c2cf9333c55872ef3775fabfd6962 (patch)
tree4b167936d6aabbf576f84d84bd0f84056f501557 /vcl/source/control/fmtfield.cxx
parent4f533655dd635dab30574c2a3b3915377124bd60 (diff)
We know the length here
Change-Id: I45b90c40f062afe950952740901c40fee085ed06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129552 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'vcl/source/control/fmtfield.cxx')
-rw-r--r--vcl/source/control/fmtfield.cxx5
1 files changed, 1 insertions, 4 deletions
diff --git a/vcl/source/control/fmtfield.cxx b/vcl/source/control/fmtfield.cxx
index 326ba7f7ef3e..f027ada878e5 100644
--- a/vcl/source/control/fmtfield.cxx
+++ b/vcl/source/control/fmtfield.cxx
@@ -1100,10 +1100,7 @@ void DoubleCurrencyField::UpdateCurrencyFormat()
if (nDigits)
{
sNewFormat.append(aLocaleInfo.getNumDecimalSep());
-
- OUStringBuffer sTemp;
- comphelper::string::padToLength(sTemp, nDigits, '0');
- sNewFormat.append(sTemp);
+ comphelper::string::padToLength(sNewFormat, sNewFormat.getLength() + nDigits, '0');
}
if (getPrependCurrSym())