diff options
author | Ocke Janssen <oj@openoffice.org> | 2002-07-26 08:09:41 +0000 |
---|---|---|
committer | Ocke Janssen <oj@openoffice.org> | 2002-07-26 08:09:41 +0000 |
commit | 08f66dba02e564ef6eef637046e0721aa3c0eb25 (patch) | |
tree | f87880e9d75e4cc4b3658f927718ee1a8e142795 /connectivity | |
parent | ae6864fbf8f5e7df8002c78b85f6fa356d702e1c (diff) |
#101733# fix column matching for double column names in a table
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/file/FResultSet.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx index 0cdf002bb60c..6b621e4c87a6 100644 --- a/connectivity/source/drivers/file/FResultSet.cxx +++ b/connectivity/source/drivers/file/FResultSet.cxx @@ -2,9 +2,9 @@ * * $RCSfile: FResultSet.cxx,v $ * - * $Revision: 1.83 $ + * $Revision: 1.84 $ * - * last change: $Author: oj $ $Date: 2002-07-05 07:57:45 $ + * last change: $Author: oj $ $Date: 2002-07-26 09:09:41 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1685,12 +1685,15 @@ void OResultSet::setBoundedColumns(const OValueRow& _rRow, const ::rtl::OUString sRealName = OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_REALNAME); const ::rtl::OUString sType = OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE); + typedef ::std::map<OSQLColumns::iterator,sal_Bool> IterMap; + IterMap aSelectIters; OValueVector::iterator aRowIter = _rRow->begin()+1; for (sal_Int32 i=0; // the first column is the bookmark column aRowIter != _rRow->end(); ++i, ++aRowIter ) { + aRowIter->setBound(sal_False); try { // get the table column and it's name @@ -1713,8 +1716,9 @@ void OResultSet::setBoundedColumns(const OValueRow& _rRow, else (*aIter)->getPropertyValue(sName) >>= sSelectColumnRealName; - if (aCase(sTableColumnName, sSelectColumnRealName)) + if ( aCase(sTableColumnName, sSelectColumnRealName) && !aRowIter->isBound() && aSelectIters.end() == aSelectIters.find(aIter) ) { + aSelectIters.insert(IterMap::value_type(aIter,sal_True)); if(_bSetColumnMapping) { sal_Int32 nSelectColumnPos = aIter - _rxColumns->begin() + 1; @@ -1729,6 +1733,8 @@ void OResultSet::setBoundedColumns(const OValueRow& _rRow, if (xTableColumn.is()) xTableColumn->getPropertyValue(sType) >>= nType; aRowIter->setTypeKind(nType); + + break; } } } |