From 76dd7fc60ba06846fe9af28c3ebdeb0dec6147cf Mon Sep 17 00:00:00 2001 From: Lionel Elie Mamane Date: Thu, 1 Nov 2012 09:56:58 +0100 Subject: 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 --- dbaccess/source/core/api/SingleSelectQueryComposer.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'dbaccess') 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()); -- cgit