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 | |
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')
-rw-r--r-- | chart2/source/model/main/ChartModel.cxx | 30 | ||||
-rw-r--r-- | chart2/source/view/main/ChartView.cxx | 10 |
2 files changed, 16 insertions, 24 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; diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 50717889acd9..283dd87f0956 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -3037,14 +3037,10 @@ void SAL_CALL ChartView::setPropertyValue( const OUString& rPropertyName Any SAL_CALL ChartView::getPropertyValue( const OUString& rPropertyName ) { - Any aRet; - if( rPropertyName == "Resolution" ) - { - aRet <<= m_aPageResolution; - } - else + if( rPropertyName != "Resolution" ) throw beans::UnknownPropertyException( "unknown property was tried to get from chart wizard", nullptr ); - return aRet; + + return Any(m_aPageResolution); } void SAL_CALL ChartView::addPropertyChangeListener( |