diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2017-09-11 17:08:33 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-12 06:48:17 +0200 |
commit | 7e2a6709d9511f983f9981258c38ccc125bcd3fe (patch) | |
tree | 6a7b444d3e8b65c5d22e9bcf26ee4ae04d04b03c /sfx2 | |
parent | 75ca51725274b95417aa2c7f169145e3cd3b3b4f (diff) |
cppcheck: identicalConditionAfterEarlyExit
Change-Id: I59d91390ee303eadc10315405cce44cfd7c37d56
Reviewed-on: https://gerrit.libreoffice.org/42179
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 75d833880caa..a8e83f9c95be 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -794,8 +794,7 @@ void SfxViewFrame::StateReload_Impl( SfxItemSet& rSet ) { const SfxViewShell *pVSh; const SfxShell *pFSh; - if ( !pSh || - !pSh->HasName() || + if ( !pSh->HasName() || !( pSh->Get_Impl()->nLoadedFlags & SfxLoadedFlags::MAINDOCUMENT ) || ( pSh->GetCreateMode() == SfxObjectCreateMode::EMBEDDED && ( !(pVSh = pSh->GetViewShell()) || @@ -815,7 +814,7 @@ void SfxViewFrame::StateReload_Impl( SfxItemSet& rSet ) case SID_RELOAD: { - if ( !pSh || !pSh->CanReload_Impl() || pSh->GetCreateMode() == SfxObjectCreateMode::EMBEDDED ) + if ( !pSh->CanReload_Impl() || pSh->GetCreateMode() == SfxObjectCreateMode::EMBEDDED ) rSet.DisableItem(nWhich); else { |