summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-04-17 18:41:39 +0200
committerAndras Timar <andras.timar@collabora.com>2018-04-23 16:44:51 +0200
commit805d01d6769a61d20763bf2c45138eaa4b88b418 (patch)
tree1bf758cbd34f90dc65fe8b8bd2aa8b874c6035f8
parent9e33e6d2cb11b80192ff8d4aaa757ca155763609 (diff)
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 <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit c18be7816a253bb03675f74df38b41a999a02952)
-rw-r--r--vcl/win/app/salinst.cxx3
1 files changed, 3 insertions, 0 deletions
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);