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

New commits:
commit 94c264859f621e8e7c793fad2beb6528659433bf
Author: Michael Stahl <michael.st...@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 <c...@libreoffice.org>
    Reviewed-by: Mike Kaganski <mike.kagan...@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);
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to