[Libreoffice-commits] core.git: cppuhelper/source

Michael Meeks (via logerrit) logerrit at kemper.freedesktop.org
Thu Nov 21 01:49:22 UTC 2019


 cppuhelper/source/servicemanager.cxx |   14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

New commits:
commit d4381cdad5c838219720019d771f7174992c1779
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Wed Nov 20 16:38:14 2019 +0000
Commit:     Aron Budea <aron.budea at collabora.com>
CommitDate: Thu Nov 21 02:48:02 2019 +0100

    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 <aron.budea at collabora.com>

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<OUString> aReported;
     std::vector<OUString> 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();


More information about the Libreoffice-commits mailing list