From faa40c022ccee7c28de98472699ca26aa8aa827b Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 21 Jul 2022 09:21:33 +0200 Subject: [PATCH] elide some makeStringAndClear() calls Change-Id: I8636102554a76f2ba3f6297219b40761473a4489 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137285 Tested-by: Jenkins Reviewed-by: Noel Grandin --- extensions/source/propctrlr/formcomponenthandler.cxx | 2 +- filter/source/xsltfilter/OleHandler.cxx | 4 ++-- forms/source/xforms/submission/submission_get.cxx | 2 +- framework/source/recording/dispatchrecorder.cxx | 4 ++-- framework/source/services/urltransformer.cxx | 2 +- .../defaultnumberingprovider/defaultnumberingprovider.cxx | 2 +- jvmfwk/source/fwkbase.cxx | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index d5f3976629a7..85791ac1e6e6 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -2533,7 +2533,7 @@ namespace pcr sTemp.append(rQueryName); Reference< XNameAccess > xSubQueries(_xQueryNames->getByName(rQueryName),UNO_QUERY); if ( xSubQueries.is() ) - impl_fillQueryNames_throw(xSubQueries,_out_rNames,sTemp.makeStringAndClear()); + impl_fillQueryNames_throw(xSubQueries,_out_rNames,sTemp); else _out_rNames.push_back( sTemp.makeStringAndClear() ); } diff --git a/filter/source/xsltfilter/OleHandler.cxx b/filter/source/xsltfilter/OleHandler.cxx index bb2089935b32..bf1c641186eb 100644 --- a/filter/source/xsltfilter/OleHandler.cxx +++ b/filter/source/xsltfilter/OleHandler.cxx @@ -126,7 +126,7 @@ namespace XSLT //return the base64 string of the uncompressed data OUStringBuffer buf(oleLength); ::comphelper::Base64::encode(buf, result); - return OUStringToOString(buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US); + return OUStringToOString(buf, RTL_TEXTENCODING_ASCII_US); } void @@ -159,7 +159,7 @@ namespace XSLT //return the base64 encoded string OUStringBuffer buf(oleLength); ::comphelper::Base64::encode(buf, oledata); - return OUStringToOString(buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US); + return OUStringToOString(buf, RTL_TEXTENCODING_ASCII_US); } return encodeSubStorage(streamName); } diff --git a/forms/source/xforms/submission/submission_get.cxx b/forms/source/xforms/submission/submission_get.cxx index 5a82aeae04d2..86709e3b8a75 100644 --- a/forms/source/xforms/submission/submission_get.cxx +++ b/forms/source/xforms/submission/submission_get.cxx @@ -79,7 +79,7 @@ CSubmission::SubmissionResult CSubmissionGet::submit(const css::uno::Reference< aUTF8QueryURL.append('?'); aUTF8QueryURL.append(aQueryString); } - OUString aQueryURL = OStringToOUString(aUTF8QueryURL.makeStringAndClear(), RTL_TEXTENCODING_UTF8); + OUString aQueryURL = OStringToOUString(aUTF8QueryURL, RTL_TEXTENCODING_UTF8); ucbhelper::Content aContent(aQueryURL, aEnvironment, m_xContext); css::uno::Reference< XOutputStream > aPipe( css::io::Pipe::create(m_xContext), UNO_QUERY_THROW ); if (!aContent.openStream(aPipe)) diff --git a/framework/source/recording/dispatchrecorder.cxx b/framework/source/recording/dispatchrecorder.cxx index 2afa8926d684..fe81814955f7 100644 --- a/framework/source/recording/dispatchrecorder.cxx +++ b/framework/source/recording/dispatchrecorder.cxx @@ -334,7 +334,7 @@ void DispatchRecorder::implts_recordMacro( std::u16string_view aURL, aArgumentBuffer.append("("); aArgumentBuffer.append (nValidArgs); aArgumentBuffer.append(").Value = "); - aArgumentBuffer.append (sValBuffer.makeStringAndClear()); + aArgumentBuffer.append (sValBuffer); aArgumentBuffer.append("\n"); ++nValidArgs; @@ -351,7 +351,7 @@ void DispatchRecorder::implts_recordMacro( std::u16string_view aURL, aScriptBuffer.append("("); aScriptBuffer.append (static_cast(nValidArgs-1)); // 0 based! aScriptBuffer.append(") as new com.sun.star.beans.PropertyValue\n"); - aScriptBuffer.append (aArgumentBuffer.makeStringAndClear()); + aScriptBuffer.append (aArgumentBuffer); aScriptBuffer.append("\n"); } diff --git a/framework/source/services/urltransformer.cxx b/framework/source/services/urltransformer.cxx index b4fd3de16a1a..239aed6dbfa0 100644 --- a/framework/source/services/urltransformer.cxx +++ b/framework/source/services/urltransformer.cxx @@ -238,7 +238,7 @@ sal_Bool SAL_CALL URLTransformer::assemble( css::util::URL& aURL ) aURL.Password , aURL.Server , aURL.Port , - aCompletePath.makeStringAndClear() ); + aCompletePath); if ( !bResult ) return false; diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx index 64325b43ca6f..7d807a31ac8d 100644 --- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx +++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx @@ -499,7 +499,7 @@ static void lcl_formatKoreanLegalWord(sal_Int32 nNumber, OUString& rsResult) { aTemp.insert(0, (table_KoreanLegalWord_decade1[digit1 - 1])); if (digit2 > 0) aTemp.insert(0, (table_KoreanLegalWord_decade2[digit2 - 1])); - rsResult += aTemp.makeStringAndClear(); + rsResult += aTemp; } // Greek Letter Numbering diff --git a/jvmfwk/source/fwkbase.cxx b/jvmfwk/source/fwkbase.cxx index 225437011fdd..43820a926dc7 100644 --- a/jvmfwk/source/fwkbase.cxx +++ b/jvmfwk/source/fwkbase.cxx @@ -470,7 +470,7 @@ OString makeClassPathOption(std::u16string_view sUserClassPath) sBufCP.append(sAppCP); } - sPaths = OUStringToOString(sBufCP.makeStringAndClear(), PathEncoding()); + sPaths = OUStringToOString(sBufCP, PathEncoding()); if (sPaths.isEmpty()) { return ""; }