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 #include #include -#include #include #include @@ -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);