summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
Diffstat (limited to 'framework')
-rw-r--r--framework/source/uielement/uicommanddescription.cxx23
-rw-r--r--framework/util/fwk.component3
2 files changed, 3 insertions, 23 deletions
diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx
index d791ddfd89ab..4d9fccf5af41 100644
--- a/framework/source/uielement/uicommanddescription.cxx
+++ b/framework/source/uielement/uicommanddescription.cxx
@@ -710,33 +710,12 @@ sal_Bool SAL_CALL UICommandDescription::hasElements()
} // namespace framework
-namespace {
-
-struct Instance {
- explicit Instance(
- css::uno::Reference<css::uno::XComponentContext> const & context):
- instance(static_cast<cppu::OWeakObject *>(
- new framework::UICommandDescription(context)))
- {
- }
-
- css::uno::Reference<css::uno::XInterface> instance;
-};
-
-struct Singleton:
- public rtl::StaticWithArg<
- Instance, css::uno::Reference<css::uno::XComponentContext>, Singleton>
-{};
-
-}
-
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
com_sun_star_comp_framework_UICommandDescription_get_implementation(
css::uno::XComponentContext *context,
css::uno::Sequence<css::uno::Any> const &)
{
- return cppu::acquire(static_cast<cppu::OWeakObject *>(
- Singleton::get(context).instance.get()));
+ return cppu::acquire(new framework::UICommandDescription(context));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/util/fwk.component b/framework/util/fwk.component
index 12ce9ec7d966..5c9085759b19 100644
--- a/framework/util/fwk.component
+++ b/framework/util/fwk.component
@@ -161,7 +161,8 @@
<singleton name="com.sun.star.ui.theUICategoryDescription"/>
</implementation>
<implementation name="com.sun.star.comp.framework.UICommandDescription"
- constructor="com_sun_star_comp_framework_UICommandDescription_get_implementation">
+ constructor="com_sun_star_comp_framework_UICommandDescription_get_implementation"
+ single-instance="true">
<service name="com.sun.star.frame.UICommandDescription"/>
<singleton name="com.sun.star.frame.theUICommandDescription"/>
</implementation>