summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-01-09 13:46:42 +0100
committerMatúš Kukan <matus.kukan@collabora.com>2014-01-10 10:19:44 +0100
commitb1c878bfb10439d619341bf2edf03975547f0649 (patch)
treeea3208ecba00f25132bc093edc419aec8ea253e3
parentf091c0b77b7988d26bc2ea0a038ba6c094acc5bb (diff)
fwk: Use constructor feature for StatusbarControllerFactory.
Change-Id: I0867404f7e4aa7b9caafe4f0568bd2c20190867f
-rw-r--r--framework/inc/uifactory/uicontrollerfactory.hxx9
-rw-r--r--framework/source/register/registerservices.cxx1
-rw-r--r--framework/source/uifactory/uicontrollerfactory.cxx29
-rw-r--r--framework/util/fwk.component3
4 files changed, 30 insertions, 12 deletions
diff --git a/framework/inc/uifactory/uicontrollerfactory.hxx b/framework/inc/uifactory/uicontrollerfactory.hxx
index 08af3f43b0e2..0eca2e0255c5 100644
--- a/framework/inc/uifactory/uicontrollerfactory.hxx
+++ b/framework/inc/uifactory/uicontrollerfactory.hxx
@@ -85,15 +85,6 @@ class ToolbarControllerFactory : public UIControllerFactory
DECLARE_XSERVICEINFO
};
-class StatusbarControllerFactory : public UIControllerFactory
-{
- public:
- StatusbarControllerFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext );
-
- // XInterface, XTypeProvider, XServiceInfo
- DECLARE_XSERVICEINFO
-};
-
}
#endif // INCLUDED_FRAMEWORK_INC_UIFACTORY_UICONTROLLERFACTORY_HXX
diff --git a/framework/source/register/registerservices.cxx b/framework/source/register/registerservices.cxx
index c99847383658..f893b5b17af8 100644
--- a/framework/source/register/registerservices.cxx
+++ b/framework/source/register/registerservices.cxx
@@ -95,7 +95,6 @@ COMPONENTGETFACTORY ( fwk,
IFFACTORY( ::framework::StatusBarFactory ) else
IFFACTORY( ::framework::UICategoryDescription ) else
IFFACTORY( ::framework::SessionListener ) else
- IFFACTORY( ::framework::StatusbarControllerFactory ) else
IFFACTORY( ::framework::SessionListener ) else
IFFACTORY( ::framework::TaskCreatorService ) else
IFFACTORY( ::framework::ImageManager ) else
diff --git a/framework/source/uifactory/uicontrollerfactory.cxx b/framework/source/uifactory/uicontrollerfactory.cxx
index e14eba7a0ade..546138b8c22f 100644
--- a/framework/source/uifactory/uicontrollerfactory.cxx
+++ b/framework/source/uifactory/uicontrollerfactory.cxx
@@ -29,6 +29,7 @@
#include <com/sun/star/container/XContainer.hpp>
#include <rtl/ustrbuf.hxx>
+#include <rtl/ref.hxx>
#include <cppuhelper/weak.hxx>
using namespace com::sun::star::uno;
@@ -246,6 +247,21 @@ ToolbarControllerFactory::ToolbarControllerFactory( const Reference< XComponentC
{
}
+} // namespace framework
+
+using namespace framework;
+
+namespace {
+
+class StatusbarControllerFactory : public UIControllerFactory
+{
+ public:
+ StatusbarControllerFactory( const css::uno::Reference< css::uno::XComponentContext >& xContext );
+
+ // XInterface, XTypeProvider, XServiceInfo
+ DECLARE_XSERVICEINFO
+};
+
DEFINE_XSERVICEINFO_ONEINSTANCESERVICE_2( StatusbarControllerFactory ,
::cppu::OWeakObject ,
SERVICENAME_STATUSBARCONTROLLERFACTORY ,
@@ -261,6 +277,17 @@ StatusbarControllerFactory::StatusbarControllerFactory( const Reference< XCompon
{
}
-} // namespace framework
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+com_sun_star_comp_framework_StatusBarControllerFactory_get_implementation(
+ css::uno::XComponentContext * context,
+ uno_Sequence * arguments)
+{
+ assert(arguments != 0 && arguments->nElements == 0); (void) arguments;
+ rtl::Reference<StatusbarControllerFactory> x(new StatusbarControllerFactory(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 d5d250d7100b..1746091a6e50 100644
--- a/framework/util/fwk.component
+++ b/framework/util/fwk.component
@@ -91,7 +91,8 @@
<implementation name="com.sun.star.comp.framework.RecentFilesMenuController">
<service name="com.sun.star.frame.PopupMenuController"/>
</implementation>
- <implementation name="com.sun.star.comp.framework.StatusBarControllerFactory">
+ <implementation name="com.sun.star.comp.framework.StatusBarControllerFactory"
+ constructor="com_sun_star_comp_framework_StatusBarControllerFactory_get_implementation">
<service name="com.sun.star.frame.StatusbarControllerFactory"/>
</implementation>
<implementation name="com.sun.star.comp.framework.StatusBarFactory">