diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2007-09-26 13:53:09 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2007-09-26 13:53:09 +0000 |
commit | 3bc972bf1aea0aeb788228a3175333f3a2705745 (patch) | |
tree | 0e0dcd09758f4bf0897f1f6e108c64743a7a8b68 /dbaccess/source/ui/relationdesign | |
parent | ea98a8aabc1405593f98ef811e04e2b804c44bc7 (diff) |
INTEGRATION: CWS dba24a (1.12.120); FILE MERGED
2007/09/25 11:24:07 oj 1.12.120.1: #i81922# new method to compare relation data
Diffstat (limited to 'dbaccess/source/ui/relationdesign')
-rw-r--r-- | dbaccess/source/ui/relationdesign/RTableConnectionData.cxx | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx index efe85bf162f4..7f6a65556eaa 100644 --- a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx +++ b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx @@ -4,9 +4,9 @@ * * $RCSfile: RTableConnectionData.cxx,v $ * - * $Revision: 1.12 $ + * $Revision: 1.13 $ * - * last change: $Author: obo $ $Date: 2006-09-17 07:27:51 $ + * last change: $Author: hr $ $Date: 2007-09-26 14:53:09 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -382,7 +382,33 @@ ORelationTableConnectionData& ORelationTableConnectionData::operator=( const ORe return *this; } - +namespace dbaui +{ +//------------------------------------------------------------------------- +bool operator==(const ORelationTableConnectionData& lhs, const ORelationTableConnectionData& rhs) +{ + bool bEqual = (lhs.m_nUpdateRules == rhs.m_nUpdateRules) + && (lhs.m_nDeleteRules == rhs.m_nDeleteRules) + && (lhs.m_nCardinality == rhs.m_nCardinality) + && (lhs.m_aSourceWinName == rhs.m_aSourceWinName) + && (lhs.m_aDestWinName == rhs.m_aDestWinName) + && (lhs.m_aConnName == rhs.m_aConnName) + && (lhs.m_vConnLineData.size() == rhs.m_vConnLineData.size()); + + if ( bEqual ) + { + std::vector< OConnectionLineDataRef >::const_iterator aIter = lhs.m_vConnLineData.begin(); + std::vector< OConnectionLineDataRef >::const_iterator aEnd = lhs.m_vConnLineData.end(); + for (sal_Int32 i = 0; aIter != aEnd; ++aIter,++i) + { + if ( *(rhs.m_vConnLineData[i]) != **aIter ) + break; + } + bEqual = aIter == aEnd; + } + return bEqual; +} +} //------------------------------------------------------------------------ BOOL ORelationTableConnectionData::Update() { |