From ffb1e88afae5b83d58337a84a27f9c6293f6fcd9 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 7 Mar 2013 11:05:57 +0100 Subject: 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 --- 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 ---------------------- .../test/deployment/passive/META-INF/manifest.xml | 31 +++++++ desktop/test/deployment/passive/Provider.java | 74 ----------------- desktop/test/deployment/passive/Services.java | 42 ---------- .../sun/star/comp/test/deployment/Dispatch.java | 94 ++++++++++++++++++++++ .../sun/star/comp/test/deployment/Provider.java | 74 +++++++++++++++++ .../sun/star/comp/test/deployment/Services.java | 42 ++++++++++ desktop/test/deployment/passive/manifest.xml | 31 ------- 15 files changed, 386 insertions(+), 241 deletions(-) create mode 100644 desktop/Extension_test-passive.mk create mode 100644 desktop/Jar_passive_java.mk create mode 100644 desktop/Library_passive_native.mk create mode 100644 desktop/Pyuno_passive_python.mk create mode 100644 desktop/Rdb_passive_generic.mk create mode 100644 desktop/Rdb_passive_platform.mk delete mode 100644 desktop/test/deployment/passive/Dispatch.java create mode 100644 desktop/test/deployment/passive/META-INF/manifest.xml delete mode 100644 desktop/test/deployment/passive/Provider.java delete mode 100644 desktop/test/deployment/passive/Services.java create mode 100644 desktop/test/deployment/passive/com/sun/star/comp/test/deployment/Dispatch.java create mode 100644 desktop/test/deployment/passive/com/sun/star/comp/test/deployment/Provider.java create mode 100644 desktop/test/deployment/passive/com/sun/star/comp/test/deployment/Services.java delete mode 100644 desktop/test/deployment/passive/manifest.xml (limited to 'desktop') diff --git a/desktop/Extension_test-passive.mk b/desktop/Extension_test-passive.mk new file mode 100644 index 000000000000..354ce26abe65 --- /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 000000000000..e1023a5d5230 --- /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 000000000000..2181941662cf --- /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 1122360f4691..538553ac7dd1 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 000000000000..d13431d71e0d --- /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 000000000000..f05d9c26cf31 --- /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 000000000000..72ffe6c19a69 --- /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 762a09cbc4de..000000000000 --- 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 000000000000..1d57a8eb41ae --- /dev/null +++ b/desktop/test/deployment/passive/META-INF/manifest.xml @@ -0,0 +1,31 @@ + + + + + + + + + diff --git a/desktop/test/deployment/passive/Provider.java b/desktop/test/deployment/passive/Provider.java deleted file mode 100644 index 13d59ecf1b04..000000000000 --- 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 b14ba710274c..000000000000 --- 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 000000000000..762a09cbc4de --- /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 000000000000..13d59ecf1b04 --- /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 000000000000..b14ba710274c --- /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 1d57a8eb41ae..000000000000 --- a/desktop/test/deployment/passive/manifest.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - -- cgit