[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - reportbuilder/java
Lionel Elie Mamane
lionel at mamane.lu
Mon Apr 15 00:26:02 PDT 2013
reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
New commits:
commit 8bd84f28561a68aebcf59384de0f6b07819ede99
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
Reviewed-on: https://gerrit.libreoffice.org/3341
Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
Tested-by: Fridrich Strba <fridrich at documentfoundation.org>
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 @@ 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)
{
More information about the Libreoffice-commits
mailing list