sd/qa/uitest/impress_tests/customSlideShowDialog.py | 26 ++++++++++++++++++++ sd/source/ui/func/fucushow.cxx | 9 ++++-- 2 files changed, 32 insertions(+), 3 deletions(-)
New commits: commit 47b7a76fb011fdd04c3bcbfa555102a422c78638 Author: Tibor Nagy <[email protected]> AuthorDate: Thu Jul 1 16:43:33 2021 +0200 Commit: Xisco Fauli <[email protected]> CommitDate: Mon Jul 19 14:05:19 2021 +0200 tdf#143125 sd: fix crash when closing Custom Slide Shows dialog regression from commit I6e97a69c546870199d5a45d9a6ad102e30d820c2 Change-Id: I760dabeb024413f1a2aeb57434f63adedb4246f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118231 Tested-by: Jenkins Tested-by: László Németh <[email protected]> Reviewed-by: László Németh <[email protected]> (cherry picked from commit d7dff57384126e50b75c95e84fd3081db2f326a1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119172 Reviewed-by: Xisco Fauli <[email protected]> diff --git a/sd/qa/uitest/impress_tests/customSlideShowDialog.py b/sd/qa/uitest/impress_tests/customSlideShowDialog.py new file mode 100644 index 000000000000..d0d71cea833d --- /dev/null +++ b/sd/qa/uitest/impress_tests/customSlideShowDialog.py @@ -0,0 +1,26 @@ +# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- + +from uitest.framework import UITestCase +from libreoffice.uno.propertyvalue import mkPropertyValues +import importlib +from uitest.debug import sleep +from uitest.uihelper.common import select_pos +from uitest.uihelper.common import get_state_as_dict, type_text + +class customSlideShowDialog(UITestCase): + def test_customSlideShowDialog(self): + self.ui_test.create_doc_in_start_center("impress") + MainWindow = self.xUITest.getTopFocusWindow() + TemplateDialog = self.xUITest.getTopFocusWindow() + cancel = TemplateDialog.getChild("close") + self.ui_test.close_dialog_through_button(cancel) + + self.ui_test.execute_dialog_through_command(".uno:CustomShowDialog") + xDialog = self.xUITest.getTopFocusWindow() + + # Without the fix in place, this test would have crashed here + self.ui_test.close_dialog_through_button(xDialog.getChild("ok")) + + self.ui_test.close_doc() + +# vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sd/source/ui/func/fucushow.cxx b/sd/source/ui/func/fucushow.cxx index 8c63d0215776..eb3b12211085 100644 --- a/sd/source/ui/func/fucushow.cxx +++ b/sd/source/ui/func/fucushow.cxx @@ -74,10 +74,13 @@ void FuCustomShowDlg::DoExecute( SfxRequest& ) } if (nRet == RET_OK) { - if (!pDlg->IsCustomShow()) + if (mpDoc->GetCustomShowList()) { - rSettings.mbCustomShow = false; - rSettings.mbAll = true; + if (!pDlg->IsCustomShow()) + { + rSettings.mbCustomShow = false; + rSettings.mbAll = true; + } } } pDlg.disposeAndClear(); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
