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:37:23 +0100 |
commit | 9503a458f9bf6e422710d30db617d42d7eaea02d (patch) | |
tree | e084096f98ed1c47d0764893eebcfd84acfc7026 /dbaccess | |
parent | be more cautious in debug mode (diff) | |
download | core-9503a458f9bf6e422710d30db617d42d7eaea02d.tar.gz core-9503a458f9bf6e422710d30db617d42d7eaea02d.zip |
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()) ) { |