[Libreoffice-commits] .: Branch 'libreoffice-3-6' - dbaccess/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Nov 2 07:29:54 PDT 2012


 dbaccess/source/core/api/SingleSelectQueryComposer.cxx |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit af7141ee109ea9fa73866d3663ef5f1b73dfc30a
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Thu Nov 1 09:56:58 2012 +0100

    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 at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index 01d8cbd..7b1cd80 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());


More information about the Libreoffice-commits mailing list