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
13 from com
.sun
.star
.text
.TextContentAnchorType
import AT_PARAGRAPH
15 class CheckDrawPage(unittest
.TestCase
):
19 cls
._uno
= UnoInProcess()
23 def tearDownClass(cls
):
27 Test that grouping shapes also works with a single shape.
29 def test_group_single_shape(self
):
30 xDoc
= self
.__class
__._uno
.openEmptyWriterDoc()
32 collection
= self
.__class
__._uno
.xContext
.ServiceManager
.createInstance( 'com.sun.star.drawing.ShapeCollection' )
33 shape
= xDoc
.createInstance('com.sun.star.drawing.TextShape')
34 shape
.AnchorType
= AT_PARAGRAPH
37 shapegroup
= page
.group(collection
)
39 self
.assertEqual(shapegroup
.Count
, 1)
43 if __name__
== '__main__':