diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-23 16:07:32 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-27 14:07:56 +0200 |
commit | c7c6f0af6c836ebe0968967a1e7c8320b0ac17d6 (patch) | |
tree | 4bc5b2fa623b9765b88bbfe7de10a7590c87d5c8 /sfx2/source/bastyp | |
parent | 99482297c7dd497e41fad2e7193759043e305101 (diff) |
loplugin:stringadd convert chained append to +
which can use the more efficient *StringConcat
Also fix a crash in stringview plugin which
started happening while I working on this.
Change-Id: I91a5b9b7707d1594d27d80b73930f5afac8ae608
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114568
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source/bastyp')
-rw-r--r-- | sfx2/source/bastyp/frmhtmlw.cxx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sfx2/source/bastyp/frmhtmlw.cxx b/sfx2/source/bastyp/frmhtmlw.cxx index 4c8b237bb90a..1b83c2be8b1e 100644 --- a/sfx2/source/bastyp/frmhtmlw.cxx +++ b/sfx2/source/bastyp/frmhtmlw.cxx @@ -61,13 +61,13 @@ void SfxFrameHTMLWriter::OutMeta( SvStream& rStrm, rStrm.WriteCharPtr( pIndent ); OStringBuffer sOut; - sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_meta).append(' ') + sOut.append("<" OOO_STRING_SVTOOLS_HTML_meta " ") .append(bHTTPEquiv ? OOO_STRING_SVTOOLS_HTML_O_httpequiv : OOO_STRING_SVTOOLS_HTML_O_name).append("=\""); rStrm.WriteOString( sOut.makeStringAndClear() ); HTMLOutFuncs::Out_String( rStrm, rName, eDestEnc, pNonConvertableChars ); - sOut.append("\" ").append(OOO_STRING_SVTOOLS_HTML_O_content).append("=\""); + sOut.append("\" " OOO_STRING_SVTOOLS_HTML_O_content "=\""); rStrm.WriteOString( sOut.makeStringAndClear() ); HTMLOutFuncs::Out_String( rStrm, rContent, eDestEnc, pNonConvertableChars ).WriteCharPtr( "\"/>" ); @@ -239,8 +239,7 @@ void SfxFrameHTMLWriter::Out_FrameDescriptor( { aURL = URIHelper::simpleNormalizedMakeRelative( rBaseURL, aURL ); - sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_src) - .append("=\""); + sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_src "=\""); rOut.WriteOString( sOut.makeStringAndClear() ); HTMLOutFuncs::Out_String( rOut, aURL, eDestEnc, pNonConvertableChars ); sOut.append('\"'); @@ -250,8 +249,7 @@ void SfxFrameHTMLWriter::Out_FrameDescriptor( aAny = xSet->getPropertyValue("FrameName"); if ( (aAny >>= aStr) && !aStr.isEmpty() ) { - sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_name) - .append("=\""); + sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_name "=\""); rOut.WriteOString( sOut.makeStringAndClear() ); HTMLOutFuncs::Out_String( rOut, aStr, eDestEnc, pNonConvertableChars ); sOut.append('\"'); @@ -279,8 +277,8 @@ void SfxFrameHTMLWriter::Out_FrameDescriptor( if ( aAny >>= bVal ) { const char *pStr = bVal ? sHTML_SC_yes : sHTML_SC_no; - sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_scrolling) - .append(pStr); + sOut.append(OString::Concat(" " OOO_STRING_SVTOOLS_HTML_O_scrolling) + + pStr); } } |