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/.
11 from org
.libreoffice
.unotest
import UnoInProcess
14 class CheckRangeProperties(unittest
.TestCase
):
18 cls
._uno
= UnoInProcess()
22 def tearDownClass(cls
):
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
)
36 if __name__
== '__main__':
39 # vim: set shiftwidth=4 softtabstop=4 expandtab: