diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-03 18:56:59 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-04 17:18:03 +0200 |
commit | 395b2ca9fd5af7d56d1181ed36f8b45af899539b (patch) | |
tree | 6c59a74dd5ecfef21c6f8365a3f7a4a28eeccd77 /svx | |
parent | 8907b6a04e900a05efb2e8ae5b5ac4738e67c1f8 (diff) |
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.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/form/fmshimp.cxx | 3 | ||||
-rw-r--r-- | svx/source/svdraw/svdmrkv.cxx | 3 | ||||
-rw-r--r-- | svx/source/svdraw/svdotxat.cxx | 2 | ||||
-rw-r--r-- | svx/source/table/accessiblecell.cxx | 2 |
4 files changed, 6 insertions, 4 deletions
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(); |