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/uibase/index | |
parent | 6cd7bf2043146a630925a2e49336f02c802f707a (diff) |
loplugin:nullptr (automatic rewrite)
Change-Id: I01e11fa956a249974e77dce9deebe79311f098d0
Diffstat (limited to 'sw/source/uibase/index')
-rw-r--r-- | sw/source/uibase/index/toxmgr.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/uibase/index/toxmgr.cxx b/sw/source/uibase/index/toxmgr.cxx index 9bde8b126487..1e309ffb0b0e 100644 --- a/sw/source/uibase/index/toxmgr.cxx +++ b/sw/source/uibase/index/toxmgr.cxx @@ -46,17 +46,17 @@ SwTOXMark* SwTOXMgr::GetTOXMark(sal_uInt16 nId) { if(!aCurMarks.empty()) return aCurMarks[nId]; - return 0; + return nullptr; } void SwTOXMgr::DeleteTOXMark() { - SwTOXMark* pNext = 0; + SwTOXMark* pNext = nullptr; if( pCurTOXMark ) { pNext = const_cast<SwTOXMark*>(&pSh->GotoTOXMark( *pCurTOXMark, TOX_NXT )); if( pNext == pCurTOXMark ) - pNext = 0; + pNext = nullptr; pSh->DeleteTOXMark( pCurTOXMark ); pSh->SetModified(); @@ -67,7 +67,7 @@ void SwTOXMgr::DeleteTOXMark() void SwTOXMgr::InsertTOXMark(const SwTOXMarkDescription& rDesc) { - SwTOXMark* pMark = 0; + SwTOXMark* pMark = nullptr; switch(rDesc.GetTOXType()) { case TOX_CONTENT: @@ -212,7 +212,7 @@ void SwTOXMgr::UpdateTOXMark(const SwTOXMarkDescription& rDesc) pSh->DeleteTOXMark(pCurTOXMark); aCpy.SetAlternativeText( *rDesc.GetAltStr() ); pSh->SwEditShell::Insert( aCpy ); - pCurTOXMark = 0; + pCurTOXMark = nullptr; } } pSh->SetModified(); @@ -274,7 +274,7 @@ const SwTOXType* SwTOXMgr::GetTOXType(TOXTypes eTyp, sal_uInt16 nId) const void SwTOXMgr::SetCurTOXMark(sal_uInt16 nId) { - pCurTOXMark = (nId < aCurMarks.size()) ? aCurMarks[nId] : 0; + pCurTOXMark = (nId < aCurMarks.size()) ? aCurMarks[nId] : nullptr; } bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc, @@ -286,7 +286,7 @@ bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc, const SwTOXBase* pCurTOX = ppBase && *ppBase ? *ppBase : GetCurTOX(); SwTOXBase* pTOX = const_cast<SwTOXBase*>(pCurTOX); - SwTOXBase * pNewTOX = NULL; + SwTOXBase * pNewTOX = nullptr; if (pTOX) pNewTOX = new SwTOXBase(*pTOX); @@ -440,7 +440,7 @@ bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc, if (pDoc->GetIDocumentUndoRedo().DoesUndo()) { pDoc->GetIDocumentUndoRedo().DelAllUndoObj(); - pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_TOXCHANGE, NULL); + pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_TOXCHANGE, nullptr); } pDoc->ChgTOX(*pTOX, *pNewTOX); @@ -451,7 +451,7 @@ bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc, if (pDoc->GetIDocumentUndoRedo().DoesUndo()) { - pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_TOXCHANGE, NULL); + pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_TOXCHANGE, nullptr); } } |