summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-01-09 20:36:26 +0100
committerMatúš Kukan <matus.kukan@collabora.com>2014-01-10 16:29:22 +0100
commit98b2529e91255c68b6582dbe8aaaadbaf59cdd27 (patch)
treec301cfcc08b026c6c6f1e3deefb67fd38bb1e0dc
parent7077fb9c76f9da19d71bb5c8067945f4b7f251d1 (diff)
fwk: Use constructor feature for MenuBarFactory.
Change-Id: I0673d0bfbba268728a3fa676f2af95aa6c74bbb2
-rw-r--r--framework/source/register/registerservices.cxx2
-rw-r--r--framework/source/uifactory/menubarfactory.cxx12
-rw-r--r--framework/util/fwk.component3
3 files changed, 14 insertions, 3 deletions
diff --git a/framework/source/register/registerservices.cxx b/framework/source/register/registerservices.cxx
index 5554c4e7b7dc..4e4a66306582 100644
--- a/framework/source/register/registerservices.cxx
+++ b/framework/source/register/registerservices.cxx
@@ -38,7 +38,6 @@
#include <jobs/jobexecutor.hxx>
#include <services/layoutmanager.hxx>
#include <uielement/controlmenucontroller.hxx>
-#include <uifactory/menubarfactory.hxx>
#include <accelerators/globalacceleratorconfiguration.hxx>
#include <accelerators/documentacceleratorconfiguration.hxx>
#include <uielement/recentfilesmenucontroller.hxx>
@@ -53,7 +52,6 @@ COMPONENTGETFACTORY ( fwk,
IFFACTORY( ::framework::JobExecutor ) else
IFFACTORY( ::framework::LayoutManager ) else
IFFACTORY( ::framework::ControlMenuController ) else
- IFFACTORY( ::framework::MenuBarFactory ) else
IFFACTORY( ::framework::GlobalAcceleratorConfiguration ) else
IFFACTORY( ::framework::DocumentAcceleratorConfiguration ) else
IFFACTORY( ::framework::RecentFilesMenuController ) else
diff --git a/framework/source/uifactory/menubarfactory.cxx b/framework/source/uifactory/menubarfactory.cxx
index cbda3ce4d6fc..cc7f3eaf2819 100644
--- a/framework/source/uifactory/menubarfactory.cxx
+++ b/framework/source/uifactory/menubarfactory.cxx
@@ -34,6 +34,7 @@
#include <vcl/menu.hxx>
#include <vcl/svapp.hxx>
+#include <rtl/ref.hxx>
#include <rtl/ustrbuf.hxx>
//_________________________________________________________________________________________________________________
@@ -185,4 +186,15 @@ void MenuBarFactory::CreateUIElement(const OUString& ResourceURL
} // namespace framework
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+com_sun_star_comp_framework_MenuBarFactory_get_implementation(
+ css::uno::XComponentContext * context,
+ uno_Sequence * arguments)
+{
+ assert(arguments != 0 && arguments->nElements == 0); (void) arguments;
+ rtl::Reference<framework::MenuBarFactory> x(new framework::MenuBarFactory(context));
+ x->acquire();
+ return static_cast<cppu::OWeakObject *>(x.get());
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/util/fwk.component b/framework/util/fwk.component
index 79dacc4689a2..5b860799c039 100644
--- a/framework/util/fwk.component
+++ b/framework/util/fwk.component
@@ -61,7 +61,8 @@
<implementation name="com.sun.star.comp.framework.LayoutManager">
<service name="com.sun.star.frame.LayoutManager"/>
</implementation>
- <implementation name="com.sun.star.comp.framework.MenuBarFactory">
+ <implementation name="com.sun.star.comp.framework.MenuBarFactory"
+ constructor="com_sun_star_comp_framework_MenuBarFactory_get_implementation">
<service name="com.sun.star.ui.UIElementFactory"/>
</implementation>
<implementation name="com.sun.star.comp.framework.ModuleAcceleratorConfiguration"