diff options
Diffstat (limited to 'reportbuilder/java')
-rw-r--r-- | reportbuilder/java/org/libreoffice/report/pentaho/SOFormulaParser.java | 6 | ||||
-rw-r--r-- | reportbuilder/java/org/libreoffice/report/pentaho/StarFunctionDescription.java | 6 |
2 files changed, 3 insertions, 9 deletions
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/SOFormulaParser.java b/reportbuilder/java/org/libreoffice/report/pentaho/SOFormulaParser.java index 7918826702ea..24bf1a682d3e 100644 --- a/reportbuilder/java/org/libreoffice/report/pentaho/SOFormulaParser.java +++ b/reportbuilder/java/org/libreoffice/report/pentaho/SOFormulaParser.java @@ -64,7 +64,6 @@ public final class SOFormulaParser extends ComponentBase public static final int UNARY_OPERATORS = 2; public static final int BINARY_OPERATORS = 3; public static final int FUNCTIONS = 4; - private final XComponentContext m_xContext; private final PropertySetMixin m_prophlp; private static final String __serviceName = "com.sun.star.report.meta.FormulaParser"; private static final String OPERATORS = "org.pentaho.reporting.libraries.formula.operators."; @@ -82,14 +81,13 @@ public final class SOFormulaParser extends ComponentBase public SOFormulaParser(final XComponentContext context) { - m_xContext = context; final ClassLoader cl = java.lang.Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader()); parser = new FormulaParser(); try { - final XFormulaOpCodeMapper mapper = UnoRuntime.queryInterface(XFormulaOpCodeMapper.class, m_xContext.getServiceManager().createInstanceWithContext("simple.formula.FormulaOpCodeMapperObj", m_xContext)); + final XFormulaOpCodeMapper mapper = UnoRuntime.queryInterface(XFormulaOpCodeMapper.class, context.getServiceManager().createInstanceWithContext("simple.formula.FormulaOpCodeMapperObj", context)); FormulaOpCodeMapEntry[] opCodes = mapper.getAvailableMappings(FormulaLanguage.ODFF, FormulaMapGroup.FUNCTIONS); final DefaultFormulaContext defaultContext = new DefaultFormulaContext(); final FunctionRegistry functionRegistry = defaultContext.getFunctionRegistry(); @@ -136,7 +134,7 @@ public final class SOFormulaParser extends ComponentBase // for your optional attributes if necessary. See the documentation // of the PropertySetMixin helper for further information. // Ensure that your attributes are initialized correctly! - m_prophlp = new PropertySetMixin(m_xContext, this, + m_prophlp = new PropertySetMixin(context, this, new Type(com.sun.star.report.meta.XFormulaParser.class), null); } diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/StarFunctionDescription.java b/reportbuilder/java/org/libreoffice/report/pentaho/StarFunctionDescription.java index 832137e2a4f4..b743ae08e4a1 100644 --- a/reportbuilder/java/org/libreoffice/report/pentaho/StarFunctionDescription.java +++ b/reportbuilder/java/org/libreoffice/report/pentaho/StarFunctionDescription.java @@ -34,17 +34,13 @@ public final class StarFunctionDescription extends WeakBase implements com.sun.star.report.meta.XFunctionDescription { - private final XComponentContext m_xContext; private final PropertySetMixin m_prophlp; - // attributes -// final private com.sun.star.report.meta.XFunctionCategory m_Category; private final FunctionDescription functionDescription; private final XFunctionCategory category; private final Locale defaultLocale; public StarFunctionDescription(final DefaultFormulaContext defaultContext, final XComponentContext context, final XFunctionCategory category, final FunctionDescription functionDescription) { - m_xContext = context; this.category = category; Locale locale; try @@ -63,7 +59,7 @@ public final class StarFunctionDescription extends WeakBase // for your optional attributes if necessary. See the documentation // of the PropertySetMixin helper for further information. // Ensure that your attributes are initialized correctly! - m_prophlp = new PropertySetMixin(m_xContext, this, + m_prophlp = new PropertySetMixin(context, this, new Type(com.sun.star.report.meta.XFunctionDescription.class), null); } |