[Libreoffice-commits] core.git: vcl/win

Michael Stahl Michael.Stahl at cib.de
Wed Apr 18 10:59:25 UTC 2018


 vcl/win/app/salinst.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 94c264859f621e8e7c793fad2beb6528659433bf
Author: Michael Stahl <Michael.Stahl at cib.de>
Date:   Tue Apr 17 18:41:39 2018 +0200

    vcl: WNT: avoid calling SHAddToRecentDocs() from unit tests
    
    On Windows 10, Explorer spends ridiculous amounts of CPU with updating
    its recent documents view while tests are running.
    
    Change-Id: I170306a392900fc4b911950e36f13f1af0e405ac
    Reviewed-on: https://gerrit.libreoffice.org/53058
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx
index 125d375096a9..340e0ed01b77 100644
--- a/vcl/win/app/salinst.cxx
+++ b/vcl/win/app/salinst.cxx
@@ -921,6 +921,10 @@ OUString WinSalInstance::GetConnectionIdentifier()
 */
 void WinSalInstance::AddToRecentDocumentList(const OUString& rFileUrl, const OUString& /*rMimeType*/, const OUString& rDocumentService)
 {
+    static bool const s_isTest(getenv("LO_TESTNAME") != nullptr);
+    if (s_isTest)
+        return;
+
     OUString system_path;
     osl::FileBase::RC rc = osl::FileBase::getSystemPathFromFileURL(rFileUrl, system_path);
 


More information about the Libreoffice-commits mailing list