From 6c80a8fe89fadf9a2c7260a09c037a09462f53d1 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 6 Nov 2015 09:23:33 +0200 Subject: new loplugin: oncevar Change-Id: If57390510dde4d166be3141b9f658a7453755d3f Reviewed-on: https://gerrit.libreoffice.org/19815 Tested-by: Jenkins Reviewed-by: Noel Grandin --- xmlscript/source/xml_helper/xml_impctx.cxx | 3 +-- xmlscript/source/xmldlg_imexp/xmldlg_export.cxx | 3 +-- xmlscript/source/xmllib_imexp/xmllib_export.cxx | 12 ++++-------- xmlscript/source/xmlmod_imexp/xmlmod_export.cxx | 3 +-- 4 files changed, 7 insertions(+), 14 deletions(-) (limited to 'xmlscript/source') diff --git a/xmlscript/source/xml_helper/xml_impctx.cxx b/xmlscript/source/xml_helper/xml_impctx.cxx index 35299be38efd..6b8ac8c8f50e 100644 --- a/xmlscript/source/xml_helper/xml_impctx.cxx +++ b/xmlscript/source/xml_helper/xml_impctx.cxx @@ -47,8 +47,7 @@ const sal_Int32 UID_UNKNOWN = -1; Sequence< OUString > getSupportedServiceNames_DocumentHandlerImpl() { - OUString name( "com.sun.star.xml.input.SaxDocumentHandler" ); - return Sequence< OUString >( &name, 1 ); + return Sequence< OUString > { "com.sun.star.xml.input.SaxDocumentHandler" }; } OUString getImplementationName_DocumentHandlerImpl() diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx index 9ad72727d66d..35264f3cc38b 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx @@ -1384,10 +1384,9 @@ void SAL_CALL exportDialogModel( xOut->startDocument(); - OUString aDocTypeStr( + xOut->unknown( "" ); - xOut->unknown( aDocTypeStr ); xOut->ignorableWhitespace( OUString() ); OUString aWindowName( XMLNS_DIALOGS_PREFIX ":window" ); diff --git a/xmlscript/source/xmllib_imexp/xmllib_export.cxx b/xmlscript/source/xmllib_imexp/xmllib_export.cxx index a10df1535221..1b791ef7c9b1 100644 --- a/xmlscript/source/xmllib_imexp/xmllib_export.cxx +++ b/xmlscript/source/xmllib_imexp/xmllib_export.cxx @@ -36,10 +36,9 @@ SAL_CALL exportLibraryContainer( { xOut->startDocument(); - OUString aDocTypeStr( + xOut->unknown( "" ); - xOut->unknown( aDocTypeStr ); xOut->ignorableWhitespace( OUString() ); OUString aLibrariesName( XMLNS_LIBRARY_PREFIX ":libraries" ); @@ -60,8 +59,7 @@ SAL_CALL exportLibraryContainer( { LibDescriptor& rLib = pLibArray->mpLibs[i]; - OUString aLibraryName( XMLNS_LIBRARY_PREFIX ":library" ); - XMLElement* pLibElement = new XMLElement( aLibraryName ); + XMLElement* pLibElement = new XMLElement( XMLNS_LIBRARY_PREFIX ":library" ); Reference< xml::sax::XAttributeList > xLibElementAttribs; xLibElementAttribs = static_cast< xml::sax::XAttributeList* >( pLibElement ); @@ -96,14 +94,12 @@ SAL_CALL exportLibrary( { xOut->startDocument(); - OUString aDocTypeStr( + xOut->unknown( "" ); - xOut->unknown( aDocTypeStr ); xOut->ignorableWhitespace( OUString() ); - OUString aLibraryName( XMLNS_LIBRARY_PREFIX ":library" ); - XMLElement* pLibElement = new XMLElement( aLibraryName ); + XMLElement* pLibElement = new XMLElement( XMLNS_LIBRARY_PREFIX ":library" ); Reference< xml::sax::XAttributeList > xAttributes( pLibElement ); pLibElement->addAttribute( "xmlns:" XMLNS_LIBRARY_PREFIX, XMLNS_LIBRARY_URI ); diff --git a/xmlscript/source/xmlmod_imexp/xmlmod_export.cxx b/xmlscript/source/xmlmod_imexp/xmlmod_export.cxx index 377fb440320a..38d6239055b5 100644 --- a/xmlscript/source/xmlmod_imexp/xmlmod_export.cxx +++ b/xmlscript/source/xmlmod_imexp/xmlmod_export.cxx @@ -33,10 +33,9 @@ SAL_CALL exportScriptModule( { xOut->startDocument(); - OUString aDocTypeStr( + xOut->unknown( ""); - xOut->unknown( aDocTypeStr ); xOut->ignorableWhitespace( OUString() ); OUString aModuleName( XMLNS_SCRIPT_PREFIX ":module" ); -- cgit v1.2.3