summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/qa/uitest/calc_tests/data/tdf91217.odsbin0 -> 150417 bytes
-rw-r--r--sc/qa/uitest/calc_tests9/tdf91217.py43
2 files changed, 43 insertions, 0 deletions
diff --git a/sc/qa/uitest/calc_tests/data/tdf91217.ods b/sc/qa/uitest/calc_tests/data/tdf91217.ods
new file mode 100644
index 000000000000..c1bb9da85c94
--- /dev/null
+++ b/sc/qa/uitest/calc_tests/data/tdf91217.ods
Binary files differ
diff --git a/sc/qa/uitest/calc_tests9/tdf91217.py b/sc/qa/uitest/calc_tests9/tdf91217.py
new file mode 100644
index 000000000000..103c970e6740
--- /dev/null
+++ b/sc/qa/uitest/calc_tests9/tdf91217.py
@@ -0,0 +1,43 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+from uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict
+from uitest.uihelper.common import select_pos
+from uitest.uihelper.calc import enter_text_to_cell
+from libreoffice.calc.document import get_cell_by_position
+from libreoffice.uno.propertyvalue import mkPropertyValues
+import org.libreoffice.unotest
+import pathlib
+
+def get_url_for_data_file(file_name):
+ return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
+
+#Bug 91217 - Crash when deleting rows
+
+class tdf91217(UITestCase):
+ def test_tdf91217_crash_deleting_rows(self):
+ calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf91217.ods"))
+ xCalcDoc = self.xUITest.getTopFocusWindow()
+ gridwin = xCalcDoc.getChild("grid_window")
+ document = self.ui_test.get_component()
+ #Select rows 76-1125 in sheet 3 (Daily), right click, Delete Rows. Instant crash.
+ gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A76:A1125"}))
+ self.xUITest.executeCommand(".uno:SelectRow")
+ #delete rows
+ self.xUITest.executeCommand(".uno:DeleteRows")
+ #A1 should be "Dist"
+ self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "Dist")
+ #- Undo-redo
+ self.xUITest.executeCommand(".uno:Undo")
+ self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "Dist")
+
+ self.xUITest.executeCommand(".uno:Redo")
+ self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "Dist")
+
+ self.ui_test.close_doc()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab: