[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.0' - sfx2/source

Jan Holesovsky kendy at collabora.com
Thu Jan 14 03:07:42 PST 2016


 sfx2/source/doc/sfxbasemodel.cxx |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 83c540d275e351b1979f7b59be8aad728bca6dc0
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Thu Jan 14 11:52:18 2016 +0100

    sfx2: Convert the exception to one that we actually announce.
    
    Otherwise saving to a non-existing http:// URL leads to a crash.
    
    Change-Id: Ia4b49e2872616545dcedb2fc5553cf5a20a1f97d

diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 20f15ee..ccdd99b 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -1699,7 +1699,16 @@ void SAL_CALL SfxBaseModel::storeToURL( const   OUString&                   rURL
     {
         m_pData->m_pObjectShell->AddLog( OUString( OSL_LOG_PREFIX "storeToURL"  ) );
         SfxSaveGuard aSaveGuard(this, m_pData, false);
-        impl_store( rURL, rArgs, true );
+        try {
+            impl_store(rURL, rArgs, true);
+        }
+        catch (const uno::Exception &e)
+        {
+            // convert to the exception we announce in the throw
+            // (eg. neon likes to throw InteractiveAugmentedIOException which
+            // is not an io::IOException)
+            throw io::IOException(e.Message, e.Context);
+        }
     }
 }
 


More information about the Libreoffice-commits mailing list