summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2012-11-01 09:56:58 +0100
committerPetr Mladek <pmladek@suse.cz>2012-11-05 17:48:31 +0100
commit79c5b880e17a134d7ed77b567222da09adbc1a0d (patch)
treecb87b01795deeb91b48b80f122bd6f3495d32050
parentc58a547bce19ba432b0f5fbace6b936e5beafac5 (diff)
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 Reviewed-on: https://gerrit.libreoffice.org/968 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--dbaccess/source/core/api/SingleSelectQueryComposer.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index 01d8cbd06268..7b1cd8099449 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -1301,9 +1301,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());