summaryrefslogtreecommitdiff
path: root/sw/qa/python
diff options
context:
space:
mode:
authorThomas Viehmann <tv@beamnet.de>2019-09-13 11:24:43 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2019-09-17 11:59:18 +0200
commit2f679fd3e6f46df7cda77eb70a014bcfcac7df52 (patch)
tree3176e59a32db9e67b89d7da8b8f198329543f2d2 /sw/qa/python
parentd550caa333328d98587b7c269a580b400238dc2b (diff)
sw: Mark uno property ParaChapterNumberingLevel as MAYBEVOID
tdf#127534 TextRange.getPropertyValues runs into RuntimeException when getting all properties form PropertySetinfo We suspect that the property might be completely unused / useless. However, removing it might be BC breaking for "buggy" uses of the property, so this is a lower-risk fix. Björn helped with great advice, thank you! All errors in the patch are my own, though. Change-Id: Ie80b61003de2b8516e458c800531aac951ebc148 Reviewed-on: https://gerrit.libreoffice.org/78865 Tested-by: Jenkins Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
Diffstat (limited to 'sw/qa/python')
-rw-r--r--sw/qa/python/check_styles.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/python/check_styles.py b/sw/qa/python/check_styles.py
index 8746c479fbbe..cfd8a9e1bec1 100644
--- a/sw/qa/python/check_styles.py
+++ b/sw/qa/python/check_styles.py
@@ -27,6 +27,16 @@ class CheckStyle(unittest.TestCase):
def tearDownClass(cls):
cls._uno.tearDown()
+ def test_TextRangeProperties(self):
+ xDoc = CheckStyle._uno.openEmptyWriterDoc()
+ xBodyText = xDoc.getText()
+ xCursor = xBodyText.createTextCursor()
+ xBodyText.insertString(xCursor, "Hello world", 0)
+ xTextRange = list(xBodyText)[0]
+ pnames = [p.Name for p in xTextRange.PropertySetInfo.Properties]
+ xTextRange.getPropertyValues(pnames)
+ xDoc.dispose()
+
def test_StyleFamilies(self):
xDoc = CheckStyle._uno.openEmptyWriterDoc()
xStyleFamilies = xDoc.StyleFamilies