[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - sot/source

Michael Stahl mstahl at redhat.com
Sat Dec 9 10:43:03 UTC 2017


 sot/source/sdstor/storage.cxx |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit e0920fb441e5747e683af3a5748b893e4778b9f9
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Dec 8 21:53:47 2017 +0100

    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 at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

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;


More information about the Libreoffice-commits mailing list