summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/unoobj/docuno.cxx16
1 files changed, 15 insertions, 1 deletions
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 67bdb092a0be..13a9e2c58e71 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -771,7 +771,21 @@ OString ScModelObj::getTextSelection(const char* pMimeType, OString& rUsedMimeTy
if (!xTransferable.is() || !xTransferable->isDataFlavorSupported(aFlavor))
return OString();
- uno::Any aAny(xTransferable->getTransferData(aFlavor));
+ uno::Any aAny;
+ try
+ {
+ aAny = xTransferable->getTransferData(aFlavor);
+ }
+ catch (const datatransfer::UnsupportedFlavorException e)
+ {
+ OSL_TRACE("Caught UnsupportedFlavorException '%s'", OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr());
+ return OString();
+ }
+ catch (const css::uno::Exception& e)
+ {
+ OSL_TRACE("Caught UNO Exception '%s'", OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr());
+ return OString();
+ }
OString aRet;
if (aFlavor.DataType == cppu::UnoType<OUString>::get())