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/.
10 from uitest
.framework
import UITestCase
11 from libreoffice
.uno
.propertyvalue
import mkPropertyValues
13 class ImpressLayouts(UITestCase
):
15 def test_impress_layouts(self
):
17 with self
.ui_test
.create_doc_in_start_center("impress"):
19 xTemplateDlg
= self
.xUITest
.getTopFocusWindow()
20 xCancelBtn
= xTemplateDlg
.getChild("close")
21 self
.ui_test
.close_dialog_through_button(xCancelBtn
)
23 layouts
= (".uno:AssignLayout?WhatLayout:long=20", ".uno:AssignLayout?WhatLayout:long=19",
24 ".uno:AssignLayout?WhatLayout:long=0", ".uno:AssignLayout?WhatLayout:long=1",
25 ".uno:AssignLayout?WhatLayout:long=32", ".uno:AssignLayout?WhatLayout:long=3",
26 ".uno:AssignLayout?WhatLayout:long=12", ".uno:AssignLayout?WhatLayout:long=15",
27 ".uno:AssignLayout?WhatLayout:long=14", ".uno:AssignLayout?WhatLayout:long=16",
28 ".uno:AssignLayout?WhatLayout:long=18", ".uno:AssignLayout?WhatLayout:long=34",
29 ".uno:AssignLayout?WhatLayout:long=28", ".uno:AssignLayout?WhatLayout:long=27",
30 ".uno:AssignLayout?WhatLayout:long=29", ".uno:AssignLayout?WhatLayout:long=30")
33 self
.xUITest
.executeCommand(i
)
35 xImpressDoc
= self
.xUITest
.getTopFocusWindow()
37 xEditWin
= xImpressDoc
.getChild("impress_win")
39 # There's a layout with 7 objects
41 xEditWin
.executeAction("SELECT", mkPropertyValues({"OBJECT":"Unnamed Drawinglayer object " + str(j
)}))
42 xEditWin
.executeAction("DESELECT", tuple())
45 # vim: set shiftwidth=4 softtabstop=4 expandtab: