summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/relationdesign
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/relationdesign')
-rw-r--r--dbaccess/source/ui/relationdesign/RTableConnectionData.cxx10
-rw-r--r--dbaccess/source/ui/relationdesign/RelationTableView.cxx5
2 files changed, 6 insertions, 9 deletions
diff --git a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
index 741c36adebf6..6934ed27fe78 100644
--- a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
+++ b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
@@ -75,7 +75,7 @@ ORelationTableConnectionData::~ORelationTableConnectionData()
{
}
-bool ORelationTableConnectionData::DropRelation()
+void ORelationTableConnectionData::DropRelation()
{
::osl::MutexGuard aGuard( m_aMutex );
// delete relation
@@ -102,7 +102,6 @@ bool ORelationTableConnectionData::DropRelation()
}
}
}
- return true;
}
void ORelationTableConnectionData::ChangeOrientation()
@@ -173,15 +172,13 @@ bool ORelationTableConnectionData::checkPrimaryKey(const Reference< XPropertySet
return nPrimKeysCount && nPrimKeysCount == nValidLinesCount;
}
-bool ORelationTableConnectionData::IsConnectionPossible()
+void ORelationTableConnectionData::IsConnectionPossible()
{
::osl::MutexGuard aGuard( m_aMutex );
// if the SourceFields are a PrimKey, it's only the orientation which is wrong
if ( IsSourcePrimKey() && !IsDestPrimKey() )
ChangeOrientation();
-
- return true;
}
OConnectionLineDataRef ORelationTableConnectionData::CreateLineDataObj()
@@ -244,8 +241,7 @@ bool ORelationTableConnectionData::Update()
// delete old relation
{
DropRelation();
- if( !IsConnectionPossible() )
- return false;
+ IsConnectionPossible();
}
// reassign the keys because the orientation could be changed
diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
index 86b5b44e48be..233120cc6f37 100644
--- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
@@ -262,8 +262,9 @@ bool ORelationTableView::RemoveConnection(VclPtr<OTableConnection>& rConn, bool
ORelationTableConnectionData* pTabConnData = static_cast<ORelationTableConnectionData*>(rConn->GetData().get());
try
{
- if ( m_bInRemove || pTabConnData->DropRelation())
- return OJoinTableView::RemoveConnection(rConn, true);
+ if (!m_bInRemove)
+ pTabConnData->DropRelation();
+ return OJoinTableView::RemoveConnection(rConn, true);
}
catch(SQLException& e)
{