Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / sw / qa / python / check_range_properties.py
blob26babf5220cec41a01381d922906d1e8d9148b43
1 #! /usr/bin/env python
2 # -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
4 # This file is part of the LibreOffice project.
6 # This Source Code Form is subject to the terms of the Mozilla Public
7 # License, v. 2.0. If a copy of the MPL was not distributed with this
8 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 import unittest
11 from org.libreoffice.unotest import UnoInProcess
14 class CheckRangeProperties(unittest.TestCase):
16 @classmethod
17 def setUpClass(cls):
18 cls._uno = UnoInProcess()
19 cls._uno.setUp()
21 @classmethod
22 def tearDownClass(cls):
23 cls._uno.tearDown()
25 # see tdf#127534
26 def test_TextRangeProperties(self):
27 xDoc = CheckRangeProperties._uno.openEmptyWriterDoc()
28 xBodyText = xDoc.getText()
29 xCursor = xBodyText.createTextCursor()
30 xBodyText.insertString(xCursor, "Hello world", 0)
31 xTextRange = list(xBodyText)[0]
32 pnames = [p.Name for p in xTextRange.PropertySetInfo.Properties]
33 xTextRange.getPropertyValues(pnames)
34 xDoc.dispose()
36 if __name__ == '__main__':
37 unittest.main()
39 # vim: set shiftwidth=4 softtabstop=4 expandtab: