summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-22 08:50:20 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-22 13:48:25 +0200
commita7ce8404befaf59df5f1a476c8dd414633bbf823 (patch)
treedc617344e2ac5a1b144614421a87d27a17ee0f36 /reportdesign
parent5c54b6523f74db4f79540361fc1630aaee06bcd5 (diff)
loplugin:flatten in pyuno..sc
Change-Id: I7ddc0b76532d26910f78642200750459508c2861 Reviewed-on: https://gerrit.libreoffice.org/42617 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/source/core/api/ReportDefinition.cxx21
1 files changed, 10 insertions, 11 deletions
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index d0c194ab95db..ca6d941dcf50 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -2664,21 +2664,20 @@ uno::Reference< document::XDocumentProperties > SAL_CALL OReportDefinition::getD
uno::Any SAL_CALL OReportDefinition::getTransferData( const datatransfer::DataFlavor& aFlavor )
{
uno::Any aResult;
- if( isDataFlavorSupported( aFlavor ) )
+ if( !isDataFlavorSupported( aFlavor ) )
{
- try
- {
- aResult = getPreferredVisualRepresentation(0).Data;
- }
- catch (const uno::Exception &)
- {
- DBG_UNHANDLED_EXCEPTION();
- }
+ throw datatransfer::UnsupportedFlavorException(aFlavor.MimeType, static_cast< ::cppu::OWeakObject* >( this ));
}
- else
+
+ try
{
- throw datatransfer::UnsupportedFlavorException(aFlavor.MimeType, static_cast< ::cppu::OWeakObject* >( this ));
+ aResult = getPreferredVisualRepresentation(0).Data;
}
+ catch (const uno::Exception &)
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+
return aResult;
}