diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2012-11-01 09:56:58 +0100 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2012-11-02 10:50:55 +0100 |
commit | 76dd7fc60ba06846fe9af28c3ebdeb0dec6147cf (patch) | |
tree | c2c4e0eb0d2663ff48a852fa3b058f0640797bde /dbaccess | |
parent | optimisation: take ref to OUString instead of constructing temp object (diff) | |
download | core-76dd7fc60ba06846fe9af28c3ebdeb0dec6147cf.tar.gz core-76dd7fc60ba06846fe9af28c3ebdeb0dec6147cf.zip |
Don't abort when column has no (Catalog|Schema|Table)Name
Especially since the rest of the function is prepared to handle
no/empty (Catalog|Schema|Table)Name.
Change-Id: Ic0bb59ead5789e671c90887ef850588f4924f5e7
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/api/SingleSelectQueryComposer.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx index faef30832cc1..b3caf704db5e 100644 --- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx +++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx @@ -1290,9 +1290,12 @@ sal_Bool OSingleSelectQueryComposer::setComparsionPredicate(OSQLParseNode * pCon if(m_pTables && m_pTables->getCount() > 1) { ::rtl::OUString aCatalog,aSchema,aTable,aComposedName,aColumnName; - column->getPropertyValue(PROPERTY_CATALOGNAME) >>= aCatalog; - column->getPropertyValue(PROPERTY_SCHEMANAME) >>= aSchema; - column->getPropertyValue(PROPERTY_TABLENAME) >>= aTable; + if(column->getPropertySetInfo()->hasPropertyByName(PROPERTY_CATALOGNAME)) + column->getPropertyValue(PROPERTY_CATALOGNAME) >>= aCatalog; + if(column->getPropertySetInfo()->hasPropertyByName(PROPERTY_SCHEMANAME)) + column->getPropertyValue(PROPERTY_SCHEMANAME) >>= aSchema; + if(column->getPropertySetInfo()->hasPropertyByName(PROPERTY_TABLENAME)) + column->getPropertyValue(PROPERTY_TABLENAME) >>= aTable; column->getPropertyValue(PROPERTY_NAME) >>= aColumnName; Sequence< ::rtl::OUString> aNames(m_pTables->getElementNames()); |