diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-02-12 12:00:33 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-02-13 11:26:27 +0100 |
commit | 5691ef0b4f3d1be45f3f208db668d295013cdc9b (patch) | |
tree | e440e38d59eb075e985e21de9133f294fcfce2d2 /framework | |
parent | 9a4056c18f09160264af7a5533852c9deae4b27c (diff) |
Move this Singleton class to anonymous namespace.
If you add more Singleton classes into framework namespace,
it builds without any warning but I was not able to see menu text
labels.
Luckily UICommandDescription is involved in this and the problem was not
hidden somewhere else.
Change-Id: Iba0c06c2e31ae509579f31308d9f45f0cb9f654f
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/uielement/uicommanddescription.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx index fc98617b809e..6e31dc6b23cb 100644 --- a/framework/source/uielement/uicommanddescription.cxx +++ b/framework/source/uielement/uicommanddescription.cxx @@ -749,11 +749,15 @@ throw (::com::sun::star::uno::RuntimeException) return sal_True; } +} // namespace framework + +namespace { + struct Instance { explicit Instance( css::uno::Reference<css::uno::XComponentContext> const & context): instance(static_cast<cppu::OWeakObject *>( - new UICommandDescription(context))) + new framework::UICommandDescription(context))) { } @@ -765,7 +769,7 @@ struct Singleton: Instance, css::uno::Reference<css::uno::XComponentContext>, Singleton> {}; -} // namespace framework +} extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_comp_framework_UICommandDescription_get_implementation( @@ -773,7 +777,7 @@ com_sun_star_comp_framework_UICommandDescription_get_implementation( css::uno::Sequence<css::uno::Any> const &) { return cppu::acquire(static_cast<cppu::OWeakObject *>( - framework::Singleton::get(context).instance.get())); + Singleton::get(context).instance.get())); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |