Debian Codegraph @

sw/qa/uitest/writer_tests8/tdf158794.py

raw symbols SCIP
1 # -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
2 #
3 # This file is part of the LibreOffice project.
4 #
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 #
9 from uitest.framework import UITestCase
10 from libreoffice.uno.propertyvalue import mkPropertyValues
11 from uitest.uihelper.calc import enter_text_to_cell
12
13 class tdf158794(UITestCase):
14 def test_tdf158794(self):
15 with self.ui_test.create_doc_in_start_center("calc"):
16
17 xCalcDoc = self.xUITest.getTopFocusWindow()
18 gridwin = xCalcDoc.getChild("grid_window")
19
20 enter_text_to_cell(gridwin, "A1", "1")
21
22 gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"}))
23
24 self.xUITest.executeCommand(".uno:Copy")
25
26 with self.ui_test.load_empty_file("writer") as document:
27
28 self.xUITest.executeCommand(".uno:InsertFootnote")
29
30 # Paste as DDE link
31 # Without the fix in place, this test would have crashed here
32 formatProperty = mkPropertyValues({"SelectedFormat": 59})
33 self.xUITest.executeCommandWithParameters(".uno:ClipboardFormatItems", formatProperty)
34
35 self.assertEqual("", document.Footnotes[0].String)
36
37 # vim: set shiftwidth=4 softtabstop=4 expandtab: