diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-02-08 14:57:36 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-02-11 07:08:38 +0100 |
commit | 04c1a98c10a24e65c4460d198c4009dc512c44ab (patch) | |
tree | 2d561307e89653237d91345d1566b5cf06fb6d40 /sfx2 | |
parent | 6fd533031f2775aaa8843065a9986caf1fa304b0 (diff) |
tdf#120703 PVS: V560 A part of conditional expression is always true
Change-Id: I598ba9c49e919c3a521b3062c83b72a1c7949b9e
Reviewed-on: https://gerrit.libreoffice.org/67540
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 049307823e24..1d8273bffb97 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -969,7 +969,7 @@ void SfxViewFrame::StateHistory_Impl( SfxItemSet &rSet ) pShUndoMgr->GetRepeatActionCount() == 0 ) rSet.DisableItem( SID_CLEARHISTORY ); - if ( pShUndoMgr && pShUndoMgr->GetUndoActionCount() ) + if (pShUndoMgr->GetUndoActionCount()) { const SfxUndoAction* pAction = pShUndoMgr->GetUndoAction(); SfxViewShell *pViewSh = GetViewShell(); @@ -985,7 +985,7 @@ void SfxViewFrame::StateHistory_Impl( SfxItemSet &rSet ) else rSet.DisableItem( SID_UNDO ); - if ( pShUndoMgr && pShUndoMgr->GetRedoActionCount() ) + if (pShUndoMgr->GetRedoActionCount()) { const SfxUndoAction* pAction = pShUndoMgr->GetRedoAction(); SfxViewShell *pViewSh = GetViewShell(); @@ -1002,7 +1002,7 @@ void SfxViewFrame::StateHistory_Impl( SfxItemSet &rSet ) rSet.DisableItem( SID_REDO ); SfxRepeatTarget *pTarget = pSh->GetRepeatTarget(); - if ( pShUndoMgr && pTarget && pShUndoMgr->GetRepeatActionCount() && pShUndoMgr->CanRepeat(*pTarget) ) + if (pTarget && pShUndoMgr->GetRepeatActionCount() && pShUndoMgr->CanRepeat(*pTarget)) rSet.Put( SfxStringItem( SID_REPEAT, SvtResId(STR_REPEAT)+pShUndoMgr->GetRepeatActionComment(*pTarget) ) ); else rSet.DisableItem( SID_REPEAT ); @@ -2208,10 +2208,9 @@ void SfxViewFrame::ExecView_Impl { const SfxInt16Item* pItem = rReq.GetArg<SfxInt16Item>(SID_OBJECT); - SfxViewShell *pViewShell = GetViewShell(); - if ( pViewShell && pItem ) + if (pItem) { - pViewShell->DoVerb( pItem->GetValue() ); + GetViewShell()->DoVerb( pItem->GetValue() ); rReq.Done(); break; } |