diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-06 09:23:33 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-11-09 08:34:40 +0000 |
commit | 6c80a8fe89fadf9a2c7260a09c037a09462f53d1 (patch) | |
tree | d36da9ee2a5fdc579d2a57ff6ba02deaddfa785a /xmlscript | |
parent | e1fc599eb764186e5d511ace9785463eebbc7028 (diff) |
new loplugin: oncevar
Change-Id: If57390510dde4d166be3141b9f658a7453755d3f
Reviewed-on: https://gerrit.libreoffice.org/19815
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'xmlscript')
-rw-r--r-- | xmlscript/source/xml_helper/xml_impctx.cxx | 3 | ||||
-rw-r--r-- | xmlscript/source/xmldlg_imexp/xmldlg_export.cxx | 3 | ||||
-rw-r--r-- | xmlscript/source/xmllib_imexp/xmllib_export.cxx | 12 | ||||
-rw-r--r-- | xmlscript/source/xmlmod_imexp/xmlmod_export.cxx | 3 |
4 files changed, 7 insertions, 14 deletions
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( "<!DOCTYPE dlg:window PUBLIC \"-//OpenOffice.org//DTD OfficeDocument 1.0//EN\"" " \"dialog.dtd\">" ); - 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( "<!DOCTYPE library:libraries PUBLIC \"-//OpenOffice.org//DTD OfficeDocument 1.0//EN\"" " \"libraries.dtd\">" ); - 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( "<!DOCTYPE library:library PUBLIC \"-//OpenOffice.org//DTD OfficeDocument 1.0//EN\"" " \"library.dtd\">" ); - 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( "<!DOCTYPE script:module PUBLIC \"-//OpenOffice.org//DTD OfficeDocument 1.0//EN\"" " \"module.dtd\">"); - xOut->unknown( aDocTypeStr ); xOut->ignorableWhitespace( OUString() ); OUString aModuleName( XMLNS_SCRIPT_PREFIX ":module" ); |