1 # -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 from uitest
.uihelper
.common
import get_state_as_dict
10 from libreoffice
.uno
.propertyvalue
import mkPropertyValues
12 from uitest
.framework
import UITestCase
14 from uitest
.debug
import time
16 class ImpressDrawinglayerTest(UITestCase
):
18 def test_move_object(self
):
19 self
.ui_test
.create_doc_in_start_center("impress")
21 xTemplateDlg
= self
.xUITest
.getTopFocusWindow()
22 xCancelBtn
= xTemplateDlg
.getChild("cancel")
23 self
.ui_test
.close_dialog_through_button(xCancelBtn
)
25 xImpressDoc
= self
.xUITest
.getTopFocusWindow()
27 xEditWin
= xImpressDoc
.getChild("impress_win")
29 xDrawinglayerObject
= xEditWin
.getChild("Unnamed Drawinglayer object 1")
30 print(get_state_as_dict(xDrawinglayerObject
))
31 xDrawinglayerObject
.executeAction("MOVE", mkPropertyValues({"X": "1000", "Y":"1000"}))
33 self
.ui_test
.close_doc()
35 def test_resize_object(self
):
36 self
.ui_test
.create_doc_in_start_center("impress")
38 xTemplateDlg
= self
.xUITest
.getTopFocusWindow()
39 xCancelBtn
= xTemplateDlg
.getChild("cancel")
40 self
.ui_test
.close_dialog_through_button(xCancelBtn
)
42 xImpressDoc
= self
.xUITest
.getTopFocusWindow()
44 xEditWin
= xImpressDoc
.getChild("impress_win")
46 xDrawinglayerObject
= xEditWin
.getChild("Unnamed Drawinglayer object 1")
47 print(get_state_as_dict(xDrawinglayerObject
))
48 xDrawinglayerObject
.executeAction("RESIZE", mkPropertyValues({"X": "500", "Y":"4000", "FRAC_X": "0.5", "FRAC_Y": "0.5"}))
50 self
.ui_test
.close_doc()
52 # vim: set shiftwidth=4 softtabstop=4 expandtab: