diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-29 13:13:26 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-29 13:14:58 +0200 |
commit | 610cfb377161a84f24c9022fc04cf7cb55d74ea9 (patch) | |
tree | f37315822034ee6520b0fff7a144edbfe40a2a71 /reportbuilder | |
parent | 7da6716e98f22d6cb968c3218b5f4936f868a977 (diff) |
java: fix reportbuilder and wizard
which I broke in commits
70f56bc22fe95 "java: reduce scope, make member classes private"
and
34bcf9b498b "java: remove dead methods"
Change-Id: Id21482782bbc102e60f346a2bf51096af2fcbe22
Diffstat (limited to 'reportbuilder')
-rw-r--r-- | reportbuilder/java/org/libreoffice/report/pentaho/SOFormulaParser.java | 2 | ||||
-rw-r--r-- | reportbuilder/java/org/libreoffice/report/pentaho/SOReportJobFactory.java | 37 |
2 files changed, 37 insertions, 2 deletions
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/SOFormulaParser.java b/reportbuilder/java/org/libreoffice/report/pentaho/SOFormulaParser.java index d6cde5da4776..7918826702ea 100644 --- a/reportbuilder/java/org/libreoffice/report/pentaho/SOFormulaParser.java +++ b/reportbuilder/java/org/libreoffice/report/pentaho/SOFormulaParser.java @@ -329,7 +329,7 @@ public final class SOFormulaParser extends ComponentBase * This method is a simple helper function to used in the static component initialisation functions as well as * in getSupportedServiceNames. */ - private static String[] getServiceNames() + public static String[] getServiceNames() { return new String[] { diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/SOReportJobFactory.java b/reportbuilder/java/org/libreoffice/report/pentaho/SOReportJobFactory.java index 6ed6ec73f4e8..b9a0c2d42511 100644 --- a/reportbuilder/java/org/libreoffice/report/pentaho/SOReportJobFactory.java +++ b/reportbuilder/java/org/libreoffice/report/pentaho/SOReportJobFactory.java @@ -30,6 +30,8 @@ import com.sun.star.lang.IllegalArgumentException; import com.sun.star.lang.WrappedTargetException; import com.sun.star.lang.XInitialization; import com.sun.star.lang.XServiceInfo; +import com.sun.star.lang.XSingleComponentFactory; +import com.sun.star.lib.uno.helper.Factory; import com.sun.star.lib.uno.helper.PropertySetMixin; import com.sun.star.lib.uno.helper.WeakBase; import com.sun.star.registry.InvalidRegistryException; @@ -74,7 +76,7 @@ public class SOReportJobFactory { } - private static class _SOReportJobFactory extends WeakBase implements XInitialization, XServiceInfo, XJob, XPropertySet, ReportJobFactory + public static class _SOReportJobFactory extends WeakBase implements XInitialization, XServiceInfo, XJob, XPropertySet, ReportJobFactory { private static final Log LOGGER = LogFactory.getLog(_SOReportJobFactory.class); @@ -381,5 +383,38 @@ public class SOReportJobFactory } } + /** + * Gives a factory for creating the service. This method is called by the <code>JavaLoader</code> + * <p/> + * + * @param sImplName the name of the implementation for which a service is desired + * @return returns a <code>XSingleComponentFactory</code> for creating the component + * @see com.sun.star.comp.loader.JavaLoader + */ + public static XSingleComponentFactory __getComponentFactory(final String sImplName) + { + XSingleComponentFactory xFactory = null; + + try + { + if (sImplName.equals(_SOReportJobFactory.class.getName())) + { + xFactory = Factory.createComponentFactory(_SOReportJobFactory.class, _SOReportJobFactory.getServiceNames()); + } + else if (sImplName.equals(SOFunctionManager.class.getName())) + { + xFactory = Factory.createComponentFactory(SOFunctionManager.class, SOFunctionManager.getServiceNames()); + } + else if (sImplName.equals(SOFormulaParser.class.getName())) + { + xFactory = Factory.createComponentFactory(SOFormulaParser.class, SOFormulaParser.getServiceNames()); + } + } + catch (java.lang.IncompatibleClassChangeError e2) + { + } + + return xFactory; + } } |