diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-11-02 18:59:49 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-11-03 17:11:14 +0100 |
commit | ab285c743afa1c8769581871d7b56374fd8c49f1 (patch) | |
tree | d5628df49fb4db29d474e5e7b7cef4072c33153a /sw/source/filter | |
parent | f4544f3903fed3a656e3cd57e1bd83582e024b96 (diff) |
loplugin:stringadd
tweak the plugin to be more permissive, then validate by hand
afterwards
Change-Id: I40c5c911fe6ff7e45baaca372abf7dac211d9654
Reviewed-on: https://gerrit.libreoffice.org/81942
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter')
-rw-r--r-- | sw/source/filter/html/htmlflywriter.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/html/htmlplug.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/writer/writer.cxx | 3 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par5.cxx | 4 |
5 files changed, 11 insertions, 12 deletions
diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx index 90ae515291c3..61a255d633a3 100644 --- a/sw/source/filter/html/htmlflywriter.cxx +++ b/sw/source/filter/html/htmlflywriter.cxx @@ -1878,9 +1878,9 @@ static Writer& OutHTML_FrameFormatGrfNode( Writer& rWrt, const SwFrameFormat& rF if (rHTMLWrt.GetOrigFileName()) aFileName = *rHTMLWrt.GetOrigFileName(); INetURLObject aURL(aFileName); - OUString aName(aURL.getBase() + "_"); - aName += aURL.getExtension() + "_"; - aName += OUString::number(aGraphic.GetChecksum(), 16); + OUString aName = aURL.getBase() + "_" + + aURL.getExtension() + "_" + + OUString::number(aGraphic.GetChecksum(), 16); aURL.setBase(aName); aURL.setExtension("ole"); aFileName = aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE); diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx index 9e87beb61706..a0da671de733 100644 --- a/sw/source/filter/html/htmlplug.cxx +++ b/sw/source/filter/html/htmlplug.cxx @@ -150,9 +150,9 @@ OUString lcl_CalculateFileName(const OUString* pOrigFileName, const Graphic& rGr if (pOrigFileName) aFileName = *pOrigFileName; INetURLObject aURL(aFileName); - OUString aName(aURL.getBase() + "_"); - aName += aURL.getExtension() + "_"; - aName += OUString::number(rGraphic.GetChecksum(), 16); + OUString aName = aURL.getBase() + "_" + + aURL.getExtension() + "_" + + OUString::number(rGraphic.GetChecksum(), 16); aURL.setBase(aName); aURL.setExtension(rExtension); aFileName = aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE); diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx index 49095288a18a..fa56eb08f519 100644 --- a/sw/source/filter/writer/writer.cxx +++ b/sw/source/filter/writer/writer.cxx @@ -331,8 +331,7 @@ bool Writer::CopyLocalFileToINet( OUString& rFileNm ) } OUString aSrc = rFileNm; - OUString aDest = aTargetUrl.GetPartBeforeLastName(); - aDest += aFileUrl.GetLastName(); + OUString aDest = aTargetUrl.GetPartBeforeLastName() + aFileUrl.GetLastName(); SfxMedium aSrcFile( aSrc, StreamMode::READ ); SfxMedium aDstFile( aDest, StreamMode::WRITE | StreamMode::SHARE_DENYNONE ); diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 872b693a1431..60b5c7cc6f24 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -7236,8 +7236,8 @@ void DocxAttributeOutput::RefField( const SwField& rField, const OUString& rRef SwFieldIds nType = rField.GetTyp( )->Which( ); if ( nType == SwFieldIds::GetExp ) { - OUString sCmd = FieldString( ww::eREF ); - sCmd += "\"" + rRef + "\" "; + OUString sCmd = FieldString( ww::eREF ) + + "\"" + rRef + "\" "; m_rExport.OutputField( &rField, ww::eREF, sCmd ); } diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index b1689bacde4f..dbfa676e93f1 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -664,8 +664,8 @@ sal_uInt16 SwWW8ImplReader::End_Field() if ( m_aFieldStack.back().mnObjLocFc > 0 ) { // Store the OLE object as an internal link - OUString sOleId('_'); - sOleId += OUString::number( m_aFieldStack.back().mnObjLocFc ); + OUString sOleId = "_" + + OUString::number( m_aFieldStack.back().mnObjLocFc ); tools::SvRef<SotStorage> xSrc0 = m_pStg->OpenSotStorage(SL::aObjectPool); tools::SvRef<SotStorage> xSrc1 = xSrc0->OpenSotStorage( sOleId, StreamMode::READ ); |