Tag: cws_src680_dba25
User: oj      
Date: 05/03/03 23:19:29

Modified:
 /dba/dbaccess/source/ui/app/
  AppController.cxx, AppControllerGen.cxx

Log:
 #i43880# #i43912# use set connection as activeconnection

File Changes:

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

File [changed]: AppController.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppController.cxx?r1=1.15&r2=1.15.2.1
Delta lines:  +18 -6
--------------------
--- AppController.cxx   21 Feb 2005 12:40:03 -0000      1.15
+++ AppController.cxx   4 Mar 2005 07:19:25 -0000       1.15.2.1
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: AppController.cxx,v $
  *
- *  $Revision: 1.15 $
+ *  $Revision: 1.15.2.1 $
  *
- *  last change: $Author: vg $ $Date: 2005/02/21 12:40:03 $
+ *  last change: $Author: oj $ $Date: 2005/03/04 07:19:25 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -1209,6 +1209,7 @@
                                break;
                        case SID_SELECTALL:
                                getContainer()->selectAll();
+                               InvalidateAll();
                                break;
                        case SID_DB_APP_DSRELDESIGN:
                                {
@@ -1217,13 +1218,18 @@
                                        if ( xConnection.is() )
                                        {
                                                ORelationDesignAccess 
aHelper(getORB());
-                                               Reference< XComponent > 
xComponent(aHelper.create(Reference<XDataSource>(m_xDataSource,UNO_QUERY), 
Reference<XConnection>()),UNO_QUERY);
+                                               Reference< XComponent > 
xComponent(aHelper.create(Reference<XDataSource>(m_xDataSource,UNO_QUERY), 
getActiveConnection()),UNO_QUERY);
                                                
addDocumentListener(xComponent,NULL);
                                        }
                                }
                                break;
                        case SID_DB_APP_DSUSERADMIN:
+                               {
+                                       Reference<XConnection> xConnection;
+                                       ensureConnection(xConnection);
+                                       if ( xConnection.is() )
                                
openDialog(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.UserAdministrationDialog")));
+                               }
                                break;
                        case SID_DB_APP_TABLEFILTER:
                                openTableFilterDialog();
@@ -1245,7 +1251,12 @@
                                askToReconnect();
                                break;
                        case ID_DIRECT_SQL:
+                               {
+                                       Reference<XConnection> xConnection;
+                                       ensureConnection(xConnection);
+                                       if ( xConnection.is() )
                                openDirectSQLDialog();
+                               }
                                break;
                        case SID_DB_APP_VIEW_TABLES:
                                getContainer()->changeContainer(E_TABLE);
@@ -1334,6 +1345,7 @@
                                                                                
         CommandGroup::INSERT );
 
     implDescribeSupportedFeature( ".uno:DBDelete",           
SID_DB_APP_DELETE,         CommandGroup::EDIT );
+       implDescribeSupportedFeature( ".uno:Delete",                     
SID_DB_APP_DELETE,         CommandGroup::EDIT );
     implDescribeSupportedFeature( ".uno:DBRename",           
SID_DB_APP_RENAME,         CommandGroup::EDIT );
     implDescribeSupportedFeature( ".uno:DBEdit",             SID_DB_APP_EDIT,  
         CommandGroup::EDIT );
     implDescribeSupportedFeature( ".uno:DBOpen",             SID_DB_APP_OPEN,  
         CommandGroup::EDIT );

File [changed]: AppControllerGen.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppControllerGen.cxx?r1=1.9&r2=1.9.38.1
Delta lines:  +9 -4
-------------------
--- AppControllerGen.cxx        21 Jan 2005 17:06:03 -0000      1.9
+++ AppControllerGen.cxx        4 Mar 2005 07:19:26 -0000       1.9.38.1
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: AppControllerGen.cxx,v $
  *
- *  $Revision: 1.9 $
+ *  $Revision: 1.9.38.1 $
  *
- *  last change: $Author: kz $ $Date: 2005/01/21 17:06:03 $
+ *  last change: $Author: oj $ $Date: 2005/03/04 07:19:26 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -267,7 +267,8 @@
                ::osl::MutexGuard aGuard(m_aMutex);
                WaitObject aWO(getView());
 
-               Sequence< Any > aArgs(2);
+        Reference<XConnection> xConnection = getActiveConnection();
+               Sequence< Any > aArgs(xConnection.is() ? 3 : 2);
 
                Reference< ::com::sun::star::awt::XWindow> xWindow = 
getTopMostContainerWindow();
                if ( !xWindow.is() )
@@ -289,6 +290,10 @@
                aArgs[1] <<= PropertyValue(
                        
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("InitialSelection")), 0,
                        makeAny(sInitialSelection), PropertyState_DIRECT_VALUE);
+               if ( xConnection.is() )
+                       aArgs[2] <<= PropertyValue(
+                               PROPERTY_ACTIVECONNECTION, 0,
+                               makeAny(xConnection), 
PropertyState_DIRECT_VALUE);
 
                // create the dialog
                Reference< XExecutableDialog > xAdminDialog;




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

Reply via email to