From d4381cdad5c838219720019d771f7174992c1779 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Wed, 20 Nov 2019 16:38:14 +0000 Subject: preload: cleanup failed module load warnings and rename them. Change-Id: Iafa89df6f724fa6b64712d970502091e38300dad Reviewed-on: https://gerrit.libreoffice.org/83341 Tested-by: Jenkins Reviewed-by: Aron Budea --- cppuhelper/source/servicemanager.cxx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx index 8f49b4ecb908..b4c2503db1a1 100644 --- a/cppuhelper/source/servicemanager.cxx +++ b/cppuhelper/source/servicemanager.cxx @@ -1788,6 +1788,7 @@ void cppuhelper::ServiceManager::preloadImplementations() { std::vector aReported; std::vector aDisabled; OUStringBuffer aDisabledMsg; + OUStringBuffer aMissingMsg; /// Allow external callers & testers to disable certain components const char *pDisable = getenv("UNODISABLELIBRARY"); @@ -1810,6 +1811,7 @@ void cppuhelper::ServiceManager::preloadImplementations() { rEntry.second->status == Data::Implementation::STATUS_LOADED) continue; + OUString simplified; try { const OUString &aLibrary = rEntry.second->info->uri; @@ -1817,7 +1819,8 @@ void cppuhelper::ServiceManager::preloadImplementations() { if (aLibrary.isEmpty()) continue; - OUString simplified = simplifyModule(aLibrary); + simplified = simplifyModule(aLibrary); + bool bDisabled = std::find(aDisabled.begin(), aDisabled.end(), simplified) != aDisabled.end(); @@ -1854,8 +1857,8 @@ void cppuhelper::ServiceManager::preloadImplementations() { if (!aModule.is()) { - std::cerr << ":failed" << std::endl; - std::cerr.flush(); + aMissingMsg.append(simplified); + aMissingMsg.append(" "); } if (aModule.is() && @@ -1948,6 +1951,11 @@ void cppuhelper::ServiceManager::preloadImplementations() { } std::cerr << std::endl; + if (aMissingMsg.getLength() > 0) + { + OUString aMsg = aMissingMsg.makeStringAndClear(); + std::cerr << "Absent (often optional): " << aMsg << "\n"; + } if (aDisabledMsg.getLength() > 0) { OUString aMsg = aDisabledMsg.makeStringAndClear(); -- cgit v1.2.3