diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-01 18:25:40 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-02 08:47:24 +0200 |
commit | 366eaa1a383a0f5f3f755f2b6a739d3d9c5b8343 (patch) | |
tree | 0b7b4876a3e35d40a75818593214df7717e5f3b5 /xmloff | |
parent | 91c836acea76cffb0e2d5df0d15fc94d84bfdc5a (diff) |
loplugin:stringadd in writerfilter..xmloff
Change-Id: Ib5292f4c702cc1e2994c736250a93e6fb18d1a20
Reviewed-on: https://gerrit.libreoffice.org/79988
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/chart/SchXMLTableContext.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/core/DocumentSettingsContext.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/core/XMLBase64ImportContext.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/draw/sdxmlexp.cxx | 7 | ||||
-rw-r--r-- | xmloff/source/draw/shapeexport.cxx | 9 | ||||
-rw-r--r-- | xmloff/source/style/prstylecond.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/text/XMLTextFrameContext.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/transform/OOo2Oasis.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/transform/TransformerBase.cxx | 7 |
9 files changed, 15 insertions, 30 deletions
diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx index 491c8c313d47..cb4a7e789793 100644 --- a/xmloff/source/chart/SchXMLTableContext.cxx +++ b/xmloff/source/chart/SchXMLTableContext.cxx @@ -913,8 +913,7 @@ void SchXMLTableHelper::switchRangesFromOuterToInternalIfNecessary( } else if( ! lcl_tableOfRangeMatches( aRange, rTable.aTableNameOfFile )) { - OUString aRep("label "); - aRep += OUString::number( rLSeq.first.first ); + OUString aRep = "label " + OUString::number( rLSeq.first.first ); Reference< chart2::data::XDataSequence > xNewSeq( xDataProv->createDataSequenceByRangeRepresentation( aRep )); diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx index 9d3bafb53b54..59c61614e6d8 100644 --- a/xmloff/source/core/DocumentSettingsContext.cxx +++ b/xmloff/source/core/DocumentSettingsContext.cxx @@ -489,8 +489,7 @@ void XMLConfigItemContext::Characters( const OUString& rChars ) OUString sChars; if( !msValue.isEmpty() ) { - sChars = msValue; - sChars += sTrimmedChars; + sChars = msValue + sTrimmedChars; msValue.clear(); } else diff --git a/xmloff/source/core/XMLBase64ImportContext.cxx b/xmloff/source/core/XMLBase64ImportContext.cxx index f7291c39a7d3..f39bd39cb80d 100644 --- a/xmloff/source/core/XMLBase64ImportContext.cxx +++ b/xmloff/source/core/XMLBase64ImportContext.cxx @@ -55,8 +55,7 @@ void XMLBase64ImportContext::Characters( const OUString& rChars ) OUString sChars; if( !sBase64CharsLeft.isEmpty() ) { - sChars = sBase64CharsLeft; - sChars += sTrimmedChars; + sChars = sBase64CharsLeft + sTrimmedChars; sBase64CharsLeft.clear(); } else diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index b2bfd9d5b398..baf552c8ca10 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -691,8 +691,7 @@ bool SdXMLExport::ImpPrepAutoLayoutInfo(const Reference<XDrawPage>& xPage, OUStr mvAutoLayoutInfoList.emplace_back( pNew ); OUString sNewName = "AL"; sNewName += OUString::number(mvAutoLayoutInfoList.size() - 1); - sNewName += "T"; - sNewName += OUString::number(nType); + sNewName += "T" + OUString::number(nType); pNew->SetLayoutName(sNewName); } @@ -1219,9 +1218,7 @@ void SdXMLExport::ImpWritePageMasterInfos() if(pInfo) { // create name - OUString sNewName("PM"); - - sNewName += OUString::number(nCnt); + OUString sNewName = "PM" + OUString::number(nCnt); pInfo->SetName(sNewName); // prepare page-master attributes diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 0adf2202bb1e..836fc921fdf3 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -2953,8 +2953,7 @@ void XMLShapeExport::ImpExportOLE2Shape( } if( !bIsEmptyPresObj ) { - OUString sURL(XML_EMBEDDEDOBJECTGRAPHIC_URL_BASE); - sURL += sPersistName; + OUString sURL = XML_EMBEDDEDOBJECTGRAPHIC_URL_BASE + sPersistName; if( !bExportEmbedded ) { sURL = GetExport().AddEmbeddedObject( sURL ); @@ -3797,8 +3796,7 @@ static void ImpExportEquations( SvXMLExport& rExport, const uno::Sequence< OUStr sal_Int32 i; for ( i = 0; i < rEquations.getLength(); i++ ) { - OUString aStr('f'); - aStr += OUString::number( i ); + OUString aStr= "f" + OUString::number( i ); rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, aStr ); aStr = rEquations[ i ]; @@ -4919,8 +4917,7 @@ void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape if( !bExportEmbedded ) { - OUString sURL( "Pictures/" ); - sURL += sPictureName; + OUString sURL = "Pictures/" + sPictureName; mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, sURL ); mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE ); mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED ); diff --git a/xmloff/source/style/prstylecond.cxx b/xmloff/source/style/prstylecond.cxx index 569ebce6c919..f0dafdf1c36d 100644 --- a/xmloff/source/style/prstylecond.cxx +++ b/xmloff/source/style/prstylecond.cxx @@ -73,8 +73,8 @@ OUString GetParaStyleCondExternal( OUString const &internal) aResult += "()"; if (g_ConditionMap[i].aValue != -1) { - aResult += "="; - aResult += OUString::number( g_ConditionMap[i].aValue ); + aResult += "=" + + OUString::number( g_ConditionMap[i].aValue ); } return aResult; } diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx index 3755b3845c03..0e1fdfeec7b3 100644 --- a/xmloff/source/text/XMLTextFrameContext.cxx +++ b/xmloff/source/text/XMLTextFrameContext.cxx @@ -464,8 +464,7 @@ void XMLTextFrameContext_Impl::Create() } else { - OUString sURL( "vnd.sun.star.ServiceName:" ); - sURL += sFilterService; + OUString sURL = "vnd.sun.star.ServiceName:" + sFilterService; xPropSet = GetImport().GetTextImport() ->createAndInsertOLEObject( GetImport(), sURL, sStyleName, @@ -1227,8 +1226,7 @@ void XMLTextFrameContext_Impl::Characters( const OUString& rChars ) OUString sChars; if( !sBase64CharsLeft.isEmpty() ) { - sChars = sBase64CharsLeft; - sChars += sTrimmedChars; + sChars = sBase64CharsLeft + sTrimmedChars; sBase64CharsLeft.clear(); } else diff --git a/xmloff/source/transform/OOo2Oasis.cxx b/xmloff/source/transform/OOo2Oasis.cxx index e5060c3846cd..780e0f604632 100644 --- a/xmloff/source/transform/OOo2Oasis.cxx +++ b/xmloff/source/transform/OOo2Oasis.cxx @@ -1149,8 +1149,7 @@ void XMLDocumentTransformerContext_Impl::StartElement( pMutableAttrList = new XMLMutableAttributeList( xAttrList ); xAttrList = pMutableAttrList; - OUString sMime("application/vnd.oasis.opendocument."); - sMime += rValue; + OUString sMime = "application/vnd.oasis.opendocument." + rValue; pMutableAttrList->SetValueByIndex( i, sMime ); OUString aNewAttrQName( GetTransformer().GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_OFFICE, ::xmloff::token::GetXMLToken( XML_MIMETYPE ) ) ); pMutableAttrList->RenameAttributeByIndex(i, aNewAttrQName ); diff --git a/xmloff/source/transform/TransformerBase.cxx b/xmloff/source/transform/TransformerBase.cxx index db3cbfe629db..2a838cbfc97b 100644 --- a/xmloff/source/transform/TransformerBase.cxx +++ b/xmloff/source/transform/TransformerBase.cxx @@ -840,8 +840,7 @@ XMLMutableAttributeList *XMLTransformerBase::ProcessAttrList( break; case XML_ATACTION_SHAPEID: { - OUString sNewValue( "shape" ); - sNewValue += rAttrValue; + OUString sNewValue = "shape" + rAttrValue; pMutableAttrList->SetValueByIndex( i, sNewValue ); break; } @@ -1276,9 +1275,7 @@ bool XMLTransformerBase::ConvertURIToOASIS( OUString& rURI, if( bRel ) { - OUString sTmp( m_aExtPathPrefix ); - sTmp += rURI; - rURI = sTmp; + rURI = m_aExtPathPrefix + rURI; bRet = true; } } |