#! /usr/bin/env python # -*- 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/. # import unittest from org.libreoffice.unotest import UnoInProcess from com.sun.star.lang import IllegalArgumentException from com.sun.star.beans import PropertyValue
# Make sure that all properties are returned with getArgs()
args = xDoc.getArgs()
self.assertTrue(p1 in args)
self.assertTrue(p2 in args)
self.assertTrue(p3 in args)
self.assertTrue(p4 in args)
self.assertTrue(p5 in args)
self.assertTrue(p6 in args)
self.assertTrue(p7 in args)
self.assertTrue(p8 in args)
# IllegalArgumentException should be thrown when setting a non-existing property
p1 = PropertyValue(Name="PropertyNotExists", Value="doesntmatter") with self.assertRaises(IllegalArgumentException):
xDoc.setArgs([p1])
xDoc.close(True)
if __name__ == '__main__':
unittest.main()
# vim: set shiftwidth=4 softtabstop=4 expandtab:
¤ Dauer der Verarbeitung: 0.23 Sekunden
(vorverarbeitet)
¤
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 ist noch experimentell.