User: kz      
Date: 06/01/03 08:14:42

Modified:
 /dba/dbaccess/source/core/dataaccess/
  databasedocument.cxx

Log:
 INTEGRATION: CWS dba202c (1.22.50); FILE MERGED
 2005/12/05 12:16:58 oj 1.22.50.1: #128008 # check storage, wehn null throw 
IOException

File Changes:

Directory: /dba/dbaccess/source/core/dataaccess/
================================================

File [changed]: databasedocument.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/databasedocument.cxx?r1=1.23&r2=1.24
Delta lines:  +10 -1
--------------------
--- databasedocument.cxx        21 Dec 2005 13:34:54 -0000      1.23
+++ databasedocument.cxx        3 Jan 2006 16:14:40 -0000       1.24
@@ -468,7 +468,16 @@
     m_pImpl->commitStorages();
     m_bCommitMasterStorage = sal_True;
 
-       writeStorage(_rURL,_rArguments,m_pImpl->getStorage());
+       Reference<XStorage> xMyStorage = m_pImpl->getStorage();
+    OSL_ENSURE( xMyStorage.is(), "ODatabaseDocument::storeToURL: no own 
storage?" );
+       if ( !xMyStorage.is() )
+    {
+        IOException aError;
+        aError.Message = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 
"Internal error: no source storage available." ) );
+        aError.Context = *this;
+               throw IOException( aError );
+    }
+       writeStorage(_rURL,_rArguments,xMyStorage);
 
     m_pImpl->commitRootStorage();
 




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to