diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-07-28 12:03:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-07-29 08:53:23 +0200 |
commit | 0d36b32755ac662299e6a8165e9fa57311b74a2f (patch) | |
tree | ce68c6d050056858dbf31033d7d3a3741aab2276 /xmlscript | |
parent | f53fcf9cfcc0bef415f9d2d95132ccd8bbe96061 (diff) |
loplugin:sequentialassign
Change-Id: I56a9bf698b60bd278c71cc632aacef2bd2f4c13f
Reviewed-on: https://gerrit.libreoffice.org/76501
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmlscript')
-rw-r--r-- | xmlscript/source/xmldlg_imexp/xmldlg_import.cxx | 3 | ||||
-rw-r--r-- | xmlscript/source/xmlflat_imexp/xmlbas_export.cxx | 12 | ||||
-rw-r--r-- | xmlscript/source/xmllib_imexp/xmllib_export.cxx | 6 |
3 files changed, 7 insertions, 14 deletions
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx index c8a96c3335b7..9113131f1d33 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx @@ -117,8 +117,7 @@ OUString ControlElement::getControlModelName( OUString const& rDefaultModel, Reference< xml::input::XAttributes > const & xAttributes ) { - OUString aModel; - aModel = xAttributes->getValueByUidName( m_xImport->XMLNS_DIALOGS_UID, "control-implementation"); + OUString aModel = xAttributes->getValueByUidName( m_xImport->XMLNS_DIALOGS_UID, "control-implementation"); if (aModel.isEmpty()) aModel = rDefaultModel; return aModel; diff --git a/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx b/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx index 02a1f900e390..ed1ca3da901e 100644 --- a/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx +++ b/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx @@ -166,8 +166,7 @@ sal_Bool XMLBasicExporterBase::filter( const Sequence< beans::PropertyValue >& / OUString aLibElementName( aPrefix ); aLibElementName += ":library-linked"; XMLElement* pLibElement = new XMLElement( aLibElementName ); - Reference< xml::sax::XAttributeList > xLibAttribs; - xLibAttribs = static_cast< xml::sax::XAttributeList* >( pLibElement ); + Reference< xml::sax::XAttributeList > xLibAttribs = static_cast< xml::sax::XAttributeList* >( pLibElement ); // ooo/script:name attribute pLibElement->addAttribute( aPrefix + ":name", rLibName ); @@ -202,8 +201,7 @@ sal_Bool XMLBasicExporterBase::filter( const Sequence< beans::PropertyValue >& / OUString aLibElementName( aPrefix ); aLibElementName += ":library-embedded"; XMLElement* pLibElement = new XMLElement( aLibElementName ); - Reference< xml::sax::XAttributeList > xLibAttribs; - xLibAttribs = static_cast< xml::sax::XAttributeList* >( pLibElement ); + Reference< xml::sax::XAttributeList > xLibAttribs = static_cast< xml::sax::XAttributeList* >( pLibElement ); // ooo/script:name attribute pLibElement->addAttribute( aPrefix + ":name", rLibName ); @@ -240,8 +238,7 @@ sal_Bool XMLBasicExporterBase::filter( const Sequence< beans::PropertyValue >& / OUString aModElementName( aPrefix ); aModElementName += ":module"; XMLElement* pModElement = new XMLElement( aModElementName ); - Reference< xml::sax::XAttributeList > xModAttribs; - xModAttribs = static_cast< xml::sax::XAttributeList* >( pModElement ); + Reference< xml::sax::XAttributeList > xModAttribs = static_cast< xml::sax::XAttributeList* >( pModElement ); // ooo/script:name attribute pModElement->addAttribute( aPrefix + ":name", rModName ); @@ -254,8 +251,7 @@ sal_Bool XMLBasicExporterBase::filter( const Sequence< beans::PropertyValue >& / OUString aSourceElementName( aPrefix ); aSourceElementName += ":source-code"; XMLElement* pSourceElement = new XMLElement( aSourceElementName ); - Reference< xml::sax::XAttributeList > xSourceAttribs; - xSourceAttribs = static_cast< xml::sax::XAttributeList* >( pSourceElement ); + Reference< xml::sax::XAttributeList > xSourceAttribs = static_cast< xml::sax::XAttributeList* >( pSourceElement ); // <ooo/script:source-code... m_xHandler->ignorableWhitespace( OUString() ); diff --git a/xmlscript/source/xmllib_imexp/xmllib_export.cxx b/xmlscript/source/xmllib_imexp/xmllib_export.cxx index 5353c1c245ec..97764e4292c2 100644 --- a/xmlscript/source/xmllib_imexp/xmllib_export.cxx +++ b/xmlscript/source/xmllib_imexp/xmllib_export.cxx @@ -63,8 +63,7 @@ exportLibraryContainer( LibDescriptor& rLib = pLibArray->mpLibs[i]; XMLElement* pLibElement = new XMLElement( XMLNS_LIBRARY_PREFIX ":library" ); - Reference< xml::sax::XAttributeList > xLibElementAttribs; - xLibElementAttribs = static_cast< xml::sax::XAttributeList* >( pLibElement ); + Reference< xml::sax::XAttributeList > xLibElementAttribs = static_cast< xml::sax::XAttributeList* >( pLibElement ); pLibElement->addAttribute( XMLNS_LIBRARY_PREFIX ":name", rLib.aName ); @@ -121,8 +120,7 @@ exportLibrary( for( const auto& rElementName : rLib.aElementNames ) { XMLElement* pElement = new XMLElement( XMLNS_LIBRARY_PREFIX ":element" ); - Reference< xml::sax::XAttributeList > xElementAttribs; - xElementAttribs = static_cast< xml::sax::XAttributeList* >( pElement ); + Reference< xml::sax::XAttributeList > xElementAttribs = static_cast< xml::sax::XAttributeList* >( pElement ); pElement->addAttribute( XMLNS_LIBRARY_PREFIX ":name", rElementName ); |