summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-12-08 21:53:47 +0100
committerMichael Stahl <mstahl@redhat.com>2017-12-09 11:41:51 +0100
commite0920fb441e5747e683af3a5748b893e4778b9f9 (patch)
tree1d99b5556ca7733cc4e57694f9bca7894ce8d1b7 /sot
parentd595a081b38bbfda7a64fd1c2680c24880f02025 (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(). (cherry picked from commit 07c7b5441251b55be72256ae8c64138eecf6cb5f) Change-Id: Iccf21bf64ee81b66dd9b9902b9b952fa48a318e5 Reviewed-on: https://gerrit.libreoffice.org/46124 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sot')
-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;