1 # -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
3 # This file is part of the LibreOffice project.
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/.
9 from uitest
.framework
import UITestCase
10 from uitest
.uihelper
.common
import get_url_for_data_file
13 class tdf137803(UITestCase
):
14 def test_tdf137803(self
):
15 # load the sample file
16 with self
.ui_test
.load_file(get_url_for_data_file("tdf137803.odt")) as document
:
19 self
.xUITest
.executeCommand(".uno:JumpToNextFrame")
20 self
.ui_test
.wait_until_child_is_available('metricfield')
22 # open textattrs dialog
23 with self
.ui_test
.execute_dialog_through_command(".uno:TextAttributes") as TextDialog
:
26 TSB_AUTOGROW_SIZE
= TextDialog
.getChild('TSB_AUTOGROW_SIZE')
27 TSB_AUTOGROW_SIZE
.executeAction("CLICK",tuple())
30 shape
= document
.getDrawPages()[0][0]
33 frame
= shape
.getText()
36 shapeYPos
= shape
.getPropertyValue("VertOrientPosition")
37 frameYPos
= frame
.getPropertyValue("VertOrientPosition")
38 shpsize
= shape
.getSize().Height
40 xToolkit
= self
.xContext
.ServiceManager
.createInstance('com.sun.star.awt.Toolkit')
41 xToolkit
.processEventsToIdle()
43 # without the fix, at this point the textbox falls apart so this won't be passed
44 self
.assertLess(frameYPos
, shapeYPos
+ shpsize
)
48 # vim: set shiftwidth=4 softtabstop=4 expandtab: