diff options
author | Ocke Janssen [oj] <Ocke.Janssen@sun.com> | 2009-11-25 10:12:45 +0100 |
---|---|---|
committer | Ocke Janssen [oj] <Ocke.Janssen@sun.com> | 2009-11-25 10:12:45 +0100 |
commit | 510361e19b2e8f0955795a6007c0baf8cbafc9cd (patch) | |
tree | 206c8ec0d5b53de157702afe157c7176d46c8ef7 /reportbuilder/java | |
parent | b5c8e3b6159c0874a284ae6181b3b7b8c5fb0dd3 (diff) |
dba33d: #i104712# qurtal expression fixed
Diffstat (limited to 'reportbuilder/java')
-rw-r--r-- | reportbuilder/java/com/sun/star/report/pentaho/PentahoReportJob.java | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/PentahoReportJob.java b/reportbuilder/java/com/sun/star/report/pentaho/PentahoReportJob.java index fbfa211e112c..23f959e05943 100644 --- a/reportbuilder/java/com/sun/star/report/pentaho/PentahoReportJob.java +++ b/reportbuilder/java/com/sun/star/report/pentaho/PentahoReportJob.java @@ -265,18 +265,22 @@ public class PentahoReportJob implements ReportJob if (reportExp.getName().equals(name)) { - final LValue val = parser.parse(reportExp.getFormulaExpression()); - if (val instanceof FormulaFunction) + LValue val = parser.parse(reportExp.getFormulaExpression()); + while( !(val instanceof ContextLookup)) { - final FormulaFunction reportFunction = (FormulaFunction) val; - - final ContextLookup context = (ContextLookup) reportFunction.getChildValues()[0]; - name = context.getName(); + if (val instanceof Term) + { + val = ((Term)val).getHeadValue(); + } + else if (val instanceof FormulaFunction) + { + final FormulaFunction reportFunction = (FormulaFunction) val; + val = reportFunction.getChildValues()[0]; + } } - else if (val instanceof Term) + if (val instanceof ContextLookup) { - final Term term = (Term) val; - final ContextLookup context = (ContextLookup) term.getHeadValue().getChildValues()[0]; + final ContextLookup context = (ContextLookup) val; name = context.getName(); } break; |