summaryrefslogtreecommitdiff
path: root/sw/qa/uitest
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2023-01-02 13:36:42 +0100
committerLászló Németh <nemeth@numbertext.org>2023-01-03 09:54:27 +0000
commitc9129bd97a9514e5679ed65bdf5879718f1b476d (patch)
tree883ae3f80512ff83faf8058487435a74280cea5d /sw/qa/uitest
parent88ebc324a51f16df0248d6a0d53d2169b1995dda (diff)
tdf#152245 sw change tracking: fix copy from Calc to Writer tables
Pasting Calc tables into Writer tables uses temporary table deletion, which never occured if change tracking was enabled, resulting freezing. Fix this by disabling change tracking during temporarily, also add a limit for other potential cases, where it's not possible to delete the table. Regression from commit 05366b8e6683363688de8708a3d88cf144c7a2bf "tdf#60382 sw offapi: add change tracking of table/row deletion". Change-Id: I57874fa658652b30fc78b267ab49a52d7277a838 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144946 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/qa/uitest')
-rw-r--r--sw/qa/uitest/table/sheetToTable.py36
1 files changed, 35 insertions, 1 deletions
diff --git a/sw/qa/uitest/table/sheetToTable.py b/sw/qa/uitest/table/sheetToTable.py
index 11b9fe89b490..4a40b6966935 100644
--- a/sw/qa/uitest/table/sheetToTable.py
+++ b/sw/qa/uitest/table/sheetToTable.py
@@ -114,4 +114,38 @@ class sheetToTable(UITestCase):
self.assertEqual(table.getCellByName("A3").getString(), "Test 3")
self.assertEqual(table.getCellByName("A4").getString(), "Test 4")
-# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file
+ def test_tdf152245(self):
+ with self.ui_test.create_doc_in_start_center("calc"):
+
+ xCalcDoc = self.xUITest.getTopFocusWindow()
+ gridwin = xCalcDoc.getChild("grid_window")
+
+ enter_text_to_cell(gridwin, "A1", "Test 1")
+ enter_text_to_cell(gridwin, "A2", "Test 2")
+ enter_text_to_cell(gridwin, "A3", "Test 3")
+ enter_text_to_cell(gridwin, "A4", "Test 4")
+
+ gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A4"}))
+
+ self.xUITest.executeCommand(".uno:Copy")
+
+
+ with self.ui_test.load_empty_file("writer") as writer_doc:
+
+ self.xUITest.executeCommand(".uno:InsertTable?Columns:short=1&Rows:short=4")
+
+ # redlining should be on
+ self.xUITest.executeCommand(".uno:TrackChanges")
+
+ # This was freezing
+ self.xUITest.executeCommand(".uno:Paste")
+
+ self.assertEqual(writer_doc.TextTables.getCount(), 1)
+ table = writer_doc.getTextTables()[0]
+ self.assertEqual(len(table.getRows()), 4)
+ self.assertEqual(table.getCellByName("A1").getString(), "Test 1")
+ self.assertEqual(table.getCellByName("A2").getString(), "Test 2")
+ self.assertEqual(table.getCellByName("A3").getString(), "Test 3")
+ self.assertEqual(table.getCellByName("A4").getString(), "Test 4")
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab: