diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-20 15:03:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-21 15:18:57 +0200 |
commit | ac80f048f2bb23651ddc3c6608e9ef24635698d7 (patch) | |
tree | 925ece62dd2e859170d1267d8e7122c4f9b762e8 /chart2/source/model/main | |
parent | b5450f4afe2af6620fbbbdf686853dfa3293ff90 (diff) |
loplugin:flatten in basctl..configmgr
Change-Id: I674cad57ce30a885e126d3bcc921f8fcb53dc36d
Reviewed-on: https://gerrit.libreoffice.org/42577
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/model/main')
-rw-r--r-- | chart2/source/model/main/ChartModel.cxx | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx index c0289c3af548..37b1f4967588 100644 --- a/chart2/source/model/main/ChartModel.cxx +++ b/chart2/source/model/main/ChartModel.cxx @@ -1071,28 +1071,24 @@ embed::VisualRepresentation SAL_CALL ChartModel::getPreferredVisualRepresentatio uno::Any SAL_CALL ChartModel::getTransferData( const datatransfer::DataFlavor& aFlavor ) { uno::Any aResult; - if( isDataFlavorSupported( aFlavor )) + if( !isDataFlavorSupported( aFlavor ) ) + throw datatransfer::UnsupportedFlavorException( + aFlavor.MimeType, static_cast< ::cppu::OWeakObject* >( this )); + + try { - try - { - //get view from old api wrapper - Reference< datatransfer::XTransferable > xTransferable( - createInstance( CHART_VIEW_SERVICE_NAME ), uno::UNO_QUERY ); - if( xTransferable.is() && - xTransferable->isDataFlavorSupported( aFlavor )) - { - aResult = xTransferable->getTransferData( aFlavor ); - } - } - catch (const uno::Exception& ex) + //get view from old api wrapper + Reference< datatransfer::XTransferable > xTransferable( + createInstance( CHART_VIEW_SERVICE_NAME ), uno::UNO_QUERY ); + if( xTransferable.is() && + xTransferable->isDataFlavorSupported( aFlavor )) { - ASSERT_EXCEPTION( ex ); + aResult = xTransferable->getTransferData( aFlavor ); } } - else + catch (const uno::Exception& ex) { - throw datatransfer::UnsupportedFlavorException( - aFlavor.MimeType, static_cast< ::cppu::OWeakObject* >( this )); + ASSERT_EXCEPTION( ex ); } return aResult; |