summaryrefslogtreecommitdiff
path: root/sc/qa/uitest/chart/tdf98690.py
diff options
context:
space:
mode:
Diffstat (limited to 'sc/qa/uitest/chart/tdf98690.py')
-rw-r--r--sc/qa/uitest/chart/tdf98690.py45
1 files changed, 45 insertions, 0 deletions
diff --git a/sc/qa/uitest/chart/tdf98690.py b/sc/qa/uitest/chart/tdf98690.py
new file mode 100644
index 000000000000..d70b66ee4214
--- /dev/null
+++ b/sc/qa/uitest/chart/tdf98690.py
@@ -0,0 +1,45 @@
+# -*- 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_url_for_data_file
+
+class tdf98690(UITestCase):
+
+ def test_tdf98690(self):
+ calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf98690.xlsx"))
+ xCalcDoc = self.xUITest.getTopFocusWindow()
+ gridwin = xCalcDoc.getChild("grid_window")
+
+ gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Chart 2"}))
+
+ self.xUITest.executeCommand(".uno:Copy")
+
+ self.ui_test.close_doc()
+
+ self.ui_test.load_empty_file("calc")
+ xCalcDoc = self.xUITest.getTopFocusWindow()
+ gridwin = xCalcDoc.getChild("grid_window")
+ document = self.ui_test.get_component()
+
+ self.xUITest.executeCommand(".uno:Paste")
+
+ xData = document.Sheets[0].Charts[0].getEmbeddedObject().Data
+
+ aExpectedRowDescriptions = tuple(str(i) for i in range(1, 14))
+ aExpectedColumnDescriptions = ('Column D Column D', 'cc_girder2', 'Column S Column S',
+ 'Column S Column S', 'Column D Column D', 'clexrfdon', 'Column S Column S',
+ 'Column S Column S', 'Column D', 'clexrfdoff', 'Column S Column S', 'Column S Column S')
+
+ # Without the fix in place, this test would have failed here,
+ # since the pasted chart wouldn't have had any data
+ self.assertEqual(aExpectedRowDescriptions, xData.RowDescriptions)
+ self.assertEqual(aExpectedColumnDescriptions, xData.ColumnDescriptions)
+
+ self.ui_test.close_doc()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab: