summaryrefslogtreecommitdiff
path: root/cppuhelper
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-10-02 15:15:28 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-10-08 14:45:54 +0200
commit98bb53a5609f8651b0841e8326d7aa53fd56ab3b (patch)
tree4461c432b5ffd328f8ae31e94ef174cc072e91dc /cppuhelper
parentdeed6dcacd355ce84cada955887a31e7d8cb5fb1 (diff)
fdo#80927: css.office.Quickstart should be single-instance service.
Incorrectly converted in a384b21cc40818bf3c918951a086a30b5d9d8022 where SFX_IMPL_ONEINSTANCEFACTORY was used. AFAICS it's the first converted single-instance service which implements css::lang::XInitialization. That's kind of strange but can do its job. sbergman@redhat.com: Three things were necessary in order to not call the ~ShutdownIcon code too late during exit now: * Move the relevant code from ~ShutdownIcon to ShutdownIcon::disposing. * Add a dummy <singleton name="com.sun.star.office.theQuickstart"/> so the service manager will eventually dispose the (single) instance. * In cppuhelper::ServiceManager::Data::Implementation::createInstanceWithArguments do not shortcut updateDisposeSingleton in that odd case of calling createInstanceWithArguments on an implementation that (effectively) is a singleton (as otherwise the service manager would still not dispose it). It looks to me like that "return inst;" was an inadvertent leftover in 874c481801434d4fac3c50f076bff0fe3a3988b6 "Simplify service manager's tracking of singletons" and wasn't intended to serve some subtle purpose. Change-Id: Icd4d3168ec0bbb820b17ac321fe897ac9f9ce7fc
Diffstat (limited to 'cppuhelper')
-rw-r--r--cppuhelper/source/servicemanager.cxx1
1 files changed, 0 insertions, 1 deletions
diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx
index ed8e9ecbbfca..8a2cdcab2833 100644
--- a/cppuhelper/source/servicemanager.cxx
+++ b/cppuhelper/source/servicemanager.cxx
@@ -711,7 +711,6 @@ cppuhelper::ServiceManager::Data::Implementation::createInstanceWithArguments(
if (init.is()) {
init->initialize(arguments);
}
- return inst;
} else if (factory1.is()) {
inst = factory1->createInstanceWithArgumentsAndContext(
arguments, context);