summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTibor Nagy <nagy.tibor2@nisz.hu>2021-07-01 16:43:33 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2021-07-19 14:05:19 +0200
commit47b7a76fb011fdd04c3bcbfa555102a422c78638 (patch)
tree2d58bb678f2aca896455e772e2e97bdd97205d4b
parentsw: xDictionary may be an empty reference in SID_SPELLCHECK_IGNORE_ALL (diff)
downloadcore-47b7a76fb011fdd04c3bcbfa555102a422c78638.tar.gz
core-47b7a76fb011fdd04c3bcbfa555102a422c78638.zip
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> (cherry picked from commit d7dff57384126e50b75c95e84fd3081db2f326a1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119172 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--sd/qa/uitest/impress_tests/customSlideShowDialog.py26
-rw-r--r--sd/source/ui/func/fucushow.cxx9
2 files changed, 32 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..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();