sw/source/core/crsr/crstrvl.cxx | 2 +- sw/source/core/doc/doc.cxx | 4 +++- sw/source/core/edit/acorrect.cxx | 2 +- sw/source/core/edit/edfcol.cxx | 2 +- sw/source/core/layout/dbg_lay.cxx | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-)
New commits: commit e7cc97d1e95fae3271fddafaa7a13bdf7c62b6ee Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Thu Jul 21 18:51:40 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Fri Jul 22 11:14:20 2022 +0200 elide some makeStringAndClear() calls Change-Id: I58541cc3e0ec45a2f8127e1e14f4912a1295c740 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137312 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index adf7617428d4..d636cd27165e 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -1964,7 +1964,7 @@ bool SwCursorShell::GetContentAtPos( const Point& rPt, { if( !rContentAtPos.sStr.isEmpty() ) rContentAtPos.sStr += "\n"; - rContentAtPos.sStr += "Attr: " + sAttrs.makeStringAndClear(); + rContentAtPos.sStr += "Attr: " + sAttrs; } } bRet = true; diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 800c264588b6..3e2c57b2c4b8 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -90,6 +90,7 @@ #include <vector> #include <map> +#include <o3tl/string_view.hxx> #include <osl/diagnose.h> #include <osl/interlck.h> #include <vbahelper/vbaaccesshelper.hxx> @@ -620,7 +621,8 @@ OUString UIPages2PhyPages(const OUString& rUIPageRange, const std::map< sal_Int3 aNumber.append(*pInput++); if (!aNumber.isEmpty()) { - sal_Int32 nNumber = aNumber.makeStringAndClear().toInt32(); + sal_Int32 nNumber = o3tl::toInt32(aNumber); + aNumber.setLength(0); if (nNumber < nUIPageMin) nNumber = nPhyPageMin-1; else if (nNumber > nUIPageMax) diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx index 75b45488465d..9c3ee63ff863 100644 --- a/sw/source/core/edit/acorrect.cxx +++ b/sw/source/core/edit/acorrect.cxx @@ -565,7 +565,7 @@ bool SwAutoCorrDoc::TransliterateRTLWord( sal_Int32& rSttPos, sal_Int32 nEndPos, { const Color* pColor = nullptr; // Send text as NatNum12 prefix - OUString sPrefix("[NatNum12 " + sDisambiguatedWord.makeStringAndClear() + "]0"); + OUString sPrefix("[NatNum12 " + sDisambiguatedWord + "]0"); if (pFormatter->GetPreviewString(sPrefix, 0, sConverted, &pColor, LANGUAGE_USER_HUNGARIAN_ROVAS)) bRet = true; } diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx index 4d7f80d6d3d1..8dc1610a597a 100644 --- a/sw/source/core/edit/edfcol.cxx +++ b/sw/source/core/edit/edfcol.cxx @@ -1789,7 +1789,7 @@ void SwEditShell::SignParagraph() if (!signing.Sign(sigBuf)) return; - const OUString signature = OStringToOUString(sigBuf.makeStringAndClear(), RTL_TEXTENCODING_UTF8, 0); + const OUString signature = OStringToOUString(sigBuf, RTL_TEXTENCODING_UTF8, 0); auto it = std::find_if(std::as_const(aProperties).begin(), std::as_const(aProperties).end(), [](const beans::PropertyValue& rValue) { diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx index d1d012c6418c..37d4c5271557 100644 --- a/sw/source/core/layout/dbg_lay.cxx +++ b/sw/source/core/layout/dbg_lay.cxx @@ -816,7 +816,7 @@ void SwImplProtocol::Record_( const SwFrame* pFrame, PROT nFunction, DbgAction n } SAL_INFO("sw.layout.debug", aOut.getStr()); - m_pStream->WriteOString(aOut.makeStringAndClear()); + m_pStream->WriteOString(aOut); (*m_pStream) << endl; // output m_pStream->Flush(); // to the disk, so we can read it immediately if (++m_nLineCount >= m_nMaxLines) // max number of lines reached?