[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - dbaccess/source

Julien Nabet serval2412 at yahoo.fr
Fri Sep 15 10:38:32 UTC 2017


 dbaccess/source/core/dataaccess/databasedocument.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4f269f8c8965be157e0584ead84a65347d8b6b69
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sat Sep 2 15:33:37 2017 +0200

    tdf#96703: getDocumentStorage is called during initialization
    
    So use DocumentGuard::MethodUsedDuringInit instead of DocumentGuard::DefaultMethod
    to avoid com.sun.star.lang.NotInitializedException
    
    Then we'll got to tackle ODatabaseModelImpl::getOrCreateRootStorage: no source to create the storage from!
    
    Change-Id: I1f01bb46088445f3cb3264baee9ad4d45bb5fa8c
    Reviewed-on: https://gerrit.libreoffice.org/41837
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
    (cherry picked from commit 9a46ad2f762765348f7aef6e44774a47871362ae)
    Reviewed-on: https://gerrit.libreoffice.org/41852
    Reviewed-by: Eike Rathke <erack at redhat.com>

diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index 0c42e19325c2..11b1da287569 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -1963,7 +1963,7 @@ void SAL_CALL ODatabaseDocument::switchToStorage( const Reference< XStorage >& _
 
 Reference< XStorage > SAL_CALL ODatabaseDocument::getDocumentStorage(  )
 {
-    DocumentGuard aGuard(*this, DocumentGuard::DefaultMethod);
+    DocumentGuard aGuard(*this, DocumentGuard::MethodUsedDuringInit);
     return m_pImpl->getOrCreateRootStorage();
 }
 


More information about the Libreoffice-commits mailing list