#104812# factory method inserted for tablewindows
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: JoinTableView.hxx,v $
|
||||
*
|
||||
* $Revision: 1.17 $
|
||||
* $Revision: 1.18 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2002-06-24 07:49:59 $
|
||||
* last change: $Author: oj $ $Date: 2002-11-08 09:27:36 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
@@ -325,6 +325,14 @@ namespace dbaui
|
||||
virtual OTableWindowData* CreateImpl(const ::rtl::OUString& _rComposedName,
|
||||
const ::rtl::OUString& _rWinName);
|
||||
|
||||
/** factory method to create table windows
|
||||
@param _pData
|
||||
The data corresponding to the window.
|
||||
@return
|
||||
The new TableWindow
|
||||
*/
|
||||
virtual OTableWindow* createWindow(OTableWindowData* _pData) = 0;
|
||||
|
||||
private:
|
||||
void InitColors();
|
||||
BOOL ScrollWhileDragging();
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: QueryTableView.hxx,v $
|
||||
*
|
||||
* $Revision: 1.11 $
|
||||
* $Revision: 1.12 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2002-05-22 11:09:25 $
|
||||
* last change: $Author: oj $ $Date: 2002-11-08 09:27:37 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
@@ -96,6 +96,8 @@ namespace dbaui
|
||||
protected:
|
||||
virtual void ConnDoubleClicked(OTableConnection* pConnection);
|
||||
virtual void KeyInput(const KeyEvent& rEvt);
|
||||
|
||||
virtual OTableWindow* createWindow(OTableWindowData* _pData);
|
||||
public:
|
||||
TYPEINFO();
|
||||
OQueryTableView(Window* pParent,OQueryDesignView* pView);
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: RelationControl.hxx,v $
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Revision: 1.3 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2002-02-08 08:56:33 $
|
||||
* last change: $Author: oj $ $Date: 2002-11-08 09:27:37 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
@@ -120,6 +120,7 @@ namespace dbaui
|
||||
the connection data which is used to init the control
|
||||
*/
|
||||
void Init(OTableConnectionData* _pConnData);
|
||||
void lateInit();
|
||||
|
||||
BOOL SaveModified();
|
||||
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: RelationTableView.hxx,v $
|
||||
*
|
||||
* $Revision: 1.5 $
|
||||
* $Revision: 1.6 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2002-05-22 11:25:53 $
|
||||
* last change: $Author: oj $ $Date: 2002-11-08 09:27:38 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
@@ -77,6 +77,8 @@ namespace dbaui
|
||||
virtual void ConnDoubleClicked( OTableConnection* pConnection );
|
||||
virtual void AddTabWin(const ::rtl::OUString& _rComposedName, const ::rtl::OUString& rWinName, BOOL bNewTable = FALSE);
|
||||
|
||||
virtual OTableWindow* createWindow(OTableWindowData* _pData);
|
||||
|
||||
public:
|
||||
ORelationTableView( Window* pParent, ORelationDesignView* pView );
|
||||
virtual ~ORelationTableView();
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: TableWindow.hxx,v $
|
||||
*
|
||||
* $Revision: 1.8 $
|
||||
* $Revision: 1.9 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2002-06-27 08:19:42 $
|
||||
* last change: $Author: oj $ $Date: 2002-11-08 09:27:39 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
@@ -168,9 +168,11 @@ namespace dbaui
|
||||
virtual void* createUserData(const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::beans::XPropertySet>& _xColumn,
|
||||
bool _bPrimaryKey);
|
||||
|
||||
OTableWindow( Window* pParent, OTableWindowData* pTabWinData);
|
||||
public:
|
||||
TYPEINFO();
|
||||
OTableWindow( Window* pParent, OTableWindowData* pTabWinData);
|
||||
|
||||
virtual ~OTableWindow();
|
||||
|
||||
// spaeter Constructor, siehe auch CreateListbox und FillListbox
|
||||
@@ -196,6 +198,12 @@ namespace dbaui
|
||||
::rtl::OUString GetComposedName() const { return m_pData->GetComposedName(); }
|
||||
OTableWindowListBox* GetListBox() const { return m_pListBox; }
|
||||
OTableWindowData* GetData() const { return m_pData; }
|
||||
|
||||
/** returns the name which should be used when displaying join or relations
|
||||
@return
|
||||
The composed name or the window name.
|
||||
*/
|
||||
virtual ::rtl::OUString GetName() const = 0;
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> GetOriginalColumns() const { ::osl::MutexGuard aGuard( m_aMutex ); return m_xColumns; }
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> GetTable() const { ::osl::MutexGuard aGuard( m_aMutex ); return m_xTable; }
|
||||
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: JoinTableView.cxx,v $
|
||||
*
|
||||
* $Revision: 1.41 $
|
||||
* $Revision: 1.42 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2002-10-24 09:08:40 $
|
||||
* last change: $Author: oj $ $Date: 2002-11-08 09:26:56 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
@@ -381,8 +381,8 @@ void OJoinTableView::AddTabWin(const ::rtl::OUString& _rComposedName, const ::rt
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Neues Fenster in Fensterliste eintragen
|
||||
OTableWindow* pNewTabWin = new OTableWindow( this, pNewTabWinData );
|
||||
if(pNewTabWin->Init())
|
||||
OTableWindow* pNewTabWin = createWindow( pNewTabWinData );
|
||||
if ( pNewTabWin->Init() )
|
||||
{
|
||||
m_pView->getController()->getTableWindowData()->push_back( pNewTabWinData);
|
||||
// when we already have a table with this name insert the full qualified one instead
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: QTableWindow.hxx,v $
|
||||
*
|
||||
* $Revision: 1.4 $
|
||||
* $Revision: 1.5 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2002-06-27 08:21:02 $
|
||||
* last change: $Author: oj $ $Date: 2002-11-08 09:26:57 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
@@ -103,6 +103,8 @@ namespace dbaui
|
||||
BOOL ExistsField(const ::rtl::OUString& strFieldName, OTableFieldDescRef& rInfo);
|
||||
BOOL ExistsAVisitedConn() const;
|
||||
|
||||
virtual ::rtl::OUString GetName() const { return GetWinName(); }
|
||||
|
||||
protected:
|
||||
virtual void KeyInput( const KeyEvent& rEvt );
|
||||
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: QueryTableView.cxx,v $
|
||||
*
|
||||
* $Revision: 1.26 $
|
||||
* $Revision: 1.27 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2002-10-08 13:43:23 $
|
||||
* last change: $Author: oj $ $Date: 2002-11-08 09:26:59 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
@@ -378,7 +378,7 @@ void OQueryTableView::ReSync()
|
||||
for(;aIter != pTabWinDataList->rend();++aIter)
|
||||
{
|
||||
OQueryTableWindowData* pData = static_cast<OQueryTableWindowData*>(*aIter);
|
||||
OQueryTableWindow* pTabWin = new OQueryTableWindow(this, pData);
|
||||
OTableWindow* pTabWin = createWindow(pData);
|
||||
|
||||
// ich gehe jetzt NICHT ueber ShowTabWin, da dieses die Daten des Fensters in die Liste des Docs einfuegt, was
|
||||
// schlecht waere, denn genau von dort hole ich sie ja gerade
|
||||
@@ -440,6 +440,12 @@ void OQueryTableView::ClearAll()
|
||||
m_pView->getController()->setModified(sal_True);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
OTableWindow* OQueryTableView::createWindow(OTableWindowData* _pData)
|
||||
{
|
||||
return new OQueryTableWindow(this,static_cast<OQueryTableWindowData*>(_pData));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void OQueryTableView::NotifyTabConnection(const OQueryTableConnection& rNewConn, sal_Bool _bCreateUndoAction)
|
||||
{
|
||||
@@ -570,7 +576,7 @@ void OQueryTableView::AddTabWin(const ::rtl::OUString& _rComposedName, const ::r
|
||||
// die TabWinData brauche ich nicht in die entsprechende Liste der DocShell eintragen, das macht ShowTabWin
|
||||
|
||||
// neues Fenster erzeugen
|
||||
OQueryTableWindow* pNewTabWin = new OQueryTableWindow(this, pNewTabWinData);
|
||||
OQueryTableWindow* pNewTabWin = static_cast<OQueryTableWindow*>(createWindow(pNewTabWinData));
|
||||
// das Init kann ich hier weglassen, da das in ShowTabWin passiert
|
||||
|
||||
// Neue UndoAction
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: querydlg.cxx,v $
|
||||
*
|
||||
* $Revision: 1.5 $
|
||||
* $Revision: 1.6 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2002-08-19 08:01:31 $
|
||||
* last change: $Author: oj $ $Date: 2002-11-08 09:27:00 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
@@ -141,6 +141,7 @@ DlgQryJoin::DlgQryJoin( Window * pParent,
|
||||
m_pTableControl->Init( m_pConnData );
|
||||
}
|
||||
|
||||
m_pTableControl->lateInit();
|
||||
|
||||
sal_Bool bFull = sal_False;
|
||||
sal_Bool bOuter = sal_False;
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: RelationTableView.cxx,v $
|
||||
*
|
||||
* $Revision: 1.13 $
|
||||
* $Revision: 1.14 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2002-08-19 07:52:46 $
|
||||
* last change: $Author: oj $ $Date: 2002-11-08 09:27:59 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
@@ -142,6 +142,9 @@
|
||||
#ifndef _DBHELPER_DBEXCEPTION_HXX_
|
||||
#include <connectivity/dbexception.hxx>
|
||||
#endif
|
||||
#ifndef DBAUI_RELTABLEWINDOW_HXX
|
||||
#include "RTableWindow.hxx"
|
||||
#endif
|
||||
|
||||
|
||||
using namespace dbaui;
|
||||
@@ -152,6 +155,8 @@ using namespace ::com::sun::star::sdbcx;
|
||||
using namespace ::com::sun::star::beans;
|
||||
using namespace ::com::sun::star::container;
|
||||
|
||||
TYPEINIT1(ORelationTableWindow, OTableWindow);
|
||||
|
||||
//==================================================================
|
||||
// class ORelationTableView
|
||||
//==================================================================
|
||||
@@ -189,7 +194,7 @@ void ORelationTableView::ReSync()
|
||||
for(;aIter != pTabWinDataList->rend();++aIter)
|
||||
{
|
||||
OTableWindowData* pData = *aIter;
|
||||
OTableWindow* pTabWin = new OTableWindow(this, pData);
|
||||
OTableWindow* pTabWin = createWindow(pData);
|
||||
|
||||
if (!pTabWin->Init())
|
||||
{
|
||||
@@ -462,7 +467,7 @@ void ORelationTableView::AddTabWin(const ::rtl::OUString& _rComposedName, const
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Neues Fenster in Fensterliste eintragen
|
||||
OTableWindow* pNewTabWin = new OTableWindow( this, pNewTabWinData );
|
||||
OTableWindow* pNewTabWin = createWindow( pNewTabWinData );
|
||||
if(pNewTabWin->Init())
|
||||
{
|
||||
m_pView->getController()->getTableWindowData()->push_back( pNewTabWinData);
|
||||
@@ -518,3 +523,9 @@ void ORelationTableView::lookForUiActivities()
|
||||
}
|
||||
}
|
||||
// -----------------------------------------------------------------------------
|
||||
OTableWindow* ORelationTableView::createWindow(OTableWindowData* _pData)
|
||||
{
|
||||
return new ORelationTableWindow(this,_pData);
|
||||
}
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
Reference in New Issue
Block a user