vcl/win/app/salinst.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
New commits: commit b07e8a7e16ba69e822a309ec280d1987f90021a3 Author: Michael Stahl <michael.st...@cib.de> Date: Wed Apr 18 13:01:37 2018 +0200 vcl: WNT: *really* avoid calling SHAddToRecentDocs() from unit tests At least in sw unit tests, AddToRecentDocumentList is apparently called too early so the variable isn't set yet. 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. Change-Id: I8ada3659d05c94d072ba30859090e835a595e9ea Reviewed-on: https://gerrit.libreoffice.org/53100 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Michael Stahl <michael.st...@cib.de> diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx index 340e0ed01b77..a33b7e1bd683 100644 --- a/vcl/win/app/salinst.cxx +++ b/vcl/win/app/salinst.cxx @@ -921,8 +921,7 @@ 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) + if (Application::IsHeadlessModeEnabled()) return; OUString system_path; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits