Hi there,
I was just trying to chase down the reason why custom shapes would bust
loading in the android port; still not quite to the bottom of why they
initialize these language-checkers so early ;-) but - the attached fixes
it and prints:
No ExtensionManager: exception 'component context fails to
supply singleton com.sun.star.deployment.ExtensionManager of
type ...
Is it intended that that would throw an exception rather than returning
NULL ? that was apparently not clear to either to Caolan, or me reading
it :-)
Having said that - it's some lovely work there Caolan to get the
caching right based on new extensions being installed - that is sexy :-)
Of course - Android has no real need for the extension manager, we'll
bundle a static image - so this sort of thing is expected; so just a
question: is a nil return, or an exception ideal ? and/or is some
QUERY_THROW type annotation wanted ? :-)
Either way - with this, I can load much more interesting writer
documents on Android/x86 Tor :-) [ though I have a batch of other
commits / cleanups to push Monday to make that fly ].
Thanks,
Michael.
--
[email protected] <><, Pseudo Engineer, itinerant idiot
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index 6dc2d69..40bc684 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -491,8 +493,15 @@ LngSvcMgr::LngSvcMgr()
// request to be notified if an extension has been added/removed
uno::Reference<uno::XComponentContext> xContext(comphelper::getProcessComponentContext());
- uno::Reference<deployment::XExtensionManager> xExtensionManager(
- deployment::ExtensionManager::get(xContext));
+ uno::Reference<deployment::XExtensionManager> xExtensionManager;
+ try {
+ xExtensionManager = deployment::ExtensionManager::get(xContext);
+ } catch (const uno::Exception &e) {
+ // FIXME: I'd really want the above to return a NULL pointer not
+ // throw an exception on error ...
+ fprintf( stderr, "No ExtensionManager: exception '%s'\n",
+ rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr());
+ }
if (xExtensionManager.is())
{
xMB = uno::Reference<util::XModifyBroadcaster>(xExtensionManager, uno::UNO_QUERY_THROW);
_______________________________________________
LibreOffice mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice