test/source/a11y/XAccessibleTextTester.cxx |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit c60458d60ea832295d3f2ca71d34a0ab29ef7169
Author:     Michael Weghorn <[email protected]>
AuthorDate: Fri Feb 27 18:58:48 2026 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Sat Feb 28 09:41:36 2026 +0100

    a11y tests: Don't use SystemClipboard service ctor
    
    Instead of going via this UNO abstraction, call
    GetSystemClipboard() to get access to the system
    clipboard.
    
    Change-Id: I8ef1d7b0c76b3a154ff8b1bddeed0a0ad57f5709
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200653
    Reviewed-by: Michael Weghorn <[email protected]>
    Tested-by: Jenkins

diff --git a/test/source/a11y/XAccessibleTextTester.cxx 
b/test/source/a11y/XAccessibleTextTester.cxx
index e0ad2b9fedc1..f53e3e6a762e 100644
--- a/test/source/a11y/XAccessibleTextTester.cxx
+++ b/test/source/a11y/XAccessibleTextTester.cxx
@@ -23,11 +23,11 @@
 #include <com/sun/star/accessibility/XAccessibleComponent.hpp>
 #include <com/sun/star/accessibility/XAccessibleContext.hpp>
 #include <com/sun/star/awt/Point.hpp>
-#include <com/sun/star/datatransfer/clipboard/SystemClipboard.hpp>
 #include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
 #include <com/sun/star/uno/Reference.hxx>
 #include <comphelper/processfactory.hxx>
 #include <tools/color.hxx>
+#include <vcl/transfer.hxx>
 #include <vcl/unohelp.hxx>
 #include <test/a11y/AccessibilityTools.hxx>
 #include <test/a11y/XAccessibleTextTester.hxx>
@@ -587,9 +587,7 @@ void XAccessibleTextTester::testCopyText()
 
 OUString XAccessibleTextTester::getSystemClipboardText()
 {
-    css::uno::Reference<css::datatransfer::clipboard::XSystemClipboard> 
xClipboard
-        = css::datatransfer::clipboard::SystemClipboard::create(
-            comphelper::getProcessComponentContext());
+    css::uno::Reference<css::datatransfer::clipboard::XClipboard> xClipboard = 
GetSystemClipboard();
 
     css::uno::Reference<css::datatransfer::XTransferable> xTrans = 
xClipboard->getContents();
 

Reply via email to