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 com
.sun
.star
.text
.TextContentAnchorType
import AS_CHARACTER
, AT_PARAGRAPH
11 from uitest
.uihelper
.common
import get_url_for_data_file
13 class tdf141557(UITestCase
):
14 def test_tdf141557(self
):
15 # load the sample file
16 with self
.ui_test
.load_file(get_url_for_data_file("tdf141557.docx")):
17 document
= self
.ui_test
.get_component()
19 self
.assertEqual(AS_CHARACTER
, document
.DrawPage
.getByIndex(0).AnchorType
)
21 self
.xUITest
.executeCommand(".uno:JumpToNextFrame")
23 self
.ui_test
.wait_until_child_is_available('metricfield')
25 with self
.ui_test
.execute_dialog_through_command(".uno:TransformDialog") as xDialog
:
28 xDialog
.getChild('topara').executeAction("CLICK", tuple())
31 # Without the fix in place, at this point crash occurs.
32 self
.assertEqual(AT_PARAGRAPH
, document
.DrawPage
.getByIndex(0).AnchorType
)
34 # vim: set shiftwidth=4 softtabstop=4 expandtab: