# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- # # This file is part of the LibreOffice project. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. #
from uitest.framework import UITestCase from uitest.uihelper.common import select_pos, get_state_as_dict from uitest.uihelper.common import change_measurement_unit from com.sun.star.awt.GradientStyle import LINEAR from com.sun.star.drawing.HatchStyle import SINGLE from com.sun.star.drawing.BitmapMode import REPEAT from com.sun.star.drawing.RectanglePoint import MIDDLE_MIDDLE
with self.ui_test.create_doc_in_start_center("writer"):
with change_measurement_unit(self, "Centimeter"):
buttons = ['btnbitmap', 'btncolor', 'btngradient', 'btnhatch', 'btnpattern'] for index, button in enumerate(buttons):
with self.ui_test.execute_dialog_through_command(".uno:PageDialog") as xDialog:
tabcontrol = xDialog.getChild("tabcontrol")
select_pos(tabcontrol, "2")
self.click_button(xDialog, button)
self.check_default_area(button)
with self.ui_test.execute_dialog_through_command(".uno:PageDialog") as xDialog:
tabcontrol = xDialog.getChild("tabcontrol")
select_pos(tabcontrol, "2")
with self.ui_test.create_doc_in_start_center("writer"):
for i in range(30): with self.subTest(i=i): with self.ui_test.execute_dialog_through_command(".uno:PageDialog") as xDialog:
tabcontrol = xDialog.getChild("tabcontrol")
select_pos(tabcontrol, "1")
xFormatList = xDialog.getChild("comboPageFormat")
select_pos(xFormatList, str(i))
with self.ui_test.create_doc_in_start_center("writer") as document:
for i in range(4): with self.subTest(i=i): with self.ui_test.execute_dialog_through_command(".uno:PageDialog") as xDialog:
tabcontrol = xDialog.getChild("tabcontrol")
select_pos(tabcontrol, "1")
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.