sd/qa/uitest/impress_tests/customSlideShowDialog.py | 21 ++++++++++++++++++++ sd/source/ui/func/fucushow.cxx | 9 +++++--- 2 files changed, 27 insertions(+), 3 deletions(-)
New commits: commit d7dff57384126e50b75c95e84fd3081db2f326a1 Author: Tibor Nagy <nagy.tib...@nisz.hu> AuthorDate: Thu Jul 1 16:43:33 2021 +0200 Commit: László Németh <nem...@numbertext.org> CommitDate: Mon Jul 19 09:19:06 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 <nem...@numbertext.org> Reviewed-by: László Németh <nem...@numbertext.org> diff --git a/sd/qa/uitest/impress_tests/customSlideShowDialog.py b/sd/qa/uitest/impress_tests/customSlideShowDialog.py new file mode 100644 index 000000000000..b515a9657f85 --- /dev/null +++ b/sd/qa/uitest/impress_tests/customSlideShowDialog.py @@ -0,0 +1,21 @@ +# -*- 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): + with 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) + with self.ui_test.execute_dialog_through_command(".uno:CustomShowDialog") as CustomSlideShows: + self.ui_test.close_doc() + # Without the fix in place, this test would have crashed here + +# 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 libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits