diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-06-23 16:16:58 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-06-27 21:45:32 +0200 |
commit | eef1a5f3aa0f1b11024aa6760cf92181b9bf0a96 (patch) | |
tree | d4e46ce25ba5214a6e5820712c84e55035e8874e /sc/qa | |
parent | 241c37a6ad2a444ddf2eb48385041318d4e7e8ee (diff) |
uitest: remove duplicated calls to get_component()
after 8298aa62726312eee6f8fbb64a9fc9b12680447f
< uitest: guard execute_blocking_action >
Change-Id: I954c11c42620660afd48a585f5c59ff2196f4b6a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117738
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc/qa')
99 files changed, 731 insertions, 867 deletions
diff --git a/sc/qa/uitest/autofilter/autofilterBugs.py b/sc/qa/uitest/autofilter/autofilterBugs.py index ffb6419690ea..908d78aa62d3 100644 --- a/sc/qa/uitest/autofilter/autofilterBugs.py +++ b/sc/qa/uitest/autofilter/autofilterBugs.py @@ -13,9 +13,8 @@ class autofilter(UITestCase): def test_tdf115046(self): with self.ui_test.load_file(get_url_for_data_file("tdf115046.ods")) as calc_doc: - document = self.ui_test.get_component() #autofilter exist - self.assertEqual(document.getPropertyValue("UnnamedDatabaseRanges").getByTable(0).AutoFilter, True) + self.assertEqual(calc_doc.getPropertyValue("UnnamedDatabaseRanges").getByTable(0).AutoFilter, True) self.ui_test.execute_dialog_through_command(".uno:DataSort") xDialog = self.xUITest.getTopFocusWindow() @@ -23,7 +22,7 @@ class autofilter(UITestCase): xcancBtn = xDialog.getChild("cancel") self.ui_test.close_dialog_through_button(xcancBtn) #autofilter still exist - self.assertEqual(document.getPropertyValue("UnnamedDatabaseRanges").getByTable(0).AutoFilter, True) + self.assertEqual(calc_doc.getPropertyValue("UnnamedDatabaseRanges").getByTable(0).AutoFilter, True) def test_tdf94055(self): self.ui_test.create_doc_in_start_center("calc") @@ -58,11 +57,10 @@ class autofilter(UITestCase): #tdf77479.ods def test_tdf77479(self): with self.ui_test.load_file(get_url_for_data_file("tdf77479.ods")) as calc_doc: - document = self.ui_test.get_component() calcDoc = self.xUITest.getTopFocusWindow() xGridWindow = calcDoc.getChild("grid_window") #autofilter exist - self.assertEqual(document.getPropertyValue("UnnamedDatabaseRanges").getByTable(0).AutoFilter, True) + self.assertEqual(calc_doc.getPropertyValue("UnnamedDatabaseRanges").getByTable(0).AutoFilter, True) xGridWindow.executeAction("SELECT", mkPropertyValues({"RANGE": "A2:E6"})) @@ -71,12 +69,11 @@ class autofilter(UITestCase): xOKBtn = xDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOKBtn) #autofilter still exist - self.assertEqual(document.getPropertyValue("UnnamedDatabaseRanges").getByTable(0).AutoFilter, True) + self.assertEqual(calc_doc.getPropertyValue("UnnamedDatabaseRanges").getByTable(0).AutoFilter, True) #112656 def test_tdf112656(self): with self.ui_test.load_file(get_url_for_data_file("tdf112656.ods")) as calc_doc: - document = self.ui_test.get_component() calcDoc = self.xUITest.getTopFocusWindow() xGridWindow = calcDoc.getChild("grid_window") @@ -91,7 +88,6 @@ class autofilter(UITestCase): #tdf81124 def test_tdf81124(self): with self.ui_test.load_file(get_url_for_data_file("tdf81124.ods")) as calc_doc: - document = self.ui_test.get_component() calcDoc = self.xUITest.getTopFocusWindow() xGridWindow = calcDoc.getChild("grid_window") @@ -114,7 +110,6 @@ class autofilter(UITestCase): #tdf73565 def test_tdf73565(self): with self.ui_test.load_file(get_url_for_data_file("tdf73565.ods")) as calc_doc: - document = self.ui_test.get_component() calcDoc = self.xUITest.getTopFocusWindow() xGridWindow = calcDoc.getChild("grid_window") @@ -130,7 +125,6 @@ class autofilter(UITestCase): #tdf65505 def test_tdf65505(self): with self.ui_test.load_file(get_url_for_data_file("tdf81124.ods")) as calc_doc: - document = self.ui_test.get_component() calcDoc = self.xUITest.getTopFocusWindow() xGridWindow = calcDoc.getChild("grid_window") @@ -146,7 +140,6 @@ class autofilter(UITestCase): #tdf74857 def test_tdf74857(self): with self.ui_test.load_file(get_url_for_data_file("tdf74857.ods")) as calc_doc: - document = self.ui_test.get_component() calcDoc = self.xUITest.getTopFocusWindow() xGridWindow = calcDoc.getChild("grid_window") @@ -158,7 +151,6 @@ class autofilter(UITestCase): #tdf35294 def test_tdf35294(self): with self.ui_test.load_file(get_url_for_data_file("tdf35294.ods")) as calc_doc: - document = self.ui_test.get_component() calcDoc = self.xUITest.getTopFocusWindow() xGridWindow = calcDoc.getChild("grid_window") @@ -187,7 +179,6 @@ class autofilter(UITestCase): #tdf55712 def test_tdf55712(self): with self.ui_test.load_file(get_url_for_data_file("tdf55712.ods")) as calc_doc: - document = self.ui_test.get_component() calcDoc = self.xUITest.getTopFocusWindow() xGridWindow = calcDoc.getChild("grid_window") diff --git a/sc/qa/uitest/autofilter/tdf101165.py b/sc/qa/uitest/autofilter/tdf101165.py index e71820e53e0a..8232866be98e 100644 --- a/sc/qa/uitest/autofilter/tdf101165.py +++ b/sc/qa/uitest/autofilter/tdf101165.py @@ -16,13 +16,12 @@ class tdf101165(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf101165.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", "COL": "1", "ROW": "0"})) xFloatWindow = self.xUITest.getFloatWindow() xAll = xFloatWindow.getChild("toggle_all") xAll.executeAction("CLICK", tuple()) - self.assertEqual(get_cell_by_position(document, 1, 0, 1).getValue(), 6494) + self.assertEqual(get_cell_by_position(calc_doc, 1, 0, 1).getValue(), 6494) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/autofilter/tdf117276.py b/sc/qa/uitest/autofilter/tdf117276.py index fdd5e91b7f83..2c5a44be4bd3 100644 --- a/sc/qa/uitest/autofilter/tdf117276.py +++ b/sc/qa/uitest/autofilter/tdf117276.py @@ -16,7 +16,6 @@ class tdf117276(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf117276.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() # 1. open attached file # 2. open filter of column B (Fabrikat) and deselect (Citroen, Fiat, Ford, Opel, Peugeot, Renault, Tesla) gridwin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", "COL": "1", "ROW": "0"})) diff --git a/sc/qa/uitest/autofilter/tdf130070.py b/sc/qa/uitest/autofilter/tdf130070.py index 1ea4b8fbaf9c..decff22e1009 100644 --- a/sc/qa/uitest/autofilter/tdf130070.py +++ b/sc/qa/uitest/autofilter/tdf130070.py @@ -16,7 +16,6 @@ class tdf130770(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf130770.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() # 1. open attached file and check initial state self.assertFalse(is_row_hidden(calc_doc, 0)) diff --git a/sc/qa/uitest/autofilter/tdf140754.py b/sc/qa/uitest/autofilter/tdf140754.py index 186637e303b9..67a4c5055eb7 100644 --- a/sc/qa/uitest/autofilter/tdf140754.py +++ b/sc/qa/uitest/autofilter/tdf140754.py @@ -30,17 +30,15 @@ class tdf140754(UITestCase): xOKBtn = xDialogOpt.getChild("ok") self.ui_test.close_dialog_through_button(xOKBtn) - document = self.ui_test.get_component() - self.assertEqual(0, get_cell_by_position(document, 0, 0, 30).getValue()) - self.assertEqual(0, get_cell_by_position(document, 0, 0, 82).getValue()) - self.assertEqual(1, get_cell_by_position(document, 0, 0, 238).getValue()) - self.assertEqual(28, get_cell_by_position(document, 0, 0, 265).getValue()) - self.assertEqual(28, get_cell_by_position(document, 0, 0, 1370).getValue()) + self.assertEqual(0, get_cell_by_position(calc_doc, 0, 0, 30).getValue()) + self.assertEqual(0, get_cell_by_position(calc_doc, 0, 0, 82).getValue()) + self.assertEqual(1, get_cell_by_position(calc_doc, 0, 0, 238).getValue()) + self.assertEqual(28, get_cell_by_position(calc_doc, 0, 0, 265).getValue()) + self.assertEqual(28, get_cell_by_position(calc_doc, 0, 0, 1370).getValue()) xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", "COL": "2", "ROW": "0"})) xFloatWindow = self.xUITest.getFloatWindow() @@ -55,11 +53,11 @@ class tdf140754(UITestCase): xOkBtn = xFloatWindow.getChild("ok") xOkBtn.executeAction("CLICK", tuple()) - self.assertEqual(0, get_cell_by_position(document, 0, 0, 30).getValue()) - self.assertEqual(1, get_cell_by_position(document, 0, 0, 82).getValue()) - self.assertEqual(39, get_cell_by_position(document, 0, 0, 238).getValue()) - self.assertEqual(66, get_cell_by_position(document, 0, 0, 265).getValue()) - self.assertEqual(282, get_cell_by_position(document, 0, 0, 1370).getValue()) + self.assertEqual(0, get_cell_by_position(calc_doc, 0, 0, 30).getValue()) + self.assertEqual(1, get_cell_by_position(calc_doc, 0, 0, 82).getValue()) + self.assertEqual(39, get_cell_by_position(calc_doc, 0, 0, 238).getValue()) + self.assertEqual(66, get_cell_by_position(calc_doc, 0, 0, 265).getValue()) + self.assertEqual(282, get_cell_by_position(calc_doc, 0, 0, 1370).getValue()) gridwin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", "COL": "6", "ROW": "0"})) xFloatWindow = self.xUITest.getFloatWindow() @@ -73,10 +71,10 @@ class tdf140754(UITestCase): xOkBtn = xFloatWindow.getChild("ok") xOkBtn.executeAction("CLICK", tuple()) - self.assertEqual(1, get_cell_by_position(document, 0, 0, 30).getValue()) - self.assertEqual(11, get_cell_by_position(document, 0, 0, 82).getValue()) - self.assertEqual(69, get_cell_by_position(document, 0, 0, 238).getValue()) - self.assertEqual(96, get_cell_by_position(document, 0, 0, 265).getValue()) - self.assertEqual(411, get_cell_by_position(document, 0, 0, 1370).getValue()) + self.assertEqual(1, get_cell_by_position(calc_doc, 0, 0, 30).getValue()) + self.assertEqual(11, get_cell_by_position(calc_doc, 0, 0, 82).getValue()) + self.assertEqual(69, get_cell_by_position(calc_doc, 0, 0, 238).getValue()) + self.assertEqual(96, get_cell_by_position(calc_doc, 0, 0, 265).getValue()) + self.assertEqual(411, get_cell_by_position(calc_doc, 0, 0, 1370).getValue()) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/autofilter/tdf92767.py b/sc/qa/uitest/autofilter/tdf92767.py index a016d2337f86..bb63543660dd 100644 --- a/sc/qa/uitest/autofilter/tdf92767.py +++ b/sc/qa/uitest/autofilter/tdf92767.py @@ -15,7 +15,6 @@ class tdf92767(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf92767.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() for i in range(0,25): self.assertFalse(is_row_hidden(calc_doc, i)) diff --git a/sc/qa/uitest/autofilter/tdf97340.py b/sc/qa/uitest/autofilter/tdf97340.py index f4b58ce5a7d4..d7e7f0c2afa3 100644 --- a/sc/qa/uitest/autofilter/tdf97340.py +++ b/sc/qa/uitest/autofilter/tdf97340.py @@ -15,7 +15,6 @@ class tdf97340(UITestCase): with self.ui_test.load_file(get_url_for_data_file("autofilter.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", "COL": "0", "ROW": "0"})) xFloatWindow = self.xUITest.getFloatWindow() diff --git a/sc/qa/uitest/calc_tests/autofill.py b/sc/qa/uitest/calc_tests/autofill.py index 57691ef5c499..60a5f04f3315 100644 --- a/sc/qa/uitest/calc_tests/autofill.py +++ b/sc/qa/uitest/calc_tests/autofill.py @@ -17,7 +17,6 @@ class CalcAutofill(UITestCase): with self.ui_test.load_file(get_url_for_data_file("autofill.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #Select cell A12 and drag the fill handle in the bottom right corner of the cell down to A18 gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A12:A18"})) self.ui_test.execute_dialog_through_command(".uno:FillSeries") @@ -25,13 +24,13 @@ class CalcAutofill(UITestCase): xOK = xDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOK) #Compare with the content in the right next column - self.assertEqual(get_cell_by_position(document, 0, 0, 11).getValue(), 18.34) - self.assertEqual(get_cell_by_position(document, 0, 0, 12).getValue(), 19.34) - self.assertEqual(get_cell_by_position(document, 0, 0, 13).getValue(), 20.34) - self.assertEqual(get_cell_by_position(document, 0, 0, 14).getValue(), 21.34) - self.assertEqual(get_cell_by_position(document, 0, 0, 15).getValue(), 22.34) - self.assertEqual(get_cell_by_position(document, 0, 0, 16).getValue(), 23.34) - self.assertEqual(get_cell_by_position(document, 0, 0, 17).getValue(), 24.34) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 11).getValue(), 18.34) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 12).getValue(), 19.34) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 13).getValue(), 20.34) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 14).getValue(), 21.34) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 15).getValue(), 22.34) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 16).getValue(), 23.34) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 17).getValue(), 24.34) #Select cell A12 and drag the fill handle in the bottom right corner of the cell up to A6 gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A6:A12"})) self.ui_test.execute_dialog_through_command(".uno:FillSeries") @@ -45,13 +44,13 @@ class CalcAutofill(UITestCase): xOK = xDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOK) #Compare with the content in the right next column - self.assertEqual(get_cell_by_position(document, 0, 0, 5).getValue(), 12.34) - self.assertEqual(get_cell_by_position(document, 0, 0, 6).getValue(), 13.34) - self.assertEqual(get_cell_by_position(document, 0, 0, 7).getValue(), 14.34) - self.assertEqual(get_cell_by_position(document, 0, 0, 8).getValue(), 15.34) - self.assertEqual(get_cell_by_position(document, 0, 0, 9).getValue(), 16.34) - self.assertEqual(get_cell_by_position(document, 0, 0, 10).getValue(), 17.34) - self.assertEqual(get_cell_by_position(document, 0, 0, 11).getValue(), 18.34) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 5).getValue(), 12.34) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 6).getValue(), 13.34) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 7).getValue(), 14.34) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 8).getValue(), 15.34) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 9).getValue(), 16.34) + 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) #Continue with the next cells with grey background gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "M12:M18"})) @@ -60,13 +59,13 @@ class CalcAutofill(UITestCase): xOK = xDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOK) #Compare with the content in the right next column - self.assertEqual(get_cell_by_position(document, 0, 12, 11).getString(), "12abc40") - self.assertEqual(get_cell_by_position(document, 0, 12, 12).getString(), "12abc41") - self.assertEqual(get_cell_by_position(document, 0, 12, 13).getString(), "12abc42") - self.assertEqual(get_cell_by_position(document, 0, 12, 14).getString(), "12abc43") - self.assertEqual(get_cell_by_position(document, 0, 12, 15).getString(), "12abc44") - self.assertEqual(get_cell_by_position(document, 0, 12, 16).getString(), "12abc45") - self.assertEqual(get_cell_by_position(document, 0, 12, 17).getString(), "12abc46") + self.assertEqual(get_cell_by_position(calc_doc, 0, 12, 11).getString(), "12abc40") + self.assertEqual(get_cell_by_position(calc_doc, 0, 12, 12).getString(), "12abc41") + self.assertEqual(get_cell_by_position(calc_doc, 0, 12, 13).getString(), "12abc42") + self.assertEqual(get_cell_by_position(calc_doc, 0, 12, 14).getString(), "12abc43") + self.assertEqual(get_cell_by_position(calc_doc, 0, 12, 15).getString(), "12abc44") + self.assertEqual(get_cell_by_position(calc_doc, 0, 12, 16).getString(), "12abc45") + self.assertEqual(get_cell_by_position(calc_doc, 0, 12, 17).getString(), "12abc46") gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "M6:M12"})) self.ui_test.execute_dialog_through_command(".uno:FillSeries") @@ -80,13 +79,13 @@ class CalcAutofill(UITestCase): xOK = xDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOK) #Compare with the content in the right next column - self.assertEqual(get_cell_by_position(document, 0, 12, 5).getString(), "12abc34") - self.assertEqual(get_cell_by_position(document, 0, 12, 6).getString(), "12abc35") - self.assertEqual(get_cell_by_position(document, 0, 12, 7).getString(), "12abc36") - self.assertEqual(get_cell_by_position(document, 0, 12, 8).getString(), "12abc37") - self.assertEqual(get_cell_by_position(document, 0, 12, 9).getString(), "12abc38") - self.assertEqual(get_cell_by_position(document, 0, 12, 10).getString(), "12abc39") - self.assertEqual(get_cell_by_position(document, 0, 12, 11).getString(), "12abc40") + self.assertEqual(get_cell_by_position(calc_doc, 0, 12, 5).getString(), "12abc34") + self.assertEqual(get_cell_by_position(calc_doc, 0, 12, 6).getString(), "12abc35") + self.assertEqual(get_cell_by_position(calc_doc, 0, 12, 7).getString(), "12abc36") + self.assertEqual(get_cell_by_position(calc_doc, 0, 12, 8).getString(), "12abc37") + self.assertEqual(get_cell_by_position(calc_doc, 0, 12, 9).getString(), "12abc38") + self.assertEqual(get_cell_by_position(calc_doc, 0, 12, 10).getString(), "12abc39") + self.assertEqual(get_cell_by_position(calc_doc, 0, 12, 11).getString(), "12abc40") gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "P12:P18"})) self.ui_test.execute_dialog_through_command(".uno:FillSeries") @@ -94,13 +93,13 @@ class CalcAutofill(UITestCase): xOK = xDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOK) #Compare with the content in the right next column - self.assertEqual(get_cell_by_position(document, 0, 15, 11).getString(), "10.64.127.7") - self.assertEqual(get_cell_by_position(document, 0, 15, 12).getString(), "10.64.127.8") - self.assertEqual(get_cell_by_position(document, 0, 15, 13).getString(), "10.64.127.9") - self.assertEqual(get_cell_by_position(document, 0, 15, 14).getString(), "10.64.127.10") - self.assertEqual(get_cell_by_position(document, 0, 15, 15).getString(), "10.64.127.11") - self.assertEqual(get_cell_by_position(document, 0, 15, 16).getString(), "10.64.127.12") - self.assertEqual(get_cell_by_position(document, 0, 15, 17).getString(), "10.64.127.13") + self.assertEqual(get_cell_by_position(calc_doc, 0, 15, 11).getString(), "10.64.127.7") + self.assertEqual(get_cell_by_position(calc_doc, 0, 15, 12).getString(), "10.64.127.8") + self.assertEqual(get_cell_by_position(calc_doc, 0, 15, 13).getString(), "10.64.127.9") + self.assertEqual(get_cell_by_position(calc_doc, 0, 15, 14).getString(), "10.64.127.10") + self.assertEqual(get_cell_by_position(calc_doc, 0, 15, 15).getString(), "10.64.127.11") + self.assertEqual(get_cell_by_position(calc_doc, 0, 15, 16).getString(), "10.64.127.12") + self.assertEqual(get_cell_by_position(calc_doc, 0, 15, 17).getString(), "10.64.127.13") gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "P6:P12"})) self.ui_test.execute_dialog_through_command(".uno:FillSeries") @@ -114,13 +113,13 @@ class CalcAutofill(UITestCase): xOK = xDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOK) #Compare with the content in the right next column - self.assertEqual(get_cell_by_position(document, 0, 15, 5).getString(), "10.64.127.1") - self.assertEqual(get_cell_by_position(document, 0, 15, 6).getString(), "10.64.127.2") - self.assertEqual(get_cell_by_position(document, 0, 15, 7).getString(), "10.64.127.3") - self.assertEqual(get_cell_by_position(document, 0, 15, 8).getString(), "10.64.127.4") - self.assertEqual(get_cell_by_position(document, 0, 15, 9).getString(), "10.64.127.5") - self.assertEqual(get_cell_by_position(document, 0, 15, 10).getString(), "10.64.127.6") - self.assertEqual(get_cell_by_position(document, 0, 15, 11).getString(), "10.64.127.7") + self.assertEqual(get_cell_by_position(calc_doc, 0, 15, 5).getString(), "10.64.127.1") + self.assertEqual(get_cell_by_position(calc_doc, 0, 15, 6).getString(), "10.64.127.2") + self.assertEqual(get_cell_by_position(calc_doc, 0, 15, 7).getString(), "10.64.127.3") + self.assertEqual(get_cell_by_position(calc_doc, 0, 15, 8).getString(), "10.64.127.4") + self.assertEqual(get_cell_by_position(calc_doc, 0, 15, 9).getString(), "10.64.127.5") + self.assertEqual(get_cell_by_position(calc_doc, 0, 15, 10).getString(), "10.64.127.6") + self.assertEqual(get_cell_by_position(calc_doc, 0, 15, 11).getString(), "10.64.127.7") def test_autofill_with_suffix(self): calc_doc = self.ui_test.create_doc_in_start_center("calc") diff --git a/sc/qa/uitest/calc_tests/autosum.py b/sc/qa/uitest/calc_tests/autosum.py index bc493d1977b0..537ccb4a842f 100644 --- a/sc/qa/uitest/calc_tests/autosum.py +++ b/sc/qa/uitest/calc_tests/autosum.py @@ -18,7 +18,6 @@ class calcAutosum(UITestCase): with self.ui_test.load_file(get_url_for_data_file("autosum.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #Place the cell cursor on the gray cells located under Point 1. #(Multiselection is not possible at this place) and press the Sum Icon in the formula bar. #Now hit the enter key and the result should be shown. Do so for each gray cell in this part of the document. @@ -28,24 +27,23 @@ class calcAutosum(UITestCase): self.xUITest.executeCommand(".uno:AutoSum") gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "B14"})) self.xUITest.executeCommand(".uno:AutoSum") - self.assertEqual(get_cell_by_position(document, 0, 1, 9).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 1, 9).getFormula(), "=SUM(B8:B9)") - self.assertEqual(get_cell_by_position(document, 0, 1, 12).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 1, 12).getFormula(), "=SUM(B11:B12)") - self.assertEqual(get_cell_by_position(document, 0, 1, 13).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 1, 13).getFormula(), "=SUM(B13:B13;B10:B10)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 9).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 9).getFormula(), "=SUM(B8:B9)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 12).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 12).getFormula(), "=SUM(B11:B12)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 13).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 13).getFormula(), "=SUM(B13:B13;B10:B10)") gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "F8:F14"})) self.xUITest.executeCommand(".uno:AutoSum") - self.assertEqual(get_cell_by_position(document, 0, 5, 13).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 5, 13).getFormula(), "=SUM(F13:F13;F10:F10)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 13).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 13).getFormula(), "=SUM(F13:F13;F10:F10)") def test_autosum_test2(self): #Sum on Row and Column with self.ui_test.load_file(get_url_for_data_file("autosum.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "E25"})) self.xUITest.executeCommand(".uno:AutoSum") @@ -60,202 +58,191 @@ class calcAutosum(UITestCase): gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "E30"})) self.xUITest.executeCommand(".uno:AutoSum") - self.assertEqual(get_cell_by_position(document, 0, 4, 24).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 4, 24).getFormula(), "=SUM(E22:E24)") - self.assertEqual(get_cell_by_position(document, 0, 4, 25).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 4, 25).getFormula(), "=SUM(B26:D26)") - self.assertEqual(get_cell_by_position(document, 0, 4, 26).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 4, 26).getFormula(), "=SUM(B27:D27)") - self.assertEqual(get_cell_by_position(document, 0, 4, 27).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 4, 27).getFormula(), "=SUM(B28:D28)") - self.assertEqual(get_cell_by_position(document, 0, 4, 28).getValue(), 9) - self.assertEqual(get_cell_by_position(document, 0, 4, 28).getFormula(), "=SUM(E26:E28)") - self.assertEqual(get_cell_by_position(document, 0, 4, 29).getValue(), 12) - self.assertEqual(get_cell_by_position(document, 0, 4, 29).getFormula(), "=SUM(E29:E29;E25:E25)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 24).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 24).getFormula(), "=SUM(E22:E24)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 25).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 25).getFormula(), "=SUM(B26:D26)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 26).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 26).getFormula(), "=SUM(B27:D27)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 27).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 27).getFormula(), "=SUM(B28:D28)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 28).getValue(), 9) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 28).getFormula(), "=SUM(E26:E28)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 29).getValue(), 12) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 29).getFormula(), "=SUM(E29:E29;E25:E25)") def test_autosum_test3(self): #Subtotals on Autosum with self.ui_test.load_file(get_url_for_data_file("autosum.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "C49"})) self.xUITest.executeCommand(".uno:AutoSum") - self.assertEqual(get_cell_by_position(document, 0, 2, 48).getValue(), 20) - self.assertEqual(get_cell_by_position(document, 0, 2, 48).getFormula(), "=SUBTOTAL(9;C38:C48)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 48).getValue(), 20) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 48).getFormula(), "=SUBTOTAL(9;C38:C48)") def test_autosum_test4(self): #Autosum on column with selected empty cell for result with self.ui_test.load_file(get_url_for_data_file("autosum.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "B59:B64"})) self.xUITest.executeCommand(".uno:AutoSum") - self.assertEqual(get_cell_by_position(document, 0, 1, 63).getValue(), 150) - self.assertEqual(get_cell_by_position(document, 0, 1, 63).getFormula(), "=SUM(B59:B63)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 63).getValue(), 150) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 63).getFormula(), "=SUM(B59:B63)") def test_autosum_test5(self): #5.Autosum on rows with selected empty cell for result with self.ui_test.load_file(get_url_for_data_file("autosum.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "B76:E80"})) self.xUITest.executeCommand(".uno:AutoSum") - self.assertEqual(get_cell_by_position(document, 0, 4, 75).getValue(), 30) - self.assertEqual(get_cell_by_position(document, 0, 4, 75).getFormula(), "=SUM(B76:D76)") - self.assertEqual(get_cell_by_position(document, 0, 4, 76).getValue(), 60) - self.assertEqual(get_cell_by_position(document, 0, 4, 76).getFormula(), "=SUM(B77:D77)") - self.assertEqual(get_cell_by_position(document, 0, 4, 77).getValue(), 90) - self.assertEqual(get_cell_by_position(document, 0, 4, 77).getFormula(), "=SUM(B78:D78)") - self.assertEqual(get_cell_by_position(document, 0, 4, 78).getValue(), 120) - self.assertEqual(get_cell_by_position(document, 0, 4, 78).getFormula(), "=SUM(B79:D79)") - self.assertEqual(get_cell_by_position(document, 0, 4, 79).getValue(), 150) - self.assertEqual(get_cell_by_position(document, 0, 4, 79).getFormula(), "=SUM(B80:D80)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 75).getValue(), 30) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 75).getFormula(), "=SUM(B76:D76)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 76).getValue(), 60) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 76).getFormula(), "=SUM(B77:D77)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 77).getValue(), 90) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 77).getFormula(), "=SUM(B78:D78)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 78).getValue(), 120) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 78).getFormula(), "=SUM(B79:D79)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 79).getValue(), 150) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 79).getFormula(), "=SUM(B80:D80)") def test_autosum_test6(self): #6.Subtotal on column with selected empty cell for result with self.ui_test.load_file(get_url_for_data_file("autosum.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "C92:C101"})) self.xUITest.executeCommand(".uno:AutoSum") - self.assertEqual(get_cell_by_position(document, 0, 2, 100).getValue(), 19) - self.assertEqual(get_cell_by_position(document, 0, 2, 100).getFormula(), "=SUBTOTAL(9;C92:C100)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 100).getValue(), 19) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 100).getFormula(), "=SUBTOTAL(9;C92:C100)") def test_autosum_test7(self): #7.Autosum on column without selected empty cell for result with self.ui_test.load_file(get_url_for_data_file("autosum.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "B109:B113"})) self.xUITest.executeCommand(".uno:AutoSum") - self.assertEqual(get_cell_by_position(document, 0, 1, 113).getValue(), 150) - self.assertEqual(get_cell_by_position(document, 0, 1, 113).getFormula(), "=SUM(B109:B113)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 113).getValue(), 150) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 113).getFormula(), "=SUM(B109:B113)") def test_autosum_test8(self): #8.Autosum on rows without selected empty cell for result with self.ui_test.load_file(get_url_for_data_file("autosum.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "B126:D126"})) gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "B128:D128", "EXTEND":"1"})) gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "B130:D130", "EXTEND":"1"})) self.xUITest.executeCommand(".uno:AutoSum") - self.assertEqual(get_cell_by_position(document, 0, 4, 125).getValue(), 30) - self.assertEqual(get_cell_by_position(document, 0, 4, 125).getFormula(), "=SUM(B126:D126)") - self.assertEqual(get_cell_by_position(document, 0, 4, 127).getValue(), 90) - self.assertEqual(get_cell_by_position(document, 0, 4, 127).getFormula(), "=SUM(B128:D128)") - self.assertEqual(get_cell_by_position(document, 0, 4, 129).getValue(), 150) - self.assertEqual(get_cell_by_position(document, 0, 4, 129).getFormula(), "=SUM(B130:D130)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 125).getValue(), 30) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 125).getFormula(), "=SUM(B126:D126)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 127).getValue(), 90) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 127).getFormula(), "=SUM(B128:D128)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 129).getValue(), 150) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 129).getFormula(), "=SUM(B130:D130)") def test_autosum_test9(self): #9.Subtotal on column without selected empty cell for result with self.ui_test.load_file(get_url_for_data_file("autosum.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "C142:C149"})) self.xUITest.executeCommand(".uno:AutoSum") - self.assertEqual(get_cell_by_position(document, 0, 2, 150).getValue(), 19) - self.assertEqual(get_cell_by_position(document, 0, 2, 150).getFormula(), "=SUBTOTAL(9;C142:C149)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 150).getValue(), 19) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 150).getFormula(), "=SUBTOTAL(9;C142:C149)") def test_autosum_test10(self): #10.Autosum on multiselected columns without selected empty cell for result with self.ui_test.load_file(get_url_for_data_file("autosum.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "B160:D164"})) self.xUITest.executeCommand(".uno:AutoSum") - self.assertEqual(get_cell_by_position(document, 0, 1, 164).getValue(), 150) - self.assertEqual(get_cell_by_position(document, 0, 1, 164).getFormula(), "=SUM(B160:B164)") - self.assertEqual(get_cell_by_position(document, 0, 2, 164).getValue(), 150) - self.assertEqual(get_cell_by_position(document, 0, 2, 164).getFormula(), "=SUM(C160:C164)") - self.assertEqual(get_cell_by_position(document, 0, 3, 164).getValue(), 150) - self.assertEqual(get_cell_by_position(document, 0, 3, 164).getFormula(), "=SUM(D160:D164)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 164).getValue(), 150) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 164).getFormula(), "=SUM(B160:B164)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 164).getValue(), 150) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 164).getFormula(), "=SUM(C160:C164)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 164).getValue(), 150) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 164).getFormula(), "=SUM(D160:D164)") def test_autosum_test11(self): #11.Autosum on columns with formula results without selected empty cell for result with self.ui_test.load_file(get_url_for_data_file("autosum.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "B173:D177"})) self.xUITest.executeCommand(".uno:AutoSum") - self.assertEqual(round(get_cell_by_position(document, 0, 1, 177).getValue(),2), 2.55) - self.assertEqual(get_cell_by_position(document, 0, 1, 177).getFormula(), "=SUM(B173:B177)") - self.assertEqual(round(get_cell_by_position(document, 0, 2, 177).getValue(),2), -4.91) - self.assertEqual(get_cell_by_position(document, 0, 2, 177).getFormula(), "=SUM(C173:C177)") - self.assertEqual(get_cell_by_position(document, 0, 3, 177).getValue(), 5500) - self.assertEqual(get_cell_by_position(document, 0, 3, 177).getFormula(), "=SUM(D173:D177)") + self.assertEqual(round(get_cell_by_position(calc_doc, 0, 1, 177).getValue(),2), 2.55) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 177).getFormula(), "=SUM(B173:B177)") + self.assertEqual(round(get_cell_by_position(calc_doc, 0, 2, 177).getValue(),2), -4.91) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 177).getFormula(), "=SUM(C173:C177)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 177).getValue(), 5500) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 177).getFormula(), "=SUM(D173:D177)") def test_autosum_test12(self): #12.Autosum on column with filled cell under selected area with self.ui_test.load_file(get_url_for_data_file("autosum.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "B186:D190"})) self.xUITest.executeCommand(".uno:AutoSum") - self.assertEqual(get_cell_by_position(document, 0, 1, 191).getValue(), 150) - self.assertEqual(get_cell_by_position(document, 0, 1, 191).getFormula(), "=SUM(B186:B190)") - self.assertEqual(get_cell_by_position(document, 0, 2, 191).getValue(), 150) - self.assertEqual(get_cell_by_position(document, 0, 2, 191).getFormula(), "=SUM(C186:C190)") - self.assertEqual(get_cell_by_position(document, 0, 3, 191).getValue(), 150) - self.assertEqual(get_cell_by_position(document, 0, 3, 191).getFormula(), "=SUM(D186:D190)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 191).getValue(), 150) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 191).getFormula(), "=SUM(B186:B190)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 191).getValue(), 150) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 191).getFormula(), "=SUM(C186:C190)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 191).getValue(), 150) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 191).getFormula(), "=SUM(D186:D190)") def test_autosum_test13(self): #13.Autosum on column and rows with empty cells selected for row and column with self.ui_test.load_file(get_url_for_data_file("autosum.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "B203:E208"})) self.xUITest.executeCommand(".uno:AutoSum") - self.assertEqual(get_cell_by_position(document, 0, 1, 207).getValue(), 150) - self.assertEqual(get_cell_by_position(document, 0, 1, 207).getFormula(), "=SUM(B203:B207)") - self.assertEqual(get_cell_by_position(document, 0, 2, 207).getValue(), 150) - self.assertEqual(get_cell_by_position(document, 0, 2, 207).getFormula(), "=SUM(C203:C207)") - self.assertEqual(get_cell_by_position(document, 0, 3, 207).getValue(), 150) - self.assertEqual(get_cell_by_position(document, 0, 3, 207).getFormula(), "=SUM(D203:D207)") - self.assertEqual(get_cell_by_position(document, 0, 4, 207).getValue(), 450) - self.assertEqual(get_cell_by_position(document, 0, 4, 207).getFormula(), "=SUM(B208:D208)") - self.assertEqual(get_cell_by_position(document, 0, 4, 202).getValue(), 30) - self.assertEqual(get_cell_by_position(document, 0, 4, 202).getFormula(), "=SUM(B203:D203)") - self.assertEqual(get_cell_by_position(document, 0, 4, 203).getValue(), 60) - self.assertEqual(get_cell_by_position(document, 0, 4, 203).getFormula(), "=SUM(B204:D204)") - self.assertEqual(get_cell_by_position(document, 0, 4, 204).getValue(), 90) - self.assertEqual(get_cell_by_position(document, 0, 4, 204).getFormula(), "=SUM(B205:D205)") - self.assertEqual(get_cell_by_position(document, 0, 4, 205).getValue(), 120) - self.assertEqual(get_cell_by_position(document, 0, 4, 205).getFormula(), "=SUM(B206:D206)") - self.assertEqual(get_cell_by_position(document, 0, 4, 206).getValue(), 150) - self.assertEqual(get_cell_by_position(document, 0, 4, 206).getFormula(), "=SUM(B207:D207)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 207).getValue(), 150) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 207).getFormula(), "=SUM(B203:B207)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 207).getValue(), 150) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 207).getFormula(), "=SUM(C203:C207)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 207).getValue(), 150) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 207).getFormula(), "=SUM(D203:D207)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 207).getValue(), 450) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 207).getFormula(), "=SUM(B208:D208)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 202).getValue(), 30) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 202).getFormula(), "=SUM(B203:D203)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 203).getValue(), 60) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 203).getFormula(), "=SUM(B204:D204)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 204).getValue(), 90) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 204).getFormula(), "=SUM(B205:D205)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 205).getValue(), 120) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 205).getFormula(), "=SUM(B206:D206)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 206).getValue(), 150) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 206).getFormula(), "=SUM(B207:D207)") # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/calc_tests/tdf133855.py b/sc/qa/uitest/calc_tests/tdf133855.py index cd2144c3a134..ea9c5b15a47f 100644 --- a/sc/qa/uitest/calc_tests/tdf133855.py +++ b/sc/qa/uitest/calc_tests/tdf133855.py @@ -15,7 +15,6 @@ class tdf133855(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf133855.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() - document = self.ui_test.get_component() results = ['A', 'B', 'C', 'D', 'E', 'F'] @@ -30,7 +29,7 @@ class tdf133855(UITestCase): xListItem = xlist.getChild( str(i) ) xListItem.executeAction("DOUBLECLICK" , mkPropertyValues({}) ) - self.assertEqual(get_cell_by_position(document, 0, 6, 5).getString(), results[i]) + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 5).getString(), results[i]) # normal dropdown list for i in range(len(results)): @@ -43,6 +42,6 @@ class tdf133855(UITestCase): xListItem = xlist.getChild( str(i) ) xListItem.executeAction("DOUBLECLICK" , mkPropertyValues({}) ) - self.assertEqual(get_cell_by_position(document, 0, 6, 6).getString(), results[i]) + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 6).getString(), results[i]) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/calc_tests2/consolidate.py b/sc/qa/uitest/calc_tests2/consolidate.py index 95ddcf3df592..83ed3587dad1 100644 --- a/sc/qa/uitest/calc_tests2/consolidate.py +++ b/sc/qa/uitest/calc_tests2/consolidate.py @@ -15,7 +15,6 @@ class consolidate(UITestCase): with self.ui_test.load_file(get_url_for_data_file("consolidate.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() self.ui_test.execute_modeless_dialog_through_command(".uno:DataConsolidate") xDialog = self.xUITest.getTopFocusWindow() @@ -44,25 +43,25 @@ class consolidate(UITestCase): xOKBtn = xDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOKBtn) #verify - self.assertEqual(get_cell_by_position(document, 0, 1, 2).getValue(), 300) - self.assertEqual(get_cell_by_position(document, 0, 1, 3).getValue(), 303) - self.assertEqual(get_cell_by_position(document, 0, 1, 4).getValue(), 306) - self.assertEqual(get_cell_by_position(document, 0, 1, 5).getValue(), 309) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 2).getValue(), 300) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 3).getValue(), 303) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 4).getValue(), 306) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 5).getValue(), 309) - self.assertEqual(get_cell_by_position(document, 0, 2, 2).getValue(), 303) - self.assertEqual(get_cell_by_position(document, 0, 2, 3).getValue(), 306) - self.assertEqual(get_cell_by_position(document, 0, 2, 4).getValue(), 309) - self.assertEqual(get_cell_by_position(document, 0, 2, 5).getValue(), 312) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 2).getValue(), 303) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 3).getValue(), 306) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 4).getValue(), 309) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 5).getValue(), 312) - self.assertEqual(get_cell_by_position(document, 0, 3, 2).getValue(), 306) - self.assertEqual(get_cell_by_position(document, 0, 3, 3).getValue(), 309) - self.assertEqual(get_cell_by_position(document, 0, 3, 4).getValue(), 312) - self.assertEqual(get_cell_by_position(document, 0, 3, 5).getValue(), 315) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 2).getValue(), 306) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 3).getValue(), 309) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 4).getValue(), 312) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 5).getValue(), 315) - self.assertEqual(get_cell_by_position(document, 0, 4, 2).getValue(), 309) - self.assertEqual(get_cell_by_position(document, 0, 4, 3).getValue(), 312) - self.assertEqual(get_cell_by_position(document, 0, 4, 4).getValue(), 315) - self.assertEqual(get_cell_by_position(document, 0, 4, 5).getValue(), 318) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 2).getValue(), 309) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 3).getValue(), 312) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 4).getValue(), 315) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 5).getValue(), 318) #verify dialog self.ui_test.execute_modeless_dialog_through_command(".uno:DataConsolidate") xDialog = self.xUITest.getTopFocusWindow() @@ -86,25 +85,25 @@ class consolidate(UITestCase): xOKBtn = xDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOKBtn) - self.assertEqual(get_cell_by_position(document, 0, 1, 2).getValue(), 200) - self.assertEqual(get_cell_by_position(document, 0, 1, 3).getValue(), 202) - self.assertEqual(get_cell_by_position(document, 0, 1, 4).getValue(), 204) - self.assertEqual(get_cell_by_position(document, 0, 1, 5).getValue(), 206) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 2).getValue(), 200) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 3).getValue(), 202) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 4).getValue(), 204) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 5).getValue(), 206) - self.assertEqual(get_cell_by_position(document, 0, 2, 2).getValue(), 202) - self.assertEqual(get_cell_by_position(document, 0, 2, 3).getValue(), 204) - self.assertEqual(get_cell_by_position(document, 0, 2, 4).getValue(), 206) - self.assertEqual(get_cell_by_position(document, 0, 2, 5).getValue(), 208) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 2).getValue(), 202) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 3).getValue(), 204) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 4).getValue(), 206) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 5).getValue(), 208) - self.assertEqual(get_cell_by_position(document, 0, 3, 2).getValue(), 204) - self.assertEqual(get_cell_by_position(document, 0, 3, 3).getValue(), 206) - self.assertEqual(get_cell_by_position(document, 0, 3, 4).getValue(), 208) - self.assertEqual(get_cell_by_position(document, 0, 3, 5).getValue(), 210) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 2).getValue(), 204) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 3).getValue(), 206) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 4).getValue(), 208) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 5).getValue(), 210) - self.assertEqual(get_cell_by_position(document, 0, 4, 2).getValue(), 206) - self.assertEqual(get_cell_by_position(document, 0, 4, 3).getValue(), 208) - self.assertEqual(get_cell_by_position(document, 0, 4, 4).getValue(), 210) - self.assertEqual(get_cell_by_position(document, 0, 4, 5).getValue(), 212) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 2).getValue(), 206) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 3).getValue(), 208) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 4).getValue(), 210) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 5).getValue(), 212) # test cancel button self.ui_test.execute_modeless_dialog_through_command(".uno:DataConsolidate") diff --git a/sc/qa/uitest/calc_tests2/standardFilter.py b/sc/qa/uitest/calc_tests2/standardFilter.py index 25b6373c7e42..dccf669d1e39 100644 --- a/sc/qa/uitest/calc_tests2/standardFilter.py +++ b/sc/qa/uitest/calc_tests2/standardFilter.py @@ -18,7 +18,6 @@ class standardFilter(UITestCase): with self.ui_test.load_file(get_url_for_data_file("standardFilter.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:C8"})) self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter") @@ -67,7 +66,6 @@ class standardFilter(UITestCase): with self.ui_test.load_file(get_url_for_data_file("standardFilter.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:C8"})) self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter") @@ -89,21 +87,20 @@ class standardFilter(UITestCase): xOKBtn = xDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOKBtn) #verify - self.assertEqual(get_cell_by_position(document, 0, 5, 0).getString(), "a") - self.assertEqual(get_cell_by_position(document, 0, 6, 0).getString(), "b") - self.assertEqual(get_cell_by_position(document, 0, 7, 0).getString(), "c") - self.assertEqual(get_cell_by_position(document, 0, 5, 1).getValue(), 1) - self.assertEqual(get_cell_by_position(document, 0, 6, 1).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 7, 1).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 5, 2).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 6, 2).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 7, 2).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 0).getString(), "a") + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 0).getString(), "b") + self.assertEqual(get_cell_by_position(calc_doc, 0, 7, 0).getString(), "c") + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 1).getValue(), 1) + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 1).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 7, 1).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 2).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 2).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 7, 2).getValue(), 4) def test_standard_filter_copy_result_next_sheet(self): with self.ui_test.load_file(get_url_for_data_file("standardFilter.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:C8"})) self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter") @@ -125,15 +122,15 @@ class standardFilter(UITestCase): xOKBtn = xDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOKBtn) #verify - self.assertEqual(get_cell_by_position(document, 1, 5, 0).getString(), "a") - self.assertEqual(get_cell_by_position(document, 1, 6, 0).getString(), "b") - self.assertEqual(get_cell_by_position(document, 1, 7, 0).getString(), "c") - self.assertEqual(get_cell_by_position(document, 1, 5, 1).getValue(), 1) - self.assertEqual(get_cell_by_position(document, 1, 6, 1).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 1, 7, 1).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 1, 5, 2).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 1, 6, 2).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 1, 7, 2).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 1, 5, 0).getString(), "a") + self.assertEqual(get_cell_by_position(calc_doc, 1, 6, 0).getString(), "b") + self.assertEqual(get_cell_by_position(calc_doc, 1, 7, 0).getString(), "c") + self.assertEqual(get_cell_by_position(calc_doc, 1, 5, 1).getValue(), 1) + self.assertEqual(get_cell_by_position(calc_doc, 1, 6, 1).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 1, 7, 1).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 1, 5, 2).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 1, 6, 2).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 1, 7, 2).getValue(), 4) def test_standard_filter_case_sensitive(self): calc_doc = self.ui_test.create_doc_in_start_center("calc") diff --git a/sc/qa/uitest/calc_tests2/tdf114992.py b/sc/qa/uitest/calc_tests2/tdf114992.py index eedf7dcba100..3a4ffb55a857 100644 --- a/sc/qa/uitest/calc_tests2/tdf114992.py +++ b/sc/qa/uitest/calc_tests2/tdf114992.py @@ -14,15 +14,14 @@ class tdf114992(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf114992.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() self.ui_test.execute_dialog_through_command(".uno:Remove") #delete sheet xDialog = self.xUITest.getTopFocusWindow() xOKButton = xDialog.getChild("yes") xOKButton.executeAction("CLICK", tuple()) - self.assertEqual(document.Sheets.getCount(), 1) + self.assertEqual(calc_doc.Sheets.getCount(), 1) self.xUITest.executeCommand(".uno:Undo") - self.assertEqual(document.Sheets.getCount(), 2) + self.assertEqual(calc_doc.Sheets.getCount(), 2) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/calc_tests2/tdf37623.py b/sc/qa/uitest/calc_tests2/tdf37623.py index fcf4d278448a..00ccf19c4a33 100644 --- a/sc/qa/uitest/calc_tests2/tdf37623.py +++ b/sc/qa/uitest/calc_tests2/tdf37623.py @@ -15,7 +15,6 @@ class tdf37623(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf37623.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A2:A6"})) self.ui_test.execute_dialog_through_command(".uno:FillSeries") xDialog = self.xUITest.getTopFocusWindow() @@ -24,10 +23,10 @@ class tdf37623(UITestCase): xOK = xDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOK) - self.assertEqual(get_cell_by_position(document, 0, 0, 1).getValue(), 1) - self.assertEqual(get_cell_by_position(document, 0, 0, 2).getValue(), 0) - self.assertEqual(get_cell_by_position(document, 0, 0, 3).getValue(), 0) - self.assertEqual(get_cell_by_position(document, 0, 0, 4).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 0, 5).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 1).getValue(), 1) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 2).getValue(), 0) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 3).getValue(), 0) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 4).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 5).getValue(), 3) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/calc_tests3/tdf57274.py b/sc/qa/uitest/calc_tests3/tdf57274.py index 32b92bc14bcc..135a83a223dd 100644 --- a/sc/qa/uitest/calc_tests3/tdf57274.py +++ b/sc/qa/uitest/calc_tests3/tdf57274.py @@ -17,7 +17,6 @@ class tdf57274(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf57274.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #* Source Cells, range B6..E6 gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "B6:E6"})) @@ -35,7 +34,7 @@ class tdf57274(UITestCase): pass #we would expect a reference to cell E6 here and a zero being displayed, but the cell is also simply blank. - self.assertEqual(get_cell_by_position(document, 0, 4, 10).getValue(), 0) - self.assertEqual(get_cell_by_position(document, 0, 4, 10).getFormula(), "=$Sheet1.$E$6") + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 10).getValue(), 0) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 10).getFormula(), "=$Sheet1.$E$6") # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/calc_tests3/tdf62267.py b/sc/qa/uitest/calc_tests3/tdf62267.py index c4c36b150125..68654e8d0062 100644 --- a/sc/qa/uitest/calc_tests3/tdf62267.py +++ b/sc/qa/uitest/calc_tests3/tdf62267.py @@ -18,7 +18,6 @@ class tdf62267(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf62267.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #* Copy A1, then paste special to C1; gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) diff --git a/sc/qa/uitest/calc_tests3/tdf63805.py b/sc/qa/uitest/calc_tests3/tdf63805.py index 8c9332cb4200..9f9d9baeca75 100644 --- a/sc/qa/uitest/calc_tests3/tdf63805.py +++ b/sc/qa/uitest/calc_tests3/tdf63805.py @@ -18,7 +18,6 @@ class tdf63805(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf63805.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #1 - A1: 2012-10-31 enter_text_to_cell(gridwin, "A1", "2012-10-31") @@ -30,29 +29,29 @@ class tdf63805(UITestCase): xOK = xDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOK) #5 -Expected: All Cells show last day of month / Actual: some months skipped - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getValue(), 41213) - self.assertEqual(get_cell_by_position(document, 0, 0, 1).getValue(), 41243) - self.assertEqual(get_cell_by_position(document, 0, 0, 2).getValue(), 41274) - self.assertEqual(get_cell_by_position(document, 0, 0, 3).getValue(), 41305) - self.assertEqual(get_cell_by_position(document, 0, 0, 4).getValue(), 41333) - self.assertEqual(get_cell_by_position(document, 0, 0, 5).getValue(), 41364) - self.assertEqual(get_cell_by_position(document, 0, 0, 6).getValue(), 41394) - self.assertEqual(get_cell_by_position(document, 0, 0, 7).getValue(), 41425) - self.assertEqual(get_cell_by_position(document, 0, 0, 8).getValue(), 41455) - self.assertEqual(get_cell_by_position(document, 0, 0, 9).getValue(), 41486) - self.assertEqual(get_cell_by_position(document, 0, 0, 10).getValue(), 41517) - self.assertEqual(get_cell_by_position(document, 0, 0, 11).getValue(), 41547) - self.assertEqual(get_cell_by_position(document, 0, 0, 12).getValue(), 41578) - self.assertEqual(get_cell_by_position(document, 0, 0, 13).getValue(), 41608) - self.assertEqual(get_cell_by_position(document, 0, 0, 14).getValue(), 41639) - self.assertEqual(get_cell_by_position(document, 0, 0, 15).getValue(), 41670) - self.assertEqual(get_cell_by_position(document, 0, 0, 16).getValue(), 41698) - self.assertEqual(get_cell_by_position(document, 0, 0, 17).getValue(), 41729) - self.assertEqual(get_cell_by_position(document, 0, 0, 18).getValue(), 41759) - self.assertEqual(get_cell_by_position(document, 0, 0, 19).getValue(), 41790) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getValue(), 41213) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 1).getValue(), 41243) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 2).getValue(), 41274) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 3).getValue(), 41305) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 4).getValue(), 41333) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 5).getValue(), 41364) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 6).getValue(), 41394) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 7).getValue(), 41425) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 8).getValue(), 41455) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 9).getValue(), 41486) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 10).getValue(), 41517) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 11).getValue(), 41547) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 12).getValue(), 41578) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 13).getValue(), 41608) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 14).getValue(), 41639) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 15).getValue(), 41670) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 16).getValue(), 41698) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 17).getValue(), 41729) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 18).getValue(), 41759) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 19).getValue(), 41790) #4 - undo. self.xUITest.executeCommand(".uno:Undo") - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getValue(), 41213) - self.assertEqual(get_cell_by_position(document, 0, 0, 1).getValue(), 0) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getValue(), 41213) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 1).getValue(), 0) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/calc_tests3/tdf65856.py b/sc/qa/uitest/calc_tests3/tdf65856.py index 3211d3117b34..5d08e89bc774 100644 --- a/sc/qa/uitest/calc_tests3/tdf65856.py +++ b/sc/qa/uitest/calc_tests3/tdf65856.py @@ -15,7 +15,6 @@ class tdf65856(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf65856.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #- mark D1:E14; copy gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "D1:E14"})) @@ -32,26 +31,25 @@ class tdf65856(UITestCase): self.ui_test.close_dialog_through_button(xOkBtn) #check - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "T1") - self.assertEqual(get_cell_by_position(document, 0, 1, 0).getString(), "TE1") - self.assertEqual(get_cell_by_position(document, 0, 2, 0).getString(), "TES1") - self.assertEqual(get_cell_by_position(document, 0, 3, 0).getString(), "TEST1") - self.assertEqual(get_cell_by_position(document, 0, 4, 0).getString(), "TEST1") - self.assertEqual(get_cell_by_position(document, 0, 5, 0).getString(), "TEST1") - self.assertEqual(get_cell_by_position(document, 0, 6, 0).getString(), "TEST1") - self.assertEqual(get_cell_by_position(document, 0, 0, 13).getString(), "T14") - self.assertEqual(get_cell_by_position(document, 0, 1, 13).getString(), "TE14") - self.assertEqual(get_cell_by_position(document, 0, 2, 13).getString(), "TES14") - self.assertEqual(get_cell_by_position(document, 0, 3, 13).getString(), "TEST14") - self.assertEqual(get_cell_by_position(document, 0, 4, 13).getString(), "TEST14") - self.assertEqual(get_cell_by_position(document, 0, 5, 13).getString(), "TEST14") - self.assertEqual(get_cell_by_position(document, 0, 6, 13).getString(), "TEST14") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "T1") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 0).getString(), "TE1") + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 0).getString(), "TES1") + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 0).getString(), "TEST1") + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 0).getString(), "TEST1") + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 0).getString(), "TEST1") + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 0).getString(), "TEST1") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 13).getString(), "T14") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 13).getString(), "TE14") + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 13).getString(), "TES14") + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 13).getString(), "TEST14") + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 13).getString(), "TEST14") + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 13).getString(), "TEST14") + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 13).getString(), "TEST14") def test_tdf65856_paste_special_shift_right_2(self): with self.ui_test.load_file(get_url_for_data_file("tdf65856_2.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #- select range C2:D4; copy gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "C2:D4"})) @@ -68,27 +66,27 @@ class tdf65856(UITestCase): self.ui_test.close_dialog_through_button(xOkBtn) #check - self.assertEqual(get_cell_by_position(document, 0, 1, 1).getString(), "1") - self.assertEqual(get_cell_by_position(document, 0, 2, 1).getString(), "1") - self.assertEqual(get_cell_by_position(document, 0, 3, 1).getString(), "1") - self.assertEqual(get_cell_by_position(document, 0, 4, 1).getString(), "1") - self.assertEqual(get_cell_by_position(document, 0, 5, 1).getString(), "1") - self.assertEqual(get_cell_by_position(document, 0, 1, 2).getString(), "2") - self.assertEqual(get_cell_by_position(document, 0, 2, 2).getString(), "2") - self.assertEqual(get_cell_by_position(document, 0, 3, 2).getString(), "2") - self.assertEqual(get_cell_by_position(document, 0, 4, 2).getString(), "2") - self.assertEqual(get_cell_by_position(document, 0, 5, 2).getString(), "2") - self.assertEqual(get_cell_by_position(document, 0, 1, 3).getString(), "3") - self.assertEqual(get_cell_by_position(document, 0, 2, 3).getString(), "3") - self.assertEqual(get_cell_by_position(document, 0, 3, 3).getString(), "3") - self.assertEqual(get_cell_by_position(document, 0, 4, 3).getString(), "3") - self.assertEqual(get_cell_by_position(document, 0, 5, 3).getString(), "3") - self.assertEqual(get_cell_by_position(document, 0, 4, 1).getFormula(), "=D2") - self.assertEqual(get_cell_by_position(document, 0, 5, 1).getFormula(), "=D2") - self.assertEqual(get_cell_by_position(document, 0, 3, 2).getFormula(), "=E3") - self.assertEqual(get_cell_by_position(document, 0, 5, 2).getFormula(), "=E3") - self.assertEqual(get_cell_by_position(document, 0, 3, 3).getFormula(), "=F4") - self.assertEqual(get_cell_by_position(document, 0, 4, 3).getFormula(), "=F4") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 1).getString(), "1") + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 1).getString(), "1") + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 1).getString(), "1") + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 1).getString(), "1") + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 1).getString(), "1") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 2).getString(), "2") + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 2).getString(), "2") + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 2).getString(), "2") + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 2).getString(), "2") + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 2).getString(), "2") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 3).getString(), "3") + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 3).getString(), "3") + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 3).getString(), "3") + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 3).getString(), "3") + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 3).getString(), "3") + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 1).getFormula(), "=D2") + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 1).getFormula(), "=D2") + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 2).getFormula(), "=E3") + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 2).getFormula(), "=E3") + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 3).getFormula(), "=F4") + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 3).getFormula(), "=F4") # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/calc_tests3/tdf69981.py b/sc/qa/uitest/calc_tests3/tdf69981.py index c32476acc056..6d4a548713f3 100644 --- a/sc/qa/uitest/calc_tests3/tdf69981.py +++ b/sc/qa/uitest/calc_tests3/tdf69981.py @@ -16,7 +16,6 @@ class tdf69981(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf69981.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #Make sure that tools-options-StarOffice Calc-General-Input settings-Show overwrite warning when pasting data is tagged. self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") #optionsdialog xDialogOpt = self.xUITest.getTopFocusWindow() @@ -49,28 +48,28 @@ class tdf69981(UITestCase): pass #Verify - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "Original") - self.assertEqual(get_cell_by_position(document, 0, 0, 1).getString(), "a") - self.assertEqual(get_cell_by_position(document, 0, 0, 2).getString(), "") - self.assertEqual(get_cell_by_position(document, 0, 0, 3).getString(), "") - self.assertEqual(get_cell_by_position(document, 0, 0, 4).getString(), "a") - self.assertEqual(get_cell_by_position(document, 0, 0, 5).getString(), "a") - self.assertEqual(get_cell_by_position(document, 0, 0, 6).getString(), "a") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "Original") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 1).getString(), "a") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 2).getString(), "") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 3).getString(), "") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 4).getString(), "a") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 5).getString(), "a") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 6).getString(), "a") - self.assertEqual(get_cell_by_position(document, 0, 1, 0).getString(), "Copy") - self.assertEqual(get_cell_by_position(document, 0, 1, 1).getString(), "b") - self.assertEqual(get_cell_by_position(document, 0, 1, 2).getString(), "b") - self.assertEqual(get_cell_by_position(document, 0, 1, 3).getString(), "") - self.assertEqual(get_cell_by_position(document, 0, 1, 4).getString(), "") - self.assertEqual(get_cell_by_position(document, 0, 1, 5).getString(), "b") - self.assertEqual(get_cell_by_position(document, 0, 1, 6).getString(), "") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 0).getString(), "Copy") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 1).getString(), "b") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 2).getString(), "b") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 3).getString(), "") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 4).getString(), "") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 5).getString(), "b") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 6).getString(), "") - self.assertEqual(get_cell_by_position(document, 0, 2, 0).getString(), "") - self.assertEqual(get_cell_by_position(document, 0, 2, 1).getString(), "c") - self.assertEqual(get_cell_by_position(document, 0, 2, 2).getString(), "c") - self.assertEqual(get_cell_by_position(document, 0, 2, 3).getString(), "c") - self.assertEqual(get_cell_by_position(document, 0, 2, 4).getString(), "") - self.assertEqual(get_cell_by_position(document, 0, 2, 5).getString(), "") - self.assertEqual(get_cell_by_position(document, 0, 2, 6).getString(), "c") + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 0).getString(), "") + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 1).getString(), "c") + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 2).getString(), "c") + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 3).getString(), "c") + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 4).getString(), "") + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 5).getString(), "") + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 6).getString(), "c") # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/calc_tests3/tdf77509.py b/sc/qa/uitest/calc_tests3/tdf77509.py index 79e228c180da..40e741a7dd42 100644 --- a/sc/qa/uitest/calc_tests3/tdf77509.py +++ b/sc/qa/uitest/calc_tests3/tdf77509.py @@ -16,7 +16,6 @@ class tdf77509(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf77509.xls")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #1. Open attachment: Consolidate-test.xls #2. Select any empty cell, eg. cell D1 gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "D1"})) @@ -46,30 +45,30 @@ class tdf77509(UITestCase): xOKBtn = xDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOKBtn) #verify - self.assertEqual("A 1", get_cell_by_position(document, 0, 3, 0).getString()) - self.assertEqual("AB 1", get_cell_by_position(document, 0, 3, 1).getString()) - self.assertEqual("AB 12", get_cell_by_position(document, 0, 3, 2).getString()) - self.assertEqual("AB 123", get_cell_by_position(document, 0, 3, 3).getString()) - self.assertEqual("ABC 1", get_cell_by_position(document, 0, 3, 4).getString()) + self.assertEqual("A 1", get_cell_by_position(calc_doc, 0, 3, 0).getString()) + self.assertEqual("AB 1", get_cell_by_position(calc_doc, 0, 3, 1).getString()) + self.assertEqual("AB 12", get_cell_by_position(calc_doc, 0, 3, 2).getString()) + self.assertEqual("AB 123", get_cell_by_position(calc_doc, 0, 3, 3).getString()) + self.assertEqual("ABC 1", get_cell_by_position(calc_doc, 0, 3, 4).getString()) - self.assertEqual(1, get_cell_by_position(document, 0, 4, 0).getValue()) - self.assertEqual(2, get_cell_by_position(document, 0, 4, 1).getValue()) - self.assertEqual(2, get_cell_by_position(document, 0, 4, 2).getValue()) - self.assertEqual(1, get_cell_by_position(document, 0, 4, 3).getValue()) - self.assertEqual(1, get_cell_by_position(document, 0, 4, 4).getValue()) + self.assertEqual(1, get_cell_by_position(calc_doc, 0, 4, 0).getValue()) + self.assertEqual(2, get_cell_by_position(calc_doc, 0, 4, 1).getValue()) + self.assertEqual(2, get_cell_by_position(calc_doc, 0, 4, 2).getValue()) + self.assertEqual(1, get_cell_by_position(calc_doc, 0, 4, 3).getValue()) + self.assertEqual(1, get_cell_by_position(calc_doc, 0, 4, 4).getValue()) self.xUITest.executeCommand(".uno:Undo") - self.assertEqual("", get_cell_by_position(document, 0, 3, 0).getString()) - self.assertEqual("", get_cell_by_position(document, 0, 3, 1).getString()) - self.assertEqual("", get_cell_by_position(document, 0, 3, 2).getString()) - self.assertEqual("", get_cell_by_position(document, 0, 3, 3).getString()) - self.assertEqual("", get_cell_by_position(document, 0, 3, 4).getString()) + self.assertEqual("", get_cell_by_position(calc_doc, 0, 3, 0).getString()) + self.assertEqual("", get_cell_by_position(calc_doc, 0, 3, 1).getString()) + self.assertEqual("", get_cell_by_position(calc_doc, 0, 3, 2).getString()) + self.assertEqual("", get_cell_by_position(calc_doc, 0, 3, 3).getString()) + self.assertEqual("", get_cell_by_position(calc_doc, 0, 3, 4).getString()) - self.assertEqual(0, get_cell_by_position(document, 0, 4, 0).getValue()) - self.assertEqual(0, get_cell_by_position(document, 0, 4, 1).getValue()) - self.assertEqual(0, get_cell_by_position(document, 0, 4, 2).getValue()) - self.assertEqual(0, get_cell_by_position(document, 0, 4, 3).getValue()) - self.assertEqual(0, get_cell_by_position(document, 0, 4, 4).getValue()) + self.assertEqual(0, get_cell_by_position(calc_doc, 0, 4, 0).getValue()) + self.assertEqual(0, get_cell_by_position(calc_doc, 0, 4, 1).getValue()) + self.assertEqual(0, get_cell_by_position(calc_doc, 0, 4, 2).getValue()) + self.assertEqual(0, get_cell_by_position(calc_doc, 0, 4, 3).getValue()) + self.assertEqual(0, get_cell_by_position(calc_doc, 0, 4, 4).getValue()) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/calc_tests4/tdf85403.py b/sc/qa/uitest/calc_tests4/tdf85403.py index 0a2acbd7ce9f..a09475c98838 100644 --- a/sc/qa/uitest/calc_tests4/tdf85403.py +++ b/sc/qa/uitest/calc_tests4/tdf85403.py @@ -16,7 +16,6 @@ class tdf85403(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf85403.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #'123 in A1, SUM(A1) in B1, result is 0 as expected, #now select A1 and use data->text to columns->ok and B1 is not updated, @@ -30,6 +29,6 @@ class tdf85403(UITestCase): self.ui_test.close_dialog_through_button(xOK) #Verify - self.assertEqual(get_cell_by_position(document, 0, 1, 0).getValue(), 123) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 0).getValue(), 123) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/calc_tests4/tdf85979.py b/sc/qa/uitest/calc_tests4/tdf85979.py index 8482bdb917d0..48052fdc1e6a 100644 --- a/sc/qa/uitest/calc_tests4/tdf85979.py +++ b/sc/qa/uitest/calc_tests4/tdf85979.py @@ -16,7 +16,6 @@ class tdf85979(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf85979.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #(I selected C1 to C5, then Text to Columns, unselected "Tab" and selected "Space") gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "C1:C5"})) @@ -31,21 +30,21 @@ class tdf85979(UITestCase): self.ui_test.close_dialog_through_button(xOK) #Verify - self.assertEqual(get_cell_by_position(document, 0, 2, 0).getValue(), 99) - self.assertEqual(get_cell_by_position(document, 0, 2, 1).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 2, 2).getValue(), 9) - self.assertEqual(get_cell_by_position(document, 0, 2, 3).getValue(), 9) - self.assertEqual(get_cell_by_position(document, 0, 3, 0).getValue(), 260) - self.assertEqual(get_cell_by_position(document, 0, 3, 1).getValue(), 10) - self.assertEqual(get_cell_by_position(document, 0, 3, 2).getValue(), 23) - self.assertEqual(get_cell_by_position(document, 0, 3, 3).getValue(), 23) - self.assertEqual(get_cell_by_position(document, 0, 4, 0).getValue(), 149) - self.assertEqual(get_cell_by_position(document, 0, 4, 1).getValue(), 6) - self.assertEqual(get_cell_by_position(document, 0, 4, 2).getValue(), 14) - self.assertEqual(get_cell_by_position(document, 0, 4, 3).getValue(), 14) - self.assertEqual(get_cell_by_position(document, 0, 5, 0).getValue(), 0) - self.assertEqual(get_cell_by_position(document, 0, 5, 1).getValue(), 16) - self.assertEqual(get_cell_by_position(document, 0, 5, 2).getValue(), 35) - self.assertEqual(get_cell_by_position(document, 0, 5, 3).getValue(), 35) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 0).getValue(), 99) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 1).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 2).getValue(), 9) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 3).getValue(), 9) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 0).getValue(), 260) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 1).getValue(), 10) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 2).getValue(), 23) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 3).getValue(), 23) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 0).getValue(), 149) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 1).getValue(), 6) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 2).getValue(), 14) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 3).getValue(), 14) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 0).getValue(), 0) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 1).getValue(), 16) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 2).getValue(), 35) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 3).getValue(), 35) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/calc_tests4/tdf86253.py b/sc/qa/uitest/calc_tests4/tdf86253.py index f3047f8fd4f2..da35ac663ad4 100644 --- a/sc/qa/uitest/calc_tests4/tdf86253.py +++ b/sc/qa/uitest/calc_tests4/tdf86253.py @@ -14,7 +14,6 @@ class tdf86253(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf86253.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #* Copy A1, then paste special only "formatting" to C1:C17; gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) diff --git a/sc/qa/uitest/calc_tests4/tdf89958.py b/sc/qa/uitest/calc_tests4/tdf89958.py index 8935bae5934a..1f97bc57ceca 100644 --- a/sc/qa/uitest/calc_tests4/tdf89958.py +++ b/sc/qa/uitest/calc_tests4/tdf89958.py @@ -16,7 +16,6 @@ class tdf89958(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf89958.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #select A1-> Column .uno:SelectColumn gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) self.xUITest.executeCommand(".uno:SelectColumn") diff --git a/sc/qa/uitest/calc_tests4/tdf99386.py b/sc/qa/uitest/calc_tests4/tdf99386.py index 4df99fb733b8..afe89217d2c6 100644 --- a/sc/qa/uitest/calc_tests4/tdf99386.py +++ b/sc/qa/uitest/calc_tests4/tdf99386.py @@ -18,12 +18,11 @@ class tdf99386(UITestCase): xCalcDoc = self.xUITest.getTopFocusWindow() xGridWindow = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() xGridWindow.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:B1"})) #select cells self.xUITest.executeCommand(".uno:ToggleMergeCells") # merge cells self.xUITest.executeCommand(".uno:Undo") - self.assertEqual(get_cell_by_position(document, 0, 1, 1).getString(), "This") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 1).getString(), "This") # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/calc_tests4/textToColumns.py b/sc/qa/uitest/calc_tests4/textToColumns.py index 5231c40dabcb..fac0666452b3 100644 --- a/sc/qa/uitest/calc_tests4/textToColumns.py +++ b/sc/qa/uitest/calc_tests4/textToColumns.py @@ -18,7 +18,6 @@ class CalcTextToColumns(UITestCase): with self.ui_test.load_file(get_url_for_data_file("text_to_columns_dot.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #Make sure that tools-options-StarOffice Calc-General-Input settings-Show overwrite warning when pasting data is tagged. self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") #optionsdialog xDialogOpt = self.xUITest.getTopFocusWindow() @@ -61,41 +60,41 @@ class CalcTextToColumns(UITestCase): xask.executeAction("CLICK", tuple()) #Verify - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getValue(), 1) - self.assertEqual(get_cell_by_position(document, 0, 0, 1).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 0, 2).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 0, 3).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 0, 4).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 1, 0).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 1, 1).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 1, 2).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 1, 3).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 1, 4).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 2, 0).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 2, 1).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 2, 2).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 2, 3).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 2, 4).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 3, 0).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 3, 1).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 3, 2).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 3, 3).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 3, 4).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 4, 0).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 4, 1).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 4, 2).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 4, 3).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 4, 4).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 5, 0).getValue(), 6) - self.assertEqual(get_cell_by_position(document, 0, 5, 1).getValue(), 6) - self.assertEqual(get_cell_by_position(document, 0, 5, 2).getValue(), 6) - self.assertEqual(get_cell_by_position(document, 0, 5, 3).getValue(), 6) - self.assertEqual(get_cell_by_position(document, 0, 5, 4).getValue(), 6) - self.assertEqual(get_cell_by_position(document, 0, 6, 0).getString(), "random content") - self.assertEqual(get_cell_by_position(document, 0, 6, 1).getValue(), 0) - self.assertEqual(get_cell_by_position(document, 0, 6, 2).getValue(), 0) - self.assertEqual(get_cell_by_position(document, 0, 6, 3).getValue(), 0) - self.assertEqual(get_cell_by_position(document, 0, 6, 4).getString(), "random content") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getValue(), 1) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 1).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 2).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 3).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 4).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 0).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 1).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 2).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 3).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 4).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 0).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 1).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 2).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 3).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 4).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 0).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 1).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 2).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 3).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 4).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 0).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 1).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 2).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 3).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 4).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 0).getValue(), 6) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 1).getValue(), 6) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 2).getValue(), 6) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 3).getValue(), 6) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 4).getValue(), 6) + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 0).getString(), "random content") + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 1).getValue(), 0) + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 2).getValue(), 0) + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 3).getValue(), 0) + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 4).getString(), "random content") #verify setting in options self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") #optionsdialog xDialogOpt = self.xUITest.getTopFocusWindow() @@ -115,7 +114,6 @@ class CalcTextToColumns(UITestCase): with self.ui_test.load_file(get_url_for_data_file("text_to_columns_comma.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #Make sure that tools-options-StarOffice Calc-General-Input settings-Show overwrite warning when pasting data is tagged. self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") #optionsdialog xDialogOpt = self.xUITest.getTopFocusWindow() @@ -149,48 +147,47 @@ class CalcTextToColumns(UITestCase): pass #Verify - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getValue(), 1) - self.assertEqual(get_cell_by_position(document, 0, 0, 1).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 0, 2).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 0, 3).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 0, 4).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 1, 0).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 1, 1).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 1, 2).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 1, 3).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 1, 4).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 2, 0).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 2, 1).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 2, 2).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 2, 3).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 2, 4).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 3, 0).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 3, 1).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 3, 2).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 3, 3).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 3, 4).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 4, 0).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 4, 1).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 4, 2).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 4, 3).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 4, 4).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 5, 0).getValue(), 6) - self.assertEqual(get_cell_by_position(document, 0, 5, 1).getValue(), 6) - self.assertEqual(get_cell_by_position(document, 0, 5, 2).getValue(), 6) - self.assertEqual(get_cell_by_position(document, 0, 5, 3).getValue(), 6) - self.assertEqual(get_cell_by_position(document, 0, 5, 4).getValue(), 6) - self.assertEqual(get_cell_by_position(document, 0, 6, 0).getString(), "random content") - self.assertEqual(get_cell_by_position(document, 0, 6, 1).getValue(), 0) - self.assertEqual(get_cell_by_position(document, 0, 6, 2).getValue(), 0) - self.assertEqual(get_cell_by_position(document, 0, 6, 3).getValue(), 0) - self.assertEqual(get_cell_by_position(document, 0, 6, 4).getString(), "random content") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getValue(), 1) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 1).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 2).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 3).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 4).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 0).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 1).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 2).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 3).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 4).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 0).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 1).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 2).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 3).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 4).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 0).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 1).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 2).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 3).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 4).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 0).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 1).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 2).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 3).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 4).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 0).getValue(), 6) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 1).getValue(), 6) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 2).getValue(), 6) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 3).getValue(), 6) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 4).getValue(), 6) + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 0).getString(), "random content") + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 1).getValue(), 0) + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 2).getValue(), 0) + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 3).getValue(), 0) + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 4).getString(), "random content") def test_text_to_columns_semicolon(self): #Semicolon as Separator with self.ui_test.load_file(get_url_for_data_file("text_to_columns_semicolon.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #Make sure that tools-options-StarOffice Calc-General-Input settings-Show overwrite warning when pasting data is tagged. self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") #optionsdialog xDialogOpt = self.xUITest.getTopFocusWindow() @@ -222,48 +219,47 @@ class CalcTextToColumns(UITestCase): pass #Verify - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getValue(), 1) - self.assertEqual(get_cell_by_position(document, 0, 0, 1).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 0, 2).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 0, 3).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 0, 4).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 1, 0).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 1, 1).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 1, 2).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 1, 3).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 1, 4).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 2, 0).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 2, 1).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 2, 2).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 2, 3).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 2, 4).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 3, 0).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 3, 1).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 3, 2).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 3, 3).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 3, 4).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 4, 0).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 4, 1).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 4, 2).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 4, 3).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 4, 4).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 5, 0).getValue(), 6) - self.assertEqual(get_cell_by_position(document, 0, 5, 1).getValue(), 6) - self.assertEqual(get_cell_by_position(document, 0, 5, 2).getValue(), 6) - self.assertEqual(get_cell_by_position(document, 0, 5, 3).getValue(), 6) - self.assertEqual(get_cell_by_position(document, 0, 5, 4).getValue(), 6) - self.assertEqual(get_cell_by_position(document, 0, 6, 0).getString(), "random content") - self.assertEqual(get_cell_by_position(document, 0, 6, 1).getValue(), 0) - self.assertEqual(get_cell_by_position(document, 0, 6, 2).getValue(), 0) - self.assertEqual(get_cell_by_position(document, 0, 6, 3).getValue(), 0) - self.assertEqual(get_cell_by_position(document, 0, 6, 4).getString(), "random content") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getValue(), 1) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 1).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 2).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 3).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 4).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 0).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 1).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 2).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 3).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 4).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 0).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 1).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 2).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 3).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 4).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 0).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 1).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 2).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 3).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 4).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 0).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 1).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 2).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 3).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 4).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 0).getValue(), 6) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 1).getValue(), 6) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 2).getValue(), 6) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 3).getValue(), 6) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 4).getValue(), 6) + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 0).getString(), "random content") + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 1).getValue(), 0) + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 2).getValue(), 0) + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 3).getValue(), 0) + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 4).getString(), "random content") def test_text_to_columns_space(self): #Space as Separator with self.ui_test.load_file(get_url_for_data_file("text_to_columns_space.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #Make sure that tools-options-StarOffice Calc-General-Input settings-Show overwrite warning when pasting data is tagged. self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") #optionsdialog xDialogOpt = self.xUITest.getTopFocusWindow() @@ -296,48 +292,47 @@ class CalcTextToColumns(UITestCase): pass #Verify - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getValue(), 1) - self.assertEqual(get_cell_by_position(document, 0, 0, 1).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 0, 2).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 0, 3).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 0, 4).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 1, 0).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 1, 1).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 1, 2).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 1, 3).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 1, 4).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 2, 0).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 2, 1).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 2, 2).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 2, 3).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 2, 4).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 3, 0).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 3, 1).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 3, 2).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 3, 3).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 3, 4).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 4, 0).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 4, 1).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 4, 2).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 4, 3).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 4, 4).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 5, 0).getValue(), 6) - self.assertEqual(get_cell_by_position(document, 0, 5, 1).getValue(), 6) - self.assertEqual(get_cell_by_position(document, 0, 5, 2).getValue(), 6) - self.assertEqual(get_cell_by_position(document, 0, 5, 3).getValue(), 6) - self.assertEqual(get_cell_by_position(document, 0, 5, 4).getValue(), 6) - self.assertEqual(get_cell_by_position(document, 0, 6, 0).getString(), "random content") - self.assertEqual(get_cell_by_position(document, 0, 6, 1).getValue(), 0) - self.assertEqual(get_cell_by_position(document, 0, 6, 2).getValue(), 0) - self.assertEqual(get_cell_by_position(document, 0, 6, 3).getValue(), 0) - self.assertEqual(get_cell_by_position(document, 0, 6, 4).getString(), "random content") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getValue(), 1) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 1).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 2).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 3).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 4).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 0).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 1).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 2).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 3).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 4).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 0).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 1).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 2).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 3).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 4).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 0).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 1).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 2).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 3).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 4).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 0).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 1).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 2).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 3).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 4).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 0).getValue(), 6) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 1).getValue(), 6) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 2).getValue(), 6) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 3).getValue(), 6) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 4).getValue(), 6) + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 0).getString(), "random content") + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 1).getValue(), 0) + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 2).getValue(), 0) + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 3).getValue(), 0) + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 4).getString(), "random content") def test_text_to_columns_pipe(self): #Space as Separator with self.ui_test.load_file(get_url_for_data_file("text_to_columns_pipe.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #Make sure that tools-options-StarOffice Calc-General-Input settings-Show overwrite warning when pasting data is tagged. self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") #optionsdialog xDialogOpt = self.xUITest.getTopFocusWindow() @@ -376,48 +371,47 @@ class CalcTextToColumns(UITestCase): pass #Verify - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getValue(), 1) - self.assertEqual(get_cell_by_position(document, 0, 0, 1).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 0, 2).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 0, 3).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 0, 4).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 1, 0).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 1, 1).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 1, 2).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 1, 3).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 1, 4).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 2, 0).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 2, 1).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 2, 2).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 2, 3).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 2, 4).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 3, 0).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 3, 1).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 3, 2).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 3, 3).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 3, 4).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 4, 0).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 4, 1).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 4, 2).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 4, 3).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 4, 4).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 5, 0).getValue(), 6) - self.assertEqual(get_cell_by_position(document, 0, 5, 1).getValue(), 6) - self.assertEqual(get_cell_by_position(document, 0, 5, 2).getValue(), 6) - self.assertEqual(get_cell_by_position(document, 0, 5, 3).getValue(), 6) - self.assertEqual(get_cell_by_position(document, 0, 5, 4).getValue(), 6) - self.assertEqual(get_cell_by_position(document, 0, 6, 0).getString(), "random content") - self.assertEqual(get_cell_by_position(document, 0, 6, 1).getValue(), 0) - self.assertEqual(get_cell_by_position(document, 0, 6, 2).getValue(), 0) - self.assertEqual(get_cell_by_position(document, 0, 6, 3).getValue(), 0) - self.assertEqual(get_cell_by_position(document, 0, 6, 4).getString(), "random content") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getValue(), 1) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 1).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 2).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 3).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 4).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 0).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 1).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 2).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 3).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 4).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 0).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 1).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 2).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 3).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 4).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 0).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 1).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 2).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 3).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 4).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 0).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 1).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 2).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 3).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 4).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 0).getValue(), 6) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 1).getValue(), 6) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 2).getValue(), 6) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 3).getValue(), 6) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 4).getValue(), 6) + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 0).getString(), "random content") + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 1).getValue(), 0) + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 2).getValue(), 0) + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 3).getValue(), 0) + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 4).getString(), "random content") def test_text_to_columns_pipespace(self): #Space as Separator with self.ui_test.load_file(get_url_for_data_file("text_to_columns_pipe_space.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #Make sure that tools-options-StarOffice Calc-General-Input settings-Show overwrite warning when pasting data is tagged. self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") #optionsdialog xDialogOpt = self.xUITest.getTopFocusWindow() @@ -457,39 +451,39 @@ class CalcTextToColumns(UITestCase): pass #Verify - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getValue(), 1) - self.assertEqual(get_cell_by_position(document, 0, 0, 1).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 0, 2).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 0, 3).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 0, 4).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 1, 0).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 1, 1).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 1, 2).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 1, 3).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 1, 4).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 2, 0).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 2, 1).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 2, 2).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 2, 3).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 2, 4).getValue(), 3) - self.assertEqual(get_cell_by_position(document, 0, 3, 0).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 3, 1).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 3, 2).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 3, 3).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 3, 4).getValue(), 4) - self.assertEqual(get_cell_by_position(document, 0, 4, 0).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 4, 1).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 4, 2).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 4, 3).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 4, 4).getValue(), 5) - self.assertEqual(get_cell_by_position(document, 0, 5, 0).getValue(), 6) - self.assertEqual(get_cell_by_position(document, 0, 5, 1).getValue(), 6) - self.assertEqual(get_cell_by_position(document, 0, 5, 2).getValue(), 6) - self.assertEqual(get_cell_by_position(document, 0, 5, 3).getValue(), 6) - self.assertEqual(get_cell_by_position(document, 0, 5, 4).getValue(), 6) - self.assertEqual(get_cell_by_position(document, 0, 6, 0).getString(), "random content") - self.assertEqual(get_cell_by_position(document, 0, 6, 1).getValue(), 0) - self.assertEqual(get_cell_by_position(document, 0, 6, 2).getValue(), 0) - self.assertEqual(get_cell_by_position(document, 0, 6, 3).getValue(), 0) - self.assertEqual(get_cell_by_position(document, 0, 6, 4).getString(), "random content") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getValue(), 1) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 1).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 2).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 3).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 4).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 0).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 1).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 2).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 3).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 4).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 0).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 1).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 2).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 3).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 4).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 0).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 1).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 2).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 3).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 4).getValue(), 4) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 0).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 1).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 2).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 3).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 4).getValue(), 5) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 0).getValue(), 6) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 1).getValue(), 6) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 2).getValue(), 6) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 3).getValue(), 6) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 4).getValue(), 6) + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 0).getString(), "random content") + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 1).getValue(), 0) + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 2).getValue(), 0) + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 3).getValue(), 0) + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 4).getString(), "random content") # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/calc_tests6/tdf107267.py b/sc/qa/uitest/calc_tests6/tdf107267.py index 8416cb62e2ae..d9de215503fe 100644 --- a/sc/qa/uitest/calc_tests6/tdf107267.py +++ b/sc/qa/uitest/calc_tests6/tdf107267.py @@ -19,7 +19,6 @@ class Subtotals(UITestCase): def test_tdf107267(self): with self.ui_test.load_file(get_url_for_data_file("tdf107267.ods")) as calc_doc: XcalcDoc = self.xUITest.getTopFocusWindow() - document = self.ui_test.get_component() gridwin = XcalcDoc.getChild("grid_window") # 1. Open the test file gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:F123"})) @@ -65,12 +64,12 @@ class Subtotals(UITestCase): self.ui_test.close_dialog_through_button(xOKBtn) #verify - self.assertEqual(get_cell_by_position(document, 0, 0, 141).getString(), "Grand Average") - self.assertEqual(get_cell_by_position(document, 0, 0, 142).getString(), "Grand Min") - self.assertEqual(get_cell_by_position(document, 0, 0, 143).getString(), "Grand Max") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 141).getString(), "Grand Average") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 142).getString(), "Grand Min") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 143).getString(), "Grand Max") - self.assertEqual(round(get_cell_by_position(document, 0, 5, 141).getValue(), 13), 3.3852459016393) - self.assertEqual(get_cell_by_position(document, 0, 5, 142).getValue(), 0) - self.assertEqual(get_cell_by_position(document, 0, 5, 143).getValue(), 26) + self.assertEqual(round(get_cell_by_position(calc_doc, 0, 5, 141).getValue(), 13), 3.3852459016393) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 142).getValue(), 0) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 143).getValue(), 26) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/calc_tests6/tdf107869.py b/sc/qa/uitest/calc_tests6/tdf107869.py index 2d4127b0f64c..855b05b86214 100644 --- a/sc/qa/uitest/calc_tests6/tdf107869.py +++ b/sc/qa/uitest/calc_tests6/tdf107869.py @@ -14,7 +14,6 @@ class tdf107869(UITestCase): with self.ui_test.load_file(get_url_for_data_file("comments.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #- Delete the row with comment. #select row 1 gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) @@ -22,34 +21,34 @@ class tdf107869(UITestCase): #delete row 1 self.xUITest.executeCommand(".uno:DeleteRows") #A1 should be "B" - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "B") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "B") #- Undo-redo deletion a few times. self.xUITest.executeCommand(".uno:Undo") - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "A") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "A") self.xUITest.executeCommand(".uno:Redo") - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "B") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "B") self.xUITest.executeCommand(".uno:Undo") - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "A") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "A") self.xUITest.executeCommand(".uno:Redo") - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "B") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "B") self.xUITest.executeCommand(".uno:Undo") - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "A") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "A") self.xUITest.executeCommand(".uno:Redo") - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "B") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "B") self.xUITest.executeCommand(".uno:Undo") - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "A") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "A") self.xUITest.executeCommand(".uno:Redo") - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "B") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "B") self.xUITest.executeCommand(".uno:Undo") - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "A") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "A") self.xUITest.executeCommand(".uno:Redo") - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "B") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "B") self.xUITest.executeCommand(".uno:Undo") - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "A") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "A") self.xUITest.executeCommand(".uno:Redo") - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "B") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "B") self.xUITest.executeCommand(".uno:Undo") - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "A") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "A") #select row 1 and 2 gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A2"})) @@ -57,27 +56,27 @@ class tdf107869(UITestCase): #delete row 1 self.xUITest.executeCommand(".uno:DeleteRows") #A1 should be "" - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "") #- Undo-redo deletion a few times. self.xUITest.executeCommand(".uno:Undo") - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "A") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "A") self.xUITest.executeCommand(".uno:Redo") - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "") self.xUITest.executeCommand(".uno:Undo") - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "A") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "A") self.xUITest.executeCommand(".uno:Redo") - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "") self.xUITest.executeCommand(".uno:Undo") - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "A") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "A") self.xUITest.executeCommand(".uno:Redo") - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "") self.xUITest.executeCommand(".uno:Undo") - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "A") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "A") self.xUITest.executeCommand(".uno:Redo") - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "") self.xUITest.executeCommand(".uno:Undo") - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "A") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "A") self.xUITest.executeCommand(".uno:Redo") - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "") # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/calc_tests6/tdf118638.py b/sc/qa/uitest/calc_tests6/tdf118638.py index bd1151f569f9..94c99f50666d 100644 --- a/sc/qa/uitest/calc_tests6/tdf118638.py +++ b/sc/qa/uitest/calc_tests6/tdf118638.py @@ -18,7 +18,6 @@ class Subtotals(UITestCase): def test_tdf118638_subtotal_format(self): with self.ui_test.load_file(get_url_for_data_file("tdf118638.ods")) as calc_doc: XcalcDoc = self.xUITest.getTopFocusWindow() - document = self.ui_test.get_component() gridwin = XcalcDoc.getChild("grid_window") # Open the test file gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:B15"})) @@ -44,13 +43,13 @@ class Subtotals(UITestCase): self.ui_test.close_dialog_through_button(xOKBtn) #verify - self.assertEqual(get_cell_by_position(document, 0, 0, 15).getString(), "5408 Sum") - self.assertEqual(get_cell_by_position(document, 0, 0, 16).getString(), "Grand Sum") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 15).getString(), "5408 Sum") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 16).getString(), "Grand Sum") - self.assertEqual(round(get_cell_by_position(document, 0, 1, 15).getValue(),12), 238.89) - self.assertEqual(round(get_cell_by_position(document, 0, 1, 16).getValue(),12), 238.89) + self.assertEqual(round(get_cell_by_position(calc_doc, 0, 1, 15).getValue(),12), 238.89) + self.assertEqual(round(get_cell_by_position(calc_doc, 0, 1, 16).getValue(),12), 238.89) - self.assertEqual(get_cell_by_position(document, 0, 1, 15).getString(), "$238.89") - self.assertEqual(get_cell_by_position(document, 0, 1, 16).getString(), "$238.89") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 15).getString(), "$238.89") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 16).getString(), "$238.89") # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/calc_tests7/tdf122509.py b/sc/qa/uitest/calc_tests7/tdf122509.py index 5dbb61518ace..a2f2b44289ed 100644 --- a/sc/qa/uitest/calc_tests7/tdf122509.py +++ b/sc/qa/uitest/calc_tests7/tdf122509.py @@ -18,7 +18,6 @@ class tdf122509(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf122509.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #select cell A1 gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) #format - cell @@ -46,6 +45,6 @@ class tdf122509(UITestCase): xOk = xDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOk) #verify; no crashes - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getValue(), 2) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/calc_tests7/tdf124818.py b/sc/qa/uitest/calc_tests7/tdf124818.py index f73bb543d312..e436e689554e 100644 --- a/sc/qa/uitest/calc_tests7/tdf124818.py +++ b/sc/qa/uitest/calc_tests7/tdf124818.py @@ -14,7 +14,6 @@ class tdf124818(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf124818.xls")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #Select all ( Ctrl + A );Go to sheet Graph2;Select all;Crash self.xUITest.executeCommand(".uno:SelectAll") @@ -22,6 +21,6 @@ class tdf124818(UITestCase): self.xUITest.executeCommand(".uno:SelectAll") #verify; no crashes - self.assertEqual(document.Sheets.getCount(), 3) + self.assertEqual(calc_doc.Sheets.getCount(), 3) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/calc_tests7/tdf124896.py b/sc/qa/uitest/calc_tests7/tdf124896.py index 5605253f6979..287631b177dd 100644 --- a/sc/qa/uitest/calc_tests7/tdf124896.py +++ b/sc/qa/uitest/calc_tests7/tdf124896.py @@ -14,7 +14,6 @@ class tdf124896(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf124896.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() # Remove X Bar R Chart (2) sheet self.ui_test.execute_dialog_through_command(".uno:Remove") #delete sheet @@ -22,6 +21,6 @@ class tdf124896(UITestCase): xOKButton = xDialog.getChild("yes") xOKButton.executeAction("CLICK", tuple()) #verify; no crashes - self.assertEqual(document.Sheets.getCount(), 2) + self.assertEqual(calc_doc.Sheets.getCount(), 2) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/calc_tests7/tdf31805.py b/sc/qa/uitest/calc_tests7/tdf31805.py index 5c2f363c3d9e..2fcee4d5c8ff 100644 --- a/sc/qa/uitest/calc_tests7/tdf31805.py +++ b/sc/qa/uitest/calc_tests7/tdf31805.py @@ -16,7 +16,6 @@ class tdf31805(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf31805.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #1. open "sample.ods" #2. click 'G1' #3. Menu 'edit -> Delete Cell - Delete entire Column' @@ -24,17 +23,17 @@ class tdf31805(UITestCase): # a merged cell range will remain left row 1 gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "G1"})) - self.assertEqual(get_cell_by_position(document, 0, 2, 4).getIsMerged(), True) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 4).getIsMerged(), True) self.xUITest.executeCommand(".uno:DeleteColumns") #verify. C5:F11 should be merged #isMerged returns true if this cell is merged with another cell. - self.assertEqual(get_cell_by_position(document, 0, 2, 4).getIsMerged(), True) #C5 - self.assertEqual(get_cell_by_position(document, 0, 6, 4).getIsMerged(), False) #G5 + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 4).getIsMerged(), True) #C5 + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 4).getIsMerged(), False) #G5 gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A11"})) self.xUITest.executeCommand(".uno:DeleteRows") - self.assertEqual(get_cell_by_position(document, 0, 2, 4).getIsMerged(), True) #C5 + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 4).getIsMerged(), True) #C5 gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "D1"})) self.xUITest.executeCommand(".uno:DeleteColumns") - self.assertEqual(get_cell_by_position(document, 0, 2, 4).getIsMerged(), True) #C5 + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 4).getIsMerged(), True) #C5 # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/calc_tests7/tdf91425.py b/sc/qa/uitest/calc_tests7/tdf91425.py index 19948fb70810..2c53b3934911 100644 --- a/sc/qa/uitest/calc_tests7/tdf91425.py +++ b/sc/qa/uitest/calc_tests7/tdf91425.py @@ -16,19 +16,18 @@ class tdf91425(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf91425.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #1) Open test file provided in report #2) Move mouse pointer over Column A header, the right mouse button click gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) #3) Insert columns left self.xUITest.executeCommand(".uno:InsertColumnsBefore") #verify - self.assertEqual(get_cell_by_position(document, 0, 3, 0).getString(), "C") + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 0).getString(), "C") #undo self.xUITest.executeCommand(".uno:Undo") - self.assertEqual(get_cell_by_position(document, 0, 2, 0).getString(), "C") + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 0).getString(), "C") #redo self.xUITest.executeCommand(".uno:Redo") - self.assertEqual(get_cell_by_position(document, 0, 3, 0).getString(), "C") + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 0).getString(), "C") # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/calc_tests8/tdf114710.py b/sc/qa/uitest/calc_tests8/tdf114710.py index 34ab90f56a5c..d0de48c10c74 100644 --- a/sc/qa/uitest/calc_tests8/tdf114710.py +++ b/sc/qa/uitest/calc_tests8/tdf114710.py @@ -14,7 +14,6 @@ class tdf114710(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf114710.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:O7"})) self.xUITest.executeCommand(".uno:Copy") diff --git a/sc/qa/uitest/calc_tests8/tdf119343.py b/sc/qa/uitest/calc_tests8/tdf119343.py index 1393c50ad1c9..0039a92017d0 100644 --- a/sc/qa/uitest/calc_tests8/tdf119343.py +++ b/sc/qa/uitest/calc_tests8/tdf119343.py @@ -21,15 +21,14 @@ class tdf119343(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf119343.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "M295"})) self.xUITest.executeCommand(".uno:Copy") gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "DOWN"})) self.xUITest.executeCommand(".uno:Paste") #verify - self.assertEqual(get_cell_by_position(document, 0, 12, 295).getString(), "Q11005355") - self.assertEqual(get_cell_by_position(document, 0, 12, 294).getString(), "Q1099565") - self.assertEqual(get_cell_by_position(document, 0, 12, 293).getString(), "Q108420") + self.assertEqual(get_cell_by_position(calc_doc, 0, 12, 295).getString(), "Q11005355") + self.assertEqual(get_cell_by_position(calc_doc, 0, 12, 294).getString(), "Q1099565") + self.assertEqual(get_cell_by_position(calc_doc, 0, 12, 293).getString(), "Q108420") # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/calc_tests8/tdf124829.py b/sc/qa/uitest/calc_tests8/tdf124829.py index 45cf00b459a6..464aaa8a616a 100644 --- a/sc/qa/uitest/calc_tests8/tdf124829.py +++ b/sc/qa/uitest/calc_tests8/tdf124829.py @@ -21,7 +21,6 @@ class tdf124829(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf124829.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() self.xUITest.executeCommand(".uno:SelectAll") self.xUITest.executeCommand(".uno:Cut") @@ -29,6 +28,6 @@ class tdf124829(UITestCase): self.xUITest.executeCommand(".uno:Undo") #verify; no crashes - self.assertEqual(document.Sheets.getCount(), 6) + self.assertEqual(calc_doc.Sheets.getCount(), 6) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/calc_tests9/tdf126673.py b/sc/qa/uitest/calc_tests9/tdf126673.py index 30c81696f836..442cde01cd6d 100644 --- a/sc/qa/uitest/calc_tests9/tdf126673.py +++ b/sc/qa/uitest/calc_tests9/tdf126673.py @@ -19,7 +19,6 @@ class tdf126673(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf126673.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() change_measurement_unit(self, "Centimeter") diff --git a/sc/qa/uitest/calc_tests9/tdf130371.py b/sc/qa/uitest/calc_tests9/tdf130371.py index 9533e0719393..e5108a118e03 100644 --- a/sc/qa/uitest/calc_tests9/tdf130371.py +++ b/sc/qa/uitest/calc_tests9/tdf130371.py @@ -15,7 +15,6 @@ class namedRanges(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf130371.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() text1 = "value\t$Sheet2.$B$2\tSheet2" text2 = "value\t$Sheet3.$B$2\tSheet3" diff --git a/sc/qa/uitest/calc_tests9/tdf91217.py b/sc/qa/uitest/calc_tests9/tdf91217.py index 397d43ec06fc..e4a47d65be0f 100644 --- a/sc/qa/uitest/calc_tests9/tdf91217.py +++ b/sc/qa/uitest/calc_tests9/tdf91217.py @@ -20,19 +20,18 @@ class tdf91217(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf91217.ods")) as calc_doc: 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") + self.assertEqual(get_cell_by_position(calc_doc, 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.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "Dist") self.xUITest.executeCommand(".uno:Redo") - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "Dist") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "Dist") # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/chart/chartArea.py b/sc/qa/uitest/chart/chartArea.py index 05aac7a5bf8e..93c7ed299bef 100644 --- a/sc/qa/uitest/chart/chartArea.py +++ b/sc/qa/uitest/chart/chartArea.py @@ -19,11 +19,10 @@ class chartArea(UITestCase): with self.ui_test.load_file(get_url_for_data_file("chartArea.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() change_measurement_unit(self, "Centimeter") - xArea = document.Sheets[0].Charts[0].getEmbeddedObject().Area + xArea = calc_doc.Sheets[0].Charts[0].getEmbeddedObject().Area self.assertEqual(xArea.LineWidth, 0) self.assertEqual(xArea.LineTransparence, 0) self.assertEqual(hex(xArea.FillColor), '0xffffff') diff --git a/sc/qa/uitest/chart/chartAxes.py b/sc/qa/uitest/chart/chartAxes.py index e45b48309f13..f0fbbbdca4f7 100644 --- a/sc/qa/uitest/chart/chartAxes.py +++ b/sc/qa/uitest/chart/chartAxes.py @@ -18,7 +18,6 @@ class chartAxes(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf98390.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"})) gridwin.executeAction("ACTIVATE", tuple()) diff --git a/sc/qa/uitest/chart/chartDataLabels.py b/sc/qa/uitest/chart/chartDataLabels.py index bbf82bab76f3..16a914b83ffd 100644 --- a/sc/qa/uitest/chart/chartDataLabels.py +++ b/sc/qa/uitest/chart/chartDataLabels.py @@ -22,7 +22,6 @@ class chartDataLabels(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf98390.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"})) gridwin.executeAction("ACTIVATE", tuple()) @@ -30,7 +29,7 @@ class chartDataLabels(UITestCase): xChartMain = xChartMainTop.getChild("chart_window") xSeriesObj = xChartMain.getChild("CID/D=0:CS=0:CT=0:Series=0") - xDataSeries = document.Sheets[0].Charts[0].getEmbeddedObject().getFirstDiagram().CoordinateSystems[0].ChartTypes[0].DataSeries + xDataSeries = calc_doc.Sheets[0].Charts[0].getEmbeddedObject().getFirstDiagram().CoordinateSystems[0].ChartTypes[0].DataSeries self.assertFalse(xDataSeries[0].Label.ShowNumber) self.assertFalse(xDataSeries[0].Label.ShowCategoryName) self.assertFalse(xDataSeries[0].Label.ShowLegendSymbol) @@ -115,7 +114,6 @@ class chartDataLabels(UITestCase): with self.ui_test.load_file(get_url_for_data_file("dataLabels.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"})) gridwin.executeAction("ACTIVATE", tuple()) @@ -123,7 +121,7 @@ class chartDataLabels(UITestCase): xChartMain = xChartMainTop.getChild("chart_window") xSeriesObj = xChartMain.getChild("CID/D=0:CS=0:CT=0:Series=0") - xDataSeries = document.Sheets[0].Charts[0].getEmbeddedObject().getFirstDiagram().CoordinateSystems[0].ChartTypes[0].DataSeries + xDataSeries = calc_doc.Sheets[0].Charts[0].getEmbeddedObject().getFirstDiagram().CoordinateSystems[0].ChartTypes[0].DataSeries self.assertTrue(xDataSeries[0].Label.ShowNumber) self.assertFalse(xDataSeries[0].Label.ShowNumberInPercent) self.assertIsNone(xDataSeries[0].PercentageNumberFormat) @@ -171,7 +169,7 @@ class chartDataLabels(UITestCase): self.assertEqual(get_state_as_dict(valueAsPercentage)["Selected"], "true") - xNumberFormats = document.Sheets[0].Charts[0].getEmbeddedObject().getNumberFormats() + xNumberFormats = calc_doc.Sheets[0].Charts[0].getEmbeddedObject().getNumberFormats() xLocale = Locale('en', 'US', '') xFormat = xNumberFormats.queryKey("#,#00.0%;[RED]-#,#00.0%", xLocale, True) @@ -217,7 +215,6 @@ class chartDataLabels(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf131291.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"})) gridwin.executeAction("ACTIVATE", tuple()) @@ -225,7 +222,7 @@ class chartDataLabels(UITestCase): xChartMain = xChartMainTop.getChild("chart_window") xSeriesObj = xChartMain.getChild("CID/D=0:CS=0:CT=0:Series=0") - xDataSeries = document.Sheets[0].Charts[0].getEmbeddedObject().getFirstDiagram().CoordinateSystems[0].ChartTypes[0].DataSeries + xDataSeries = calc_doc.Sheets[0].Charts[0].getEmbeddedObject().getFirstDiagram().CoordinateSystems[0].ChartTypes[0].DataSeries self.assertTrue(xDataSeries[0].Label.ShowNumber) self.assertFalse(xDataSeries[0].Label.ShowNumberInPercent) @@ -253,7 +250,7 @@ class chartDataLabels(UITestCase): self.assertEqual(get_state_as_dict(formatted)["Text"], "[$$-409]#,##0.00;[RED]-[$$-409]#,##0.00") - xNumberFormats = document.Sheets[0].Charts[0].getEmbeddedObject().getNumberFormats() + xNumberFormats = calc_doc.Sheets[0].Charts[0].getEmbeddedObject().getNumberFormats() xLocale = Locale() xFormat = xNumberFormats.queryKey("[$$-409]#,##0.00;[RED]-[$$-409]#,##0.00", xLocale, True) diff --git a/sc/qa/uitest/chart/chartGrid.py b/sc/qa/uitest/chart/chartGrid.py index cbc91f264f6b..ce044c094309 100644 --- a/sc/qa/uitest/chart/chartGrid.py +++ b/sc/qa/uitest/chart/chartGrid.py @@ -20,7 +20,6 @@ class chartGrid(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf98390.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() change_measurement_unit(self, "Centimeter") diff --git a/sc/qa/uitest/chart/chartGrids.py b/sc/qa/uitest/chart/chartGrids.py index e7548ba6e0f1..47fc29415913 100644 --- a/sc/qa/uitest/chart/chartGrids.py +++ b/sc/qa/uitest/chart/chartGrids.py @@ -18,7 +18,6 @@ class chartGrids(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf98390.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"})) gridwin.executeAction("ACTIVATE", tuple()) diff --git a/sc/qa/uitest/chart/chartLegend.py b/sc/qa/uitest/chart/chartLegend.py index 9128ad040a9a..6988543598dd 100644 --- a/sc/qa/uitest/chart/chartLegend.py +++ b/sc/qa/uitest/chart/chartLegend.py @@ -19,7 +19,6 @@ class chartLegend(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf98390.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"})) gridwin.executeAction("ACTIVATE", tuple()) diff --git a/sc/qa/uitest/chart/chartTitles.py b/sc/qa/uitest/chart/chartTitles.py index c94823387ece..055502d9194d 100644 --- a/sc/qa/uitest/chart/chartTitles.py +++ b/sc/qa/uitest/chart/chartTitles.py @@ -19,12 +19,11 @@ class chartTitles(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf98390.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() - xCS = document.Sheets[0].Charts[0].getEmbeddedObject().FirstDiagram.CoordinateSystems[0] + xCS = calc_doc.Sheets[0].Charts[0].getEmbeddedObject().FirstDiagram.CoordinateSystems[0] - self.assertFalse(document.Sheets[0].Charts[0].getEmbeddedObject().HasMainTitle) - self.assertFalse(document.Sheets[0].Charts[0].getEmbeddedObject().HasSubTitle) + self.assertFalse(calc_doc.Sheets[0].Charts[0].getEmbeddedObject().HasMainTitle) + self.assertFalse(calc_doc.Sheets[0].Charts[0].getEmbeddedObject().HasSubTitle) self.assertIsNone(xCS.getAxisByDimension(0, 0).TitleObject) self.assertIsNone(xCS.getAxisByDimension(1, 0).TitleObject) @@ -50,10 +49,10 @@ class chartTitles(UITestCase): secondaryYaxis.executeAction("TYPE", mkPropertyValues({"TEXT":"F"})) - self.assertTrue(document.Sheets[0].Charts[0].getEmbeddedObject().HasMainTitle) - self.assertTrue(document.Sheets[0].Charts[0].getEmbeddedObject().HasSubTitle) - self.assertEqual("A", document.Sheets[0].Charts[0].getEmbeddedObject().Title.String) - self.assertEqual("B", document.Sheets[0].Charts[0].getEmbeddedObject().SubTitle.String) + self.assertTrue(calc_doc.Sheets[0].Charts[0].getEmbeddedObject().HasMainTitle) + self.assertTrue(calc_doc.Sheets[0].Charts[0].getEmbeddedObject().HasSubTitle) + self.assertEqual("A", calc_doc.Sheets[0].Charts[0].getEmbeddedObject().Title.String) + self.assertEqual("B", calc_doc.Sheets[0].Charts[0].getEmbeddedObject().SubTitle.String) self.assertEqual("C", xCS.getAxisByDimension(0, 0).TitleObject.Text[0].String) self.assertEqual("D", xCS.getAxisByDimension(1, 0).TitleObject.Text[0].String) self.assertEqual("E", xCS.getAxisByDimension(0, 1).TitleObject.Text[0].String) diff --git a/sc/qa/uitest/chart/chartWall.py b/sc/qa/uitest/chart/chartWall.py index 600bb8e6d362..e05cca5bb3e7 100644 --- a/sc/qa/uitest/chart/chartWall.py +++ b/sc/qa/uitest/chart/chartWall.py @@ -19,11 +19,10 @@ class chartWall(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf122398.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() change_measurement_unit(self, "Centimeter") - xWall = document.Sheets[0].Charts[0].getEmbeddedObject().getFirstDiagram().Wall + xWall = calc_doc.Sheets[0].Charts[0].getEmbeddedObject().getFirstDiagram().Wall self.assertEqual(xWall.LineWidth, 0) self.assertEqual(xWall.LineTransparence, 0) self.assertEqual(hex(xWall.FillColor), '0xe6e6e6') diff --git a/sc/qa/uitest/chart/chartXAxis.py b/sc/qa/uitest/chart/chartXAxis.py index 085bee88bb8f..9f06945c6585 100644 --- a/sc/qa/uitest/chart/chartXAxis.py +++ b/sc/qa/uitest/chart/chartXAxis.py @@ -20,7 +20,6 @@ class chartXAxis(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf122398.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() change_measurement_unit(self, "Centimeter") diff --git a/sc/qa/uitest/chart/chartYAxis.py b/sc/qa/uitest/chart/chartYAxis.py index bb4f09119685..43efe59c27e9 100644 --- a/sc/qa/uitest/chart/chartYAxis.py +++ b/sc/qa/uitest/chart/chartYAxis.py @@ -20,7 +20,6 @@ class chartYAxis(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf122398.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() change_measurement_unit(self, "Centimeter") diff --git a/sc/qa/uitest/chart/copyPaste.py b/sc/qa/uitest/chart/copyPaste.py index c0e3bb14fe33..35ac13a2fdd1 100644 --- a/sc/qa/uitest/chart/copyPaste.py +++ b/sc/qa/uitest/chart/copyPaste.py @@ -17,9 +17,8 @@ class CopyPaste(UITestCase): @unittest.skipIf(platform.system() == "Windows", "Fails on Windows: tdf#142635") def test_copy_paste_chart_with_dot_in_sheet_name(self): with self.ui_test.load_file(get_url_for_data_file("chartWithDotInSheetName.ods")) as calc_doc: - document = self.ui_test.get_component() - xChart = document.Sheets[0].Charts[0] + xChart = calc_doc.Sheets[0].Charts[0] xDataSeries = xChart.getEmbeddedObject().getFirstDiagram().CoordinateSystems[0].ChartTypes[0].DataSeries self.assertEqual(4, len(xDataSeries)) diff --git a/sc/qa/uitest/chart/formatDataSeries.py b/sc/qa/uitest/chart/formatDataSeries.py index ce9f871a6430..8cd7a2bcd462 100644 --- a/sc/qa/uitest/chart/formatDataSeries.py +++ b/sc/qa/uitest/chart/formatDataSeries.py @@ -19,7 +19,6 @@ class chartFormatDataSeries(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf93506.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() change_measurement_unit(self, "Centimeter") diff --git a/sc/qa/uitest/chart/tdf101894.py b/sc/qa/uitest/chart/tdf101894.py index db5f9cb93ea9..419b9c645add 100644 --- a/sc/qa/uitest/chart/tdf101894.py +++ b/sc/qa/uitest/chart/tdf101894.py @@ -17,9 +17,8 @@ class tdf101894(UITestCase): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() - xChart = document.Sheets[0].Charts[0] + xChart = calc_doc.Sheets[0].Charts[0] xDataSeries = xChart.getEmbeddedObject().getFirstDiagram().CoordinateSystems[0].ChartTypes[0].DataSeries self.assertEqual(4, len(xDataSeries)) @@ -56,7 +55,7 @@ class tdf101894(UITestCase): xOKBtn = xDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOKBtn) - xChart = document.Sheets[0].Charts[0] + xChart = calc_doc.Sheets[0].Charts[0] xDataSeries = xChart.getEmbeddedObject().getFirstDiagram().CoordinateSystems[0].ChartTypes[0].DataSeries self.assertEqual(4, len(xDataSeries)) diff --git a/sc/qa/uitest/chart/tdf107097.py b/sc/qa/uitest/chart/tdf107097.py index 06bcdc488875..28f545e623ae 100644 --- a/sc/qa/uitest/chart/tdf107097.py +++ b/sc/qa/uitest/chart/tdf107097.py @@ -18,13 +18,12 @@ class tdf107097(UITestCase): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() xFirstMatrix = [] for row in range(6, 18): xRow = [] for column in range(3, 7): - xRow.append(get_cell_by_position(document, 1, column, row).getValue()) + xRow.append(get_cell_by_position(calc_doc, 1, column, row).getValue()) xFirstMatrix.append(xRow) gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"})) diff --git a/sc/qa/uitest/chart/tdf120348.py b/sc/qa/uitest/chart/tdf120348.py index 43aa61bd99d4..15b86d2c7fb9 100644 --- a/sc/qa/uitest/chart/tdf120348.py +++ b/sc/qa/uitest/chart/tdf120348.py @@ -17,13 +17,12 @@ class tdf120348(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf120348.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() xFirstMatrix = [] for row in range(1, 159): xRow = [] for column in range(5, 9): - xRow.append(round(get_cell_by_position(document, 0, column, row).getValue(), 5)) + xRow.append(round(get_cell_by_position(calc_doc, 0, column, row).getValue(), 5)) xFirstMatrix.append(xRow) gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 2"})) diff --git a/sc/qa/uitest/chart/tdf122398.py b/sc/qa/uitest/chart/tdf122398.py index 5d14db351268..fcd306b8127e 100644 --- a/sc/qa/uitest/chart/tdf122398.py +++ b/sc/qa/uitest/chart/tdf122398.py @@ -18,7 +18,6 @@ class tdf122398(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf122398.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #Open attached file. Set chart into edit mode. Select x-axis and then Format Selection. #Disable the Automatic for min and max. You cannot change the values at all, neither with direct diff --git a/sc/qa/uitest/chart/tdf123013.py b/sc/qa/uitest/chart/tdf123013.py index 45bb294fcfa0..770145b97e0c 100644 --- a/sc/qa/uitest/chart/tdf123013.py +++ b/sc/qa/uitest/chart/tdf123013.py @@ -18,7 +18,6 @@ class tdf123013(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf123013.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"})) gridwin.executeAction("ACTIVATE", tuple()) xChartMainTop = self.xUITest.getTopFocusWindow() diff --git a/sc/qa/uitest/chart/tdf123231.py b/sc/qa/uitest/chart/tdf123231.py index d384229df275..e85e28368d08 100644 --- a/sc/qa/uitest/chart/tdf123231.py +++ b/sc/qa/uitest/chart/tdf123231.py @@ -18,7 +18,6 @@ class tdf123231(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf93506.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #Change regression Type to Power gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"})) diff --git a/sc/qa/uitest/chart/tdf123520.py b/sc/qa/uitest/chart/tdf123520.py index b2d1b169cf9a..b84c16911c40 100644 --- a/sc/qa/uitest/chart/tdf123520.py +++ b/sc/qa/uitest/chart/tdf123520.py @@ -19,7 +19,6 @@ class tdf123520(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf123520.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"})) gridwin.executeAction("ACTIVATE", tuple()) diff --git a/sc/qa/uitest/chart/tdf124111.py b/sc/qa/uitest/chart/tdf124111.py index 3adbd0848293..d1141499db35 100644 --- a/sc/qa/uitest/chart/tdf124111.py +++ b/sc/qa/uitest/chart/tdf124111.py @@ -18,7 +18,6 @@ class tdf124111(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf124111.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"})) gridwin.executeAction("ACTIVATE", tuple()) diff --git a/sc/qa/uitest/chart/tdf129587.py b/sc/qa/uitest/chart/tdf129587.py index a969c5e7e3d9..d0713173c60a 100644 --- a/sc/qa/uitest/chart/tdf129587.py +++ b/sc/qa/uitest/chart/tdf129587.py @@ -16,8 +16,7 @@ class tdf129587(UITestCase): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() - xDataSeries = document.Sheets[0].Charts[0].getEmbeddedObject().getFirstDiagram().CoordinateSystems[0].ChartTypes[0].DataSeries + xDataSeries = calc_doc.Sheets[0].Charts[0].getEmbeddedObject().getFirstDiagram().CoordinateSystems[0].ChartTypes[0].DataSeries self.assertEqual("$Tabelle1.$F$2:$G$11", xDataSeries[0].ErrorBarY.ErrorBarRangeNegative) gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"})) @@ -49,7 +48,7 @@ class tdf129587(UITestCase): #Without the fix in place, it would have crashed here - xDataSeries = document.Sheets[0].Charts[0].getEmbeddedObject().getFirstDiagram().CoordinateSystems[0].ChartTypes[0].DataSeries + xDataSeries = calc_doc.Sheets[0].Charts[0].getEmbeddedObject().getFirstDiagram().CoordinateSystems[0].ChartTypes[0].DataSeries self.assertEqual(1.0, xDataSeries[0].ErrorBarY.PercentageError) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/chart/tdf133630.py b/sc/qa/uitest/chart/tdf133630.py index 100b2695a139..1bf3bb99eacc 100644 --- a/sc/qa/uitest/chart/tdf133630.py +++ b/sc/qa/uitest/chart/tdf133630.py @@ -16,11 +16,10 @@ class tdf133630(UITestCase): with self.ui_test.load_file(get_url_for_data_file("chartArea.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() change_measurement_unit(self, "Centimeter") - xCS = document.Sheets[0].Charts[0].getEmbeddedObject().getFirstDiagram().CoordinateSystems[0] + xCS = calc_doc.Sheets[0].Charts[0].getEmbeddedObject().getFirstDiagram().CoordinateSystems[0] self.assertEqual(0, xCS.getAxisByDimension(0, 0).LineWidth) self.assertEqual(80, xCS.ChartTypes[0].DataSeries[0].LineWidth) diff --git a/sc/qa/uitest/chart/tdf134059.py b/sc/qa/uitest/chart/tdf134059.py index a77822920d8c..1dfc052e058e 100644 --- a/sc/qa/uitest/chart/tdf134059.py +++ b/sc/qa/uitest/chart/tdf134059.py @@ -39,7 +39,6 @@ class Tdf134059(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf134059.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() self.assertSeriesNames(gridwin) diff --git a/sc/qa/uitest/chart/tdf136011.py b/sc/qa/uitest/chart/tdf136011.py index a3dce1d6e9e6..f0df5ca47841 100644 --- a/sc/qa/uitest/chart/tdf136011.py +++ b/sc/qa/uitest/chart/tdf136011.py @@ -25,7 +25,6 @@ class tdf136011(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf136011.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() xExpectedResults = [] for category in xCategories: diff --git a/sc/qa/uitest/chart/tdf142851.py b/sc/qa/uitest/chart/tdf142851.py index 2adf25da0709..a7ea6e826729 100644 --- a/sc/qa/uitest/chart/tdf142851.py +++ b/sc/qa/uitest/chart/tdf142851.py @@ -15,7 +15,6 @@ class tdf142851(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf142851.xlsx")): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Diagram 1"})) gridwin.executeAction("ACTIVATE", tuple()) diff --git a/sc/qa/uitest/chart/tdf43175.py b/sc/qa/uitest/chart/tdf43175.py index 1bfb26aa43d3..47470a71fefd 100644 --- a/sc/qa/uitest/chart/tdf43175.py +++ b/sc/qa/uitest/chart/tdf43175.py @@ -11,7 +11,7 @@ from uitest.uihelper.common import get_url_for_data_file class Tdf43175(UITestCase): def test_tdf43175(self): - with self.ui_test.load_file(get_url_for_data_file("tdf43175.ods")): + with self.ui_test.load_file(get_url_for_data_file("tdf43175.ods")) as document: self.xUITest.executeCommand(".uno:TableSelectAll") @@ -26,8 +26,6 @@ class Tdf43175(UITestCase): xOKBtn = xDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOKBtn) - document = self.ui_test.get_component() - aSheetNames = ['Blad1', 'Blad2', 'Blad1_2', 'Blad2_2'] self.assertEqual(4, document.Sheets.getCount()) diff --git a/sc/qa/uitest/chart/tdf62057.py b/sc/qa/uitest/chart/tdf62057.py index 915fa8f02e11..fcdaebb03d56 100644 --- a/sc/qa/uitest/chart/tdf62057.py +++ b/sc/qa/uitest/chart/tdf62057.py @@ -16,18 +16,17 @@ class tdf62057(UITestCase): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() xDataMatrix = [] for column in range(1, 3): xColumn = [] for row in range(0, 6): - xColumn.append(round(get_cell_by_position(document, 0, column, row).getValue(), 5)) + xColumn.append(round(get_cell_by_position(calc_doc, 0, column, row).getValue(), 5)) xDataMatrix.append(xColumn) xRowDescriptions = [] for row in range(0, 6): - xRowDescriptions.append(get_cell_by_position(document, 0, 0, row).getString()) + xRowDescriptions.append(get_cell_by_position(calc_doc, 0, 0, row).getString()) gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"})) diff --git a/sc/qa/uitest/chart/tdf62349.py b/sc/qa/uitest/chart/tdf62349.py index 2c9d0d44fef1..db2170612664 100644 --- a/sc/qa/uitest/chart/tdf62349.py +++ b/sc/qa/uitest/chart/tdf62349.py @@ -18,7 +18,6 @@ class tdf62349(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf62349.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #3: select all data cells C5:H9 gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "C5:H9"})) # 4: create a chart with insert/chart menu @@ -36,6 +35,6 @@ class tdf62349(UITestCase): self.xUITest.executeCommand(".uno:Copy") self.xUITest.executeCommand(".uno:Paste") #check we didn't crash - self.assertEqual(get_cell_by_position(document, 0, 2, 5).getString(), "group1") + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 5).getString(), "group1") # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/chart/tdf93506_trendline.py b/sc/qa/uitest/chart/tdf93506_trendline.py index f44ccf64e576..ebd683607c6b 100644 --- a/sc/qa/uitest/chart/tdf93506_trendline.py +++ b/sc/qa/uitest/chart/tdf93506_trendline.py @@ -21,7 +21,6 @@ class tdf93506(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf93506.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() change_measurement_unit(self, "Centimeter") diff --git a/sc/qa/uitest/chart/tdf96432.py b/sc/qa/uitest/chart/tdf96432.py index b05afbf89690..85d2caee2b7e 100644 --- a/sc/qa/uitest/chart/tdf96432.py +++ b/sc/qa/uitest/chart/tdf96432.py @@ -17,8 +17,7 @@ class tdf96432(UITestCase): xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() - xDataSeries = document.Sheets[0].Charts[0].getEmbeddedObject().getFirstDiagram().CoordinateSystems[0].ChartTypes[0].DataSeries + xDataSeries = calc_doc.Sheets[0].Charts[0].getEmbeddedObject().getFirstDiagram().CoordinateSystems[0].ChartTypes[0].DataSeries self.assertEqual(0, xDataSeries[0].ErrorBarY.LineTransparence) gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"})) @@ -40,7 +39,7 @@ class tdf96432(UITestCase): #verify - we didn't crash gridwin.executeAction("DESELECT", mkPropertyValues({"OBJECT": ""})) - xDataSeries = document.Sheets[0].Charts[0].getEmbeddedObject().getFirstDiagram().CoordinateSystems[0].ChartTypes[0].DataSeries + xDataSeries = calc_doc.Sheets[0].Charts[0].getEmbeddedObject().getFirstDiagram().CoordinateSystems[0].ChartTypes[0].DataSeries self.assertEqual(5, xDataSeries[0].ErrorBarY.LineTransparence) #reopen and try again @@ -64,7 +63,7 @@ class tdf96432(UITestCase): #verify - we didn't crash gridwin.executeAction("DESELECT", mkPropertyValues({"OBJECT": ""})) - xDataSeries = document.Sheets[0].Charts[0].getEmbeddedObject().getFirstDiagram().CoordinateSystems[0].ChartTypes[0].DataSeries + xDataSeries = calc_doc.Sheets[0].Charts[0].getEmbeddedObject().getFirstDiagram().CoordinateSystems[0].ChartTypes[0].DataSeries self.assertEqual(10, xDataSeries[0].ErrorBarY.LineTransparence) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/chart/tdf99069.py b/sc/qa/uitest/chart/tdf99069.py index 1de912e6b5cd..355bac8a6896 100644 --- a/sc/qa/uitest/chart/tdf99069.py +++ b/sc/qa/uitest/chart/tdf99069.py @@ -18,7 +18,6 @@ class tdf99069(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf99069.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #(1) Download and open example.ods attached to tdf#97266 with cell B1 active. #(2) In tool bar, click the chart icon. Program presents Chart Wizard. self.ui_test.execute_dialog_through_command(".uno:InsertObjectChart") @@ -61,6 +60,6 @@ class tdf99069(UITestCase): #verify - we didn't crash gridwin.executeAction("DESELECT", mkPropertyValues({"OBJECT": ""})) - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getValue(), 0.529084) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getValue(), 0.529084) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/conditional_format/tdf100793.py b/sc/qa/uitest/conditional_format/tdf100793.py index 24a658f2cf4c..0fec3c69648f 100644 --- a/sc/qa/uitest/conditional_format/tdf100793.py +++ b/sc/qa/uitest/conditional_format/tdf100793.py @@ -18,7 +18,6 @@ class tdf100793(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf100793.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() sheet = get_sheet_from_doc(calc_doc, 2) conditional_format_list = get_conditional_format_from_sheet(sheet) diff --git a/sc/qa/uitest/conditional_format/tdf105544.py b/sc/qa/uitest/conditional_format/tdf105544.py index 45af6a736af4..0c656ec4998f 100644 --- a/sc/qa/uitest/conditional_format/tdf105544.py +++ b/sc/qa/uitest/conditional_format/tdf105544.py @@ -18,7 +18,6 @@ class tdf105544(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf105544.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #2. select B3. Format> conditional formatting> manage gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "B3"})) self.ui_test.execute_dialog_through_command(".uno:ConditionalFormatManagerDialog") diff --git a/sc/qa/uitest/conditional_format/tdf118206.py b/sc/qa/uitest/conditional_format/tdf118206.py index 679e76dcb879..1408b34a089c 100644 --- a/sc/qa/uitest/conditional_format/tdf118206.py +++ b/sc/qa/uitest/conditional_format/tdf118206.py @@ -17,7 +17,6 @@ class tdf118206(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf118206.xlsx")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) self.xUITest.executeCommand(".uno:SelectColumn") self.xUITest.executeCommand(".uno:Copy") @@ -26,17 +25,17 @@ class tdf118206(UITestCase): self.xUITest.executeCommand(".uno:Paste") #verify - self.assertEqual(get_cell_by_position(document, 0, 1, 0).getString(), "On Back Order") - self.assertEqual(get_cell_by_position(document, 0, 1, 1).getValue(), 0) - self.assertEqual(get_cell_by_position(document, 0, 1, 7).getValue(), 1) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 0).getString(), "On Back Order") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 1).getValue(), 0) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 7).getValue(), 1) #Undo self.xUITest.executeCommand(".uno:Undo") - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "On Back Order") - self.assertEqual(get_cell_by_position(document, 0, 0, 1).getValue(), 0) - self.assertEqual(get_cell_by_position(document, 0, 0, 7).getValue(), 1) - self.assertEqual(get_cell_by_position(document, 0, 1, 0).getString(), "") - self.assertEqual(get_cell_by_position(document, 0, 1, 1).getString(), "") - self.assertEqual(get_cell_by_position(document, 0, 1, 7).getString(), "") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "On Back Order") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 1).getValue(), 0) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 7).getValue(), 1) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 0).getString(), "") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 1).getString(), "") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 7).getString(), "") # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/conditional_format/tdf81696.py b/sc/qa/uitest/conditional_format/tdf81696.py index a57d91a70479..6ad9a4531309 100644 --- a/sc/qa/uitest/conditional_format/tdf81696.py +++ b/sc/qa/uitest/conditional_format/tdf81696.py @@ -21,7 +21,6 @@ class tdf81696(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf81696.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:B3"})) #Open sort dialog by DATA - SORT,Just sort it by Column A, ascending. (it's default) @@ -34,11 +33,11 @@ class tdf81696(UITestCase): xOK = xDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOK) #verify - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "A") - self.assertEqual(get_cell_by_position(document, 0, 1, 0).getString(), "B") - self.assertEqual(get_cell_by_position(document, 0, 0, 1).getValue(), 1) - self.assertEqual(get_cell_by_position(document, 0, 1, 1).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 0, 2).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 1, 2).getValue(), 1) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "A") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 0).getString(), "B") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 1).getValue(), 1) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 1).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 2).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 2).getValue(), 1) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/function_wizard/tdf123479.py b/sc/qa/uitest/function_wizard/tdf123479.py index 478db9cc1fdd..b94037855c16 100644 --- a/sc/qa/uitest/function_wizard/tdf123479.py +++ b/sc/qa/uitest/function_wizard/tdf123479.py @@ -22,7 +22,6 @@ class tdf123479(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf123479.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #Select D14:D16 gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "D14:D16"})) #Open Formula Wizard (Ctrl+F2) @@ -40,6 +39,6 @@ class tdf123479(UITestCase): xOk = xDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOk) #verify; no crashes - self.assertEqual(get_cell_by_position(document, 0, 1, 0).getString(), "Pass/Fail") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 0).getString(), "Pass/Fail") # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/goalSeek/goalSeek.py b/sc/qa/uitest/goalSeek/goalSeek.py index 7bbb35a78b0e..784614e46d12 100644 --- a/sc/qa/uitest/goalSeek/goalSeek.py +++ b/sc/qa/uitest/goalSeek/goalSeek.py @@ -16,7 +16,6 @@ class goalSeek(UITestCase): with self.ui_test.load_file(get_url_for_data_file("goalSeek.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "B4"})) self.ui_test.execute_modeless_dialog_through_command(".uno:GoalSeekDialog") xDialog = self.xUITest.getTopFocusWindow() @@ -31,7 +30,7 @@ class goalSeek(UITestCase): pass #verify - self.assertEqual(get_cell_by_position(document, 0, 1, 0).getValue(), 200000) - self.assertEqual(get_cell_by_position(document, 0, 1, 3).getValue(), 15000) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 0).getValue(), 200000) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 3).getValue(), 15000) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/goalSeek/tdf37341.py b/sc/qa/uitest/goalSeek/tdf37341.py index 7248e6b39218..14e359c8644f 100644 --- a/sc/qa/uitest/goalSeek/tdf37341.py +++ b/sc/qa/uitest/goalSeek/tdf37341.py @@ -18,7 +18,6 @@ class tdf37341(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf37341.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "F111"})) self.ui_test.execute_modeless_dialog_through_command(".uno:GoalSeekDialog") xDialog = self.xUITest.getTopFocusWindow() @@ -33,6 +32,6 @@ class tdf37341(UITestCase): pass #verify - self.assertEqual(get_cell_by_position(document, 0, 4, 6).getValue() > 0, True) + self.assertEqual(get_cell_by_position(calc_doc, 0, 4, 6).getValue() > 0, True) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/goalSeek/tdf43693.py b/sc/qa/uitest/goalSeek/tdf43693.py index 43bce6da86bd..93c286389e1b 100644 --- a/sc/qa/uitest/goalSeek/tdf43693.py +++ b/sc/qa/uitest/goalSeek/tdf43693.py @@ -18,7 +18,6 @@ class tdf43693(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf43693.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "K248"})) self.ui_test.execute_modeless_dialog_through_command(".uno:GoalSeekDialog") xDialog = self.xUITest.getTopFocusWindow() @@ -33,6 +32,6 @@ class tdf43693(UITestCase): pass #verify - self.assertEqual(get_cell_by_position(document, 0, 7, 4).getValue(), 0.04) + self.assertEqual(get_cell_by_position(calc_doc, 0, 7, 4).getValue(), 0.04) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/key_f4/tdf102525.py b/sc/qa/uitest/key_f4/tdf102525.py index 9681d2be87ab..b2458bf101db 100644 --- a/sc/qa/uitest/key_f4/tdf102525.py +++ b/sc/qa/uitest/key_f4/tdf102525.py @@ -16,22 +16,21 @@ class tdf102525(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf102525.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #select B1:B4 gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "B1:B4"})) #F4 gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "F4"})) #verify - self.assertEqual(get_cell_by_position(document, 0, 1, 0).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 1, 0).getFormula(), "{=IF($A$1:$A$4>2;1;2)}") - self.assertEqual(get_cell_by_position(document, 0, 1, 1).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 1, 2).getValue(), 1) - self.assertEqual(get_cell_by_position(document, 0, 1, 3).getValue(), 1) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 0).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 0).getFormula(), "{=IF($A$1:$A$4>2;1;2)}") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 1).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 2).getValue(), 1) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 3).getValue(), 1) #Undo self.xUITest.executeCommand(".uno:Undo") #verify - self.assertEqual(get_cell_by_position(document, 0, 1, 0).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 1, 0).getFormula(), "{=IF(A1:A4>2;1;2)}") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 0).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 0).getFormula(), "{=IF(A1:A4>2;1;2)}") # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/pageFormat/tdf123508.py b/sc/qa/uitest/pageFormat/tdf123508.py index df3fae824162..c4b8fe9c8431 100644 --- a/sc/qa/uitest/pageFormat/tdf123508.py +++ b/sc/qa/uitest/pageFormat/tdf123508.py @@ -19,7 +19,6 @@ class tdf123508(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf123508.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #open "Format > Page - Sheet > Scale self.ui_test.execute_dialog_through_command(".uno:PageFormatDialog") xDialog = self.xUITest.getTopFocusWindow() diff --git a/sc/qa/uitest/range_name/tdf119954.py b/sc/qa/uitest/range_name/tdf119954.py index 99495123fe14..78b844c4ea13 100644 --- a/sc/qa/uitest/range_name/tdf119954.py +++ b/sc/qa/uitest/range_name/tdf119954.py @@ -19,7 +19,6 @@ class tdf119954(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf119954.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #* new document #* in A1 enter 1 #* in C3 enter 2 @@ -58,18 +57,18 @@ class tdf119954(UITestCase): enter_text_to_cell(gridwin, "B2", "=bbb") gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RETURN"})) - self.assertEqual(get_cell_by_position(document, 0, 1, 1).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 1).getValue(), 2) enter_text_to_cell(gridwin, "C2", "=aaa") gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RETURN"})) - self.assertEqual(get_cell_by_position(document, 0, 2, 1).getValue(), 1) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 1).getValue(), 1) self.xUITest.executeCommand(".uno:Undo") self.xUITest.executeCommand(".uno:Undo") - self.assertEqual(get_cell_by_position(document, 0, 2, 1).getValue(), 0) - self.assertEqual(get_cell_by_position(document, 0, 1, 1).getValue(), 0) - self.assertEqual(get_cell_by_position(document, 0, 1, 2).getFormula(), "") - self.assertEqual(get_cell_by_position(document, 0, 1, 1).getFormula(), "") + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 1).getValue(), 0) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 1).getValue(), 0) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 2).getFormula(), "") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 1).getFormula(), "") # check cancel button self.ui_test.execute_modeless_dialog_through_command(".uno:DefineDBName") diff --git a/sc/qa/uitest/search_replace/tdf35020.py b/sc/qa/uitest/search_replace/tdf35020.py index 335d985eadcb..bf148704f687 100644 --- a/sc/qa/uitest/search_replace/tdf35020.py +++ b/sc/qa/uitest/search_replace/tdf35020.py @@ -19,7 +19,6 @@ class tdf35020(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf35020.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog") xDialog = self.xUITest.getTopFocusWindow() @@ -39,10 +38,10 @@ class tdf35020(UITestCase): self.ui_test.close_dialog_through_button(xcloseBtn) #verify Sheet1.A13 A14 = 2 - self.assertEqual(get_cell_by_position(document, 0, 0, 12).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 0, 13).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 12).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 13).getValue(), 2) #Undo self.xUITest.executeCommand(".uno:Undo") - self.assertEqual(get_cell_by_position(document, 0, 0, 12).getValue(), 1) - self.assertEqual(get_cell_by_position(document, 0, 0, 13).getValue(), 1) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 12).getValue(), 1) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 13).getValue(), 1) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/search_replace/tdf39959.py b/sc/qa/uitest/search_replace/tdf39959.py index 3c05533bc540..4e5f022fe61f 100644 --- a/sc/qa/uitest/search_replace/tdf39959.py +++ b/sc/qa/uitest/search_replace/tdf39959.py @@ -18,7 +18,6 @@ class tdf39959(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf39959.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() # 1. Open a new document # 2. Enter "asdf" in A1 @@ -43,9 +42,9 @@ class tdf39959(UITestCase): self.ui_test.close_dialog_through_button(xcloseBtn) #verify Sheet2.A1 = "bbb" - self.assertEqual(get_cell_by_position(document, 1, 0, 0).getString(), "bbb ") - self.assertEqual(get_cell_by_position(document, 1, 0, 2).getString(), "abc") + self.assertEqual(get_cell_by_position(calc_doc, 1, 0, 0).getString(), "bbb ") + self.assertEqual(get_cell_by_position(calc_doc, 1, 0, 2).getString(), "abc") #Undo self.xUITest.executeCommand(".uno:Undo") - self.assertEqual(get_cell_by_position(document, 1, 0, 0).getString(), "asdf ") + self.assertEqual(get_cell_by_position(calc_doc, 1, 0, 0).getString(), "asdf ") # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/search_replace/tdf44861.py b/sc/qa/uitest/search_replace/tdf44861.py index 37947ff9d3de..64cece075ab2 100644 --- a/sc/qa/uitest/search_replace/tdf44861.py +++ b/sc/qa/uitest/search_replace/tdf44861.py @@ -18,7 +18,6 @@ class tdf44861(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf44861.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() # 2. ctrl-h, in dialog # Search: ([0-9]{2})([0-9]{2}) # Replace: $1.$2 @@ -42,10 +41,10 @@ class tdf44861(UITestCase): self.ui_test.close_dialog_through_button(xcloseBtn) #Expected: instead of 1345-1430 appears 13.45-14.30 - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "13.45-14.30") - self.assertEqual(get_cell_by_position(document, 0, 0, 1).getString(), "13.45-14.30") - self.assertEqual(get_cell_by_position(document, 0, 0, 2).getString(), "14.50-15.30") - self.assertEqual(get_cell_by_position(document, 0, 0, 3).getString(), "12.55-13.35") - self.assertEqual(get_cell_by_position(document, 0, 0, 4).getString(), "12.30-13.40") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "13.45-14.30") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 1).getString(), "13.45-14.30") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 2).getString(), "14.50-15.30") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 3).getString(), "12.55-13.35") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 4).getString(), "12.30-13.40") # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/solver/solver.py b/sc/qa/uitest/solver/solver.py index 762773e8635f..ed3925447822 100644 --- a/sc/qa/uitest/solver/solver.py +++ b/sc/qa/uitest/solver/solver.py @@ -17,7 +17,6 @@ class solver(UITestCase): with self.ui_test.load_file(get_url_for_data_file("solver.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "B4"})) self.ui_test.execute_modeless_dialog_through_command(".uno:SolverDialog") xDialog = self.xUITest.getTopFocusWindow() @@ -46,6 +45,6 @@ class solver(UITestCase): pass #verify - self.assertEqual(get_cell_by_position(document, 0, 1, 1).getValue(), 400) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 1).getValue(), 400) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/sort/stableSorting.py b/sc/qa/uitest/sort/stableSorting.py index 8b68af659538..52d4b3d41b1f 100644 --- a/sc/qa/uitest/sort/stableSorting.py +++ b/sc/qa/uitest/sort/stableSorting.py @@ -22,7 +22,6 @@ class CalcStableSorting(UITestCase): with self.ui_test.load_file(get_url_for_data_file("stableSorting.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #Select cell E1 ("Sales") and press toolbar button for ascending sorting. gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "E1"})) self.xUITest.executeCommand(".uno:SortAscending") @@ -37,13 +36,12 @@ class CalcStableSorting(UITestCase): self.xUITest.executeCommand(".uno:SortAscending") #Verify that the numbers in column "CheckOrder" are ascending for i in range(1, 501): - self.assertEqual(get_cell_by_position(document, 0, 5, i).getValue(), i) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, i).getValue(), i) def test_Must_keep_sort_order_previous_sorting_toolbar_button_Descending(self): with self.ui_test.load_file(get_url_for_data_file("stableSorting.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #Select cell E1 ("Sales") and press toolbar button for descending sorting. gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "E1"})) self.xUITest.executeCommand(".uno:SortDescending") @@ -59,7 +57,7 @@ class CalcStableSorting(UITestCase): #Verify that the numbers in column "CheckOrder" are ascending for i in range(1, 501): j = 501 - i - self.assertEqual(get_cell_by_position(document, 0, 5, i).getValue(), j) + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, i).getValue(), j) # def test_Must_keep_sort_order_previous_sorting_using_sort_dialog(self): # cannot test for now - criteria names are identical - Markus https://gerrit.libreoffice.org/#/c/52534/ diff --git a/sc/qa/uitest/sort/subtotals.py b/sc/qa/uitest/sort/subtotals.py index 1445a1d87dc2..d8b9fcff9d32 100644 --- a/sc/qa/uitest/sort/subtotals.py +++ b/sc/qa/uitest/sort/subtotals.py @@ -51,7 +51,6 @@ class Subtotals(UITestCase): def test_tdf88792(self): with self.ui_test.load_file(get_url_for_data_file("tdf88792.ods")) as calc_doc: XcalcDoc = self.xUITest.getTopFocusWindow() - document = self.ui_test.get_component() gridwin = XcalcDoc.getChild("grid_window") # go to cell A1 @@ -75,12 +74,11 @@ class Subtotals(UITestCase): xOKBtn = xDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOKBtn) - self.assertEqual(get_cell_by_position(document, 0, 3, 5).getValue(), 28000) + self.assertEqual(get_cell_by_position(calc_doc, 0, 3, 5).getValue(), 28000) def test_tdf88735(self): with self.ui_test.load_file(get_url_for_data_file("tdf88735.ods")) as calc_doc: XcalcDoc = self.xUITest.getTopFocusWindow() - document = self.ui_test.get_component() gridwin = XcalcDoc.getChild("grid_window") # 1 select all cells self.xUITest.executeCommand(".uno:SelectAll")#use uno command Menu Edit->Select All @@ -97,13 +95,12 @@ class Subtotals(UITestCase): xCancelBtn = xDialog.getChild("cancel") self.ui_test.close_dialog_through_button(xCancelBtn) - self.assertEqual(get_cell_by_position(document, 0, 0, 8).getString(), "z") - self.assertEqual(get_cell_by_position(document, 0, 1, 8).getValue(), 8) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 8).getString(), "z") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 8).getValue(), 8) def test_tdf56958(self): with self.ui_test.load_file(get_url_for_data_file("tdf56958.ods")) as calc_doc: XcalcDoc = self.xUITest.getTopFocusWindow() - document = self.ui_test.get_component() gridwin = XcalcDoc.getChild("grid_window") # 1. Open the test file # 2. Data->Subtotals @@ -146,12 +143,11 @@ class Subtotals(UITestCase): # 13. Click OK xOKBtn = xDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOKBtn) - self.assertEqual(get_cell_by_position(document, 0, 2, 1).getValue(), -0.25) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 1).getValue(), -0.25) def test_tdf55734(self): with self.ui_test.load_file(get_url_for_data_file("tdf55734.ods")) as calc_doc: XcalcDoc = self.xUITest.getTopFocusWindow() - document = self.ui_test.get_component() gridwin = XcalcDoc.getChild("grid_window") # 1. Open attached document # 2. Place cursor in cell outside of subtotals range (e.g. B7) @@ -166,7 +162,7 @@ class Subtotals(UITestCase): xOKBtn = xDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOKBtn) - self.assertEqual(get_cell_by_position(document, 0, 0, 1).getValue(), 1) - self.assertEqual(get_cell_by_position(document, 0, 1, 1).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 1).getValue(), 1) + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 1).getValue(), 2) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/sort/tdf105301.py b/sc/qa/uitest/sort/tdf105301.py index 2a93df6b57b9..1dbdd84c0b0f 100644 --- a/sc/qa/uitest/sort/tdf105301.py +++ b/sc/qa/uitest/sort/tdf105301.py @@ -15,7 +15,6 @@ class tdf105301(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf105301.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:R9"})) diff --git a/sc/qa/uitest/sort/tdf49531.py b/sc/qa/uitest/sort/tdf49531.py index fc1a5a05afd4..6057f6e129d5 100644 --- a/sc/qa/uitest/sort/tdf49531.py +++ b/sc/qa/uitest/sort/tdf49531.py @@ -20,7 +20,6 @@ class tdf49531(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf49531.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #select A3:C147 gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A3:C147"})) @@ -46,16 +45,16 @@ class tdf49531(UITestCase): xOk = xDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOk) #Verify - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "x") - self.assertEqual(get_cell_by_position(document, 0, 0, 1).getString(), "0") - self.assertEqual(get_cell_by_position(document, 0, 2, 2).getValue(), 111) - self.assertEqual(get_cell_by_position(document, 0, 2, 3).getValue(), 48) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "x") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 1).getString(), "0") + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 2).getValue(), 111) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 3).getValue(), 48) # UNDO Bug 49520 - EDITING: CRASH when undo sort with chart self.xUITest.executeCommand(".uno:Undo") # Verify - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "x") - self.assertEqual(get_cell_by_position(document, 0, 0, 1).getString(), "0") - self.assertEqual(get_cell_by_position(document, 0, 2, 2).getValue(), 2) - self.assertEqual(get_cell_by_position(document, 0, 2, 3).getValue(), 3) + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "x") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 1).getString(), "0") + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 2).getValue(), 2) + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 3).getValue(), 3) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/sort/tdf53482.py b/sc/qa/uitest/sort/tdf53482.py index 2058f1888f93..5d9fb51ca031 100644 --- a/sc/qa/uitest/sort/tdf53482.py +++ b/sc/qa/uitest/sort/tdf53482.py @@ -20,7 +20,6 @@ class tdf53482(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf53482.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #1. Highlight cells to be sorted A8:J124 gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A8:J124"})) #2. Click Data menu, Sort @@ -43,9 +42,9 @@ class tdf53482(UITestCase): xOK = xDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOK) #6. Expected behavior: Ignore column labels when sorting - self.assertEqual(get_cell_by_position(document, 0, 6, 7).getString(), "Occupation") - self.assertEqual(get_cell_by_position(document, 0, 6, 8).getString(), "Travel Industry") - self.assertEqual(get_cell_by_position(document, 0, 6, 123).getString(), "13") + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 7).getString(), "Occupation") + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 8).getString(), "Travel Industry") + self.assertEqual(get_cell_by_position(calc_doc, 0, 6, 123).getString(), "13") def test_tdf53482_Range_contains_column_headings(self): calc_doc = self.ui_test.create_doc_in_start_center("calc") diff --git a/sc/qa/uitest/sort/tdf54018.py b/sc/qa/uitest/sort/tdf54018.py index ece3a7fa2cc0..77ce70266074 100644 --- a/sc/qa/uitest/sort/tdf54018.py +++ b/sc/qa/uitest/sort/tdf54018.py @@ -19,7 +19,6 @@ class tdf54018(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf54018.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #click top left columns / rows heading field to select all cells self.xUITest.executeCommand(".uno:SelectAll") @@ -36,12 +35,12 @@ class tdf54018(UITestCase): self.ui_test.close_dialog_through_button(xOKBtn) #Bug: When progress bar reaches 40% LibO Stops responding #Verify - self.assertEqual(get_cell_by_position(document, 0, 1, 0).getString(), "7") - self.assertEqual(get_cell_by_position(document, 0, 1, 1).getString(), "6") - self.assertEqual(get_cell_by_position(document, 0, 1, 2).getString(), "5") - self.assertEqual(get_cell_by_position(document, 0, 1, 3).getString(), "4") - self.assertEqual(get_cell_by_position(document, 0, 1, 4).getString(), "3") - self.assertEqual(get_cell_by_position(document, 0, 1, 5).getString(), "2") - self.assertEqual(get_cell_by_position(document, 0, 1, 6).getString(), "1") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 0).getString(), "7") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 1).getString(), "6") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 2).getString(), "5") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 3).getString(), "4") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 4).getString(), "3") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 5).getString(), "2") + self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 6).getString(), "1") # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/sort/tdf57465.py b/sc/qa/uitest/sort/tdf57465.py index 26cdd6bdbf52..b993c8b14771 100644 --- a/sc/qa/uitest/sort/tdf57465.py +++ b/sc/qa/uitest/sort/tdf57465.py @@ -16,7 +16,6 @@ class tdf57465(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf57465.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "B1:G4"})) @@ -39,14 +38,14 @@ class tdf57465(UITestCase): xOk = xDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOk) - self.assertEqual("a", get_cell_by_position(document, 0, 1, 1).getString()) + self.assertEqual("a", get_cell_by_position(calc_doc, 0, 1, 1).getString()) # Without the fix in place, this test would have failed with # AssertionError: 'b' != '' - self.assertEqual("b", get_cell_by_position(document, 0, 2, 2).getString()) - self.assertEqual("c", get_cell_by_position(document, 0, 3, 3).getString()) - self.assertEqual("d", get_cell_by_position(document, 0, 4, 1).getString()) - self.assertEqual("e", get_cell_by_position(document, 0, 5, 2).getString()) - self.assertEqual("f", get_cell_by_position(document, 0, 6, 3).getString()) + self.assertEqual("b", get_cell_by_position(calc_doc, 0, 2, 2).getString()) + self.assertEqual("c", get_cell_by_position(calc_doc, 0, 3, 3).getString()) + self.assertEqual("d", get_cell_by_position(calc_doc, 0, 4, 1).getString()) + self.assertEqual("e", get_cell_by_position(calc_doc, 0, 5, 2).getString()) + self.assertEqual("f", get_cell_by_position(calc_doc, 0, 6, 3).getString()) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/sort/tdf95192.py b/sc/qa/uitest/sort/tdf95192.py index b3d7b1d069e6..6b17aed1a93c 100644 --- a/sc/qa/uitest/sort/tdf95192.py +++ b/sc/qa/uitest/sort/tdf95192.py @@ -17,7 +17,6 @@ class tdf95192(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf95192.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) @@ -31,15 +30,15 @@ class tdf95192(UITestCase): xOk = xDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOk) #Verify - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "Sal. Capra 1/17") - self.assertEqual(get_cell_by_position(document, 0, 0, 1).getString(), "Sal. Capra 1/20") - self.assertEqual(get_cell_by_position(document, 0, 0, 2).getString(), "Sal. Oregina 1/2") - self.assertEqual(get_cell_by_position(document, 0, 0, 41).getString(), "Vico Chiuso Cinque Santi 18/10") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "Sal. Capra 1/17") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 1).getString(), "Sal. Capra 1/20") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 2).getString(), "Sal. Oregina 1/2") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 41).getString(), "Vico Chiuso Cinque Santi 18/10") #UNDO self.xUITest.executeCommand(".uno:Undo") #Verify - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "Sal. Oregina 1/2") - self.assertEqual(get_cell_by_position(document, 0, 0, 1).getString(), "Via A. Centurione 11/7") - self.assertEqual(get_cell_by_position(document, 0, 0, 41).getString(), "Vico Chiuso Cinque Santi 18/10") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "Sal. Oregina 1/2") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 1).getString(), "Via A. Centurione 11/7") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 41).getString(), "Vico Chiuso Cinque Santi 18/10") # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/sort/tdf99208.py b/sc/qa/uitest/sort/tdf99208.py index dd037792dda1..d4511816465d 100644 --- a/sc/qa/uitest/sort/tdf99208.py +++ b/sc/qa/uitest/sort/tdf99208.py @@ -19,7 +19,6 @@ class tdf99208(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf99208.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #select A3:C245 gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:C245"})) @@ -48,15 +47,15 @@ class tdf99208(UITestCase): xOk = xDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOk) #Verify Expected: Values column B sorted ascending, column "control" unsorted - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "FODMAP") - self.assertEqual(get_cell_by_position(document, 0, 0, 1).getString(), "agave") - self.assertEqual(get_cell_by_position(document, 0, 0, 2).getString(), "almond milk") - self.assertEqual(get_cell_by_position(document, 0, 0, 244).getString(), "zucchini") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "FODMAP") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 1).getString(), "agave") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 2).getString(), "almond milk") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 244).getString(), "zucchini") # UNDO self.xUITest.executeCommand(".uno:Undo") # Verify - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "FODMAP") - self.assertEqual(get_cell_by_position(document, 0, 0, 1).getString(), "beef (grass fed, no breadcrumbs)") - self.assertEqual(get_cell_by_position(document, 0, 0, 244).getString(), "salsa") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "FODMAP") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 1).getString(), "beef (grass fed, no breadcrumbs)") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 244).getString(), "salsa") # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/sort/tdf99627.py b/sc/qa/uitest/sort/tdf99627.py index 0be80c388586..08be9e20da35 100644 --- a/sc/qa/uitest/sort/tdf99627.py +++ b/sc/qa/uitest/sort/tdf99627.py @@ -18,7 +18,6 @@ class tdf99627(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf99627.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) @@ -35,12 +34,12 @@ class tdf99627(UITestCase): xOk = xDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOk) #Verify - self.assertEqual(get_cell_by_position(document, 0, 0, 1).getString(), "2998") - self.assertEqual(get_cell_by_position(document, 0, 0, 2998).getString(), "1") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 1).getString(), "2998") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 2998).getString(), "1") #UNDO self.xUITest.executeCommand(".uno:Undo") #Verify - self.assertEqual(get_cell_by_position(document, 0, 0, 1).getString(), "1") - self.assertEqual(get_cell_by_position(document, 0, 0, 2998).getString(), "2998") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 1).getString(), "1") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 2998).getString(), "2998") # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/statistics/regression.py b/sc/qa/uitest/statistics/regression.py index 0102df1f8f92..c726a5aa37ba 100644 --- a/sc/qa/uitest/statistics/regression.py +++ b/sc/qa/uitest/statistics/regression.py @@ -23,17 +23,16 @@ class regression(UITestCase): with self.ui_test.load_file(get_url_for_data_file("regression.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() # Initially the final check status is "FALSE" (failed). - self.assertEqual(get_cell_by_position(document, 14, 1, 6).getString(), "FALSE", + self.assertEqual(get_cell_by_position(calc_doc, 14, 1, 6).getString(), "FALSE", "Check status must be FALSE before the test") self._do_regression(regression_type = "LINEAR", data_groupedby_column = data_groupedby_column, calc_intercept = True) self._do_regression(regression_type = "LINEAR", data_groupedby_column = data_groupedby_column, calc_intercept = False) self._do_regression(regression_type = "LOG", data_groupedby_column = data_groupedby_column) self._do_regression(regression_type = "POWER", data_groupedby_column = data_groupedby_column) - self.assertEqual(get_cell_by_position(document, 14, 1, 6).getString(), "TRUE", - "One of more of the checks failed for data_groupedby_column = {}, manually try with the document". + self.assertEqual(get_cell_by_position(calc_doc, 14, 1, 6).getString(), "TRUE", + "One of more of the checks failed for data_groupedby_column = {}, manually try with the calc_doc". format(data_groupedby_column)) def _do_regression(self, regression_type, data_groupedby_column = True, calc_intercept = True): diff --git a/sc/qa/uitest/statistics/tdf76731.py b/sc/qa/uitest/statistics/tdf76731.py index 12cecdab1832..a1aa96c79944 100644 --- a/sc/qa/uitest/statistics/tdf76731.py +++ b/sc/qa/uitest/statistics/tdf76731.py @@ -20,7 +20,6 @@ class anova(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf76731.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #1. Open the attached sample document in Calc. #2. Select the data range, i.e. A1:C5. gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:C5"})) @@ -46,22 +45,22 @@ class anova(UITestCase): xOKBtn = xDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOKBtn) #Verify, Table of results is shown, "F critical" cell has "#NAME?" error value. - self.assertEqual(get_cell_by_position(document, 0, 5, 0).getString(), "ANOVA - Single Factor") - self.assertEqual(get_cell_by_position(document, 0, 5, 1).getString(), "Alpha") - self.assertEqual(get_cell_by_position(document, 0, 5, 3).getString(), "Groups") - self.assertEqual(get_cell_by_position(document, 0, 5, 4).getString(), "Column 1") - self.assertEqual(get_cell_by_position(document, 0, 5, 5).getString(), "Column 2") - self.assertEqual(get_cell_by_position(document, 0, 5, 6).getString(), "Column 3") - self.assertEqual(get_cell_by_position(document, 0, 5, 8).getString(), "Source of Variation") - self.assertEqual(get_cell_by_position(document, 0, 5, 9).getString(), "Between Groups") - self.assertEqual(get_cell_by_position(document, 0, 5, 10).getString(), "Within Groups") - self.assertEqual(get_cell_by_position(document, 0, 5, 11).getString(), "Total") + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 0).getString(), "ANOVA - Single Factor") + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 1).getString(), "Alpha") + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 3).getString(), "Groups") + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 4).getString(), "Column 1") + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 5).getString(), "Column 2") + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 6).getString(), "Column 3") + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 8).getString(), "Source of Variation") + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 9).getString(), "Between Groups") + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 10).getString(), "Within Groups") + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 11).getString(), "Total") - self.assertEqual(get_cell_by_position(document, 0, 11, 8).getString(), "F critical") - self.assertEqual(round(get_cell_by_position(document, 0, 11, 9).getValue(),9), 3.885293835) + self.assertEqual(get_cell_by_position(calc_doc, 0, 11, 8).getString(), "F critical") + self.assertEqual(round(get_cell_by_position(calc_doc, 0, 11, 9).getValue(),9), 3.885293835) #undo self.xUITest.executeCommand(".uno:Undo") - self.assertEqual(get_cell_by_position(document, 0, 5, 0).getString(), "") + self.assertEqual(get_cell_by_position(calc_doc, 0, 5, 0).getString(), "") # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/textCase/textCase.py b/sc/qa/uitest/textCase/textCase.py index d3823f1dacc6..7b399670224c 100644 --- a/sc/qa/uitest/textCase/textCase.py +++ b/sc/qa/uitest/textCase/textCase.py @@ -130,22 +130,20 @@ class textCase(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf119155.xlsx")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #1. Open attached file #2. Select cells from C2 to C14 gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "C2:C14"})) #3. Go to menu: Format->Text->Capitalize Every Word self.xUITest.executeCommand(".uno:ChangeCaseToTitleCase") #Actual Results:Freezes LibreOffice - self.assertEqual(get_cell_by_position(document, 0, 2, 1).getString(), "Collagene Expert Targeted Wrinkle Corrector Unboxed 10 Ml") - self.assertEqual(get_cell_by_position(document, 0, 2, 13).getString(), "Vitamina Suractivee Hand Cream 400 Ml") + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 1).getString(), "Collagene Expert Targeted Wrinkle Corrector Unboxed 10 Ml") + self.assertEqual(get_cell_by_position(calc_doc, 0, 2, 13).getString(), "Vitamina Suractivee Hand Cream 400 Ml") def test_tdf119162_Cycle_Case(self): #Bug 119162 - Format > Text > Cycle Case on attached example file hangs Calc reproducibly with self.ui_test.load_file(get_url_for_data_file("tdf119162.xls")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") - document = self.ui_test.get_component() #1.Open the attached .xls file #2. Select column A gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) @@ -153,6 +151,6 @@ class textCase(UITestCase): self.xUITest.executeCommand(".uno:ChangeCaseRotateCase") self.xUITest.executeCommand(".uno:ChangeCaseToLower") #Actual Results:Freezes LibreOffice - self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "test\n") + self.assertEqual(get_cell_by_position(calc_doc, 0, 0, 0).getString(), "test\n") # vim: set shiftwidth=4 softtabstop=4 expandtab: |