diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2013-07-11 16:40:10 +0200 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2013-07-11 17:53:28 +0200 |
commit | 48e5349a6e7f155e8709c4e9d0839eea51d57557 (patch) | |
tree | e5b4fe9ddaeab30d562f18fe5b935df7d2bcc17a /connectivity/source/parse | |
parent | 72e71b829d43144c2991b589b0db96097d7f4fb7 (diff) |
lcl_getColumnRange: no table range -> match 1st name-matching select column
as opposed to no match
Change-Id: I811abd9df5b6cc617c28ab330cecb406cd11e709
Diffstat (limited to 'connectivity/source/parse')
-rw-r--r-- | connectivity/source/parse/sqliterator.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx index 0ae7b834ff03..fa605a45a487 100644 --- a/connectivity/source/parse/sqliterator.cxx +++ b/connectivity/source/parse/sqliterator.cxx @@ -751,8 +751,11 @@ namespace OUString sName, sTableName; xColumn->getPropertyValue( OMetaConnection::getPropMap().getNameByIndex( PROPERTY_ID_REALNAME ) ) >>= sName; xColumn->getPropertyValue( OMetaConnection::getPropMap().getNameByIndex( PROPERTY_ID_TABLENAME ) ) >>= sTableName; - if ( sName == _out_rColumnName && sTableName == _out_rTableRange ) + if ( sName == _out_rColumnName && ( _out_rTableRange.isEmpty() || sTableName == _out_rTableRange ) ) + { xColumn->getPropertyValue( OMetaConnection::getPropMap().getNameByIndex( PROPERTY_ID_NAME ) ) >>= _out_rColumnAliasIfPresent; + break; + } } catch( const Exception& ) { |