summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/inc
diff options
context:
space:
mode:
authorOcke Janssen <oj@openoffice.org>2001-06-28 13:26:45 +0000
committerOcke Janssen <oj@openoffice.org>2001-06-28 13:26:45 +0000
commitc11e65dabcae8fb31206d9159bf856a4a553a7a7 (patch)
tree356784026592cf33476dc6a4e012b40528999788 /dbaccess/source/ui/inc
parent8b6dead99ca0b0ad138a80357720e350e81373b6 (diff)
#88787# assure that the noone access objects thaould already be disposed
Diffstat (limited to 'dbaccess/source/ui/inc')
-rw-r--r--dbaccess/source/ui/inc/JoinTableView.hxx9
-rw-r--r--dbaccess/source/ui/inc/RTableConnectionData.hxx16
-rw-r--r--dbaccess/source/ui/inc/RelationController.hxx8
-rw-r--r--dbaccess/source/ui/inc/TableWindow.hxx23
4 files changed, 39 insertions, 17 deletions
diff --git a/dbaccess/source/ui/inc/JoinTableView.hxx b/dbaccess/source/ui/inc/JoinTableView.hxx
index a834679ce..05e699bd1 100644
--- a/dbaccess/source/ui/inc/JoinTableView.hxx
+++ b/dbaccess/source/ui/inc/JoinTableView.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: JoinTableView.hxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: oj $ $Date: 2001-04-30 13:03:02 $
+ * last change: $Author: oj $ $Date: 2001-06-28 14:26:45 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -196,12 +196,15 @@ namespace dbaui
OTableWindowMap* GetTabWinMap() { return &m_aTableMap; }
const OTableWindowMap* GetTabWinMap() const { return &m_aTableMap; }
::std::vector<OTableConnection*>* GetTabConnList() { return &m_vTableConnection; }
- // ::std::vector<OTableConnection*>* GetTabConnList() const { return &m_vTableConnection; }
BOOL ExistsAConn(const OTableWindow* pFromWin) const;
OTableConnection* GetTabConn(OTableWindow* pLhs,OTableWindow* pRhs, OTableConnection* _rpFirstAfter = NULL);
+ // clears the window map and connection vector without destroying it
+ // that means teh data of the windows and connection will be untouched
+ void clearLayoutInformation();
+
// set the focus to that tab win which most recently had it (or to the first available one)
void GrabTabWinFocus();
diff --git a/dbaccess/source/ui/inc/RTableConnectionData.hxx b/dbaccess/source/ui/inc/RTableConnectionData.hxx
index 24117a7a1..35d2b2934 100644
--- a/dbaccess/source/ui/inc/RTableConnectionData.hxx
+++ b/dbaccess/source/ui/inc/RTableConnectionData.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: RTableConnectionData.hxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: oj $ $Date: 2001-02-28 10:07:39 $
+ * last change: $Author: oj $ $Date: 2001-06-28 14:26:45 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -73,6 +73,9 @@
#ifndef DBAUI_ENUMTYPES_HXX
#include "QEnumTypes.hxx"
#endif
+#ifndef _UNOTOOLS_EVENTLISTENERADAPTER_HXX_
+#include <unotools/eventlisteneradapter.hxx>
+#endif
namespace dbaui
{
@@ -83,8 +86,10 @@ namespace dbaui
class OConnectionLineData;
//==================================================================
- class ORelationTableConnectionData : public OTableConnectionData
+ class ORelationTableConnectionData : public OTableConnectionData,
+ public ::utl::OEventListenerAdapter
{
+ ::osl::Mutex m_aMutex;
::rtl::OUString m_sDatabaseName;
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> m_xTables;
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> m_xSource;
@@ -98,6 +103,8 @@ namespace dbaui
BOOL checkPrimaryKey(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xTable,EConnectionSide _eEConnectionSide) const;
BOOL IsSourcePrimKey() const { return checkPrimaryKey(m_xSource,JTCS_FROM); }
BOOL IsDestPrimKey() const { return checkPrimaryKey(m_xDest,JTCS_TO); }
+ void addListening(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _rxComponent);
+ void removeListening(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _rxComponent);
protected:
virtual OConnectionLineData* CreateLineDataObj();
@@ -139,6 +146,9 @@ namespace dbaui
BOOL IsConnectionPossible();
void ChangeOrientation();
BOOL DropRelation();
+
+ // OEventListenerAdapter
+ virtual void _disposing( const ::com::sun::star::lang::EventObject& _rSource );
};
}
diff --git a/dbaccess/source/ui/inc/RelationController.hxx b/dbaccess/source/ui/inc/RelationController.hxx
index cbec93be3..341557b82 100644
--- a/dbaccess/source/ui/inc/RelationController.hxx
+++ b/dbaccess/source/ui/inc/RelationController.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: RelationController.hxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: fs $ $Date: 2001-06-21 17:43:46 $
+ * last change: $Author: oj $ $Date: 2001-06-28 14:26:45 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -93,6 +93,10 @@ namespace dbaui
ORelationDesignView* getRelationView() { return static_cast<ORelationDesignView*>(m_pView); }
void loadData();
sal_Bool existsTable(const ::rtl::OUString& _rComposedTableName) const;
+ // ask the user if the design should be saved when it is modified
+ short saveModified();
+ // load the window positions out of the datasource
+ void loadLayoutInformation();
public:
ORelationController(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM);
diff --git a/dbaccess/source/ui/inc/TableWindow.hxx b/dbaccess/source/ui/inc/TableWindow.hxx
index 423e4333a..bba84f31d 100644
--- a/dbaccess/source/ui/inc/TableWindow.hxx
+++ b/dbaccess/source/ui/inc/TableWindow.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: TableWindow.hxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: oj $ $Date: 2001-02-28 10:07:01 $
+ * last change: $Author: oj $ $Date: 2001-06-28 14:26:45 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -82,6 +82,9 @@
#ifndef _SV_WINDOW_HXX
#include <vcl/window.hxx>
#endif
+#ifndef _UNOTOOLS_EVENTLISTENERADAPTER_HXX_
+#include <unotools/eventlisteneradapter.hxx>
+#endif
class SvLBoxEntry;
namespace dbaui
@@ -98,10 +101,13 @@ namespace dbaui
class OJoinDesignView;
class OJoinTableView;
- class OTableWindow : public Window
+ class OTableWindow : public Window,
+ public ::utl::OEventListenerAdapter
{
friend class OTableWindowTitle;
friend class OTableWindowListBox;
+
+ mutable ::osl::Mutex m_aMutex;
protected:
// und die Tabelle selber (brauche ich, da ich sie locken will, solange das Fenster lebt)
OTableWindowTitle m_aTitle;
@@ -138,10 +144,6 @@ namespace dbaui
virtual void OnEntryDoubleClicked(SvLBoxEntry* pEntry) { }
// wird aus dem DoubleClickHdl der ListBox heraus aufgerufen
- // die unterliegende Tabellendefinition (un)locken
- // void LockTable() { if (m_xTableDef.Is()) m_xTableDef->AddUsage(); }
- // void UnlockTable() { if (m_xTableDef.Is()) m_xTableDef->ReleaseUsage(); }
-
public:
TYPEINFO();
OTableWindow( Window* pParent, OTableWindowData* pTabWinData);
@@ -168,8 +170,8 @@ namespace dbaui
::rtl::OUString GetComposedName() const { return m_pData->GetComposedName(); }
OTableWindowListBox* GetListBox() const { return m_pListBox; }
OTableWindowData* GetData() const { return m_pData; }
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> GetOriginalColumns() const { return m_xColumns; }
- ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> GetTable() const { return m_xTable; }
+ ::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; }
UINT16 GetSizingFlags() const { return m_nSizingFlags; }
@@ -184,6 +186,9 @@ namespace dbaui
BOOL ExistsAConn() const;
virtual void EnumValidFields(::std::vector< ::rtl::OUString>& arrstrFields);
+
+ // OEventListenerAdapter
+ virtual void _disposing( const ::com::sun::star::lang::EventObject& _rSource );
};
}
#endif //DBAUI_TABLEWINDOW_HXX