diff options
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; |