svx/source/form/fmshimp.cxx         |    3 ++-
 svx/source/svdraw/svdmrkv.cxx       |    3 ++-
 svx/source/svdraw/svdotxat.cxx      |    2 +-
 svx/source/table/accessiblecell.cxx |    2 +-
 4 files changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 395b2ca9fd5af7d56d1181ed36f8b45af899539b
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Fri Jun 3 18:56:59 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sat Jun 4 17:18:03 2022 +0200

    elide some makeStringAndClear() calls
    
    when we are passing the result to a string_view, it is pointless.
    
    Change-Id: If2532f998343b49a2966e0c704f6f789af936e1e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135371
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 6e013df3b634..8eb83000b03e 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -2885,8 +2885,9 @@ void 
FmXFormShell::impl_collectFormSearchContexts_nothrow_Lock( const Reference<
 
             // and descend
             impl_collectFormSearchContexts_nothrow_Lock(
-                xCurrentAsForm, aNextLevelPrefix.makeStringAndClear(),
+                xCurrentAsForm, aNextLevelPrefix,
                 _out_rForms, _out_rNames);
+            aNextLevelPrefix.setLength(0);
         }
     }
     catch( const Exception& )
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 01b065f970f1..c298e1925191 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -1108,7 +1108,8 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle 
const & rRect, const S
                 sSelectionTextView = sSelectionText + ", " + aExtraInfo + "}";
                 aExtraInfo.append(handleArrayStr);
                 aExtraInfo.append("}");
-                sSelectionText += ", " + aExtraInfo.makeStringAndClear();
+                sSelectionText += ", " + aExtraInfo;
+                aExtraInfo.setLength(0);
             }
         }
 
diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx
index 65da2a851acf..97bdb5e59c55 100644
--- a/svx/source/svdraw/svdotxat.cxx
+++ b/svx/source/svdraw/svdotxat.cxx
@@ -441,7 +441,7 @@ void SdrTextObj::AppendFamilyToStyleName(OUString& 
styleName, SfxStyleFamily fam
     aFam.append(static_cast<sal_Int32>(family));
     comphelper::string::padToLength(aFam, PADDING_LENGTH_FOR_STYLE_FAMILY , 
PADDING_CHARACTER_FOR_STYLE_FAMILY);
 
-    styleName += "|" + aFam.makeStringAndClear();
+    styleName += "|" + aFam;
 }
 
 SfxStyleFamily SdrTextObj::ReadFamilyFromStyleName(const OUString& styleName)
diff --git a/svx/source/table/accessiblecell.cxx 
b/svx/source/table/accessiblecell.cxx
index 98851438ff0c..1052ab5eb93b 100644
--- a/svx/source/table/accessiblecell.cxx
+++ b/svx/source/table/accessiblecell.cxx
@@ -546,7 +546,7 @@ OUString AccessibleCell::getCellName( sal_Int32 nCol, 
sal_Int32 nRow )
         }
         aStr.append(static_cast<sal_Unicode>( 'A' +
                 static_cast<sal_uInt16>(nCol)));
-        
aBuf.append(comphelper::string::reverseString(aStr.makeStringAndClear()));
+        aBuf.append(comphelper::string::reverseString(aStr));
     }
     aBuf.append(nRow+1);
     return aBuf.makeStringAndClear();

Reply via email to