# -*- 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 libreoffice.uno.propertyvalue import mkPropertyValues from uitest.uihelper.common import get_state_as_dict from uitest.uihelper.common import select_pos
class documentProperties(UITestCase):
def assert_custom_properties(self, dialog, bIsFirstItemVisible): for i in range(6):
aExpected = 'false' if bIsFirstItemVisible and i == 0:
aExpected = 'true'
xNameBox = dialog.getChild("namebox" + str(i + 1))
xTypeBox = dialog.getChild("typebox" + str(i + 1))
xValueEdit = dialog.getChild("valueedit" + str(i + 1))
xRemoveBtn = dialog.getChild("remove" + str(i + 1))
self.assertEqual(aExpected, get_state_as_dict(xNameBox)['ReallyVisible'])
self.assertEqual(aExpected, get_state_as_dict(xTypeBox)['ReallyVisible'])
self.assertEqual(aExpected, get_state_as_dict(xValueEdit)['ReallyVisible'])
self.assertEqual(aExpected, get_state_as_dict(xRemoveBtn)['ReallyVisible'])
def test_open_documentProperties_writer(self): with self.ui_test.create_doc_in_start_center("writer"): with self.ui_test.execute_dialog_through_command(".uno:SetDocumentProperties") as xDialog:
xResetBtn = xDialog.getChild("reset")
xResetBtn.executeAction("CLICK", tuple())
xUserDataCheckbox = xDialog.getChild("userdatacb") # apply user data
xUserDataCheckbox.executeAction("CLICK", tuple())
xThumbSaveCheckbox = xDialog.getChild("thumbnailsavecb") # save preview image with document
xThumbSaveCheckbox.executeAction("CLICK", tuple())
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.