tdf#164393 Change themes UI as per UX feedback
[LibreOffice.git] / sw / qa / python / check_drawpage.py
blobef28490ce22495e6c43fe87cbf15a73ece0614dd
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
13 from com.sun.star.text.TextContentAnchorType import AT_PARAGRAPH
15 class CheckDrawPage(unittest.TestCase):
17 @classmethod
18 def setUpClass(cls):
19 cls._uno = UnoInProcess()
20 cls._uno.setUp()
22 @classmethod
23 def tearDownClass(cls):
24 cls._uno.tearDown()
26 """
27 Test that grouping shapes also works with a single shape.
28 """
29 def test_group_single_shape(self):
30 xDoc = self.__class__._uno.openEmptyWriterDoc()
31 page = xDoc.DrawPage
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
35 page.add(shape)
36 collection.add(shape)
37 shapegroup = page.group(collection)
39 self.assertEqual(shapegroup.Count, 1)
41 xDoc.close(True)
43 if __name__ == '__main__':
44 unittest.main()