diff options
author | Jakub Trzebiatowski <ubap.dev@gmail.com> | 2016-05-27 17:55:44 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-05-31 07:22:25 +0000 |
commit | be0c898587f9464cd7a11be5e6b1d4e8dbd078d8 (patch) | |
tree | 8168b63e06ba57d7c15ebdcc6b54626848fed9b2 /sw/qa | |
parent | 91a8c5c21b54162230ae83bf02ebfcb1a3d11659 (diff) |
Sw UNO API SwXTextCellStyle; TableStyles createInstance, XNameAccess
Making createInstance("com.sun.star.style.TableStyle") possible
Making SwXTextTableStyle a XNameAccess container of SwXTextCellStyles
Implementing basic SwXTextCellStyle
CellStyleMap based on svx/source/table/tabledesign.cxx
Change-Id: I5afff1f514582a63a6eb9f9fb44667665749855a
Reviewed-on: https://gerrit.libreoffice.org/25558
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/python/check_styles.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sw/qa/python/check_styles.py b/sw/qa/python/check_styles.py index 79972efdab30..31d8b5cc2172 100644 --- a/sw/qa/python/check_styles.py +++ b/sw/qa/python/check_styles.py @@ -11,6 +11,7 @@ import math import unittest from org.libreoffice.unotest import UnoInProcess from com.sun.star.container import NoSuchElementException +from com.sun.star.beans import UnknownPropertyException from com.sun.star.lang import IndexOutOfBoundsException from com.sun.star.lang import IllegalArgumentException @@ -172,6 +173,14 @@ class CheckStyle(unittest.TestCase): self.__test_StyleFamilyIndex(xTableStyles, vEmptyDocStyles, "SwXTextTableStyle") for sStyleName in vEmptyDocStyles: self.assertIsNotNone(xTableStyles.getByName(sStyleName)) + #check SwXTextCellStyles + vCellStyles = ["first-row", "last-row", "first-column", "last-column", "body", "even-rows", "odd-rows", "even-columns", "odd-columns", "background"] + xDefaultTableStyle = xTableStyles.getByIndex(0) + for sCellStyle in vCellStyles: + xCellStyle = xDefaultTableStyle.getByName(sCellStyle) + self.assertIsNotNone(xCellStyle.getPropertyValue("BackColor")) + with self.assertRaises(UnknownPropertyException): + xCellStyle.getPropertyValue("foobarbaz") xDoc.dispose() if __name__ == '__main__': |