vcl/win/app/salinst.cxx | 3 +++ 1 file changed, 3 insertions(+) New commits: commit c18be7816a253bb03675f74df38b41a999a02952 Author: Michael Stahl <michael.st...@cib.de> Date: Tue Apr 17 18:41:39 2018 +0200
vcl: WNT: *really* 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. (cherry picked from commit 94c264859f621e8e7c793fad2beb6528659433bf) It's much better to check IsHeadlessMode anyway because that is set in more situations, and if you run soffice --headless you probably don't want the corresponding files to show up in Explorer's Recently list. (cherry picked from commit b07e8a7e16ba69e822a309ec280d1987f90021a3) Change-Id: I8ada3659d05c94d072ba30859090e835a595e9ea Reviewed-on: https://gerrit.libreoffice.org/53115 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 b13360f40b16..dcea8d53f6d7 100644 --- a/vcl/win/app/salinst.cxx +++ b/vcl/win/app/salinst.cxx @@ -930,6 +930,9 @@ OUString WinSalInstance::GetConnectionIdentifier() */ void WinSalInstance::AddToRecentDocumentList(const OUString& rFileUrl, const OUString& /*rMimeType*/, const OUString& rDocumentService) { + if (Application::IsHeadlessModeEnabled()) + 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