Tag: cws_src680_oj14
User: oj      
Date: 06/01/03 05:18:17

Modified:
 /dba/dbaccess/source/ui/app/
  AppController.hxx

Log:
 RESYNC: (1.12-1.13); FILE MERGED

File Changes:

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

File [changed]: AppController.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppController.hxx?r1=1.12.4.1&r2=1.12.4.2
Delta lines:  +22 -30
---------------------
--- AppController.hxx   3 Jan 2006 07:48:57 -0000       1.12.4.1
+++ AppController.hxx   3 Jan 2006 13:18:14 -0000       1.12.4.2
@@ -87,6 +87,9 @@
 #ifndef DBACCESS_SOURCE_UI_INC_DOCUMENTCONTROLLER_HXX
 #include "documentcontroller.hxx"
 #endif
+#ifndef _DBAUI_COMMON_TYPES_HXX_
+#include "commontypes.hxx"
+#endif
 
 #include <memory>
 
@@ -135,11 +138,13 @@
 
        private:
 
-               DECLARE_STL_USTRINGACCESS_MAP(::com::sun::star::uno::Reference< 
::com::sun::star::sdbc::XConnection >,TDataSourceConnections);
+        OTableCopyHelper::DropDescriptor                       m_aAsyncDrop;
+
+        SharedConnection        m_xDataSourceConnection;
+        ::com::sun::star::uno::Reference< 
::com::sun::star::sdbc::XDatabaseMetaData >
+                                m_xMetaData;
 
                OModuleClient                   m_aModuleClient;
-        OTableCopyHelper::DropDescriptor                       m_aAsyncDrop;
-               TDataSourceConnections  m_aDataSourceConnections;
                TransferableDataHelper  m_aSystemClipboard;             // 
content of the clipboard
                ::com::sun::star::uno::Reference< 
::com::sun::star::beans::XPropertySet >   m_xDataSource;
         ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
@@ -386,10 +391,6 @@
                */
                sal_Bool suspendDocuments(sal_Bool bSuspend);
 
-               /** disposes all created connections
-               */
-               void clearConnections();
-
                /** add event listener and remember the document
                        @param  _xDocument
                                the new document, may be <NULL/>
@@ -490,31 +491,24 @@
                // XPropertyChangeListener
                virtual void SAL_CALL propertyChange( const 
::com::sun::star::beans::PropertyChangeEvent& evt ) throw 
(::com::sun::star::uno::RuntimeException);
 
-               /** ensures that a connection for the selected data source 
exists
-                       @param  _xConnection
-                               The new connection
-                       @param  _bCreate
-                               If set to <TRUE/> than the connection will be 
created if it doesn't exist.
-            @return
-                <TRUE/> if and only if the conneciton could be established
+               /** retrieves the current connection, creates it if necessary
                */
-               bool ensureConnection(::com::sun::star::uno::Reference< 
::com::sun::star::sdbc::XConnection >& _xConnection,sal_Bool _bCreate = 
sal_True);
+               const SharedConnection& ensureConnection();
 
-               /** returns the connection for the currently active data source
-                       @return
-                               The connection for the currently active data 
source
+               /** retrieves the current connection
                */
-               ::com::sun::star::uno::Reference< 
::com::sun::star::sdbc::XConnection > getActiveConnection() const;
+        const SharedConnection& getConnection() const { return 
m_xDataSourceConnection; }
+
+        /// determines whether we're currently connected to the database
+        bool isConnected() const { return m_xDataSourceConnection.is(); }
 
+        const ::com::sun::star::uno::Reference< 
::com::sun::star::sdbc::XDatabaseMetaData >&
+            getConnectionMetaData() const { return m_xMetaData; }
 
                /** refreshes the tables
                */
                void refreshTables();
 
-               /** closes the connection of the select data source
-               */
-               void closeConnection();
-
                /// @see 
<method>IApplicationElementNotification::onEntryDoubleClick</method>
                virtual void onEntryDoubleClick(SvTreeListBox* _pTree);
                /// @see 
<method>IApplicationElementNotification::onCreationClick</method>
@@ -546,11 +540,9 @@
                virtual void previewChanged( sal_Int32 _nMode);
        protected:
 
-               /** the connection will be disposed and set to NULL
-                       @param  _xConnection
-                               the connection to be disposed
+               /** disconnects from our XConnection, and cleans up this 
connection
                */
-               virtual void            
disconnect(::com::sun::star::uno::Reference< 
::com::sun::star::sdbc::XConnection >& _xConnection);
+               virtual void            disconnect();
 
                // late construction
                virtual sal_Bool        Construct(Window* pParent);




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

Reply via email to