diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2015-01-28 18:24:40 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-02-03 09:51:16 +0000 |
commit | 3b09ae20a3ed526cd80fe27be785e8bc9ff2ce5e (patch) | |
tree | bf47493acbea30d5344a7337fc1aacbc20c8be9e /connectivity | |
parent | 5781e575c6d0ad38f7eb591b88d4d588351247d0 (diff) |
Query Design: use correct name for columns that come from another query.
Change-Id: I25b4ccdc2f50ba89687e1f4c871f286251a28e21
Reviewed-on: https://gerrit.libreoffice.org/14232
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/parse/sqlnode.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx index 37bfbdeda2a6..08e089d7478b 100644 --- a/connectivity/source/parse/sqlnode.cxx +++ b/connectivity/source/parse/sqlnode.cxx @@ -1158,7 +1158,8 @@ OUString OSQLParser::stringToDouble(const OUString& _rValue,sal_Int16 _nScale) OSQLParseNode* OSQLParser::predicateTree(OUString& rErrorMessage, const OUString& rStatement, const Reference< ::com::sun::star::util::XNumberFormatter > & xFormatter, - const Reference< XPropertySet > & xField) + const Reference< XPropertySet > & xField, + bool bUseRealName) { // Guard the parsing ::osl::MutexGuard aGuard(getMutex()); @@ -1182,7 +1183,7 @@ OSQLParseNode* OSQLParser::predicateTree(OUString& rErrorMessage, const OUString // #75243# use the RealName of the column if there is any otherwise the name which could be the alias // of the field Reference< XPropertySetInfo> xInfo = m_xField->getPropertySetInfo(); - if ( xInfo->hasPropertyByName(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_REALNAME))) + if ( bUseRealName && xInfo->hasPropertyByName(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_REALNAME))) m_xField->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_REALNAME)) >>= aString; else m_xField->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)) >>= aString; |