summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-12-26 10:03:40 +0100
committerMike Kaganski <mike.kaganski@collabora.com>2021-12-26 20:36:26 +0100
commita23a7eea5cfcdc50d09be248828cb1e6293e5ebb (patch)
treee415782b558350673175f80836d022c4882c9a7d /svl
parentcc517c687de7205487936d40b64481107656f239 (diff)
Avoid OUStringBuffer::toString where possible
Change-Id: I99abbe97a48b2077e28d6221fb70036e5e412657 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127479 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'svl')
-rw-r--r--svl/source/numbers/zforlist.cxx4
-rw-r--r--svl/source/numbers/zformat.cxx2
2 files changed, 3 insertions, 3 deletions
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index fbd05a481df9..98f607e6f07a 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -3910,10 +3910,10 @@ bool SvNumberFormatter::GetNewCurrencySymbolString( sal_uInt32 nFormat, OUString
const SvNumberformat* pFormat = GetFormatEntry(nFormat);
if ( pFormat )
{
- OUStringBuffer sBuff(128); // guess-estimate of a value that will pretty much guarantee no re-alloc
OUString aSymbol, aExtension;
if ( pFormat->GetNewCurrencySymbol( aSymbol, aExtension ) )
{
+ OUStringBuffer sBuff(128); // guess-estimate of a value that will pretty much guarantee no re-alloc
if ( ppEntry )
{
bool bFoundBank = false;
@@ -3949,7 +3949,7 @@ bool SvNumberFormatter::GetNewCurrencySymbolString( sal_uInt32 nFormat, OUString
}
sBuff.append(']');
}
- rStr = sBuff.toString();
+ rStr = sBuff.makeStringAndClear();
return true;
}
}
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 34e439ee4921..4b1e2a48c152 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -5157,7 +5157,7 @@ static void lcl_insertLCID( OUStringBuffer& rFormatStr, sal_uInt32 nLCID, sal_In
}
aLCIDString.insert( 0, "[$-" );
aLCIDString.append( "]" );
- rFormatStr.insert( nPosInsertLCID, aLCIDString.toString() );
+ rFormatStr.insert( nPosInsertLCID, aLCIDString.makeStringAndClear() );
}
/** Increment nAlphabetID for CJK numerals