diff options
author | Ocke Janssen [oj] <Ocke.Janssen@sun.com> | 2010-01-07 09:16:59 +0100 |
---|---|---|
committer | Ocke Janssen [oj] <Ocke.Janssen@sun.com> | 2010-01-07 09:16:59 +0100 |
commit | 8aa99f59a4ab4fba762c072b210620aa9f6a8ddd (patch) | |
tree | 7b5fa3c10f8a18a1ac2b085dfa1e79740cbbdf46 /reportbuilder/java | |
parent | b940775418226784f68a5ecdb74e9f5400241318 (diff) |
check already quoted expression
Diffstat (limited to 'reportbuilder/java')
-rw-r--r-- | reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java | 4 | ||||
-rw-r--r-- | reportbuilder/java/com/sun/star/report/pentaho/PentahoReportJob.java | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java b/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java index 5c3032e3a7f9..cbd215220bc9 100644 --- a/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java +++ b/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java @@ -210,7 +210,7 @@ public class SDBCReportDataFactory implements DataSourceFactory final Boolean escapeProcessing = (Boolean) parameters.get(ESCAPE_PROCESSING); final String filter = (String) parameters.get(UNO_FILTER); final Integer maxRows = (Integer) parameters.get("MaxRows"); - RowSetProperties rowSetProps = new RowSetProperties(escapeProcessing, commandType, command, filter, maxRows); + final RowSetProperties rowSetProps = new RowSetProperties(escapeProcessing, commandType, command, filter, maxRows); final Object[] p = createRowSet(rowSetProps, parameters); final XRowSet rowSet = (XRowSet) p[0]; @@ -260,7 +260,7 @@ public class SDBCReportDataFactory implements DataSourceFactory final Object[] pair = (Object[]) groupExpressions.get(i); String expression = (String) pair[0]; - if (columns.hasByName(expression)) + if (!expression.startsWith(quote) && columns.hasByName(expression)) { expression = quote + expression + quote; } diff --git a/reportbuilder/java/com/sun/star/report/pentaho/PentahoReportJob.java b/reportbuilder/java/com/sun/star/report/pentaho/PentahoReportJob.java index 23f959e05943..6641092ca6ee 100644 --- a/reportbuilder/java/com/sun/star/report/pentaho/PentahoReportJob.java +++ b/reportbuilder/java/com/sun/star/report/pentaho/PentahoReportJob.java @@ -257,6 +257,11 @@ public class PentahoReportJob implements ReportJob if (parameters.length > 0) { String name = parameters[0].toString(); + if (parameters[0] instanceof ContextLookup) + { + final ContextLookup context = (ContextLookup) parameters[0]; + name = context.getName(); + } for (int j = 0; j < reportFunctions.length; j++) { if (reportFunctions[j] instanceof FormulaExpression) |