vcl/win/dtrans/WinClipboard.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit f7c9ecf3d740f53d7a860157aba4fa1a8e32cca8
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Tue Jul 16 19:37:51 2024 +0500
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Tue Jul 16 19:26:24 2024 +0200

    Use IsRunningUnitTest / IsRunningUITest in vclplug_win, too
    
    Change-Id: I2ae0236b13ea7e562e7c585bf308c2ef7e09176a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170589
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>
    Tested-by: Jenkins

diff --git a/vcl/win/dtrans/WinClipboard.cxx b/vcl/win/dtrans/WinClipboard.cxx
index 2592d82f6b8b..4fea55531ad5 100644
--- a/vcl/win/dtrans/WinClipboard.cxx
+++ b/vcl/win/dtrans/WinClipboard.cxx
@@ -336,7 +336,8 @@ 
dtrans_CWinClipboard_get_implementation(css::uno::XComponentContext* context,
 {
     // We run unit tests in parallel, which is a problem when touching a 
shared resource
     // like the system clipboard, so rather use the dummy GenericClipboard.
-    static const bool bRunningUnitTest = getenv("LO_TESTNAME") || 
getenv("LIBO_TEST_UNIT");
+    static const bool bRunningUnitTest
+        = SalInstance::IsRunningUnitTest() || SalInstance::IsRunningUITest();
 
     if (bRunningUnitTest)
     {

Reply via email to