summaryrefslogtreecommitdiff
path: root/reportdesign/java
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2008-06-16 12:05:57 +0000
committerRüdiger Timm <rt@openoffice.org>2008-06-16 12:05:57 +0000
commit6b8c57d0f4acda91e497a7b45e609220d7241860 (patch)
tree2fc411009856860429f75579671a8557c7fcd8e6 /reportdesign/java
parentc0731f53a89951ded59fc5f4d0007be0a23df6d4 (diff)
INTEGRATION: CWS rptchart02 (1.1.2); FILE ADDED
2008/05/22 08:09:06 oj 1.1.2.1: #i86902#
Diffstat (limited to 'reportdesign/java')
-rw-r--r--reportdesign/java/com/sun/star/report/pentaho/PentahoFormulaContext.java102
1 files changed, 102 insertions, 0 deletions
diff --git a/reportdesign/java/com/sun/star/report/pentaho/PentahoFormulaContext.java b/reportdesign/java/com/sun/star/report/pentaho/PentahoFormulaContext.java
new file mode 100644
index 000000000000..60d55852907f
--- /dev/null
+++ b/reportdesign/java/com/sun/star/report/pentaho/PentahoFormulaContext.java
@@ -0,0 +1,102 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: PentahoFormulaContext.java,v $
+ * $Revision: 1.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+package com.sun.star.report.pentaho;
+
+import org.jfree.formula.ContextEvaluationException;
+import org.jfree.formula.FormulaContext;
+import org.jfree.formula.LocalizationContext;
+import org.jfree.formula.function.FunctionRegistry;
+import org.jfree.formula.operators.OperatorFactory;
+import org.jfree.formula.typing.Type;
+import org.jfree.formula.typing.TypeRegistry;
+import org.jfree.formula.typing.coretypes.AnyType;
+import org.jfree.report.util.ReportParameters;
+import org.jfree.util.Configuration;
+
+/**
+ *
+ * @author Ocke Janssen
+ */
+public class PentahoFormulaContext implements FormulaContext
+{
+
+ private FormulaContext backend;
+ private Configuration config;
+
+ public PentahoFormulaContext(final FormulaContext backend, final Configuration _config)
+ {
+ this.backend = backend;
+ config = _config;
+ }
+
+ public LocalizationContext getLocalizationContext()
+ {
+ return backend.getLocalizationContext();
+ }
+
+ public Configuration getConfiguration()
+ {
+ return config;
+ }
+
+ public FunctionRegistry getFunctionRegistry()
+ {
+ return backend.getFunctionRegistry();
+ }
+
+ public TypeRegistry getTypeRegistry()
+ {
+ return backend.getTypeRegistry();
+ }
+
+ public OperatorFactory getOperatorFactory()
+ {
+ return backend.getOperatorFactory();
+ }
+
+ public Type resolveReferenceType(final Object name) throws ContextEvaluationException
+ {
+ return backend.resolveReferenceType(name);
+ }
+
+ public Object resolveReference(final Object name) throws ContextEvaluationException
+ {
+ if (name == null)
+ {
+ throw new NullPointerException();
+ }
+ return backend.resolveReference(name);
+ }
+
+ public boolean isReferenceDirty(final Object name) throws ContextEvaluationException
+ {
+ return backend.isReferenceDirty(name);
+ }
+}