diff options
author | Tibor Nagy <nagy.tibor2@nisz.hu> | 2021-07-01 16:43:33 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2021-07-19 09:19:06 +0200 |
commit | d7dff57384126e50b75c95e84fd3081db2f326a1 (patch) | |
tree | c23553be861fa90c96693ccee9d32c1b653aefea /sd | |
parent | 6c5c657ada6eb6b3f25509384e2de4c456ec0b78 (diff) |
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 <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/uitest/impress_tests/customSlideShowDialog.py | 21 | ||||
-rw-r--r-- | sd/source/ui/func/fucushow.cxx | 9 |
2 files changed, 27 insertions, 3 deletions
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(); |