[Libreoffice-commits] core.git: reportbuilder/java wizards/com

Noel Grandin noel at peralex.com
Fri Aug 29 04:15:42 PDT 2014


 reportbuilder/java/org/libreoffice/report/pentaho/SOFormulaParser.java    |    2 
 reportbuilder/java/org/libreoffice/report/pentaho/SOReportJobFactory.java |   37 +++++++++-
 wizards/com/sun/star/wizards/form/CallFormWizard.java                     |    2 
 wizards/com/sun/star/wizards/query/CallQueryWizard.java                   |    2 
 4 files changed, 39 insertions(+), 4 deletions(-)

New commits:
commit 610cfb377161a84f24c9022fc04cf7cb55d74ea9
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Aug 29 13:13:26 2014 +0200

    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

diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/SOFormulaParser.java b/reportbuilder/java/org/libreoffice/report/pentaho/SOFormulaParser.java
index d6cde5d..7918826 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 6ed6ec7..b9a0c2d 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;
+    }
 
 }
diff --git a/wizards/com/sun/star/wizards/form/CallFormWizard.java b/wizards/com/sun/star/wizards/form/CallFormWizard.java
index 1d72909..a73391a 100644
--- a/wizards/com/sun/star/wizards/form/CallFormWizard.java
+++ b/wizards/com/sun/star/wizards/form/CallFormWizard.java
@@ -51,7 +51,7 @@ public class CallFormWizard
     /** This class implements the component. At least the interfaces XServiceInfo,
      * XTypeProvider, and XInitialization should be provided by the service.
      */
-    private static class FormWizardImplementation extends com.sun.star.lib.uno.helper.PropertySet implements com.sun.star.lang.XInitialization, com.sun.star.lang.XServiceInfo, com.sun.star.task.XJobExecutor
+    public static class FormWizardImplementation extends com.sun.star.lib.uno.helper.PropertySet implements com.sun.star.lang.XInitialization, com.sun.star.lang.XServiceInfo, com.sun.star.task.XJobExecutor
     {
         private PropertyValue[] m_wizardContext;
 
diff --git a/wizards/com/sun/star/wizards/query/CallQueryWizard.java b/wizards/com/sun/star/wizards/query/CallQueryWizard.java
index 7a966bd..229caff 100644
--- a/wizards/com/sun/star/wizards/query/CallQueryWizard.java
+++ b/wizards/com/sun/star/wizards/query/CallQueryWizard.java
@@ -53,7 +53,7 @@ public class CallQueryWizard
     /** This class implements the component. At least the interfaces XServiceInfo,
      * XTypeProvider, and XInitialization should be provided by the service.
      */
-    private static class QueryWizardImplementation extends com.sun.star.lib.uno.helper.PropertySet implements com.sun.star.lang.XInitialization, com.sun.star.lang.XServiceInfo, com.sun.star.task.XJobExecutor
+    public static class QueryWizardImplementation extends com.sun.star.lib.uno.helper.PropertySet implements com.sun.star.lang.XInitialization, com.sun.star.lang.XServiceInfo, com.sun.star.task.XJobExecutor
     {
         private PropertyValue[] m_wizardContext;
 


More information about the Libreoffice-commits mailing list