Tag: cws_src680_qiq
User: fs      
Date: 06/05/17 04:45:18

Modified:
 /dba/dbaccess/source/ui/inc/
  JoinController.hxx, JoinDesignView.hxx

Log:
 #i51143# AddTableDialog is now in the responsibility of the controller, not 
the view (allows late construction as needed)

File Changes:

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

File [changed]: JoinController.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/JoinController.hxx?r1=1.20.124.1&r2=1.20.124.2
Delta lines:  +38 -30
---------------------
--- JoinController.hxx  12 May 2006 11:08:48 -0000      1.20.124.1
+++ JoinController.hxx  17 May 2006 11:45:15 -0000      1.20.124.2
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: JoinController.hxx,v $
  *
- *  $Revision: 1.20.124.1 $
+ *  $Revision: 1.20.124.2 $
  *
- *  last change: $Author: fs $ $Date: 2006/05/12 11:08:48 $
+ *  last change: $Author: fs $ $Date: 2006/05/17 11:45:15 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -38,15 +38,6 @@
 #ifndef DBAUI_SINGLEDOCCONTROLLER_HXX
 #include "singledoccontroller.hxx"
 #endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
-#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_IO_XOBJECTOUTPUTSTREAM_HPP_
-#include <com/sun/star/io/XObjectOutputStream.hpp>
-#endif
-#ifndef _COM_SUN_STAR_IO_XOBJECTINPUTSTREAM_HPP_
-#include <com/sun/star/io/XObjectInputStream.hpp>
-#endif
 #ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
 #include <com/sun/star/beans/XPropertySet.hpp>
 #endif
@@ -63,9 +54,10 @@
 class VCLXWindow;
 namespace dbaui
 {
+       class OAddTableDlg;
+    class AddTableDialogContext;
        class OTableConnectionData;
        class OTableWindowData;
-       class OAddTableDlg;
        class OTableWindow;
        typedef OSingleDocumentController OJoinController_BASE;
        class OJoinController : public OJoinController_BASE
@@ -77,7 +69,8 @@
                Fraction                                                        
        m_aZoom;
                ::dbtools::SQLExceptionInfo                             
m_aExceptionInfo;
 
-               OAddTableDlg*   m_pAddTabDlg;           // is set by the first 
call of execute, the owner is the design view
+               OAddTableDlg*                               m_pAddTableDialog;
+        ::std::auto_ptr< AddTableDialogContext >    m_pDialogContext;
 
                // state of a feature. 'feature' may be the handle of a 
::com::sun::star::util::URL somebody requested a dispatch interface for OR a 
toolbar slot.
                virtual FeatureState    GetState(sal_uInt16 nId) const;
@@ -106,19 +99,20 @@
        public:
                OJoinController(const ::com::sun::star::uno::Reference< 
::com::sun::star::lang::XMultiServiceFactory >& _rM);
 
-               virtual void setModified(sal_Bool _bModified=sal_True);
-
-               /** erase the data in the data vector
-                       @param  _pData
-                                       the data whioch should be erased
-               */
-               void removeConnectionData(OTableConnectionData* _pData);
-
+        // ---------------------------------------------------------------
+        // attribute access
                ::std::vector< OTableWindowData*>*              
getTableWindowData()            { return &m_vTableData; }
                ::std::vector< OTableConnectionData*>*  
getTableConnectionData()        { return &m_vTableConnectionData;}
 
-               void SaveTabWinsPosSize( OJoinTableView::OTableWindowMap* 
pTabWinList, long nOffsetX, long nOffsetY );
+        OAddTableDlg*   getAddTableDialog() const { return m_pAddTableDialog; }
+
+        // ---------------------------------------------------------------
+        // OSingleDocumentController overridables
+               virtual void        reconnect( sal_Bool _bUI );
+               virtual void        setModified( sal_Bool _bModified = sal_True 
);
 
+        // ---------------------------------------------------------------
+        // own overridables
         /** determines whether or not it's allowed for database views to 
participate in the game
         */
         virtual bool allowViews() const = 0;
@@ -127,8 +121,25 @@
         */
         virtual bool allowQueries() const = 0;
 
+        /** provides access to the OJoinDesignView belonging to the 
controller, which might
+            or might not be the direct view (getView)
+        */
+               virtual OJoinDesignView*        getJoinView();
+
+
+        // ---------------------------------------------------------------
+        /** erase the data in the data vector
+                       @param  _pData
+                                       the data whioch should be erased
+               */
+               void    removeConnectionData(OTableConnectionData* _pData);
+
+               void    SaveTabWinsPosSize( OJoinTableView::OTableWindowMap* 
pTabWinList, long nOffsetX, long nOffsetY );
+
                void                    SaveTabWinPosSize(OTableWindow* 
pTabWin, long nOffsetX, long nOffsetY);
 
+        // ---------------------------------------------------------------
+        // UNO interface overridables
                // XEventListener
                virtual void SAL_CALL disposing( const 
::com::sun::star::lang::EventObject& Source ) 
throw(::com::sun::star::uno::RuntimeException);
 
@@ -138,8 +149,9 @@
                virtual sal_Bool SAL_CALL suspend(sal_Bool bSuspend) throw( 
::com::sun::star::uno::RuntimeException );
 
 
-               /**
-                       only defines a method to save a SQLException in d&d 
methods to show the error at a later state
+        // ---------------------------------------------------------------
+        // misc
+               /** only defines a method to save a SQLException in d&d methods 
to show the error at a later state
                        set the internal member m_aExceptionInfo to _rInfo
                */
                void setErrorOccured(const ::dbtools::SQLExceptionInfo& _rInfo)
@@ -156,8 +168,6 @@
                        return aInfo;
                }
 
-        void clearAddTableDialog() { m_pAddTabDlg = NULL; }
-
        protected:
                virtual OTableWindowData* createTableWindowData() = 0;
                // ask the user if the design should be saved when it is 
modified
@@ -165,8 +175,6 @@
                // called when the orignal state should be reseted (first time 
load)
                virtual void reset()             = 0;
                virtual void describeSupportedFeatures();
-
-               virtual OJoinDesignView*        getJoinView();
        };
 }
 #endif // DBAUI_JOINCONTROLLER_HXX

File [changed]: JoinDesignView.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/JoinDesignView.hxx?r1=1.7.124.1&r2=1.7.124.2
Delta lines:  +2 -9
-------------------
--- JoinDesignView.hxx  12 May 2006 11:09:00 -0000      1.7.124.1
+++ JoinDesignView.hxx  17 May 2006 11:45:15 -0000      1.7.124.2
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: JoinDesignView.hxx,v $
  *
- *  $Revision: 1.7.124.1 $
+ *  $Revision: 1.7.124.2 $
  *
- *  last change: $Author: fs $ $Date: 2006/05/12 11:09:00 $
+ *  last change: $Author: fs $ $Date: 2006/05/17 11:45:15 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -53,8 +53,6 @@
 
 namespace dbaui
 {
-       class OAddTableDlg;
-    class AddTableDialogContext;
        class OTableConnection;
        class OConnectionLineData;
        class OJoinController;
@@ -67,9 +65,6 @@
        protected:
                OScrollWindowHelper*    m_pScrollWindow;        // contains 
only the scrollbars
                OJoinTableView*                 m_pTableView;           // 
presents the upper window
-               OAddTableDlg*                   m_pAddTabDlg;           // 
create by the first execute of the add table slot
-        ::std::auto_ptr< AddTableDialogContext >
-                                m_pDialogContext;
                OJoinController*                m_pController;
 
        public:
@@ -88,8 +83,6 @@
 
                virtual void SaveTabWinUIConfig(OTableWindow* pWin);
                OJoinController* getController() const { return m_pController; }
-               // returs the add table dialog from the design view
-               OAddTableDlg* getAddTableDialog() { return m_pAddTabDlg; }
                // called when fields are deleted
                // called when a table from tabeview was deleted
                void TableDeleted(const ::rtl::OUString& rAliasName);




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

Reply via email to