update dev300-m58
[ooovba.git] / dbaccess / source / ui / inc / RelationTableView.hxx
bloba7b80c4baebb6e25bdeb8c37c6f1f12bad3df2a0
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: RelationTableView.hxx,v $
10 * $Revision: 1.11.26.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef DBAUI_RELATION_TABLEVIEW_HXX
31 #define DBAUI_RELATION_TABLEVIEW_HXX
33 #include "JoinTableView.hxx"
34 #include <comphelper/containermultiplexer.hxx>
35 #include <cppuhelper/basemutex.hxx>
36 #include <rtl/ref.hxx>
38 namespace dbaui
40 class ORelationDesignView;
41 class ORelationTableView : public ::cppu::BaseMutex
42 , public OJoinTableView
43 , public ::comphelper::OContainerListener
45 OTableConnection* m_pExistingConnection; // is set when a connection was draged on an existing connection
46 TTableConnectionData::value_type m_pCurrentlyTabConnData; // set when we creating a connection with more than one keycolumn
47 ::rtl::Reference< comphelper::OContainerListenerAdapter>
48 m_pContainerListener;
49 bool m_bInRemove;
51 virtual void ConnDoubleClicked( OTableConnection* pConnection );
52 virtual void AddTabWin(const ::rtl::OUString& _rComposedName, const ::rtl::OUString& rWinName, BOOL bNewTable = FALSE);
54 virtual OTableWindow* createWindow(const TTableWindowData::value_type& _pData);
56 /** determines whether the classes Init method should accept a query name, or only table names
58 virtual bool allowQueries() const;
60 // OContainerListener
61 virtual void _elementInserted( const ::com::sun::star::container::ContainerEvent& _rEvent ) throw(::com::sun::star::uno::RuntimeException);
62 virtual void _elementRemoved( const ::com::sun::star::container::ContainerEvent& _rEvent ) throw(::com::sun::star::uno::RuntimeException);
63 virtual void _elementReplaced( const ::com::sun::star::container::ContainerEvent& _rEvent ) throw(::com::sun::star::uno::RuntimeException);
65 public:
66 ORelationTableView( Window* pParent, ORelationDesignView* pView );
67 virtual ~ORelationTableView();
69 virtual void RemoveTabWin( OTableWindow* pTabWin );
70 virtual void AddConnection(const OJoinExchangeData& jxdSource, const OJoinExchangeData& jxdDest);
71 virtual bool RemoveConnection(OTableConnection* pConn,sal_Bool _bDelete);
73 virtual void ReSync();
75 void AddNewRelation();
76 // reisst den Dialog fuer eine voellig neue Relation hoch
77 // wird vom AddTabDlg benutzt, um festzustellen, ob noch Tabellen hinzugefuegt werden duerfen
78 virtual BOOL IsAddAllowed();
80 virtual void lookForUiActivities();
83 #endif // DBAUI_RELATION_TABLEVIEW_HXX