diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-18 14:08:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-19 11:01:18 +0200 |
commit | 9df2821e61979dab32390d5c64dd49bee868adbb (patch) | |
tree | 5b827e29e73ac2300c164b0a389a784a358956e6 /chart2/source/controller/dialogs/RangeSelectionHelper.cxx | |
parent | 8b0a69498b025e13d9772689e9e4fa3d6b05e609 (diff) |
loplugin:flatten in chart2
Change-Id: Iadc4da6515a7d82e7a92b33d74d589b61fa2c64f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92480
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/controller/dialogs/RangeSelectionHelper.cxx')
-rw-r--r-- | chart2/source/controller/dialogs/RangeSelectionHelper.cxx | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/chart2/source/controller/dialogs/RangeSelectionHelper.cxx b/chart2/source/controller/dialogs/RangeSelectionHelper.cxx index 775f80535f32..8cd8f64c8383 100644 --- a/chart2/source/controller/dialogs/RangeSelectionHelper.cxx +++ b/chart2/source/controller/dialogs/RangeSelectionHelper.cxx @@ -70,27 +70,27 @@ Reference< sheet::XRangeSelection > const & RangeSelectionHelper::getRangeSelect void RangeSelectionHelper::raiseRangeSelectionDocument() { Reference< sheet::XRangeSelection > xRangeSel( getRangeSelection()); - if( xRangeSel.is()) + if( !xRangeSel.is()) + return; + + try { - try + // bring document to front + Reference< frame::XController > xCtrl( xRangeSel, uno::UNO_QUERY ); + if( xCtrl.is()) { - // bring document to front - Reference< frame::XController > xCtrl( xRangeSel, uno::UNO_QUERY ); - if( xCtrl.is()) + Reference< frame::XFrame > xFrame( xCtrl->getFrame()); + if( xFrame.is()) { - Reference< frame::XFrame > xFrame( xCtrl->getFrame()); - if( xFrame.is()) - { - Reference< awt::XTopWindow > xWin( xFrame->getContainerWindow(), - uno::UNO_QUERY_THROW ); - xWin->toFront(); - } + Reference< awt::XTopWindow > xWin( xFrame->getContainerWindow(), + uno::UNO_QUERY_THROW ); + xWin->toFront(); } } - catch( const uno::Exception & ) - { - DBG_UNHANDLED_EXCEPTION("chart2"); - } + } + catch( const uno::Exception & ) + { + DBG_UNHANDLED_EXCEPTION("chart2"); } } |