diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-20 16:53:45 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-20 20:52:45 +0200 |
commit | 8388b834c547d39ceff68b0e247ec164e9fc505d (patch) | |
tree | 8f7ad9f00dc566756298b202cd7055d4c87bea00 /svl/source | |
parent | 98cd8e89e681463c909ff10d403fba540868e2f2 (diff) |
elide some makeStringAndClear() calls
Change-Id: Id7116fac8a6f65db18ff93384c5faf2f6481f6fd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136186
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl/source')
-rw-r--r-- | svl/source/misc/documentlockfile.cxx | 2 | ||||
-rw-r--r-- | svl/source/misc/lockfilecommon.cxx | 2 | ||||
-rw-r--r-- | svl/source/misc/sharecontrolfile.cxx | 2 | ||||
-rw-r--r-- | svl/source/numbers/zforlist.cxx | 8 | ||||
-rw-r--r-- | svl/source/numbers/zformat.cxx | 8 |
5 files changed, 12 insertions, 10 deletions
diff --git a/svl/source/misc/documentlockfile.cxx b/svl/source/misc/documentlockfile.cxx index 09d67a9e5533..0ba862f33098 100644 --- a/svl/source/misc/documentlockfile.cxx +++ b/svl/source/misc/documentlockfile.cxx @@ -189,7 +189,7 @@ void DocumentLockFile::WriteEntryToStream( const LockFileEntry& aEntry, const un aBuffer.append( ';' ); } - OString aStringData( OUStringToOString( aBuffer.makeStringAndClear(), RTL_TEXTENCODING_UTF8 ) ); + OString aStringData( OUStringToOString( aBuffer, RTL_TEXTENCODING_UTF8 ) ); uno::Sequence< sal_Int8 > aData( reinterpret_cast<sal_Int8 const *>(aStringData.getStr()), aStringData.getLength() ); xOutput->writeBytes( aData ); } diff --git a/svl/source/misc/lockfilecommon.cxx b/svl/source/misc/lockfilecommon.cxx index 982ce7ce02da..dc8b26d455f1 100644 --- a/svl/source/misc/lockfilecommon.cxx +++ b/svl/source/misc/lockfilecommon.cxx @@ -164,7 +164,7 @@ OUString LockFileCommon::ParseName( const uno::Sequence< sal_Int8 >& aBuffer, sa } } - return OStringToOUString( aResult.makeStringAndClear(), RTL_TEXTENCODING_UTF8 ); + return OStringToOUString( aResult, RTL_TEXTENCODING_UTF8 ); } diff --git a/svl/source/misc/sharecontrolfile.cxx b/svl/source/misc/sharecontrolfile.cxx index 486f280533f7..740e10eaa19c 100644 --- a/svl/source/misc/sharecontrolfile.cxx +++ b/svl/source/misc/sharecontrolfile.cxx @@ -201,7 +201,7 @@ void ShareControlFile::SetUsersDataAndStore( std::vector< LockFileEntry >&& aUse } } - OString aStringData( OUStringToOString( aBuffer.makeStringAndClear(), RTL_TEXTENCODING_UTF8 ) ); + OString aStringData( OUStringToOString( aBuffer, RTL_TEXTENCODING_UTF8 ) ); uno::Sequence< sal_Int8 > aData( reinterpret_cast<sal_Int8 const *>(aStringData.getStr()), aStringData.getLength() ); m_xOutputStream->writeBytes( aData ); m_aUsersData = aUsersData; diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index 0c1e28661fb8..cc299ab37d37 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -1120,7 +1120,7 @@ sal_uInt32 SvNumberFormatter::ImpGenerateCL( LanguageType eLnge ) + "(" + xSeq[j].formatKey + ") " - + aDupes.makeStringAndClear(); + + aDupes; LocaleDataWrapper::outputCheckMessage( xLocaleData->appendLocaleInfo( aMsg )); } } @@ -2460,8 +2460,9 @@ void SvNumberFormatter::ImpAdjustFormatCodeDefault( aMsg.insert(0, "SvNumberFormatter::ImpAdjustFormatCodeDefault: "); aMsg.append("\nXML locale data FormatElement formatindex: "); aMsg.append(static_cast<sal_Int32>(pFormatArr[nElem].Index)); - OUString aUMsg(OStringToOUString(aMsg.makeStringAndClear(), + OUString aUMsg(OStringToOUString(aMsg, RTL_TEXTENCODING_ASCII_US)); + aMsg.setLength(0); LocaleDataWrapper::outputCheckMessage(xLocaleData->appendLocaleInfo(aUMsg)); } } @@ -2475,7 +2476,8 @@ void SvNumberFormatter::ImpAdjustFormatCodeDefault( { aMsg.insert(0, "SvNumberFormatter::ImpAdjustFormatCodeDefault: "); aMsg.append("\nXML locale data FormatElement group of: "); - OUString aUMsg(OStringToOUString(aMsg.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US)); + OUString aUMsg(OStringToOUString(aMsg, RTL_TEXTENCODING_ASCII_US)); + aMsg.setLength(0); LocaleDataWrapper::outputCheckMessage( xLocaleData->appendLocaleInfo(OUStringConcatenation(aUMsg + pFormatArr[0].NameID))); } diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index a4756f4982b1..43f26e76287c 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -4533,7 +4533,7 @@ bool SvNumberformat::ImpDecimalFill( OUStringBuffer& sStr, // number string OUStringBuffer sNum; ImpGetOutputStandard(rNumber, sNum); sNum.stripStart('-'); - sStr.insert(k, sNum.makeStringAndClear()); + sStr.insert(k, sNum); break; } default: @@ -4693,7 +4693,7 @@ bool SvNumberformat::ImpNumberFillWithThousands( OUStringBuffer& sBuff, // numb OUStringBuffer sNum; ImpGetOutputStandard(rNumber, sNum); sNum.stripStart('-'); - sBuff.insert(k, sNum.makeStringAndClear()); + sBuff.insert(k, sNum); break; } default: @@ -4829,7 +4829,7 @@ bool SvNumberformat::ImpNumberFill( OUStringBuffer& sBuff, // number string bFoundNumber = true; ImpGetOutputStandard(rNumber, sNum); sNum.stripStart('-'); - sBuff.insert(k, sNum.makeStringAndClear()); + sBuff.insert(k, sNum); } break; case NF_SYMBOLTYPE_FRAC_FDIV: // Do Nothing @@ -5184,7 +5184,7 @@ static void lcl_insertLCID( OUStringBuffer& rFormatStr, sal_uInt32 nLCID, sal_In } aLCIDString.insert( 0, "[$-" ); aLCIDString.append( "]" ); - rFormatStr.insert( nPosInsertLCID, aLCIDString.makeStringAndClear() ); + rFormatStr.insert( nPosInsertLCID, aLCIDString ); } /** Increment nAlphabetID for CJK numerals |