summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-12-08 21:53:47 +0100
committerMichael Stahl <mstahl@redhat.com>2017-12-08 21:57:23 +0100
commit07c7b5441251b55be72256ae8c64138eecf6cb5f (patch)
tree397c1f30c418ef223adef7db0cdc5f1e9e1a3bd5
parent9e52685ebd80130c28bfb838ba6ec4b67334085d (diff)
tdf#114243 sot: catch exceptions in SotStorage::GetFormatID()
This function returns an error code so it might as well convert exceptions to that for the benefit of clients like lcl_ReadSections(). Change-Id: Iccf21bf64ee81b66dd9b9902b9b952fa48a318e5
-rw-r--r--sot/source/sdstor/storage.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx
index 9d19bafafedb..ac723c28e251 100644
--- a/sot/source/sdstor/storage.cxx
+++ b/sot/source/sdstor/storage.cxx
@@ -762,7 +762,15 @@ SotClipboardFormatId SotStorage::GetFormatID( const css::uno::Reference < css::e
return SotClipboardFormatId::NONE;
OUString aMediaType;
- xProps->getPropertyValue("MediaType") >>= aMediaType;
+ try
+ {
+ xProps->getPropertyValue("MediaType") >>= aMediaType;
+ }
+ catch (uno::Exception const& e)
+ {
+ SAL_INFO("sot", "SotStorage::GetFormatID: exception: " << e);
+ }
+
if ( !aMediaType.isEmpty() )
{
css::datatransfer::DataFlavor aDataFlavor;