Tag: cws_src680_dba23
User: oj      
Date: 05/01/20 08:55:12

Modified:
 /dba/dbaccess/source/ui/uno/
  DBTypeWizDlgSetup.cxx, DBTypeWizDlgSetup.hxx

Log:
 #i41043# implement private:factory/sdatabase?Interactive

File Changes:

Directory: /dba/dbaccess/source/ui/uno/
=======================================

File [changed]: DBTypeWizDlgSetup.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx?r1=1.2.42.1&r2=1.2.42.2
Delta lines:  +24 -21
---------------------
--- DBTypeWizDlgSetup.cxx       19 Jan 2005 09:01:14 -0000      1.2.42.1
+++ DBTypeWizDlgSetup.cxx       20 Jan 2005 16:55:09 -0000      1.2.42.2
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: DBTypeWizDlgSetup.cxx,v $
  *
- *  $Revision: 1.2.42.1 $
+ *  $Revision: 1.2.42.2 $
  *
- *  last change: $Author: oj $ $Date: 2005/01/19 09:01:14 $
+ *  last change: $Author: oj $ $Date: 2005/01/20 16:55:09 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -68,6 +68,9 @@
 #ifndef DBAUI_DBWIZSETUP_HXX
 #include "dbwizsetup.hxx"
 #endif
+#ifndef _SV_MSGBOX_HXX
+#include <vcl/msgbox.hxx>
+#endif
 
 using namespace dbaui;
                          
@@ -89,7 +92,14 @@
 //-------------------------------------------------------------------------
 ODBTypeWizDialogSetup::ODBTypeWizDialogSetup(const Reference< 
XMultiServiceFactory >& _rxORB)
        :ODatabaseAdministrationDialog(_rxORB)
+    ,m_bOpenDatabase(sal_True)
+       ,m_bStartTableWizard(sal_False)
 {
+    
registerProperty(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OpenDatabase")), 
3, PropertyAttribute::TRANSIENT,
+               &m_bOpenDatabase, getBooleanCppuType());
+
+    
registerProperty(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StartTableWizard")),
 4, PropertyAttribute::TRANSIENT,
+               &m_bStartTableWizard, getBooleanCppuType());
 }
 //-------------------------------------------------------------------------
 Sequence<sal_Int8> SAL_CALL ODBTypeWizDialogSetup::getImplementationId(  ) 
throw(RuntimeException)
@@ -101,21 +111,7 @@
 //-------------------------------------------------------------------------
 Reference< XInterface > SAL_CALL ODBTypeWizDialogSetup::Create(const 
Reference< XMultiServiceFactory >& _rxFactory)
 {
-    Reference < XInterface > xDBContext = 
_rxFactory->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.OfficeDatabaseDocument")));
-       Sequence<Any> aSequence(1);
-       PropertyValue aPropertyValue;
-    Any aTmp;
-    aTmp <<= xDBContext;
-    aPropertyValue.Name = 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("InitialSelection"));
-    aPropertyValue.Value = aTmp;
-       aSequence[0] <<= aPropertyValue;
-       Reference < XInterface > xDBWizard = *(new 
ODBTypeWizDialogSetup(_rxFactory));
-       Reference < XInitialization > xDBWizardInit(xDBWizard, UNO_QUERY);
-
-    xDBWizardInit->initialize(aSequence);
-    Reference <com::sun::star::ui::dialogs::XExecutableDialog> 
xDBWizardExecute( xDBWizard, UNO_QUERY );
-    xDBWizardExecute->execute();
-       return xDBWizard;
+       return *(new ODBTypeWizDialogSetup(_rxFactory));
 }
 
 //-------------------------------------------------------------------------
@@ -147,8 +143,7 @@
 //-------------------------------------------------------------------------
 Reference<XPropertySetInfo>  SAL_CALL 
ODBTypeWizDialogSetup::getPropertySetInfo() throw(RuntimeException)
 {
-       Reference<XPropertySetInfo>  xInfo( createPropertySetInfo( 
getInfoHelper() ) );
-       return xInfo;
+       return createPropertySetInfo( getInfoHelper() );
 }
 
 //-------------------------------------------------------------------------
@@ -167,8 +162,16 @@
 
//------------------------------------------------------------------------------
 Dialog*        ODBTypeWizDialogSetup::createDialog(Window* _pParent)
 {
-       ODbTypeWizDialogSetup* pDlg = new ODbTypeWizDialogSetup(_pParent, 
m_pDatasourceItems, m_xORB, m_aInitialSelection);
-       return pDlg;
+       return new ODbTypeWizDialogSetup(_pParent, m_pDatasourceItems, m_xORB, 
m_aInitialSelection);
+}
+// 
-----------------------------------------------------------------------------
+void ODBTypeWizDialogSetup::executedDialog(sal_Int16 _nExecutionResult)
+{
+    if ( _nExecutionResult == RET_OK )
+    {
+        m_bOpenDatabase = 
static_cast<ODbTypeWizDialogSetup*>(m_pDialog)->IsDatabaseDocumentToBeOpened();
+        m_bStartTableWizard = 
static_cast<ODbTypeWizDialogSetup*>(m_pDialog)->IsTableWizardToBeStarted();
+    }
 }
 
 //.........................................................................

File [changed]: DBTypeWizDlgSetup.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx?r1=1.2&r2=1.2.42.1
Delta lines:  +5 -3
-------------------
--- DBTypeWizDlgSetup.hxx       27 Oct 2004 13:10:17 -0000      1.2
+++ DBTypeWizDlgSetup.hxx       20 Jan 2005 16:55:09 -0000      1.2.42.1
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: DBTypeWizDlgSetup.hxx,v $
  *
- *  $Revision: 1.2 $
+ *  $Revision: 1.2.42.1 $
  *
- *  last change: $Author: pjunck $ $Date: 2004/10/27 13:10:17 $
+ *  last change: $Author: oj $ $Date: 2005/01/20 16:55:09 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -77,7 +77,8 @@
                :public ODatabaseAdministrationDialog
                ,public ::comphelper::OPropertyArrayUsageHelper< 
ODBTypeWizDialogSetup >
 {
-
+    sal_Bool m_bOpenDatabase;
+    sal_Bool m_bStartTableWizard;
 protected:
        ODBTypeWizDialogSetup(const ::com::sun::star::uno::Reference< 
::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
 
@@ -104,6 +105,7 @@
 protected:
 // OGenericUnoDialog overridables
        virtual Dialog* createDialog(Window* _pParent);
+    virtual void executedDialog(sal_Int16 _nExecutionResult);
 };
 
 //.........................................................................




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

Reply via email to