summaryrefslogtreecommitdiff
path: root/sc/qa/uitest/chart
diff options
context:
space:
mode:
Diffstat (limited to 'sc/qa/uitest/chart')
-rw-r--r--sc/qa/uitest/chart/chartArea.py3
-rw-r--r--sc/qa/uitest/chart/chartAxes.py1
-rw-r--r--sc/qa/uitest/chart/chartDataLabels.py13
-rw-r--r--sc/qa/uitest/chart/chartGrid.py1
-rw-r--r--sc/qa/uitest/chart/chartGrids.py1
-rw-r--r--sc/qa/uitest/chart/chartLegend.py1
-rw-r--r--sc/qa/uitest/chart/chartTitles.py15
-rw-r--r--sc/qa/uitest/chart/chartWall.py3
-rw-r--r--sc/qa/uitest/chart/chartXAxis.py1
-rw-r--r--sc/qa/uitest/chart/chartYAxis.py1
-rw-r--r--sc/qa/uitest/chart/copyPaste.py3
-rw-r--r--sc/qa/uitest/chart/formatDataSeries.py1
-rw-r--r--sc/qa/uitest/chart/tdf101894.py5
-rw-r--r--sc/qa/uitest/chart/tdf107097.py3
-rw-r--r--sc/qa/uitest/chart/tdf120348.py3
-rw-r--r--sc/qa/uitest/chart/tdf122398.py1
-rw-r--r--sc/qa/uitest/chart/tdf123013.py1
-rw-r--r--sc/qa/uitest/chart/tdf123231.py1
-rw-r--r--sc/qa/uitest/chart/tdf123520.py1
-rw-r--r--sc/qa/uitest/chart/tdf124111.py1
-rw-r--r--sc/qa/uitest/chart/tdf129587.py5
-rw-r--r--sc/qa/uitest/chart/tdf133630.py3
-rw-r--r--sc/qa/uitest/chart/tdf134059.py1
-rw-r--r--sc/qa/uitest/chart/tdf136011.py1
-rw-r--r--sc/qa/uitest/chart/tdf142851.py1
-rw-r--r--sc/qa/uitest/chart/tdf43175.py4
-rw-r--r--sc/qa/uitest/chart/tdf62057.py5
-rw-r--r--sc/qa/uitest/chart/tdf62349.py3
-rw-r--r--sc/qa/uitest/chart/tdf93506_trendline.py1
-rw-r--r--sc/qa/uitest/chart/tdf96432.py7
-rw-r--r--sc/qa/uitest/chart/tdf99069.py3
31 files changed, 30 insertions, 64 deletions
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: