[Libreoffice-commits] core.git: reportbuilder/java

Lionel Elie Mamane lionel at mamane.lu
Wed Apr 10 09:16:31 PDT 2013


 reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit eb39389da846a5d31acbfeab029ca0dacbc5f02c
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Wed Apr 10 18:03:58 2013 +0200

    reportbuilder: do not use empty tablename
    
    Change-Id: I03ed5e810468ee206820a250c740b80c0ceda432

diff --git a/reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java b/reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java
index 24e1fe1..4d0a797 100644
--- a/reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java
+++ b/reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java
@@ -254,7 +254,15 @@ public class SDBCReportDataFactory implements DataSourceFactory
                             try
                             {
                                 column = UnoRuntime.queryInterface(XPropertySet.class, columns.getByName(expression));
-                                expression = quote + column.getPropertyValue("TableName") + quote + "." + quote + expression + quote;
+                                String prefix;
+                                prefix = (String)column.getPropertyValue("TableName");
+                                if (prefix == null)
+                                    prefix = "";
+                                if (!prefix.isEmpty())
+                                {
+                                    prefix = quote + prefix + quote + ".";
+                                }
+                                expression = prefix + quote + expression + quote;
                             }
                             catch (Exception ex)
                             {


More information about the Libreoffice-commits mailing list