diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2012-12-12 16:24:45 +0100 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2012-12-12 16:34:49 +0100 |
commit | e6734050e9c6f67827fdd28a84df1fe7f0cc7de9 (patch) | |
tree | 5d83de40321bccd51e644de21d464f230b5c28d7 /dbaccess | |
parent | b46be146a4e18cfef197e236084202b6281c8191 (diff) |
query design / edit join: valid only iif column names everywhere
Change-Id: Idfb0e16c4cc2581a46e26fe97948897dc4b11dc0
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/control/RelationControl.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx index 771e1b20eef8..316e8a711a83 100644 --- a/dbaccess/source/ui/control/RelationControl.cxx +++ b/dbaccess/source/ui/control/RelationControl.cxx @@ -624,7 +624,17 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent // Enable/disable the OK button, depending on having a valid situation TTableConnectionData::value_type pConnData = m_pRC_Tables->getData(); const OConnectionLineDataVec* pLines = pConnData->GetConnLineDataList(); - m_pParentDialog->setValid(!pLines->empty()); + bool bValid = !pLines->empty(); + if (bValid) + { + OConnectionLineDataVec::const_iterator l(pLines->begin()); + const OConnectionLineDataVec::const_iterator le(pLines->end()); + for (; bValid && l!=le; ++l) + { + bValid = ! ((*l)->GetSourceFieldName().isEmpty() || (*l)->GetDestFieldName().isEmpty()); + } + } + m_pParentDialog->setValid(bValid); if ( pLines->size() >= static_cast<sal_uInt32>(m_pRC_Tables->GetRowCount()) ) { |