From 5cd976bdef4334a5c28d6c7748ef5d72cf5025ff Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 12 Sep 2018 17:01:48 +0200 Subject: loplugin:simplifyconstruct in writerfilter..xmlsecurity Change-Id: Ic2d901ca0dbc2d6fa96611d260c1572da8a783c0 Reviewed-on: https://gerrit.libreoffice.org/60398 Tested-by: Jenkins Reviewed-by: Noel Grandin --- xmloff/qa/unit/uxmloff.cxx | 1 - xmloff/source/chart/SchXMLSeries2Context.cxx | 1 - xmloff/source/chart/transporttypes.hxx | 1 - xmloff/source/core/RDFaExportHelper.cxx | 2 +- xmloff/source/core/xmlexp.cxx | 15 --------------- xmloff/source/core/xmlimp.cxx | 1 - xmloff/source/draw/shapeimport.cxx | 2 -- xmloff/source/forms/handler/form_handler_factory.cxx | 6 +++--- xmloff/source/forms/officeforms.cxx | 1 - xmloff/source/style/MultiPropertySetHelper.cxx | 2 -- xmloff/source/style/styleexp.cxx | 2 +- xmloff/source/style/xmlexppr.cxx | 3 +-- xmloff/source/style/xmlnumfe.cxx | 8 ++------ xmloff/source/style/xmlstyle.cxx | 3 +-- .../source/text/XMLFootnoteConfigurationImportContext.cxx | 1 - xmloff/source/text/txtparae.cxx | 5 ----- xmloff/source/xforms/XFormsBindContext.cxx | 3 +-- 17 files changed, 10 insertions(+), 47 deletions(-) (limited to 'xmloff') diff --git a/xmloff/qa/unit/uxmloff.cxx b/xmloff/qa/unit/uxmloff.cxx index c2460dc496d5..707210b92767 100644 --- a/xmloff/qa/unit/uxmloff.cxx +++ b/xmloff/qa/unit/uxmloff.cxx @@ -47,7 +47,6 @@ private: }; Test::Test() - : pExport( nullptr ) { } diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx index fba8bc84d600..4b934377d085 100644 --- a/xmloff/source/chart/SchXMLSeries2Context.cxx +++ b/xmloff/source/chart/SchXMLSeries2Context.cxx @@ -261,7 +261,6 @@ SchXMLSeries2Context::SchXMLSeries2Context( mrAxes( rAxes ), mrStyleVector( rStyleVector ), mrRegressionStyleVector( rRegressionStyleVector ), - m_xSeries(nullptr), mnSeriesIndex( nSeriesIndex ), mnDataPointIndex( 0 ), m_bStockHasVolume( bStockHasVolume ), diff --git a/xmloff/source/chart/transporttypes.hxx b/xmloff/source/chart/transporttypes.hxx index b1657a82dd37..16985db9022e 100644 --- a/xmloff/source/chart/transporttypes.hxx +++ b/xmloff/source/chart/transporttypes.hxx @@ -179,7 +179,6 @@ struct DataRowPointStyle , sal_Int32 nAttachedAxis = 0 ) : meType( eType ), m_xSeries( xSeries ), - m_xOldAPISeries( nullptr ), m_nPointIndex( nPointIndex ), m_nPointRepeat( nPointRepeat ), msStyleName( sStyleName ), diff --git a/xmloff/source/core/RDFaExportHelper.cxx b/xmloff/source/core/RDFaExportHelper.cxx index 2fcfe6109dcc..60132380d04c 100644 --- a/xmloff/source/core/RDFaExportHelper.cxx +++ b/xmloff/source/core/RDFaExportHelper.cxx @@ -87,7 +87,7 @@ getRelativeReference(SvXMLExport const& rExport, OUString const& rURI) } RDFaExportHelper::RDFaExportHelper(SvXMLExport & i_rExport) - : m_rExport(i_rExport), m_xRepository(nullptr), m_Counter(0) + : m_rExport(i_rExport), m_Counter(0) { const uno::Reference xRS( m_rExport.GetModel(), uno::UNO_QUERY_THROW); diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 6c3abe7d60ba..86dc9404bed7 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -436,11 +436,6 @@ SvXMLExport::SvXMLExport( mxAttrList( new SvXMLAttributeList ), mpNamespaceMap( new SvXMLNamespaceMap ), maUnitConv( xContext, util::MeasureUnit::MM_100TH, eDefaultMeasureUnit ), - mpNumExport(nullptr), - mpProgressBarHelper( nullptr ), - mpEventExport( nullptr ), - mpImageMapExport( nullptr ), - mpXMLErrors( nullptr ), meClass( eClass ), mnExportFlags( nExportFlags ), mnErrorFlags( SvXMLErrorFlags::NO ), @@ -466,11 +461,6 @@ SvXMLExport::SvXMLExport( msOrigFileName( rFileName ), mpNamespaceMap( new SvXMLNamespaceMap ), maUnitConv( xContext, util::MeasureUnit::MM_100TH, eDefaultMeasureUnit ), - mpNumExport(nullptr), - mpProgressBarHelper( nullptr ), - mpEventExport( nullptr ), - mpImageMapExport( nullptr ), - mpXMLErrors( nullptr ), meClass( XML_TOKEN_INVALID ), mnExportFlags( SvXMLExportFlags::NONE ), mnErrorFlags( SvXMLErrorFlags::NO ), @@ -506,11 +496,6 @@ SvXMLExport::SvXMLExport( maUnitConv( xContext, util::MeasureUnit::MM_100TH, SvXMLUnitConverter::GetMeasureUnit(eDefaultFieldUnit) ), - mpNumExport(nullptr), - mpProgressBarHelper( nullptr ), - mpEventExport( nullptr ), - mpImageMapExport( nullptr ), - mpXMLErrors( nullptr ), meClass( XML_TOKEN_INVALID ), mnExportFlags( nExportFlag ), mnErrorFlags( SvXMLErrorFlags::NO ), diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index 1c4099badb70..5f31846b9aa2 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -397,7 +397,6 @@ SvXMLImport::SvXMLImport( mnErrorFlags(SvXMLErrorFlags::NO), isFastContext( false ), maNamespaceHandler( new SvXMLImportFastNamespaceHandler() ), - mxFastDocumentHandler( nullptr ), mbIsFormsSupported( true ), mbIsTableShapeSupported( false ) { diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx index dff86d74b63a..a474cef96aa3 100644 --- a/xmloff/source/draw/shapeimport.cxx +++ b/xmloff/source/draw/shapeimport.cxx @@ -110,8 +110,6 @@ XMLShapeImportHelper::XMLShapeImportHelper( const uno::Reference< frame::XModel>& rModel, SvXMLImportPropertyMapper *pExtMapper ) : mpImpl( new XMLShapeImportHelperImpl ), - mpPropertySetMapper(nullptr), - mpPresPagePropsMapper(nullptr), mrImporter( rImporter ) { mpImpl->mpSortContext = nullptr; diff --git a/xmloff/source/forms/handler/form_handler_factory.cxx b/xmloff/source/forms/handler/form_handler_factory.cxx index 438d76c52fea..8ea62c5fc4c7 100644 --- a/xmloff/source/forms/handler/form_handler_factory.cxx +++ b/xmloff/source/forms/handler/form_handler_factory.cxx @@ -28,14 +28,14 @@ namespace xmloff namespace { - static PPropertyHandler s_pVCLDateHandler = nullptr; - static PPropertyHandler s_pVCLTimeHandler = nullptr; + static PPropertyHandler s_pVCLDateHandler; + static PPropertyHandler s_pVCLTimeHandler; } //= FormHandlerFactory PPropertyHandler FormHandlerFactory::getFormPropertyHandler( const PropertyId i_propertyId ) { - PPropertyHandler pHandler( nullptr ); + PPropertyHandler pHandler; switch ( i_propertyId ) { diff --git a/xmloff/source/forms/officeforms.cxx b/xmloff/source/forms/officeforms.cxx index 57a1f23d0546..c3fd44b49b0a 100644 --- a/xmloff/source/forms/officeforms.cxx +++ b/xmloff/source/forms/officeforms.cxx @@ -117,7 +117,6 @@ namespace xmloff //= OFormsRootExport OFormsRootExport::OFormsRootExport( SvXMLExport& _rExp ) - :m_pImplElement(nullptr) { addModelAttributes(_rExp); diff --git a/xmloff/source/style/MultiPropertySetHelper.cxx b/xmloff/source/style/MultiPropertySetHelper.cxx index 93d06b64dcfc..c7288be476ea 100644 --- a/xmloff/source/style/MultiPropertySetHelper.cxx +++ b/xmloff/source/style/MultiPropertySetHelper.cxx @@ -35,10 +35,8 @@ using ::com::sun::star::uno::UNO_QUERY; MultiPropertySetHelper::MultiPropertySetHelper( const sal_Char** pNames ) : - pPropertyNames( nullptr ), nLength( 0 ), aPropertySequence(), - pSequenceIndex( nullptr ), aValues(), pValues( nullptr ) { diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx index dac2d19e1565..963d127c12ff 100644 --- a/xmloff/source/style/styleexp.cxx +++ b/xmloff/source/style/styleexp.cxx @@ -440,7 +440,7 @@ void XMLStyleExport::exportStyleFamily( // If next styles are supported and used styles should be exported only, // the next style may be unused but has to be exported, too. In this case // the names of all exported styles are remembered. - std::unique_ptr > pExportedStyles(nullptr); + std::unique_ptr > pExportedStyles; bool bFirstStyle = true; const uno::Sequence< OUString> aSeq = xStyleCont->getElementNames(); diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx index 14f4ff68e1f3..c264376b863e 100644 --- a/xmloff/source/style/xmlexppr.cxx +++ b/xmloff/source/style/xmlexppr.cxx @@ -198,8 +198,7 @@ public: FilterPropertiesInfo_Impl::FilterPropertiesInfo_Impl() : nCount(0), - aPropInfos(), - pApiNames( nullptr ) + aPropInfos() { } diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx index 9598ee88b6c0..69ca3fdc6532 100644 --- a/xmloff/source/style/xmlnumfe.cxx +++ b/xmloff/source/style/xmlnumfe.cxx @@ -219,9 +219,7 @@ SvXMLNumFmtExport::SvXMLNumFmtExport( const uno::Reference< util::XNumberFormatsSupplier >& rSupp ) : rExport( rExp ), sPrefix( OUString("N") ), - pFormatter( nullptr ), - pCharClass( nullptr ), - pLocaleData( nullptr ) + pFormatter( nullptr ) { // supplier must be SvNumberFormatsSupplierObj SvNumberFormatsSupplierObj* pObj = @@ -253,9 +251,7 @@ SvXMLNumFmtExport::SvXMLNumFmtExport( const OUString& rPrefix ) : rExport( rExp ), sPrefix( rPrefix ), - pFormatter( nullptr ), - pCharClass( nullptr ), - pLocaleData( nullptr ) + pFormatter( nullptr ) { // supplier must be SvNumberFormatsSupplierObj SvNumberFormatsSupplierObj* pObj = diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx index 371f0def7735..642f1830c429 100644 --- a/xmloff/source/style/xmlstyle.cxx +++ b/xmloff/source/style/xmlstyle.cxx @@ -747,8 +747,7 @@ SvXMLStylesContext::SvXMLStylesContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference< xml::sax::XAttributeList > &, bool bAuto ) : SvXMLImportContext( rImport, nPrfx, rLName ), - mpImpl( new SvXMLStylesContext_Impl( bAuto ) ), - mpStyleStylesElemTokenMap( nullptr ) + mpImpl( new SvXMLStylesContext_Impl( bAuto ) ) { } diff --git a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx index 633a2151c400..169bf130955e 100644 --- a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx +++ b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx @@ -130,7 +130,6 @@ XMLFootnoteConfigurationImportContext::XMLFootnoteConfigurationImportContext( : SvXMLStyleContext(rImport, nPrfx, rLocalName, xAttrList, XML_STYLE_FAMILY_TEXT_FOOTNOTECONFIG) , sNumFormat("1") , sNumSync("false") -, pAttrTokenMap(nullptr) , nOffset(0) , nNumbering(FootnoteNumbering::PER_PAGE) , bPosition(false) diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 569be2c3c707..95a3e89c6f2d 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -1242,12 +1242,7 @@ XMLTextParagraphExport::XMLTextParagraphExport( m_xImpl(new Impl), rAutoStylePool( rASP ), pBoundFrameSets(new BoundFrameSets(GetExport().GetModel())), - pFieldExport( nullptr ), - pListElements( nullptr ), maListAutoPool( GetExport() ), - pSectionExport( nullptr ), - pIndexMarkExport( nullptr ), - pRedlineExport( nullptr ), bProgress( false ), bBlock( false ), bOpenRuby( false ), diff --git a/xmloff/source/xforms/XFormsBindContext.cxx b/xmloff/source/xforms/XFormsBindContext.cxx index 7adf86bb6b89..3be50d4fadf2 100644 --- a/xmloff/source/xforms/XFormsBindContext.cxx +++ b/xmloff/source/xforms/XFormsBindContext.cxx @@ -67,8 +67,7 @@ XFormsBindContext::XFormsBindContext( const OUString& rLocalName, const Reference& xModel ) : TokenContext( rImport, nPrefix, rLocalName, aAttributeMap, aEmptyMap ), - mxModel( xModel ), - mxBinding( nullptr ) + mxModel( xModel ) { // attach binding to model mxBinding = mxModel->createBinding(); -- cgit