summaryrefslogtreecommitdiff
path: root/reportbuilder
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2013-04-10 18:03:58 +0200
committerFridrich Strba <fridrich@documentfoundation.org>2013-04-15 07:25:42 +0000
commit8bd84f28561a68aebcf59384de0f6b07819ede99 (patch)
tree6f6fba8a0c5cc732c611acc12afe0e808a02182c /reportbuilder
parent94cb2604ea75a504ecab5f500701099e00859b7c (diff)
reportbuilder: do not use empty tablename
Change-Id: I03ed5e810468ee206820a250c740b80c0ceda432 Reviewed-on: https://gerrit.libreoffice.org/3341 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'reportbuilder')
-rw-r--r--reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java b/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java
index d0168a645db1..d9407185ef6a 100644
--- a/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java
+++ b/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java
@@ -253,7 +253,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.length() > 0)
+ {
+ prefix = quote + prefix + quote + ".";
+ }
+ expression = prefix + quote + expression + quote;
}
catch (Exception ex)
{