diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-01-09 17:15:37 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-01-10 16:29:08 +0100 |
commit | bbfda58607e71ac61c9175fed9b75a477a138d6f (patch) | |
tree | 693714107d3a3806406bf173d13dcd1ded7509d9 | |
parent | 89a327f5ac73f33767746bacbe25e688086c3358 (diff) |
fwk: Use constructor feature for UICommandDescription.
Change-Id: I3b772ce36492e89451597b3c7dadc5e5b5b22de7
-rw-r--r-- | framework/source/register/registerservices.cxx | 2 | ||||
-rw-r--r-- | framework/source/uielement/uicommanddescription.cxx | 12 | ||||
-rw-r--r-- | framework/util/fwk.component | 3 |
3 files changed, 14 insertions, 3 deletions
diff --git a/framework/source/register/registerservices.cxx b/framework/source/register/registerservices.cxx index 1ad178399b05..55cb853baf87 100644 --- a/framework/source/register/registerservices.cxx +++ b/framework/source/register/registerservices.cxx @@ -40,7 +40,6 @@ #include <services/layoutmanager.hxx> #include <uielement/objectmenucontroller.hxx> #include <uielement/controlmenucontroller.hxx> -#include <uielement/uicommanddescription.hxx> #include <uiconfiguration/moduleuicfgsupplier.hxx> #include <uiconfiguration/moduleuiconfigurationmanager.hxx> #include <uifactory/menubarfactory.hxx> @@ -64,7 +63,6 @@ COMPONENTGETFACTORY ( fwk, IFFACTORY( ::framework::LayoutManager ) else IFFACTORY( ::framework::ObjectMenuController ) else IFFACTORY( ::framework::ControlMenuController ) else - IFFACTORY( ::framework::UICommandDescription ) else IFFACTORY( ::framework::ModuleManager ) else IFFACTORY( ::framework::ModuleUIConfigurationManagerSupplier ) else IFFACTORY( ::framework::ModuleUIConfigurationManager ) else diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx index 9480d46233c5..8da12a9bff98 100644 --- a/framework/source/uielement/uicommanddescription.cxx +++ b/framework/source/uielement/uicommanddescription.cxx @@ -33,6 +33,7 @@ #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/container/XContainer.hpp> +#include <rtl/ref.hxx> #include <rtl/ustrbuf.hxx> #include <cppuhelper/implbase2.hxx> #include <unotools/configmgr.hxx> @@ -767,4 +768,15 @@ throw (::com::sun::star::uno::RuntimeException) } // namespace framework +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL +com_sun_star_comp_framework_UICommandDescription_get_implementation( + css::uno::XComponentContext * context, + uno_Sequence * arguments) +{ + assert(arguments != 0 && arguments->nElements == 0); (void) arguments; + rtl::Reference<framework::UICommandDescription> x(new framework::UICommandDescription(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 9259f1656a80..5902bc199344 100644 --- a/framework/util/fwk.component +++ b/framework/util/fwk.component @@ -118,7 +118,8 @@ <implementation name="com.sun.star.comp.framework.UICategoryDescription"> <service name="com.sun.star.ui.UICategoryDescription"/> </implementation> - <implementation name="com.sun.star.comp.framework.UICommandDescription"> + <implementation name="com.sun.star.comp.framework.UICommandDescription" + constructor="com_sun_star_comp_framework_UICommandDescription_get_implementation"> <service name="com.sun.star.frame.UICommandDescription"/> </implementation> <implementation name="com.sun.star.comp.framework.UIConfigurationManager" |