diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-07 09:26:57 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-07 12:39:11 +0100 |
commit | 5404f75a2fa863b97bdf8432f647053f0bff726e (patch) | |
tree | 119d2cede534f5ce1173422df99a0e532d6a7a28 /sfx2 | |
parent | 39efec060719bb2654ba20844ba02429371a4ffb (diff) |
loplugin:collapseif in sdext..svx
Change-Id: I188d9e9b53e00acfbae3c7acd54de28f084c4b3f
Reviewed-on: https://gerrit.libreoffice.org/62985
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/workwin.cxx | 17 | ||||
-rw-r--r-- | sfx2/source/control/dispatch.cxx | 7 | ||||
-rw-r--r-- | sfx2/source/doc/DocumentMetadataAccess.cxx | 5 | ||||
-rw-r--r-- | sfx2/source/view/lokcharthelper.cxx | 23 |
4 files changed, 19 insertions, 33 deletions
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx index 69e29d2e6d83..26c211d644f8 100644 --- a/sfx2/source/appl/workwin.cxx +++ b/sfx2/source/appl/workwin.cxx @@ -658,11 +658,8 @@ void SfxWorkWindow::ArrangeChildren_Impl( bool bForce ) return; SvBorder aBorder; - if ( nChildren ) - { - if ( IsVisible_Impl() ) - aBorder = Arrange_Impl(); - } + if ( nChildren && IsVisible_Impl() ) + aBorder = Arrange_Impl(); // If the current application document contains a IPClient, then the // object through SetTopToolFramePixel has to be assigned the available // space. The object will then point to its UITools and sets the app border @@ -1288,11 +1285,8 @@ void SfxWorkWindow::UpdateChildWindows_Impl() if ( bCreate ) CreateChildWin_Impl( pCW, false ); - if ( !bAllChildrenVisible ) - { - if ( pCW->pCli ) - pCW->pCli->nVisible &= ~SfxChildVisibility::ACTIVE; - } + if ( !bAllChildrenVisible && pCW->pCli ) + pCW->pCli->nVisible &= ~SfxChildVisibility::ACTIVE; } else if ( pChildWin ) { @@ -1593,8 +1587,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild, for ( n=0; n<aSortedList.size(); ++n ) { SfxChild_Impl *pChild = aChildren[aSortedList[n]]; - if ( pChild ) - if ( pChild->pWin == pWin ) + if ( pChild && pChild->pWin == pWin ) break; } diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 55d38c2dc3bf..c0d8802954ec 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -1206,11 +1206,8 @@ void SfxDispatcher::Update_Impl( bool bForce ) bool bIsActive = false; SfxDispatcher *pActDispat = pWorkWin->GetBindings().GetDispatcher_Impl(); - if ( !bIsActive ) - { - if ( this == pActDispat ) - bIsActive = true; - } + if ( !bIsActive && this == pActDispat ) + bIsActive = true; Update_Impl_( bUIActive, !bIsIPActive, bIsIPActive, pWorkWin ); if ( (bUIActive || bIsActive) && !comphelper::LibreOfficeKit::isActive() ) diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx b/sfx2/source/doc/DocumentMetadataAccess.cxx index c39e525ff5e1..8d5c1a6bc1ad 100644 --- a/sfx2/source/doc/DocumentMetadataAccess.cxx +++ b/sfx2/source/doc/DocumentMetadataAccess.cxx @@ -724,9 +724,8 @@ retry: "exception", nullptr, rterr); } - if (err) { - if (handleError(iaioe, i_xHandler)) goto retry; - } + if (err && handleError(iaioe, i_xHandler)) + goto retry; } /** init Impl struct */ diff --git a/sfx2/source/view/lokcharthelper.cxx b/sfx2/source/view/lokcharthelper.cxx index 04b433c66677..dd68454b8e59 100644 --- a/sfx2/source/view/lokcharthelper.cxx +++ b/sfx2/source/view/lokcharthelper.cxx @@ -45,24 +45,21 @@ Size lcl_TwipsToHMM( const Size& rSize ) css::uno::Reference<css::frame::XController>& LokChartHelper::GetXController() { - if(!mxController.is() ) + if(!mxController.is() && mpViewShell) { - if (mpViewShell) + SfxInPlaceClient* pIPClient = mpViewShell->GetIPClient(); + if (pIPClient) { - SfxInPlaceClient* pIPClient = mpViewShell->GetIPClient(); - if (pIPClient) + const css::uno::Reference< ::css::embed::XEmbeddedObject >& xEmbObj = pIPClient->GetObject(); + if( xEmbObj.is() ) { - const css::uno::Reference< ::css::embed::XEmbeddedObject >& xEmbObj = pIPClient->GetObject(); - if( xEmbObj.is() ) + ::css::uno::Reference< ::css::chart2::XChartDocument > xChart( xEmbObj->getComponent(), uno::UNO_QUERY ); + if( xChart.is() ) { - ::css::uno::Reference< ::css::chart2::XChartDocument > xChart( xEmbObj->getComponent(), uno::UNO_QUERY ); - if( xChart.is() ) + ::css::uno::Reference< ::css::frame::XController > xChartController = xChart->getCurrentController(); + if( xChartController.is() ) { - ::css::uno::Reference< ::css::frame::XController > xChartController = xChart->getCurrentController(); - if( xChartController.is() ) - { - mxController = xChartController; - } + mxController = xChartController; } } } |