summaryrefslogtreecommitdiffstats
path: root/dbaccess/source/ui
diff options
context:
space:
mode:
authorOcke Janssen <oj@openoffice.org>2001-03-23 08:09:24 +0000
committerOcke Janssen <oj@openoffice.org>2001-03-23 08:09:24 +0000
commite5616b75e14b944de0f47d41311136b29dda4d55 (patch)
treea60511ddb1dbdb5535e5dd13fceed2ca0e8877d9 /dbaccess/source/ui
parentcorrected spelling (diff)
downloadcore-e5616b75e14b944de0f47d41311136b29dda4d55.tar.gz
core-e5616b75e14b944de0f47d41311136b29dda4d55.zip
#85270# check if there are any tables in the dialog
Diffstat (limited to 'dbaccess/source/ui')
-rw-r--r--dbaccess/source/ui/inc/RelationTableView.hxx6
-rw-r--r--dbaccess/source/ui/relationdesign/RelationController.cxx5
-rw-r--r--dbaccess/source/ui/relationdesign/RelationTableView.cxx11
3 files changed, 15 insertions, 7 deletions
diff --git a/dbaccess/source/ui/inc/RelationTableView.hxx b/dbaccess/source/ui/inc/RelationTableView.hxx
index b198bfa34993..86ec39ab46f8 100644
--- a/dbaccess/source/ui/inc/RelationTableView.hxx
+++ b/dbaccess/source/ui/inc/RelationTableView.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: RelationTableView.hxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: oj $ $Date: 2001-02-28 10:05:04 $
+ * last change: $Author: oj $ $Date: 2001-03-23 09:09:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -80,7 +80,7 @@ namespace dbaui
virtual ~ORelationTableView();
// virtual void AddTabWin(const ::rtl::OUString& _rComposedName, const ::rtl::OUString& rWinName, BOOL bNewTable = FALSE);
- // virtual void RemoveTabWin( OTableWindow* pTabWin );
+ virtual void RemoveTabWin( OTableWindow* pTabWin );
virtual void AddConnection(const OJoinExchangeData& jxdSource, const OJoinExchangeData& jxdDest);
virtual BOOL RemoveConnection(OTableConnection* pConn);
diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx
index 5eb8eaf4df6c..dc8d9ab3ca93 100644
--- a/dbaccess/source/ui/relationdesign/RelationController.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationController.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: RelationController.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: oj $ $Date: 2001-03-22 07:55:53 $
+ * last change: $Author: oj $ $Date: 2001-03-23 09:08:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -256,6 +256,7 @@ FeatureState ORelationController::GetState(sal_uInt16 _nId)
aReturn.aState = ::cppu::bool2any(m_bEditable);
break;
case ID_REALTION_ADD_RELATION:
+ aReturn.bEnabled = m_vTableData.size() > 1;
aReturn.aState = ::cppu::bool2any(sal_False);
break;
default:
diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
index 0c0a3ff5662a..df1a1c14290e 100644
--- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: RelationTableView.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: fs $ $Date: 2001-03-15 08:26:07 $
+ * last change: $Author: oj $ $Date: 2001-03-23 09:08:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -449,6 +449,7 @@ void ORelationTableView::AddTabWin(const ::rtl::OUString& _rComposedName, const
m_pView->getController()->setModified( sal_True );
m_pView->getController()->InvalidateFeature(ID_BROWSER_ADDTABLE);
+ m_pView->getController()->InvalidateFeature(ID_REALTION_ADD_RELATION);
}
else
{
@@ -457,4 +458,10 @@ void ORelationTableView::AddTabWin(const ::rtl::OUString& _rComposedName, const
}
}
// -----------------------------------------------------------------------------
+void ORelationTableView::RemoveTabWin( OTableWindow* pTabWin )
+{
+ OJoinTableView::RemoveTabWin( pTabWin );
+ m_pView->getController()->InvalidateFeature(ID_REALTION_ADD_RELATION);
+}
+// -----------------------------------------------------------------------------