Tag: cws_src680_dba202c
User: oj      
Date: 05/12/05 04:17:01

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

Log:
 #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.22&r2=1.22.50.1
Delta lines:  +13 -4
--------------------
--- databasedocument.cxx        23 Sep 2005 12:04:55 -0000      1.22
+++ databasedocument.cxx        5 Dec 2005 12:16:58 -0000       1.22.50.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: databasedocument.cxx,v $
  *
- *  $Revision: 1.22 $
+ *  $Revision: 1.22.50.1 $
  *
- *  last change: $Author: hr $ $Date: 2005/09/23 12:04:55 $
+ *  last change: $Author: oj $ $Date: 2005/12/05 12:16:58 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -482,7 +482,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