diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-29 12:24:31 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-29 18:25:31 +0200 |
commit | 04aafba860f613c20e7078d038cc83eb02de0b54 (patch) | |
tree | 8153152b87089419bde17313d9ac7b9de6fcce32 /filter | |
parent | 76c793d2acf66f46e9edcda43d2f4327e8374841 (diff) |
loplugin:stringadd simplify some *StringBuffer operations
pulled from a larger patch which I created with a more permissive
variant of this plugin
Change-Id: I7abf1f3f09e84703b6e0e52fe9587dff691b2187
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114875
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/xsltdialog/typedetectionexport.cxx | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/filter/source/xsltdialog/typedetectionexport.cxx b/filter/source/xsltdialog/typedetectionexport.cxx index 300d4a0fb6d8..30c4f894bf9c 100644 --- a/filter/source/xsltdialog/typedetectionexport.cxx +++ b/filter/source/xsltdialog/typedetectionexport.cxx @@ -153,7 +153,9 @@ void TypeDetectionExporter::doExport( const Reference< XOutputStream >& xOS, co xHandler->startElement( sNode, pAttrList ); addLocaleProperty( xHandler, sUIName, filter->maInterfaceName ); - OUStringBuffer sValue("0" + + const application_info_impl* pAppInfo = getApplicationInfo( filter->maExportService ); + OUString sValue = + "0" + sComma + filter->maType + sComma + @@ -166,26 +168,23 @@ void TypeDetectionExporter::doExport( const Reference< XOutputStream >& xOS, co sXSLTFilterService + sDelim + OUString::boolean( filter->mbNeedsXSLT2 ) + - sDelim); - - const application_info_impl* pAppInfo = getApplicationInfo( filter->maExportService ); - sValue.append(pAppInfo->maXMLImporter + + sDelim + + 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.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() ); + sDelim + + createRelativeURL( filter->maFilterName, filter->maImportXSLT ) + + sDelim + + createRelativeURL( filter->maFilterName, filter->maExportXSLT ) + + sDelim + + // entry DTD obsolete and removed, but delimiter kept + sDelim + + filter->maComment + + sComma + + "0" + + sComma + + createRelativeURL( filter->maFilterName, filter->maImportTemplate ); + addProperty( xHandler, sData, sValue ); xHandler->ignorableWhitespace ( sWhiteSpace ); xHandler->endElement( sNode ); } |