summaryrefslogtreecommitdiff
path: root/sw/qa/python/check_fields.py
diff options
context:
space:
mode:
authorSaurav Chirania <saurav.chir@gmail.com>2018-01-14 20:51:17 +0530
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2018-01-16 15:40:43 +0100
commitada02c556531e9e5f28a159223fc7e2b36a7a84d (patch)
tree31a30ba4bfb0c78f86109604b25ca602bc962ba0 /sw/qa/python/check_fields.py
parent03afd4b72431a0dc197891d41fb7bf2419858380 (diff)
tdf#97361 Tests in sw should be more pythonic
The modified files have been made more pythonic by removing Java-like codes. Change-Id: I46c121f3bd350b0218ca700ea949616e010f917e Reviewed-on: https://gerrit.libreoffice.org/47863 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sw/qa/python/check_fields.py')
-rw-r--r--sw/qa/python/check_fields.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/sw/qa/python/check_fields.py b/sw/qa/python/check_fields.py
index 2fdbdf93cc2c..60418a93001d 100644
--- a/sw/qa/python/check_fields.py
+++ b/sw/qa/python/check_fields.py
@@ -29,8 +29,7 @@ class CheckFields(unittest.TestCase):
xDoc = self.__class__._xDoc
xEnumerationAccess = xDoc.getTextFields()
xFieldEnum = xEnumerationAccess.createEnumeration()
- while xFieldEnum.hasMoreElements():
- xField = xFieldEnum.nextElement()
+ for xField in xFieldEnum:
if xField.supportsService("com.sun.star.text.TextField.JumpEdit"):
xAnchor = xField.getAnchor()
read_content = xAnchor.getString()