Debian Codegraph @

sd/qa/uitest/impress_tests2/tdf127900.py

raw
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
10 from uitest.framework import UITestCase
11 from uitest.uihelper.common import select_pos
12 from libreoffice.uno.propertyvalue import mkPropertyValues
13 from uitest.uihelper.common import get_url_for_data_file
14
15
16 class tdf127900(UITestCase):
17
18 def test_tdf127900(self):
19
20 with self.ui_test.load_file(get_url_for_data_file("tdf127900.fodp")) as doc:
21
22 xMasterLang = doc.MasterPages[0][1].CharLocale.Language
23 xSlideLang = doc.DrawPages[1][1].CharLocale.Language
24
25 self.assertEqual(xMasterLang, xSlideLang)
26
27 self.xUITest.executeCommand(".uno:SlideMasterPage")
28
29 xMaster = self.xUITest.getTopFocusWindow().getChild("impress_win")
30
31 xMaster.executeAction("TYPE", mkPropertyValues({"KEYCODE": "TAB"}))
32 xMaster.executeAction("TYPE", mkPropertyValues({"KEYCODE": "TAB"}))
33
34 with self.ui_test.execute_dialog_through_command(".uno:FontDialog") as xDlg:
35
36 select_pos(xDlg.getChild("cbWestLanguage"), "10")
37
38 xMasterLang = doc.MasterPages[0][1].CharLocale.Language
39 xSlideLang = doc.DrawPages[1][1].CharLocale.Language
40
41 self.assertEqual(xMasterLang, xSlideLang)
42
43 # vim: set shiftwidth=4 softtabstop=4 expandtab: