diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-01-09 20:44:14 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-01-10 16:29:25 +0100 |
commit | 24941c6cbe1e31de77cb69264ba193100c9cd451 (patch) | |
tree | 01f42f26bd8a936be7b2811f5f8e7d4e2444a71f | |
parent | 8a52d5b1b3560af571ee6d669861f93d2c1005d1 (diff) |
fwk: Use constructor feature for ImageManager.
Change-Id: I3f231980b1908495b1f5ec17f95c39c464d40ff8
-rw-r--r-- | framework/source/register/registerservices.cxx | 2 | ||||
-rw-r--r-- | framework/source/uiconfiguration/imagemanager.cxx | 16 | ||||
-rw-r--r-- | framework/util/fwk.component | 3 |
3 files changed, 18 insertions, 3 deletions
diff --git a/framework/source/register/registerservices.cxx b/framework/source/register/registerservices.cxx index 5bba469ab72d..735942e55649 100644 --- a/framework/source/register/registerservices.cxx +++ b/framework/source/register/registerservices.cxx @@ -41,7 +41,6 @@ #include <uielement/recentfilesmenucontroller.hxx> #include <services/sessionlistener.hxx> -#include <uiconfiguration/imagemanager.hxx> #include <services/ContextChangeEventMultiplexer.hxx> COMPONENTGETFACTORY ( fwk, @@ -53,7 +52,6 @@ COMPONENTGETFACTORY ( fwk, IFFACTORY( ::framework::RecentFilesMenuController ) else IFFACTORY( ::framework::SessionListener ) else IFFACTORY( ::framework::SessionListener ) else - IFFACTORY( ::framework::ImageManager ) else IFFACTORY( ::framework::ContextChangeEventMultiplexer ) ) diff --git a/framework/source/uiconfiguration/imagemanager.cxx b/framework/source/uiconfiguration/imagemanager.cxx index f3f78547564b..84703e5baf76 100644 --- a/framework/source/uiconfiguration/imagemanager.cxx +++ b/framework/source/uiconfiguration/imagemanager.cxx @@ -34,6 +34,7 @@ #include <com/sun/star/io/XStream.hpp> #include <vcl/svapp.hxx> +#include <rtl/ref.hxx> #include <rtl/ustrbuf.hxx> #include <osl/mutex.hxx> #include <comphelper/sequence.hxx> @@ -222,4 +223,19 @@ sal_Bool SAL_CALL ImageManager::isReadOnly() throw (::com::sun::star::uno::Runti } // namespace framework +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL +com_sun_star_comp_framework_ImageManager_get_implementation( + css::uno::XComponentContext * context, + uno_Sequence * arguments) +{ + assert(arguments != 0); + rtl::Reference<framework::ImageManager> x(new framework::ImageManager(context)); + css::uno::Sequence<css::uno::Any> aArgs( + reinterpret_cast<css::uno::Any *>(arguments->elements), + arguments->nElements); + x->initialize(aArgs); + 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 a0399546ebbd..b55f2f691b7d 100644 --- a/framework/util/fwk.component +++ b/framework/util/fwk.component @@ -48,7 +48,8 @@ <implementation name="com.sun.star.comp.framework.GlobalAcceleratorConfiguration"> <service name="com.sun.star.ui.GlobalAcceleratorConfiguration"/> </implementation> - <implementation name="com.sun.star.comp.framework.ImageManager"> + <implementation name="com.sun.star.comp.framework.ImageManager" + constructor="com_sun_star_comp_framework_ImageManager_get_implementation"> <service name="com.sun.star.ui.ImageManager"/> </implementation> <implementation name="com.sun.star.comp.framework.JobExecutor" |