diff options
-rw-r--r-- | stoc/source/inspect/introspection.component | 3 | ||||
-rw-r--r-- | stoc/source/inspect/introspection.cxx | 16 |
2 files changed, 3 insertions, 16 deletions
diff --git a/stoc/source/inspect/introspection.component b/stoc/source/inspect/introspection.component index 4cf06357ae24..84e121fad1f7 100644 --- a/stoc/source/inspect/introspection.component +++ b/stoc/source/inspect/introspection.component @@ -20,7 +20,8 @@ <component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@" xmlns="http://openoffice.org/2010/uno-components"> <implementation name="com.sun.star.comp.stoc.Introspection" - constructor="com_sun_star_comp_stoc_Introspection_get_implementation"> + constructor="com_sun_star_comp_stoc_Introspection_get_implementation" + single-instance="true"> <service name="com.sun.star.beans.Introspection"/> <singleton name="com.sun.star.beans.theIntrospection"/> </implementation> diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx index 9317a5c35493..c7c0fd638175 100644 --- a/stoc/source/inspect/introspection.cxx +++ b/stoc/source/inspect/introspection.cxx @@ -2404,20 +2404,6 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect( return new ImplIntrospectionAccess(aToInspectObj, pAccess); } -struct Instance { - explicit Instance( - css::uno::Reference<css::uno::XComponentContext> const & context): - instance(new Implementation(context)) - {} - - rtl::Reference<cppu::OWeakObject> instance; -}; - -struct Singleton: - public rtl::StaticWithArg< - Instance, css::uno::Reference<css::uno::XComponentContext>, Singleton> -{}; - } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * @@ -2427,7 +2413,7 @@ com_sun_star_comp_stoc_Introspection_get_implementation( { SAL_WARN_IF( arguments.hasElements(), "stoc", "unexpected singleton arguments"); - return cppu::acquire(Singleton::get(context).instance.get()); + return cppu::acquire(new Implementation(context)); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |