[PATCH libreoffice-4-0] reportbuilder: do not use empty tablename

Lionel Elie Mamane (via Code Review) gerrit at gerrit.libreoffice.org
Thu Apr 11 08:05:11 PDT 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3341

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/41/3341/1

reportbuilder: do not use empty tablename

Change-Id: I03ed5e810468ee206820a250c740b80c0ceda432
---
M reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java
1 file changed, 9 insertions(+), 1 deletion(-)



diff --git a/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java b/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java
index d0168a6..d940718 100644
--- a/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java
+++ b/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java
@@ -253,7 +253,15 @@
                             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.length() > 0)
+                                {
+                                    prefix = quote + prefix + quote + ".";
+                                }
+                                expression = prefix + quote + expression + quote;
                             }
                             catch (Exception ex)
                             {

-- 
To view, visit https://gerrit.libreoffice.org/3341
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I03ed5e810468ee206820a250c740b80c0ceda432
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Lionel Elie Mamane <lionel at mamane.lu>



More information about the LibreOffice mailing list