summaryrefslogtreecommitdiff
path: root/vcl/source/control/fmtfield.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/control/fmtfield.cxx')
-rw-r--r--vcl/source/control/fmtfield.cxx26
1 files changed, 9 insertions, 17 deletions
diff --git a/vcl/source/control/fmtfield.cxx b/vcl/source/control/fmtfield.cxx
index d48f4c7560b0..196e457e41e9 100644
--- a/vcl/source/control/fmtfield.cxx
+++ b/vcl/source/control/fmtfield.cxx
@@ -1096,9 +1096,7 @@ void DoubleCurrencyField::UpdateCurrencyFormat()
OUStringBuffer sNewFormat;
if (bThSep)
{
- sNewFormat.append('#');
- sNewFormat.append(aLocaleInfo.getNumThousandSep());
- sNewFormat.append("##0");
+ sNewFormat.append("#" + aLocaleInfo.getNumThousandSep() + "##0");
}
else
sNewFormat.append('0');
@@ -1114,30 +1112,24 @@ void DoubleCurrencyField::UpdateCurrencyFormat()
OUString sSymbol = getCurrencySymbol();
sSymbol = comphelper::string::strip(sSymbol, ' ');
- OUStringBuffer sTemp("[$");
- sTemp.append(sSymbol);
- sTemp.append("] ");
- sTemp.append(sNewFormat);
-
+ sNewFormat =
+ "[$" + sSymbol + "] "
+ + sNewFormat
// for negative values : $ -0.00, not -$ 0.00...
// (the real solution would be a possibility to choose a "positive currency format" and a "negative currency format"...
// But not now... (and hey, you could take a formatted field for this...))
// FS - 31.03.00 74642
- sTemp.append(";[$");
- sTemp.append(sSymbol);
- sTemp.append("] -");
- sTemp.append(sNewFormat);
-
- sNewFormat = sTemp;
+ + ";[$"
+ + sSymbol
+ + "] -"
+ + sNewFormat;
}
else
{
OUString sTemp = getCurrencySymbol();
sTemp = comphelper::string::strip(sTemp, ' ');
- sNewFormat.append(" [$");
- sNewFormat.append(sTemp);
- sNewFormat.append(']');
+ sNewFormat.append(" [$" + sTemp + "]");
}
// set this new basic format