diff options
author | Justin Luth <justin_luth@sil.org> | 2022-02-09 20:17:53 +0200 |
---|---|---|
committer | Justin Luth <jluth@mail.com> | 2022-02-10 10:04:18 +0100 |
commit | bda200a5e9c4592bd61b7924fa171ec3265bfd24 (patch) | |
tree | 58bc684a1697e515e8b93affce031d90b5dcbff0 /sc/qa/uitest/calc_tests | |
parent | 1c0aa970650ffc7c749e0b5ea655ebb2d137c8ae (diff) |
tdf#113785 sc: IsDataFiltered must be normalized
I can't believe this hasn't caused major issues
and has survived as a bug for so long.
Due to the way IsDataFiltered is coded,
it is required that the range is normalized
in order to get any kind of meaningful result,
so lets ensure that.
Change-Id: I2ede77f738fbaeb05a0f1425a2e88e59fca08e9e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129735
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Diffstat (limited to 'sc/qa/uitest/calc_tests')
-rw-r--r-- | sc/qa/uitest/calc_tests/autofill.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/sc/qa/uitest/calc_tests/autofill.py b/sc/qa/uitest/calc_tests/autofill.py index bdb45d00c9c9..294d60fd7102 100644 --- a/sc/qa/uitest/calc_tests/autofill.py +++ b/sc/qa/uitest/calc_tests/autofill.py @@ -49,6 +49,36 @@ class CalcAutofill(UITestCase): self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 10).getValue(), 17.34) self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 11).getValue(), 18.34) + #Test that hidden cells are not affected / skipped in the increment process. + #Simulate selecting cell A26 and dragging the fill handle in the bottom right corner of the cell down to A32 + gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A26:A32"})) + with self.ui_test.execute_dialog_through_command(".uno:FillSeries"): + pass + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 25).getValue(), 18.34) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 26).getValue(), 19.34) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 27).getValue(), 5.0) #hidden + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 28).getValue(), 5.0) #hidden + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 29).getString(), "hiddenA30") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 30).getValue(), 20.34) #overwrite "rows" + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 31).getValue(), 21.34) + #Simulate selecting cell A26 and dragging the fill handle in the bottom right corner of the cell up to A19 + # Note: start at empty cell A19 so Sheet - Fill Cells - Fill Series has good defaults + gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A19:A26"})) + with self.ui_test.execute_dialog_through_command(".uno:FillSeries") as xDialog: + xup = xDialog.getChild("up") + xincrement = xDialog.getChild("increment") + xup.executeAction("CLICK", tuple()) + xincrement.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) + xincrement.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) + xincrement.executeAction("TYPE", mkPropertyValues({"TEXT":"-1"})) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 19).getString(), "hiddenA20") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 20).getValue(), 15.34) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 21).getValue(), 5.0) #hidden + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 22).getValue(), 16.34) #overwrite "testing" + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 23).getValue(), 5.0) #hidden + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 24).getValue(), 17.34) #overwrite "hidden" + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 25).getValue(), 18.34) + #Continue with the next cells with grey background gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "M12:M18"})) with self.ui_test.execute_dialog_through_command(".uno:FillSeries"): |