diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-05-14 18:20:30 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-05-14 18:20:30 +0200 |
commit | 3b1798a55bf7c193b911ce23e280e6a0e1e4314a (patch) | |
tree | 3ac82572050c8c567bf51523ee949767e733811c /cppuhelper/source | |
parent | 435c117c1c684d4603f557ed821c1fd5ee057086 (diff) |
Work around extension factories not implementing XServiceInfo
...that would otherwise lead to "Bad insert element" failure during live-insertion.
Change-Id: I74f883c9b613f03256abb7be7657f25b418f821d
Diffstat (limited to 'cppuhelper/source')
-rw-r--r-- | cppuhelper/source/defaultbootstrap.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/cppuhelper/source/defaultbootstrap.cxx b/cppuhelper/source/defaultbootstrap.cxx index f948586c0167..df13fd6d5003 100644 --- a/cppuhelper/source/defaultbootstrap.cxx +++ b/cppuhelper/source/defaultbootstrap.cxx @@ -950,6 +950,22 @@ void ServiceManager::insert(css::uno::Any const & aElement) insertLegacyFactory(info); return; } +// At least revisions up to 1.7 of LanguageTool.oxt (incl. the bundled 1.4.0 in +// module languagetool) contain an (actively registered) factory that does not +// implement XServiceInfo; the old OServiceManager::insert +// (stoc/source/servicemanager/servicemanager.cxx) silently did not add such +// broken factories to its m_ImplementationNameMap, so ignore them here for +// backwards compatibility of live-insertion of extensions, too (can go again +// for incompatible LO 4): +#if SUPD < 400 + css::uno::Reference< css::lang::XSingleComponentFactory > legacy; + if ((aElement >>= legacy) && legacy.is()) { + SAL_WARN( + "cppuhelper", + "Ignored XSingleComponentFactory not implementing XServiceInfo"); + return; + } +#endif throw css::lang::IllegalArgumentException( "Bad insert element", static_cast< cppu::OWeakObject * >(this), 0); } |