Tag: cws_dev300_dba30c
User: oj      
Date: 2008-04-28 12:08:46+0000
Modified:
   dba/dbaccess/source/filter/xml/dbloader2.cxx

Log:
 #i84173# open tables view as default for newly created files

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.34&r2=1.34.6.1
Delta lines:  +16 -5
--------------------
--- dbloader2.cxx       2008-04-10 13:21:11+0000        1.34
+++ dbloader2.cxx       2008-04-28 12:08:44+0000        1.34.6.1
@@ -7,7 +7,7 @@
  * OpenOffice.org - a multi-platform office productivity suite
  *
  * $RCSfile: dbloader2.cxx,v $
- * $Revision: 1.34 $
+ * $Revision: 1.34.6.1 $
  *
  * This file is part of OpenOffice.org.
  *
@@ -61,6 +61,7 @@
 #include <com/sun/star/task/XStatusIndicatorFactory.hpp>
 #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
 #include <com/sun/star/util/XURLTransformer.hpp>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
 /** === end UNO includes === **/
 
 #include <comphelper/componentcontext.hxx>
@@ -101,7 +102,6 @@
 using namespace ::com::sun::star::embed;
 namespace css = ::com::sun::star;
 using namespace ::com::sun::star::ui::dialogs;
-namespace css = ::com::sun::star;
 using ::com::sun::star::awt::XWindow;
 
 // -------------------------------------------------------------------------
@@ -429,6 +429,7 @@
             aMediaDesc.put( "InteractionHandler", xHandler );
     }
 
+    sal_Bool bInteractive = sal_False;
     /* special mode: use already loaded model ...
         In such case no filter name will be selected and no URL will be given!
         Such informations are not neccessary. We have to create a new view only
@@ -438,8 +439,6 @@
                Reference< XSingleServiceFactory > xDatabaseContext;
         if ( m_aContext.createComponent( 
(::rtl::OUString)SERVICE_SDB_DATABASECONTEXT, xDatabaseContext ) )
                {
-            sal_Bool bInteractive = sal_False;
-
                        ::rtl::OUString sFactoryName = 
SvtModuleOptions().GetFactoryEmptyDocumentURL(SvtModuleOptions::E_DATABASE);
             bCreateNew = sFactoryName.match(_rURL);
                        Sequence<Any> aCreationArgs;
@@ -584,6 +583,18 @@
         if ( rListener.is() )
                    rListener->loadFinished(this);
 
+        if ( bCreateNew && bInteractive )
+        {
+            Reference< css::view::XSelectionSupplier >  xDocView( 
xModel->getCurrentController(), UNO_QUERY );
+            if ( xDocView.is() )
+            {
+                Sequence< NamedValue > aSelection(1);
+                aSelection[0].Name = 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Type"));
+                aSelection[0].Value <<= sal_Int32(0);
+                xDocView->select(makeAny(aSelection));
+            }
+        }
+
                if ( bStartTableWizard )
                {
                        // reset the data of the previous async drop (if any)




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

Reply via email to