[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - chart2/source sc/qa
Tünde Tóth (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jun 22 19:45:28 UTC 2021
chart2/source/controller/dialogs/tp_ChartType.cxx | 3 +
sc/qa/uitest/chart/tdf142851.py | 38 ++++++++++++++++++++++
sc/qa/uitest/data/tdf142851.xlsx |binary
3 files changed, 40 insertions(+), 1 deletion(-)
New commits:
commit 04b81f0358da3c9c6ce84b6a1cdbedf93cb49766
Author: Tünde Tóth <toth.tunde at nisz.hu>
AuthorDate: Mon Jun 14 17:16:05 2021 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Tue Jun 22 21:44:54 2021 +0200
tdf#142851 Chart UI: fix empty Chart Type dialog
Chart Type dialog was empty, when the chart type of the chart
was unsupported.
Regression from commit: 4ff983b930dc15658aa531759d3f1e5b9586aeab
(Related: tdf#142049 restore some elements default visibility
in the ui)
Change-Id: I057e6b9218edee398af8311c46b922ca76a9bcb5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117173
Tested-by: Jenkins
Tested-by: László Németh <nemeth at numbertext.org>
Reviewed-by: László Németh <nemeth at numbertext.org>
(cherry picked from commit 1e7bf688967dc39540d24070c70c73b06bd1347f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117640
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx
index 19084e9e5180..ce38e10511d1 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -349,7 +349,8 @@ void ChartTypeTabPage::initializePage()
if( !bFound )
{
- m_xSubTypeList->Hide();
+ m_xMainTypeList->show();
+ m_xSubTypeList->Show();
m_pDim3DLookResourceGroup->showControls( false );
m_pStackingResourceGroup->showControls( false );
m_pSplineResourceGroup->showControls( false );
diff --git a/sc/qa/uitest/chart/tdf142851.py b/sc/qa/uitest/chart/tdf142851.py
new file mode 100644
index 000000000000..73c9bd68d6d0
--- /dev/null
+++ b/sc/qa/uitest/chart/tdf142851.py
@@ -0,0 +1,38 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+from uitest.framework import UITestCase
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+
+# Bug 142851 - UI Chart Type dialog empty with unsupported combo chart
+
+class tdf142851(UITestCase):
+ def test_tdf142851_combo_chart_type(self):
+ calc_doc = 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())
+ xChartMainTop = self.xUITest.getTopFocusWindow()
+ xChartMain = xChartMainTop.getChild("chart_window")
+ xChart = xChartMain.getChild("CID/Page=")
+
+ self.ui_test.execute_dialog_through_action(xChart, "COMMAND",
+ mkPropertyValues({"COMMAND" : "DiagramType"}))
+ xDialog = self.xUITest.getTopFocusWindow()
+ chartTypeVisible = get_state_as_dict(xDialog.getChild("charttype"))['Visible']
+ subTypeVisible = get_state_as_dict(xDialog.getChild("subtype"))['Visible']
+ xOKBtn = xDialog.getChild("ok")
+ self.ui_test.close_dialog_through_button(xOKBtn)
+
+ self.assertEqual('true', chartTypeVisible)
+ self.assertEqual('true', subTypeVisible)
+
+ self.ui_test.close_doc()
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/data/tdf142851.xlsx b/sc/qa/uitest/data/tdf142851.xlsx
new file mode 100644
index 000000000000..e2cdaf7c1233
Binary files /dev/null and b/sc/qa/uitest/data/tdf142851.xlsx differ
More information about the Libreoffice-commits
mailing list