summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-03-25 10:35:19 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-03-25 12:33:21 +0000
commitda5ac820d7200e70569f14a0468115ce4dc402f1 (patch)
treec1abb58453204d0c6e44b1e0a3cda14a4ab5351b /sw
parenta79afdaa11a1af26c9404441dcf27ef197e972b2 (diff)
coverity#704376 Logically dead code
Change-Id: I4ab6a73a0b24db2d07c33cd593b0898b87c90fd3
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/uibase/index/toxmgr.cxx14
1 files changed, 2 insertions, 12 deletions
diff --git a/sw/source/core/uibase/index/toxmgr.cxx b/sw/source/core/uibase/index/toxmgr.cxx
index c29bd7b402bd..2b4964af471c 100644
--- a/sw/source/core/uibase/index/toxmgr.cxx
+++ b/sw/source/core/uibase/index/toxmgr.cxx
@@ -453,16 +453,11 @@ sal_Bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc,
if (pDoc->GetIDocumentUndoRedo().DoesUndo())
{
- if (pNewTOX != NULL)
- {
- pDoc->GetIDocumentUndoRedo().DelAllUndoObj();
- }
-
+ pDoc->GetIDocumentUndoRedo().DelAllUndoObj();
pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_TOXCHANGE, NULL);
}
- if (pNewTOX != NULL) // => pTOX != NULL
- pDoc->ChgTOX(*pTOX, *pNewTOX);
+ pDoc->ChgTOX(*pTOX, *pNewTOX);
pTOX->DisableKeepExpression();
bRet = pSh->UpdateTableOf(*pTOX, pSet);
@@ -471,11 +466,6 @@ sal_Bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc,
if (pDoc->GetIDocumentUndoRedo().DoesUndo())
{
pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_TOXCHANGE, NULL);
-
- if (pNewTOX == NULL)
- {
- pDoc->GetIDocumentUndoRedo().DelAllUndoObj();
- }
}
}