sd/qa/uitest/impress_tests2/tdf146019.py |    6 +++++-
 sfx2/source/dialog/filedlghelper.cxx     |    6 +-----
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 6bb9a35e5bb358e64e64ffd8e4f0c26dbcf90e29
Author:     Mike Kaganski <[email protected]>
AuthorDate: Sat Feb 28 12:02:42 2026 +0100
Commit:     Mike Kaganski <[email protected]>
CommitDate: Sat Feb 28 15:21:22 2026 +0100

    Remove special treatment of UITests here
    
    If stored setting changes UI test, the test should change to handle
    that - which is done for tdf146019 (after tdf141297 checks "link"
    checkbox in Insert Graphic dialog).
    
    Change-Id: I3c0d1bb991fe6b07dc4be162f50464097d15bae8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200671
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <[email protected]>

diff --git a/sd/qa/uitest/impress_tests2/tdf146019.py 
b/sd/qa/uitest/impress_tests2/tdf146019.py
index 86b8ed48180f..9b5a34d961f1 100644
--- a/sd/qa/uitest/impress_tests2/tdf146019.py
+++ b/sd/qa/uitest/impress_tests2/tdf146019.py
@@ -8,7 +8,7 @@
 #
 from uitest.framework import UITestCase
 from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import get_url_for_data_file
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
 
 class tdf146019(UITestCase):
 
@@ -25,6 +25,10 @@ class tdf146019(UITestCase):
                 xFileName = xOpenDialog.getChild("file_name")
                 xFileName.executeAction("TYPE", mkPropertyValues({"TEXT": 
get_url_for_data_file("tdf146019.jpg")}))
 
+                xLink = xOpenDialog.getChild("link")
+                if get_state_as_dict(xLink)['Selected'] == "true" :
+                    xLink.executeAction("CLICK", tuple())
+
             # Before the fix, a dialog was displayed at this point
 
             # Check the shape is rotated, height > width
diff --git a/sfx2/source/dialog/filedlghelper.cxx 
b/sfx2/source/dialog/filedlghelper.cxx
index ae608e627253..e2c5f3f23d4a 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -20,7 +20,6 @@
 #include <memory>
 #include <optional>
 #include <string_view>
-#include <o3tl/test_info.hxx>
 
 #include <sfx2/filedlghelper.hxx>
 #include <sal/types.h>
@@ -2094,10 +2093,7 @@ void FileDialogHelper_Impl::saveConfig()
         try
         {
             // tdf#61358 - remember the last "insert as link" state
-            if (o3tl::IsRunningUITest())
-                aValue <<= false;
-            else
-                aValue = 
xDlg->getValue(ExtendedFilePickerElementIds::CHECKBOX_LINK, 0);
+            aValue = 
xDlg->getValue(ExtendedFilePickerElementIds::CHECKBOX_LINK, 0);
             bool bLink = false;
             aValue >>= bLink;
             OUString aUserData(GRF_CONFIG_STR);

Reply via email to