summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-09-30 15:10:05 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-01 08:26:43 +0200
commit9b3643820bf821c8be728ed20a8cb7ed05cabef2 (patch)
tree85b3cf0347f5e887b3b6f36aad33f6bb805452d0 /filter
parent4f2465f599020b356dc37f3132049a103dd32486 (diff)
loplugin:stringadd in extensions..framework
Change-Id: I0a0788cdbde292cae582982b0000ee6d5a2056d7 Reviewed-on: https://gerrit.libreoffice.org/79888 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/msfilter/msdffimp.cxx3
-rw-r--r--filter/source/msfilter/mstoolbar.cxx3
-rw-r--r--filter/source/msfilter/svdfppt.cxx3
-rw-r--r--filter/source/svg/svgexport.cxx19
-rw-r--r--filter/source/xsltdialog/typedetectionexport.cxx75
-rw-r--r--filter/source/xsltdialog/xmlfiltersettingsdialog.cxx11
6 files changed, 49 insertions, 65 deletions
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 9e303d876cf8..a6651c9d66b8 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -7177,8 +7177,7 @@ css::uno::Reference < css::embed::XEmbeddedObject > SvxMSDffManager::CheckForCo
if ( pName || pFilter )
{
//Reuse current ole name
- OUString aDstStgName(MSO_OLE_Obj);
- aDstStgName += OUString::number(nMSOleObjCntr);
+ OUString aDstStgName = MSO_OLE_Obj + OUString::number(nMSOleObjCntr);
OUString aFilterName;
if ( pFilter )
diff --git a/filter/source/msfilter/mstoolbar.cxx b/filter/source/msfilter/mstoolbar.cxx
index 7d8e25cbdeed..42ed5ee2df77 100644
--- a/filter/source/msfilter/mstoolbar.cxx
+++ b/filter/source/msfilter/mstoolbar.cxx
@@ -128,8 +128,7 @@ CustomToolBarImportHelper::createMenu( const OUString& rName, const uno::Referen
try
{
uno::Reference< ui::XUIConfigurationManager > xCfgManager( getCfgManager() );
- OUString sMenuBar("private:resource/menubar/");
- sMenuBar += rName;
+ OUString sMenuBar = "private:resource/menubar/" + rName;
uno::Reference< container::XIndexContainer > xPopup( xCfgManager->createSettings(), uno::UNO_SET_THROW );
uno::Reference< beans::XPropertySet > xProps( xPopup, uno::UNO_QUERY_THROW );
// set name for menubar
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 92b8a7392dcd..9b5e83596f05 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -6897,8 +6897,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
OUString aTarget( rHyperlink.aTarget );
if ( !rHyperlink.aConvSubString.isEmpty() )
{
- aTarget += "#";
- aTarget += rHyperlink.aConvSubString;
+ aTarget += "#" + rHyperlink.aConvSubString;
}
xEntry->xField1.reset(new SvxFieldItem( SvxURLField( aTarget, OUString(), SvxURLFormat::Repr ), EE_FEATURE_FIELD ));
}
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index cce3c3abd45d..7adb1d04e9ca 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -984,8 +984,8 @@ void SVGFilter::implExportDocumentHeaderWriterOrCalc(sal_Int32 nDocX, sal_Int32
aAttr = OUString::number( nDocHeight * 0.01 ) + "mm";
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "height", aAttr );
- aAttr = OUString::number(nDocX) + " " + OUString::number(nDocY) + " ";
- aAttr += OUString::number(nDocWidth) + " " + OUString::number(nDocHeight);
+ aAttr = OUString::number(nDocX) + " " + OUString::number(nDocY) + " " +
+ OUString::number(nDocWidth) + " " + OUString::number(nDocHeight);
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "viewBox", aAttr );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "preserveAspectRatio", "xMidYMid" );
@@ -1651,8 +1651,7 @@ void SVGFilter::implExportDrawPages( const std::vector< Reference< css::drawing:
// inserted before or after a slide: that is used for some
// when switching from the last to the first slide.
const OUString & sPageId = implGetValidIDFromInterface( rxPages[i] );
- OUString sContainerId = "container-";
- sContainerId += sPageId;
+ OUString sContainerId = "container-" + sPageId;
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", sContainerId );
SvXMLElementExport aContainerExp( *mpSVGExport, XML_NAMESPACE_NONE, "g", true, true );
@@ -1725,8 +1724,7 @@ bool SVGFilter::implExportPage( const OUString & sPageId,
if( rMtf.GetActionSize() )
{
// background id = "bg-" + page id
- OUString sBackgroundId = "bg-";
- sBackgroundId += sPageId;
+ OUString sBackgroundId = "bg-" + sPageId;
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", sBackgroundId );
// At present (LibreOffice 3.4.0) the 'IsBackgroundVisible' property is not handled
@@ -1760,8 +1758,7 @@ bool SVGFilter::implExportPage( const OUString & sPageId,
if( bMaster )
{
// background objects id = "bo-" + page id
- OUString sBackgroundObjectsId = "bo-";
- sBackgroundObjectsId += sPageId;
+ OUString sBackgroundObjectsId = "bo-" + sPageId;
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", sBackgroundObjectsId );
if( !mbPresentation )
{
@@ -2473,12 +2470,10 @@ void SVGExport::writeMtf( const GDIMetaFile& rMtf )
if( xExtDocHandler.is() && IsUseDTDString() )
xExtDocHandler->unknown( SVG_DTD_STRING );
- aAttr = OUString::number( aSize.Width() );
- aAttr += "mm";
+ aAttr = OUString::number( aSize.Width() ) + "mm";
AddAttribute( XML_NAMESPACE_NONE, "width", aAttr );
- aAttr = OUString::number( aSize.Height() );
- aAttr += "mm";
+ aAttr = OUString::number( aSize.Height() ) + "mm";
AddAttribute( XML_NAMESPACE_NONE, "height", aAttr );
aAttr = "0 0 ";
diff --git a/filter/source/xsltdialog/typedetectionexport.cxx b/filter/source/xsltdialog/typedetectionexport.cxx
index 65cd250790c3..7d53a7db8726 100644
--- a/filter/source/xsltdialog/typedetectionexport.cxx
+++ b/filter/source/xsltdialog/typedetectionexport.cxx
@@ -119,20 +119,13 @@ void TypeDetectionExporter::doExport( const Reference< XOutputStream >& xOS, co
pAttrList->AddAttribute( sName, sCdataAttribute, filter->maType );
xHandler->ignorableWhitespace ( sWhiteSpace );
xHandler->startElement( sNode, xAttrList );
- OUString sValue("0");
- sValue += sComma;
- sValue += sComma;
+ OUString sValue = "0" + sComma + sComma;
if( !filter->maDocType.isEmpty() )
{
- sValue += sDocTypePrefix;
- sValue += filter->maDocType;
+ sValue += sDocTypePrefix + filter->maDocType;
}
- sValue += sComma;
- sValue += sComma;
- sValue += filter->maExtension;
- sValue += sComma;
- sValue += OUString::number( filter->mnDocumentIconID );
- sValue += sComma;
+ sValue += sComma + sComma + filter->maExtension + sComma +
+ OUString::number( filter->mnDocumentIconID ) + sComma;
addProperty( xHandler, sData, sValue );
addLocaleProperty( xHandler, sUIName, filter->maInterfaceName );
@@ -159,39 +152,39 @@ void TypeDetectionExporter::doExport( const Reference< XOutputStream >& xOS, co
xHandler->startElement( sNode, xAttrList );
addLocaleProperty( xHandler, sUIName, filter->maInterfaceName );
- OUString sValue("0");
- sValue += sComma;
- sValue += filter->maType;
- sValue += sComma;
- sValue += filter->maDocumentService;
- sValue += sComma;
- sValue += sFilterAdaptorService;
- sValue += sComma;
- sValue += OUString::number( filter->maFlags );
- sValue += sComma;
- sValue += sXSLTFilterService;
- sValue += sDelim;
- sValue += OUString::boolean( filter->mbNeedsXSLT2 );
- sValue += sDelim;
+ OUStringBuffer sValue("0" +
+ sComma +
+ filter->maType +
+ sComma +
+ filter->maDocumentService +
+ sComma +
+ sFilterAdaptorService +
+ sComma +
+ OUString::number( filter->maFlags ) +
+ sComma +
+ sXSLTFilterService +
+ sDelim +
+ OUString::boolean( filter->mbNeedsXSLT2 ) +
+ sDelim);
const application_info_impl* pAppInfo = getApplicationInfo( filter->maExportService );
- sValue += pAppInfo->maXMLImporter;
- sValue += sDelim;
- sValue += pAppInfo->maXMLExporter;
- sValue += sDelim;
-
- sValue += createRelativeURL( filter->maFilterName, filter->maImportXSLT );
- sValue += sDelim;
- sValue += createRelativeURL( filter->maFilterName, filter->maExportXSLT );
- sValue += sDelim;
+ sValue.append(pAppInfo->maXMLImporter +
+ sDelim +
+ pAppInfo->maXMLExporter +
+ sDelim);
+
+ sValue.append(createRelativeURL( filter->maFilterName, filter->maImportXSLT ));
+ sValue.append(sDelim);
+ sValue.append(createRelativeURL( filter->maFilterName, filter->maExportXSLT ));
+ sValue.append(sDelim);
// entry DTD obsolete and removed, but delimiter kept
- sValue += sDelim;
- sValue += filter->maComment;
- sValue += sComma;
- sValue += "0";
- sValue += sComma;
- sValue += createRelativeURL( filter->maFilterName, filter->maImportTemplate );
- addProperty( xHandler, sData, sValue );
+ sValue.append(sDelim);
+ sValue.append(filter->maComment);
+ sValue.append(sComma);
+ sValue.append("0");
+ sValue.append(sComma);
+ sValue.append(createRelativeURL( filter->maFilterName, filter->maImportTemplate ));
+ addProperty( xHandler, sData, sValue.makeStringAndClear() );
xHandler->ignorableWhitespace ( sWhiteSpace );
xHandler->endElement( sNode );
}
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
index 5f7dcc7b9039..6f81c821f113 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
@@ -449,8 +449,7 @@ bool XMLFilterSettingsDialog::insertOrEdit( filter_info_impl* pNewInfo, const fi
INetURLObject aSourceURL( pFilterEntry->maImportTemplate );
if (!aSourceURL.GetLastName().isEmpty())
{
- OUString aDestURL( m_sTemplatePath );
- aDestURL += pFilterEntry->maFilterName + "/";
+ OUString aDestURL = m_sTemplatePath + pFilterEntry->maFilterName + "/";
if( createDirectory( aDestURL ) )
{
aDestURL += aSourceURL.GetLastName();
@@ -851,8 +850,8 @@ void XMLFilterSettingsDialog::onSave()
FileDialogFlags::NONE, m_xDialog.get());
OUString aExtensions( "*.jar" );
- OUString aFilterName(XsltResId(STR_FILTER_PACKAGE));
- aFilterName += " (" + aExtensions + ")";
+ OUString aFilterName = XsltResId(STR_FILTER_PACKAGE) +
+ " (" + aExtensions + ")";
aDlg.AddFilter( aFilterName, aExtensions );
@@ -896,8 +895,8 @@ void XMLFilterSettingsDialog::onOpen()
FileDialogFlags::NONE, m_xDialog.get());
OUString aExtensions( "*.jar" );
- OUString aFilterName(XsltResId(STR_FILTER_PACKAGE));
- aFilterName += " (" + aExtensions + ")";
+ OUString aFilterName = XsltResId(STR_FILTER_PACKAGE) +
+ " (" + aExtensions + ")";
aDlg.AddFilter( aFilterName, aExtensions );