diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-12 17:01:48 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-13 08:30:22 +0200 |
commit | 5cd976bdef4334a5c28d6c7748ef5d72cf5025ff (patch) | |
tree | 33b42d8365a7532155b3d1f35c4f4f12bbde191b | |
parent | 8c29b0837d924d226fd1a48e323771b450f2b9b6 (diff) |
loplugin:simplifyconstruct in writerfilter..xmlsecurity
Change-Id: Ic2d901ca0dbc2d6fa96611d260c1572da8a783c0
Reviewed-on: https://gerrit.libreoffice.org/60398
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
29 files changed, 20 insertions, 70 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index d88a4f701ac6..257b6bbad683 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -2543,7 +2543,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext ) const PropertyMapPtr pParagraphProps = m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH); if( pParagraphProps && pParagraphProps->isSet(PROP_PARA_STYLE_NAME) ) { - StyleSheetEntryPtr pStyle = nullptr; + StyleSheetEntryPtr pStyle; OUString sStyleName; pParagraphProps->getProperty(PROP_PARA_STYLE_NAME)->second >>= sStyleName; if( !sStyleName.isEmpty() && GetStyleSheetTable() ) diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 9caf6e3c8fd8..c0eea15bdb95 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -2919,7 +2919,7 @@ void DomainMapper_Impl::ChainTextFrames() sal_Int32 nSeq; OUString s_mso_next_textbox; bool bShapeNameSet; - TextFramesForChaining(): xShape(nullptr), nId(0), nSeq(0), bShapeNameSet(false) {} + TextFramesForChaining(): nId(0), nSeq(0), bShapeNameSet(false) {} } ; typedef std::map <OUString, TextFramesForChaining> ChainMap; diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx index e4fb96f7bfff..83d384844602 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -380,7 +380,6 @@ SectionPropertyMap::SectionPropertyMap( bool bIsFirstSection ) , m_bTitlePage( false ) , m_nColumnCount( 0 ) , m_nColumnDistance( 1249 ) - , m_xColumnContainer( nullptr ) , m_bSeparatorLineIsOn( false ) , m_bEvenlySpaced( false ) , m_nPageNumber( -1 ) diff --git a/writerfilter/source/dmapper/TextEffectsHandler.cxx b/writerfilter/source/dmapper/TextEffectsHandler.cxx index 13e621438c62..7626fb133762 100644 --- a/writerfilter/source/dmapper/TextEffectsHandler.cxx +++ b/writerfilter/source/dmapper/TextEffectsHandler.cxx @@ -480,8 +480,7 @@ void TextEffectsHandler::convertElementIdToPropertyId(sal_Int32 aElementId) } TextEffectsHandler::TextEffectsHandler(sal_uInt32 aElementId) : - LoggedProperties("TextEffectsHandler"), - mpGrabBagStack(nullptr) + LoggedProperties("TextEffectsHandler") { convertElementIdToPropertyId(aElementId); mpGrabBagStack.reset(new oox::GrabBagStack(maElementName)); diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx index 77b958599966..eb4dcbcd41a7 100644 --- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx @@ -58,7 +58,6 @@ OOXMLDocumentImpl::OOXMLDocumentImpl(OOXMLStream::Pointer_t const & pStream, con : mpStream(pStream) , mxStatusIndicator(xStatusIndicator) , mnXNoteId(0) - , mxThemeDom(nullptr) , mbIsSubstream(false) , mbSkipImages(bSkipImages) , mnPercentSize(0) diff --git a/xmlhelp/source/cxxhelp/provider/db.hxx b/xmlhelp/source/cxxhelp/provider/db.hxx index b26797c80593..607b987ff838 100644 --- a/xmlhelp/source/cxxhelp/provider/db.hxx +++ b/xmlhelp/source/cxxhelp/provider/db.hxx @@ -72,8 +72,6 @@ namespace helpdatafileproxy { Hdf( const OUString& rFileURL, css::uno::Reference< css::ucb::XSimpleFileAccess3 > const & xSFA ) : m_aFileURL( rFileURL ) - , m_pStringToDataMap( nullptr ) - , m_pStringToValPosMap( nullptr ) , m_xSFA( xSFA ) , m_pItData( nullptr ) , m_nItRead( -1 ) diff --git a/xmlhelp/source/cxxhelp/provider/provider.cxx b/xmlhelp/source/cxxhelp/provider/provider.cxx index 4c4532569848..24a953e7aabb 100644 --- a/xmlhelp/source/cxxhelp/provider/provider.cxx +++ b/xmlhelp/source/cxxhelp/provider/provider.cxx @@ -46,7 +46,6 @@ ContentProvider::ContentProvider( const uno::Reference< uno::XComponentContext > : ::ucbhelper::ContentProviderImplHelper( rxContext ) , isInitialized( false ) , m_aScheme(MYUCP_URL_SCHEME) - , m_pDatabases( nullptr ) { } diff --git a/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx b/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx index 9a36812d1172..f32c54a56c02 100644 --- a/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx +++ b/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx @@ -38,10 +38,7 @@ ResultSetBase::ResultSetBase( const uno::Reference< uno::XComponentContext >& r m_xProvider( xProvider ), m_nRow( -1 ), m_nWasNull( true ), - m_sProperty( seq ), - m_pDisposeEventListeners( nullptr ), - m_pRowCountListeners( nullptr ), - m_pIsFinalListeners( nullptr ) + m_sProperty( seq ) { } @@ -287,8 +284,7 @@ ResultSetBase::rowDeleted() uno::Reference< uno::XInterface > SAL_CALL ResultSetBase::getStatement() { - uno::Reference< uno::XInterface > test( nullptr ); - return test; + return uno::Reference< uno::XInterface >(); } 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<rdf::XRepositorySupplier> 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<std::set<OUString> > pExportedStyles(nullptr); + std::unique_ptr<std::set<OUString> > 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<XModel2>& xModel ) : TokenContext( rImport, nPrefix, rLocalName, aAttributeMap, aEmptyMap ), - mxModel( xModel ), - mxBinding( nullptr ) + mxModel( xModel ) { // attach binding to model mxBinding = mxModel->createBinding(); diff --git a/xmlscript/source/xml_helper/xml_impctx.cxx b/xmlscript/source/xml_helper/xml_impctx.cxx index 9c1df5f7cd92..face4f5ca01f 100644 --- a/xmlscript/source/xml_helper/xml_impctx.cxx +++ b/xmlscript/source/xml_helper/xml_impctx.cxx @@ -179,8 +179,7 @@ DocumentHandlerImpl::DocumentHandlerImpl( m_aLastURI_lookup( "<<< unknown URI >>>" ), m_nLastPrefix_lookup( UID_UNKNOWN ), m_aLastPrefix_lookup( "<<< unknown URI >>>" ), - m_nSkipElements( 0 ), - m_pMutex( nullptr ) + m_nSkipElements( 0 ) { m_elements.reserve( 10 ); diff --git a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx index 2c60c950f605..cc79b91613ff 100644 --- a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx +++ b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx @@ -39,8 +39,7 @@ namespace cssxs = com::sun::star::xml::sax; #define IMPLEMENTATION_NAME "com.sun.star.xml.security.framework.SAXEventKeeperImpl" SAXEventKeeperImpl::SAXEventKeeperImpl( ) - :m_pRootBufferNode(nullptr), - m_pCurrentBufferNode(nullptr), + :m_pCurrentBufferNode(nullptr), m_nNextElementMarkId(1), m_pNewBlocker(nullptr), m_pCurrentBlockingBufferNode(nullptr), diff --git a/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx b/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx index 6e3b0939cebf..1ee62df563bf 100644 --- a/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx +++ b/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx @@ -30,8 +30,7 @@ using ::com::sun::star::xml::wrapper::XXMLElementWrapper ; using ::com::sun::star::xml::crypto::XXMLSignatureTemplate ; XMLSignatureTemplateImpl::XMLSignatureTemplateImpl() - :m_xTemplate( nullptr ), - m_nStatus ( css::xml::crypto::SecurityOperationStatus_UNKNOWN ) + :m_nStatus ( css::xml::crypto::SecurityOperationStatus_UNKNOWN ) { } diff --git a/xmlsecurity/source/helper/xsecverify.cxx b/xmlsecurity/source/helper/xsecverify.cxx index 283c9ac45c6d..edd78902313b 100644 --- a/xmlsecurity/source/helper/xsecverify.cxx +++ b/xmlsecurity/source/helper/xsecverify.cxx @@ -101,7 +101,7 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar void XSecController::addSignature() { - cssu::Reference< cssxc::sax::XReferenceResolvedListener > xReferenceResolvedListener = nullptr; + cssu::Reference< cssxc::sax::XReferenceResolvedListener > xReferenceResolvedListener; sal_Int32 nSignatureId = 0; @@ -466,7 +466,7 @@ void XSecController::collectToVerify( const OUString& referenceId ) */ { bool bJustChainingOn = false; - cssu::Reference< cssxs::XDocumentHandler > xHandler = nullptr; + cssu::Reference< cssxs::XDocumentHandler > xHandler; int i,j; int sigNum = m_vInternalSignatureInformations.size(); |