[Libreoffice-commits] core.git: 2 commits - desktop/Extension_test-passive.mk desktop/Jar_passive_java.mk desktop/Library_passive_native.mk desktop/Module_desktop.mk desktop/Pyuno_passive_python.mk desktop/Rdb_passive_generic.mk desktop/Rdb_passive_platform.mk desktop/test mysqlc/Extension_mysql-connector-ooo.mk nlpsolver/Extension_nlpsolver.mk reportbuilder/Extension_reportbuilder.mk Repository.mk sdext/Extension_minimizer.mk solenv/gbuild swext/Extension_wiki-publisher.mk

Stephan Bergmann sbergman at redhat.com
Thu Mar 7 02:14:25 PST 2013


 Repository.mk                                                                   |    2 
 desktop/Extension_test-passive.mk                                               |   27 ++
 desktop/Jar_passive_java.mk                                                     |   30 +++
 desktop/Library_passive_native.mk                                               |   26 ++
 desktop/Module_desktop.mk                                                       |   11 +
 desktop/Pyuno_passive_python.mk                                                 |   18 +
 desktop/Rdb_passive_generic.mk                                                  |   17 +
 desktop/Rdb_passive_platform.mk                                                 |   16 +
 desktop/test/deployment/passive/Dispatch.java                                   |   94 ----------
 desktop/test/deployment/passive/META-INF/manifest.xml                           |   31 +++
 desktop/test/deployment/passive/Provider.java                                   |   74 -------
 desktop/test/deployment/passive/Services.java                                   |   42 ----
 desktop/test/deployment/passive/com/sun/star/comp/test/deployment/Dispatch.java |   94 ++++++++++
 desktop/test/deployment/passive/com/sun/star/comp/test/deployment/Provider.java |   74 +++++++
 desktop/test/deployment/passive/com/sun/star/comp/test/deployment/Services.java |   42 ++++
 desktop/test/deployment/passive/manifest.xml                                    |   31 ---
 mysqlc/Extension_mysql-connector-ooo.mk                                         |    3 
 nlpsolver/Extension_nlpsolver.mk                                                |    3 
 reportbuilder/Extension_reportbuilder.mk                                        |    3 
 sdext/Extension_minimizer.mk                                                    |    3 
 solenv/gbuild/Extension.mk                                                      |   12 +
 solenv/gbuild/ExtensionTarget.mk                                                |    2 
 swext/Extension_wiki-publisher.mk                                               |    3 
 23 files changed, 414 insertions(+), 244 deletions(-)

New commits:
commit ffb1e88afae5b83d58337a84a27f9c6293f6fcd9
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Mar 7 11:05:57 2013 +0100

    Gbuild'ify desktop/test/deployment/passive/
    
    ...to manually build solver/*/bin/test-passive.oxt via "make
    Extension_test-passive".  There's still room for improvement in gbuild, though:
    
    * There should be no need to add the extension's native library and jar UNO
      components (which nothing else links againts) to the central Repository.mk.
    
    * There should be no need to move manifest.xml around.
    
    * There should be no need to move .java files around.
    
    * Let "make Extension_test-passive.clean" clean up again.
    
    Change-Id: Ib44558061c4c0fda6be5943bd02b5a42cd15c52e

diff --git a/Repository.mk b/Repository.mk
index 2e59486..95a69db 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -668,6 +668,7 @@ $(eval $(call gb_Helper_register_libraries,UNOVERLIBS, \
 $(eval $(call gb_Helper_register_libraries,EXTENSIONLIBS, \
 	SunPresentationMinimizer \
     mysqlc \
+    passive_native \
 ))
 
 $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
@@ -784,6 +785,7 @@ $(eval $(call gb_Helper_register_jars,OXT, \
 	EvolutionarySolver \
 	mediawiki \
 	nlpsolver \
+	passive_java \
 	sun-report-builder \
 ))
 
diff --git a/desktop/Extension_test-passive.mk b/desktop/Extension_test-passive.mk
new file mode 100644
index 0000000..354ce26
--- /dev/null
+++ b/desktop/Extension_test-passive.mk
@@ -0,0 +1,27 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Extension_Extension,test-passive,desktop/test/deployment/passive))
+
+$(eval $(call gb_Extension_add_file,test-passive,generic.components,$(call gb_Rdb_get_target,passive_generic)))
+
+$(eval $(call gb_Extension_add_file,test-passive,platform.components,$(call gb_Rdb_get_target,passive_platform)))
+
+$(eval $(call gb_Extension_add_files,test-passive,, \
+    $(SRCDIR)/desktop/test/deployment/passive/Addons.xcu \
+    $(SRCDIR)/desktop/test/deployment/passive/ProtocolHandler.xcu \
+    $(SRCDIR)/desktop/test/deployment/passive/passive_python.py \
+    $(call gb_Jar_get_outdir_target,passive_java) \
+))
+
+$(eval $(call gb_Extension_add_libraries,test-passive, \
+    passive_native \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/desktop/Jar_passive_java.mk b/desktop/Jar_passive_java.mk
new file mode 100644
index 0000000..e1023a5
--- /dev/null
+++ b/desktop/Jar_passive_java.mk
@@ -0,0 +1,30 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Jar_Jar,passive_java))
+
+$(eval $(call gb_Jar_add_sourcefiles,passive_java, \
+    desktop/test/deployment/passive/com/sun/star/comp/test/deployment/Dispatch \
+    desktop/test/deployment/passive/com/sun/star/comp/test/deployment/Provider \
+    desktop/test/deployment/passive/com/sun/star/comp/test/deployment/Services \
+))
+
+$(eval $(call gb_Jar_set_componentfile,passive_java,desktop/test/deployment/passive/passive_java,OXT))
+
+$(eval $(call gb_Jar_set_manifest,passive_java,$(SRCDIR)/desktop/test/deployment/passive/MANIFEST.MF))
+
+$(eval $(call gb_Jar_set_packageroot,passive_java,com))
+
+$(eval $(call gb_Jar_use_jars,passive_java, \
+    juh \
+    ridl \
+    unoil \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/desktop/Library_passive_native.mk b/desktop/Library_passive_native.mk
new file mode 100644
index 0000000..2181941
--- /dev/null
+++ b/desktop/Library_passive_native.mk
@@ -0,0 +1,26 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Library_Library,passive_native))
+
+$(eval $(call gb_Library_add_exception_objects,passive_native, \
+    desktop/test/deployment/passive/passive_native \
+))
+
+$(eval $(call gb_Library_set_componentfile,passive_native,desktop/test/deployment/passive/passive_native))
+
+$(eval $(call gb_Library_use_libraries,passive_native, \
+    cppu \
+    cppuhelper \
+    sal \
+))
+
+$(eval $(call gb_Library_use_sdk_api,passive_native))
+
+# vim: set noet sw=4 ts=4:
diff --git a/desktop/Module_desktop.mk b/desktop/Module_desktop.mk
index 1122360..538553a 100644
--- a/desktop/Module_desktop.mk
+++ b/desktop/Module_desktop.mk
@@ -131,4 +131,15 @@ $(eval $(call gb_Module_add_targets,desktop,\
 
 endif
 
+ifneq (,$(filter Extension_test-passive,$(MAKECMDGOALS)))
+$(eval $(call gb_Module_add_targets,desktop, \
+    Extension_test-passive \
+    Jar_passive_java \
+    Library_passive_native \
+    Pyuno_passive_python \
+    Rdb_passive_generic \
+    Rdb_passive_platform \
+))
+endif
+
 # vim: set ts=4 sw=4 et:
diff --git a/desktop/Pyuno_passive_python.mk b/desktop/Pyuno_passive_python.mk
new file mode 100644
index 0000000..d13431d
--- /dev/null
+++ b/desktop/Pyuno_passive_python.mk
@@ -0,0 +1,18 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Pyuno_Pyuno,passive_python,$(SRCDIR)/desktop/test/deployment/passive))
+
+$(eval $(call gb_Pyuno_add_files,passive_python, \
+    passive_python.py \
+))
+
+$(eval $(call gb_Pyuno_set_componentfile_full,passive_python,desktop/test/deployment/passive/passive_python,./,passive_python.py))
+
+# vim: set noet sw=4 ts=4:
diff --git a/desktop/Rdb_passive_generic.mk b/desktop/Rdb_passive_generic.mk
new file mode 100644
index 0000000..f05d9c2
--- /dev/null
+++ b/desktop/Rdb_passive_generic.mk
@@ -0,0 +1,17 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Rdb_Rdb,passive_generic))
+
+$(eval $(call gb_Rdb_add_components,passive_generic, \
+    desktop/test/deployment/passive/passive_java \
+    desktop/test/deployment/passive/passive_python \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/desktop/Rdb_passive_platform.mk b/desktop/Rdb_passive_platform.mk
new file mode 100644
index 0000000..72ffe6c
--- /dev/null
+++ b/desktop/Rdb_passive_platform.mk
@@ -0,0 +1,16 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Rdb_Rdb,passive_platform))
+
+$(eval $(call gb_Rdb_add_components,passive_platform, \
+    desktop/test/deployment/passive/passive_native \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/desktop/test/deployment/passive/Dispatch.java b/desktop/test/deployment/passive/Dispatch.java
deleted file mode 100644
index 762a09c..0000000
--- a/desktop/test/deployment/passive/Dispatch.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-package com.sun.star.comp.test.deployment.passive_java;
-
-import com.sun.star.awt.MessageBoxButtons;
-import com.sun.star.awt.Rectangle;
-import com.sun.star.awt.XMessageBox;
-import com.sun.star.awt.XMessageBoxFactory;
-import com.sun.star.awt.XWindowPeer;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.frame.DispatchDescriptor;
-import com.sun.star.frame.XDesktop;
-import com.sun.star.frame.XDispatch;
-import com.sun.star.frame.XStatusListener;
-import com.sun.star.lang.WrappedTargetRuntimeException;
-import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.lib.uno.helper.WeakBase;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.util.URL;
-
-public final class Dispatch extends WeakBase implements XServiceInfo, XDispatch
-{
-    public Dispatch(XComponentContext context) {
-        this.context = context;
-    }
-
-    public String getImplementationName() { return implementationName; }
-
-    public boolean supportsService(String ServiceName) {
-        return false; //TODO
-    }
-
-    public String[] getSupportedServiceNames() {
-        return serviceNames;
-    }
-
-    public void dispatch(URL URL, PropertyValue[] Arguments) {
-        try {
-            XMultiComponentFactory smgr = UnoRuntime.queryInterface(
-                XMultiComponentFactory.class, context.getServiceManager());
-            XMessageBox box = UnoRuntime.queryInterface(
-                XMessageBoxFactory.class,
-                smgr.createInstanceWithContext(
-                    "com.sun.star.awt.Toolkit", context)).
-                createMessageBox(
-                    UnoRuntime.queryInterface(
-                        XWindowPeer.class,
-                        (UnoRuntime.queryInterface(
-                            XDesktop.class,
-                            smgr.createInstanceWithContext(
-                                "com.sun.star.frame.Desktop", context)).
-                         getCurrentFrame().getComponentWindow())),
-                    new Rectangle(), "infobox", MessageBoxButtons.BUTTONS_OK,
-                    "passive", "java");
-            box.execute();
-            UnoRuntime.queryInterface(XComponent.class, box).dispose();
-        } catch (com.sun.star.uno.RuntimeException e) {
-            throw e;
-        } catch (com.sun.star.uno.Exception e) {
-            throw new WrappedTargetRuntimeException(
-                "wrapped: " + e.getMessage(), this, e);
-        }
-    }
-
-    public void addStatusListener(XStatusListener Control, URL URL) {}
-
-    public void removeStatusListener(XStatusListener Control, URL URL) {}
-
-    private final XComponentContext context;
-
-    static final String implementationName =
-        "com.sun.star.comp.test.deployment.passive_java_singleton";
-
-    static final String[] serviceNames = new String[0];
-}
diff --git a/desktop/test/deployment/passive/META-INF/manifest.xml b/desktop/test/deployment/passive/META-INF/manifest.xml
new file mode 100644
index 0000000..1d57a8e
--- /dev/null
+++ b/desktop/test/deployment/passive/META-INF/manifest.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ -->
+
+<m:manifest xmlns:m="http://openoffice.org/2001/manifest">
+  <m:file-entry m:media-type="application/vnd.sun.star.configuration-data"
+      m:full-path="Addons.xcu"/>
+  <m:file-entry m:media-type="application/vnd.sun.star.configuration-data"
+      m:full-path="ProtocolHandler.xcu"/>
+  <m:file-entry
+      m:media-type="application/vnd.sun.star.uno-components;platform=@PLATFORM@"
+      m:full-path="platform.components"/>
+  <m:file-entry
+      m:media-type="application/vnd.sun.star.uno-components"
+      m:full-path="generic.components"/>
+</m:manifest>
diff --git a/desktop/test/deployment/passive/Provider.java b/desktop/test/deployment/passive/Provider.java
deleted file mode 100644
index 13d59ec..0000000
--- a/desktop/test/deployment/passive/Provider.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-package com.sun.star.comp.test.deployment.passive_java;
-
-import com.sun.star.frame.DispatchDescriptor;
-import com.sun.star.frame.XDispatch;
-import com.sun.star.frame.XDispatchProvider;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.lib.uno.helper.WeakBase;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.util.URL;
-
-public final class Provider extends WeakBase
-    implements XServiceInfo, XDispatchProvider
-{
-    public Provider(XComponentContext context) {
-        this.context = context;
-    }
-
-    public String getImplementationName() { return implementationName; }
-
-    public boolean supportsService(String ServiceName) {
-        return ServiceName.equals(getSupportedServiceNames()[0]); //TODO
-    }
-
-    public String[] getSupportedServiceNames() {
-        return serviceNames;
-    }
-
-    public XDispatch queryDispatch(
-        URL URL, String TargetFrameName, int SearchFlags)
-    {
-        return UnoRuntime.queryInterface(
-            XDispatch.class,
-            context.getValueByName(
-                "/singletons/" +
-                "com.sun.star.test.deployment.passive_java_singleton"));
-    }
-
-    public XDispatch[] queryDispatches(DispatchDescriptor[] Requests) {
-        XDispatch[] s = new XDispatch[Requests.length];
-        for (int i = 0; i < s.length; ++i) {
-            s[i] = queryDispatch(
-                Requests[i].FeatureURL, Requests[i].FrameName,
-                Requests[i].SearchFlags);
-        }
-        return s;
-    }
-
-    private final XComponentContext context;
-
-    static final String implementationName =
-        "com.sun.star.comp.test.deployment.passive_java";
-
-    static final String[] serviceNames = new String[] {
-        "com.sun.star.test.deployment.passive_java" };
-}
diff --git a/desktop/test/deployment/passive/Services.java b/desktop/test/deployment/passive/Services.java
deleted file mode 100644
index b14ba71..0000000
--- a/desktop/test/deployment/passive/Services.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-package com.sun.star.comp.test.deployment.passive_java;
-
-import com.sun.star.lang.XSingleComponentFactory;
-import com.sun.star.lib.uno.helper.Factory;
-
-public final class Services {
-    private Services() {}
-
-    public static XSingleComponentFactory __getComponentFactory(
-        String implementation)
-    {
-        if (implementation.equals(Dispatch.implementationName)) {
-            return Factory.createComponentFactory(
-                Dispatch.class, Dispatch.implementationName,
-                Dispatch.serviceNames);
-        } else if (implementation.equals(Provider.implementationName)) {
-            return Factory.createComponentFactory(
-                Provider.class, Provider.implementationName,
-                Provider.serviceNames);
-        } else {
-            return null;
-        }
-    }
-}
diff --git a/desktop/test/deployment/passive/com/sun/star/comp/test/deployment/Dispatch.java b/desktop/test/deployment/passive/com/sun/star/comp/test/deployment/Dispatch.java
new file mode 100644
index 0000000..762a09c
--- /dev/null
+++ b/desktop/test/deployment/passive/com/sun/star/comp/test/deployment/Dispatch.java
@@ -0,0 +1,94 @@
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+package com.sun.star.comp.test.deployment.passive_java;
+
+import com.sun.star.awt.MessageBoxButtons;
+import com.sun.star.awt.Rectangle;
+import com.sun.star.awt.XMessageBox;
+import com.sun.star.awt.XMessageBoxFactory;
+import com.sun.star.awt.XWindowPeer;
+import com.sun.star.beans.PropertyValue;
+import com.sun.star.frame.DispatchDescriptor;
+import com.sun.star.frame.XDesktop;
+import com.sun.star.frame.XDispatch;
+import com.sun.star.frame.XStatusListener;
+import com.sun.star.lang.WrappedTargetRuntimeException;
+import com.sun.star.lang.XComponent;
+import com.sun.star.lang.XMultiComponentFactory;
+import com.sun.star.lang.XServiceInfo;
+import com.sun.star.lib.uno.helper.WeakBase;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.XComponentContext;
+import com.sun.star.util.URL;
+
+public final class Dispatch extends WeakBase implements XServiceInfo, XDispatch
+{
+    public Dispatch(XComponentContext context) {
+        this.context = context;
+    }
+
+    public String getImplementationName() { return implementationName; }
+
+    public boolean supportsService(String ServiceName) {
+        return false; //TODO
+    }
+
+    public String[] getSupportedServiceNames() {
+        return serviceNames;
+    }
+
+    public void dispatch(URL URL, PropertyValue[] Arguments) {
+        try {
+            XMultiComponentFactory smgr = UnoRuntime.queryInterface(
+                XMultiComponentFactory.class, context.getServiceManager());
+            XMessageBox box = UnoRuntime.queryInterface(
+                XMessageBoxFactory.class,
+                smgr.createInstanceWithContext(
+                    "com.sun.star.awt.Toolkit", context)).
+                createMessageBox(
+                    UnoRuntime.queryInterface(
+                        XWindowPeer.class,
+                        (UnoRuntime.queryInterface(
+                            XDesktop.class,
+                            smgr.createInstanceWithContext(
+                                "com.sun.star.frame.Desktop", context)).
+                         getCurrentFrame().getComponentWindow())),
+                    new Rectangle(), "infobox", MessageBoxButtons.BUTTONS_OK,
+                    "passive", "java");
+            box.execute();
+            UnoRuntime.queryInterface(XComponent.class, box).dispose();
+        } catch (com.sun.star.uno.RuntimeException e) {
+            throw e;
+        } catch (com.sun.star.uno.Exception e) {
+            throw new WrappedTargetRuntimeException(
+                "wrapped: " + e.getMessage(), this, e);
+        }
+    }
+
+    public void addStatusListener(XStatusListener Control, URL URL) {}
+
+    public void removeStatusListener(XStatusListener Control, URL URL) {}
+
+    private final XComponentContext context;
+
+    static final String implementationName =
+        "com.sun.star.comp.test.deployment.passive_java_singleton";
+
+    static final String[] serviceNames = new String[0];
+}
diff --git a/desktop/test/deployment/passive/com/sun/star/comp/test/deployment/Provider.java b/desktop/test/deployment/passive/com/sun/star/comp/test/deployment/Provider.java
new file mode 100644
index 0000000..13d59ec
--- /dev/null
+++ b/desktop/test/deployment/passive/com/sun/star/comp/test/deployment/Provider.java
@@ -0,0 +1,74 @@
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+package com.sun.star.comp.test.deployment.passive_java;
+
+import com.sun.star.frame.DispatchDescriptor;
+import com.sun.star.frame.XDispatch;
+import com.sun.star.frame.XDispatchProvider;
+import com.sun.star.lang.XServiceInfo;
+import com.sun.star.lib.uno.helper.WeakBase;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.XComponentContext;
+import com.sun.star.util.URL;
+
+public final class Provider extends WeakBase
+    implements XServiceInfo, XDispatchProvider
+{
+    public Provider(XComponentContext context) {
+        this.context = context;
+    }
+
+    public String getImplementationName() { return implementationName; }
+
+    public boolean supportsService(String ServiceName) {
+        return ServiceName.equals(getSupportedServiceNames()[0]); //TODO
+    }
+
+    public String[] getSupportedServiceNames() {
+        return serviceNames;
+    }
+
+    public XDispatch queryDispatch(
+        URL URL, String TargetFrameName, int SearchFlags)
+    {
+        return UnoRuntime.queryInterface(
+            XDispatch.class,
+            context.getValueByName(
+                "/singletons/" +
+                "com.sun.star.test.deployment.passive_java_singleton"));
+    }
+
+    public XDispatch[] queryDispatches(DispatchDescriptor[] Requests) {
+        XDispatch[] s = new XDispatch[Requests.length];
+        for (int i = 0; i < s.length; ++i) {
+            s[i] = queryDispatch(
+                Requests[i].FeatureURL, Requests[i].FrameName,
+                Requests[i].SearchFlags);
+        }
+        return s;
+    }
+
+    private final XComponentContext context;
+
+    static final String implementationName =
+        "com.sun.star.comp.test.deployment.passive_java";
+
+    static final String[] serviceNames = new String[] {
+        "com.sun.star.test.deployment.passive_java" };
+}
diff --git a/desktop/test/deployment/passive/com/sun/star/comp/test/deployment/Services.java b/desktop/test/deployment/passive/com/sun/star/comp/test/deployment/Services.java
new file mode 100644
index 0000000..b14ba71
--- /dev/null
+++ b/desktop/test/deployment/passive/com/sun/star/comp/test/deployment/Services.java
@@ -0,0 +1,42 @@
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+package com.sun.star.comp.test.deployment.passive_java;
+
+import com.sun.star.lang.XSingleComponentFactory;
+import com.sun.star.lib.uno.helper.Factory;
+
+public final class Services {
+    private Services() {}
+
+    public static XSingleComponentFactory __getComponentFactory(
+        String implementation)
+    {
+        if (implementation.equals(Dispatch.implementationName)) {
+            return Factory.createComponentFactory(
+                Dispatch.class, Dispatch.implementationName,
+                Dispatch.serviceNames);
+        } else if (implementation.equals(Provider.implementationName)) {
+            return Factory.createComponentFactory(
+                Provider.class, Provider.implementationName,
+                Provider.serviceNames);
+        } else {
+            return null;
+        }
+    }
+}
diff --git a/desktop/test/deployment/passive/manifest.xml b/desktop/test/deployment/passive/manifest.xml
deleted file mode 100644
index 1d57a8e..0000000
--- a/desktop/test/deployment/passive/manifest.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- -->
-
-<m:manifest xmlns:m="http://openoffice.org/2001/manifest">
-  <m:file-entry m:media-type="application/vnd.sun.star.configuration-data"
-      m:full-path="Addons.xcu"/>
-  <m:file-entry m:media-type="application/vnd.sun.star.configuration-data"
-      m:full-path="ProtocolHandler.xcu"/>
-  <m:file-entry
-      m:media-type="application/vnd.sun.star.uno-components;platform=@PLATFORM@"
-      m:full-path="platform.components"/>
-  <m:file-entry
-      m:media-type="application/vnd.sun.star.uno-components"
-      m:full-path="generic.components"/>
-</m:manifest>
commit 12f9287bcacc429e4417d14a57d90f40078223dd
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Mar 7 11:01:55 2013 +0100

    Make gb_Extension_use_default_description/license explicit
    
    ...as a prerequisite for gbuild'ifying desktop/test/deployment/passive/, which
    builds a test extension that does not match those default description/license
    settings.
    
    Change-Id: I200ff0ceb9750ed4b1c187305f10469f789d29cb

diff --git a/mysqlc/Extension_mysql-connector-ooo.mk b/mysqlc/Extension_mysql-connector-ooo.mk
index 67c7c8f..26cb7c3 100644
--- a/mysqlc/Extension_mysql-connector-ooo.mk
+++ b/mysqlc/Extension_mysql-connector-ooo.mk
@@ -9,6 +9,9 @@
 
 $(eval $(call gb_Extension_Extension,mysql-connector-ooo,mysqlc/source))
 
+$(eval $(call gb_Extension_use_default_description,mysql-connector-ooo))
+$(eval $(call gb_Extension_use_default_license,mysql-connector-ooo))
+
 $(eval $(call gb_Extension_add_library,mysql-connector-ooo,mysqlc))
 
 $(eval $(call gb_Extension_add_file,mysql-connector-ooo,components.rdb,$(call gb_Rdb_get_target,mysqlc)))
diff --git a/nlpsolver/Extension_nlpsolver.mk b/nlpsolver/Extension_nlpsolver.mk
index c71c711..4599fe5 100644
--- a/nlpsolver/Extension_nlpsolver.mk
+++ b/nlpsolver/Extension_nlpsolver.mk
@@ -30,6 +30,9 @@
 
 $(eval $(call gb_Extension_Extension,nlpsolver,nlpsolver/src/com/sun/star/comp/Calc/NLPSolver))
 
+$(eval $(call gb_Extension_use_default_description,nlpsolver))
+$(eval $(call gb_Extension_use_default_license,nlpsolver))
+
 $(eval $(call gb_Extension_add_file,nlpsolver,components.rdb,$(SRCDIR)/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/components.rdb))
 $(eval $(call gb_Extension_add_file,nlpsolver,nlpsolver.jar,$(OUTDIR)/bin/nlpsolver.jar))
 $(eval $(call gb_Extension_add_file,nlpsolver,EvolutionarySolver.jar,$(OUTDIR)/bin/EvolutionarySolver.jar))
diff --git a/reportbuilder/Extension_reportbuilder.mk b/reportbuilder/Extension_reportbuilder.mk
index fd79c87..f42134f 100644
--- a/reportbuilder/Extension_reportbuilder.mk
+++ b/reportbuilder/Extension_reportbuilder.mk
@@ -27,6 +27,9 @@
 
 $(eval $(call gb_Extension_Extension,report-builder,reportbuilder/util))
 
+$(eval $(call gb_Extension_use_default_description,report-builder))
+$(eval $(call gb_Extension_use_default_license,report-builder))
+
 $(eval $(call gb_Extension_add_files,report-builder,,\
 	$(call gb_Jar_get_outdir_target,reportbuilderwizard) \
 	$(call gb_Jar_get_outdir_target,sun-report-builder) \
diff --git a/sdext/Extension_minimizer.mk b/sdext/Extension_minimizer.mk
index 08073a4..7abe900 100644
--- a/sdext/Extension_minimizer.mk
+++ b/sdext/Extension_minimizer.mk
@@ -27,6 +27,9 @@
 
 $(eval $(call gb_Extension_Extension,presentation-minimizer,sdext/source/minimizer))
 
+$(eval $(call gb_Extension_use_default_description,presentation-minimizer))
+$(eval $(call gb_Extension_use_default_license,presentation-minimizer))
+
 $(eval $(call gb_Extension_add_libraries,presentation-minimizer,\
     SunPresentationMinimizer \
 ))
diff --git a/solenv/gbuild/Extension.mk b/solenv/gbuild/Extension.mk
index 8d0e377..f9a3b80 100644
--- a/solenv/gbuild/Extension.mk
+++ b/solenv/gbuild/Extension.mk
@@ -29,8 +29,6 @@
 
 define gb_Extension_Extension
 $(call gb_ExtensionTarget_ExtensionTarget,$(1),$(2))
-$(call gb_ExtensionTarget_use_default_license,$(1))
-$(call gb_ExtensionTarget_use_default_description,$(1),$(2))
 
 $(call gb_Extension_get_target,$(1)) : $(call gb_ExtensionTarget_get_target,$(1))
 $(call gb_Extension_get_clean_target,$(1)) : $(call gb_ExtensionTarget_get_clean_target,$(1))
@@ -123,6 +121,16 @@ $(call gb_ExtensionTarget_add_helptreefile,$(1),$(2),$(3),$(4),$(5))
 
 endef
 
+define gb_Extension_use_default_description
+$(call gb_ExtensionTarget_use_default_description,$(1))
+
+endef
+
+define gb_Extension_use_default_license
+$(call gb_ExtensionTarget_use_default_license,$(1))
+
+endef
+
 define gb_Extension_use_unpacked
 $(call gb_ExtensionTarget_use_unpacked,$(1),$(2))
 
diff --git a/solenv/gbuild/ExtensionTarget.mk b/solenv/gbuild/ExtensionTarget.mk
index e839f47..09ebb189 100644
--- a/solenv/gbuild/ExtensionTarget.mk
+++ b/solenv/gbuild/ExtensionTarget.mk
@@ -160,7 +160,7 @@ endef
 
 # Use the default description file
 define gb_ExtensionTarget_use_default_description
-$(call gb_ExtensionTarget_add_file,$(1),description-en-US.txt,$(SRCDIR)/$(2)/description-en-US.txt)
+$(call gb_ExtensionTarget_add_file,$(1),description-en-US.txt,$$(LOCATION)/description-en-US.txt)
 $(call gb_ExtensionTarget_get_target,$(1)) : DESCRIPTION := $(true)
 ifneq ($(strip $(gb_WITH_LANG)),)
 $(call gb_ExtensionTarget_get_target,$(1)) : FILES += $(foreach lang,$(gb_ExtensionTarget_TRANS_LANGS),description-$(lang).txt)
diff --git a/swext/Extension_wiki-publisher.mk b/swext/Extension_wiki-publisher.mk
index 9491612..4a1a112 100644
--- a/swext/Extension_wiki-publisher.mk
+++ b/swext/Extension_wiki-publisher.mk
@@ -30,6 +30,9 @@
 
 $(eval $(call gb_Extension_Extension,wiki-publisher,swext/mediawiki/src))
 
+$(eval $(call gb_Extension_use_default_description,wiki-publisher))
+$(eval $(call gb_Extension_use_default_license,wiki-publisher))
+
 ifneq ($(SYSTEM_APACHE_COMMONS),YES)
 $(eval $(call gb_Extension_add_file,wiki-publisher,commons-codec-1.3.jar,$(OUTDIR)/bin/commons-codec-1.3.jar))
 $(eval $(call gb_Extension_add_file,wiki-publisher,commons-httpclient-3.1.jar,$(OUTDIR)/bin/commons-httpclient-3.1.jar))


More information about the Libreoffice-commits mailing list