diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:25:48 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:31:53 +0100 |
commit | 01b49802c7cda7fd4d5ba71263cef7bc95234b89 (patch) | |
tree | b8d92f1c6abf5ac548d0bcb0c581ebfcffd8bfac /sw/source/core/swg | |
parent | 6cd7bf2043146a630925a2e49336f02c802f707a (diff) |
loplugin:nullptr (automatic rewrite)
Change-Id: I01e11fa956a249974e77dce9deebe79311f098d0
Diffstat (limited to 'sw/source/core/swg')
-rw-r--r-- | sw/source/core/swg/SwXMLSectionList.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/swg/SwXMLTextBlocks.cxx | 14 | ||||
-rw-r--r-- | sw/source/core/swg/SwXMLTextBlocks1.cxx | 12 | ||||
-rw-r--r-- | sw/source/core/swg/swblocks.cxx | 6 |
4 files changed, 18 insertions, 18 deletions
diff --git a/sw/source/core/swg/SwXMLSectionList.cxx b/sw/source/core/swg/SwXMLSectionList.cxx index 8027654bafae..05494d6fa47c 100644 --- a/sw/source/core/swg/SwXMLSectionList.cxx +++ b/sw/source/core/swg/SwXMLSectionList.cxx @@ -54,7 +54,7 @@ SvXMLImportContext *SwXMLSectionList::CreateContext( const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; if(( nPrefix == XML_NAMESPACE_OFFICE && IsXMLToken ( rLocalName, XML_BODY )) || ( nPrefix == XML_NAMESPACE_TEXT && @@ -92,7 +92,7 @@ SvXMLImportContext *SvXMLSectionListContext::CreateChildContext( const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; if (nPrefix == XML_NAMESPACE_TEXT && ( IsXMLToken ( rLocalName, XML_SECTION ) || IsXMLToken ( rLocalName, XML_BOOKMARK) ) ) diff --git a/sw/source/core/swg/SwXMLTextBlocks.cxx b/sw/source/core/swg/SwXMLTextBlocks.cxx index acc880db734d..2f911a5a654d 100644 --- a/sw/source/core/swg/SwXMLTextBlocks.cxx +++ b/sw/source/core/swg/SwXMLTextBlocks.cxx @@ -46,13 +46,13 @@ using namespace ::com::sun::star; void SwXMLTextBlocks::InitBlockMode ( const uno::Reference < embed::XStorage >& rStorage ) { xBlkRoot = rStorage; - xRoot = 0; + xRoot = nullptr; } void SwXMLTextBlocks::ResetBlockMode ( ) { - xBlkRoot = 0; - xRoot = 0; + xBlkRoot = nullptr; + xRoot = nullptr; } SwXMLTextBlocks::SwXMLTextBlocks( const OUString& rFile ) @@ -130,7 +130,7 @@ SwXMLTextBlocks::~SwXMLTextBlocks() ResetBlockMode (); if(xDocShellRef.Is()) xDocShellRef->DoClose(); - xDocShellRef = 0; + xDocShellRef = nullptr; if( pDoc && !pDoc->release() ) delete pDoc; } @@ -219,7 +219,7 @@ sal_uLong SwXMLTextBlocks::Rename( sal_uInt16 nIdx, const OUString& rNewShort, c uno::Reference < embed::XTransactedObject > xTrans( xRoot, uno::UNO_QUERY ); if ( xTrans.is() ) xTrans->commit(); - xRoot = 0; + xRoot = nullptr; } try @@ -349,7 +349,7 @@ sal_uLong SwXMLTextBlocks::PutBlock( SwPaM& , const OUString& ) if ( xRoot.is() ) { - SfxMedium* pTmpMedium = NULL; + SfxMedium* pTmpMedium = nullptr; try { uno::Reference< embed::XStorage > xTempStorage = @@ -384,7 +384,7 @@ sal_uLong SwXMLTextBlocks::PutBlock( SwPaM& , const OUString& ) uno::Reference < embed::XTransactedObject > xTrans( xRoot, uno::UNO_QUERY ); if ( xTrans.is() ) xTrans->commit(); - xRoot = 0; + xRoot = nullptr; if ( !nCommitFlags ) { uno::Reference < embed::XTransactedObject > xTmpTrans( xBlkRoot, uno::UNO_QUERY ); diff --git a/sw/source/core/swg/SwXMLTextBlocks1.cxx b/sw/source/core/swg/SwXMLTextBlocks1.cxx index d264bbeff80c..889be6a14534 100644 --- a/sw/source/core/swg/SwXMLTextBlocks1.cxx +++ b/sw/source/core/swg/SwXMLTextBlocks1.cxx @@ -87,7 +87,7 @@ sal_uLong SwXMLTextBlocks::GetDoc( sal_uInt16 nIdx ) { } - xRoot = 0; + xRoot = nullptr; } else { @@ -142,7 +142,7 @@ sal_uLong SwXMLTextBlocks::GetDoc( sal_uInt16 nIdx ) { } - xRoot = 0; + xRoot = nullptr; } return 0; } @@ -153,7 +153,7 @@ const struct SvEventDescription aAutotextEvents[] = { { SW_EVENT_START_INS_GLOSSARY, "OnInsertStart" }, { SW_EVENT_END_INS_GLOSSARY, "OnInsertDone" }, - { 0, NULL } + { 0, nullptr } }; sal_uLong SwXMLTextBlocks::GetMacroTable( sal_uInt16 nIdx, @@ -328,7 +328,7 @@ sal_uLong SwXMLTextBlocks::GetBlockText( const OUString& rShort, OUString& rText // re throw ? } - xRoot = 0; + xRoot = nullptr; } catch ( uno::Exception& ) { @@ -396,7 +396,7 @@ sal_uLong SwXMLTextBlocks::PutBlockText( const OUString& rShort, const OUString& nRes = ERR_SWG_WRITE_ERROR; } - xRoot = 0; + xRoot = nullptr; //TODO/LATER: error handling /* @@ -615,7 +615,7 @@ sal_uLong SwXMLTextBlocks::SetMacroTable( xTrans->commit(); } - xRoot = 0; + xRoot = nullptr; } catch ( uno::Exception& ) { diff --git a/sw/source/core/swg/swblocks.cxx b/sw/source/core/swg/swblocks.cxx index 2b595c1f00a3..775254ab9b2d 100644 --- a/sw/source/core/swg/swblocks.cxx +++ b/sw/source/core/swg/swblocks.cxx @@ -90,7 +90,7 @@ SwImpBlocks::SwImpBlocks( const OUString& rFile, bool ) : aFile( rFile ), aDateModified( Date::EMPTY ), aTimeModified( tools::Time::EMPTY ), - pDoc( 0 ), nCur( USHRT_MAX ), + pDoc( nullptr ), nCur( USHRT_MAX ), bReadOnly( true ), bInPutMuchBlocks( false ), bInfoChanged(false) { @@ -233,7 +233,7 @@ bool SwImpBlocks::PutMuchEntries( bool ) } SwTextBlocks::SwTextBlocks( const OUString& rFile ) - : pImp( 0 ), nErr( 0 ) + : pImp( nullptr ), nErr( 0 ) { INetURLObject aObj(rFile); const OUString sFileName = aObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -517,7 +517,7 @@ SwDoc* SwTextBlocks::GetDoc() { if( pImp ) return pImp->pDoc; - return 0; + return nullptr; } void SwTextBlocks::ClearDoc() |