[ooo-build-commit] patches/dev300

Noel Power noelp at kemper.freedesktop.org
Wed Nov 25 09:53:23 PST 2009


 patches/dev300/fix-embedobj-load.diff |   37 ++++++++++++++++++++++++----------
 1 file changed, 27 insertions(+), 10 deletions(-)

New commits:
commit 14296d5542e0a2a505fbc11cad349e32cb20618f
Author: Noel Power <noel.power at novell.com>
Date:   Wed Nov 25 17:52:29 2009 +0000

    make sure storage is only reset when necessary
    
    * patches/dev300/fix-embedobj-load.diff:

diff --git a/patches/dev300/fix-embedobj-load.diff b/patches/dev300/fix-embedobj-load.diff
index 73234df..5490302 100644
--- a/patches/dev300/fix-embedobj-load.diff
+++ b/patches/dev300/fix-embedobj-load.diff
@@ -1,18 +1,35 @@
 diff --git sfx2/source/doc/sfxbasemodel.cxx sfx2/source/doc/sfxbasemodel.cxx
-index 28355da..1ebd5ae 100644
+index 28355da..1981568 100644
 --- sfx2/source/doc/sfxbasemodel.cxx
 +++ sfx2/source/doc/sfxbasemodel.cxx
-@@ -3624,7 +3624,12 @@ void SAL_CALL SfxBaseModel::switchToStorage( const uno::Reference< XSTORAGE >& x
-                                             uno::Reference< uno::XInterface >(),
-                                             nError ? nError : ERRCODE_IO_GENERAL );
+@@ -3616,15 +3616,23 @@ void SAL_CALL SfxBaseModel::switchToStorage( const uno::Reference< XSTORAGE >& x
+         throw IOEXCEPTION(); // TODO:
+ 
+     // the persistence should be switched only if the storage is different
+-    if ( xStorage != m_pData->m_pObjectShell->GetStorage()
+-      && !m_pData->m_pObjectShell->SwitchPersistance( xStorage ) )
++    if ( xStorage != m_pData->m_pObjectShell->GetStorage() )
+     {
+-        sal_uInt32 nError = m_pData->m_pObjectShell->GetErrorCode();
+-        throw task::ErrorCodeIOException( ::rtl::OUString(),
+-                                            uno::Reference< uno::XInterface >(),
+-                                            nError ? nError : ERRCODE_IO_GENERAL );
++        if ( !m_pData->m_pObjectShell->SwitchPersistance( xStorage ) )
++        {
++            sal_uInt32 nError = m_pData->m_pObjectShell->GetErrorCode();
++            throw task::ErrorCodeIOException( ::rtl::OUString(),
++                                                uno::Reference< uno::XInterface >(),
++                                                nError ? nError : ERRCODE_IO_GENERAL );
++        }
++        else
++        {
++            // UICfgMgr has a reference to the old storage, update it
++            uno::Reference< ui::XUIConfigurationStorage > xUICfgMgrStorage( getUIConfigurationManager(), uno::UNO_QUERY );
++            if ( xUICfgMgrStorage.is() )
++                xUICfgMgrStorage->setStorage( xStorage ); 
++        }
      }
 -
-+    // UICfgMgr has a reference to the old storage, update it
-+    uno::Reference< ui::XUIConfigurationStorage > xUICfgMgrStorage( getUIConfigurationManager(), uno::UNO_QUERY );
-+    if ( xUICfgMgrStorage.is() )
-+    {
-+        xUICfgMgrStorage->setStorage( xStorage ); 
-+    } 
      m_pData->m_pObjectShell->Get_Impl()->bOwnsStorage = FALSE;
  }
  


More information about the ooo-build-commit mailing list