Tag: cws_dev300_odbmacros3
User: fs      
Date: 2008-07-30 20:47:58+0000
Modified:
   dba/dbaccess/source/filter/xml/dbloader2.cxx

Log:
 #i76128# do an initNew if a newly loaded document is not to be initialized 
interactively

File Changes:

Directory: /dba/dbaccess/source/filter/xml/
===========================================

File [changed]: dbloader2.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/filter/xml/dbloader2.cxx?r1=1.32.28.10&r2=1.32.28.11
Delta lines:  +22 -6
--------------------
--- dbloader2.cxx       2008-07-29 08:31:55+0000        1.32.28.10
+++ dbloader2.cxx       2008-07-30 20:47:56+0000        1.32.28.11
@@ -7,7 +7,7 @@
  * OpenOffice.org - a multi-platform office productivity suite
  *
  * $RCSfile: dbloader2.cxx,v $
- * $Revision: 1.32.28.10 $
+ * $Revision: 1.32.28.11 $
  *
  * This file is part of OpenOffice.org.
  *
@@ -462,10 +462,26 @@
         }
 
         xModel.set( xDocumentDataSource->getDatabaseDocument(), UNO_QUERY );
-        if ( xModel.is() && bNewAndInteractive )
+
+        if ( bCreateNew && xModel.is() )
+        {
+            if ( bNewAndInteractive )
         {   
-            const ::rtl::OUString sURL = xModel->getURL();
             bSuccess = impl_executeNewDatabaseWizard( xModel, 
bStartTableWizard );
+            }
+            else
+            {
+                try
+                {
+                    Reference< XLoadable > xLoad( xModel, UNO_QUERY_THROW );
+                    xLoad->initNew();
+                    bSuccess = true;
+                }
+                catch( const Exception& )
+                {
+                    bSuccess = false;
+                }
+            }
 
             // initially select the "Tables" category (will be done below)
             nInitialSelection = 
::com::sun::star::sdb::application::DatabaseObjectContainer::TABLES;




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

Reply via email to