13 Commits
Author SHA1 Message Date
Chenxiong Qi 478583be4c Don't treat __pycache__ dir as a DirBrowseNode
Signed-off-by: Chenxiong Qi <qcxhome@gmail.com>
Change-Id: Ie1026fc5f34adb307773ef15ff8e79d035adac0f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190404
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
2025-10-23 21:16:23 +02:00
Chenxiong Qi b0ed190986 Format pythonloader.py and pythonscript.py
The goal is to make the script more readable. The format is done with
command:

    black --line-length 120 <filename>

No manual modification to these files.

Change-Id: I8ebbac936924277308fc011b20cba60849fa9c45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179438
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
2024-12-29 15:22:47 +01:00
Chenxiong Qi 74de0ebb81 tdf#97361 Make unittests more pythonic: XIndexAccess
Change-Id: I05ef274dd0ad5dc35b5455cfc01feabc6c0820a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161276
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-01-23 14:00:46 +01:00
Chenxiong Qi 8b6e0dd9e4 tdf#158803 Fix issues detected by pyflakes
Change-Id: Iaa329dff61db894e7d5fecd840e785a53a48b26f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160889
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-12-27 13:48:47 +01:00
Chenxiong Qi 10fac0f7f7 tdf#143123 Port DevelopersGuide/FirstSteps/HelloTextTableShape to Python
Signed-off-by: Chenxiong Qi <qcxhome@gmail.com>
Change-Id: Ifb5639369c4af1db27ccb5a93dfad093ce7403b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146819
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-04-18 14:33:09 +02:00
Chenxiong Qi 6f112bd40f tdf#97362 Convert comphelper SequenceOutputStreamUnitTest to Python
Signed-off-by: Chenxiong Qi <qcxhome@gmail.com>
Change-Id: I72826fc8180fcb147ff84b10b88c16a4084799ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145690
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-01-31 12:18:47 +00:00
Chenxiong Qi 9753aa4a77 tdf#143123 Port some Spreadsheet Java examples to Python
Some examples inside odk/examples/java/Spreadsheet are ported to
Python:

ChartTypeChange.java    -> ChartTypeChange.py
EuroAdaption.java       -> EuroAdaption.py
SCalc.java              -> SCalc.py

Code format is checked with 'pycodestyle':

    pycodestyle --ignore=E501,E722 odk/examples/python/Spreadsheet/*.py

Signed-off-by: Chenxiong Qi <qcxhome@gmail.com>
Change-Id: If0631b5970faab6499cfea3eef559e003fad24d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143810
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-01-19 21:39:01 +00:00
Chenxiong Qi be7f3df701 tdf#97362 Convert unotools tempfile tests to Python
Signed-off-by: Chenxiong Qi <qcxhome@gmail.com>
Change-Id: I43d0881bbd2a99e018e027e166dcb7b0bffa5ff5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144395
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-01-17 06:20:58 +00:00
Chenxiong Qi 8f34b0d40e tdf#143123 Port Text Java examples to Python
The examples inside odk/examples/java/Text are ported to Python:

BookmarkInsertion.java     -> BookmarkInsertion.py
GraphicsInserter.java      -> GraphicsInserter.py
HardFormatting.java        -> HardFormatting.py
StyleCreation.java         -> StyleCreation.py
SWriter.java               -> SWriter.py
StyleInitialization.java   -> StyleInitialization.py
TextDocumentStructure.java -> TextDocumentStructure.py
TextReplace.java           -> TextReplace.py
WriterSelector.java        -> WriterSelector.py

Code format is checked with 'pycodestyle':

    pycodestyle --ignore=E501,E722 odk/examples/python/Text/*.py

Some Java methods are merged when ported to Python.

Signed-off-by: Chenxiong Qi <qcxhome@gmail.com>
Change-Id: Ic903cfa24ef32f8edaafd7e6e2e0c757b4b1be0a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141425
Tested-by: Hossein <hossein@libreoffice.org>
Reviewed-by: Hossein <hossein@libreoffice.org>
2022-12-03 01:48:39 +00:00
Chenxiong Qi 665d1633c9 tdf#143123 port DocumentHandling examples to Python
This port keeps the similarity with Java ones as much as possible.

examples.html is also updated by adding the Python examples.

Signed-off-by: Chenxiong Qi <qcxhome@gmail.com>
Change-Id: I2af26aaf42f5408bf254a4e0507442200f843661
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139887
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2022-10-13 15:41:40 +02:00
Chenxiong Qi 9928f139e8 tdf#97361 replace getCellByPosition with access by subscript
Signed-off-by: Chenxiong Qi <qcxhome@gmail.com>
Change-Id: I50d6e29c34e3cf72cdf0afc9f118fafc3c144eaf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139141
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-05 16:05:56 +02:00
Chenxiong Qi 14cff82b31 tdf#97361 replace getCellRangeByPosition with slices
Signed-off-by: Chenxiong Qi <qcxhome@gmail.com>
Change-Id: I4368adca1e9500c6f926ea1f28b0790b06fae739
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139140
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-05 16:05:28 +02:00
Chenxiong Qi 26e3bfa02c tdf#73845 restore Empty and NonEmpty query filter after FILEOPEN
Signed-off-by: Chenxiong Qi <qcxhome@gmail.com>
Change-Id: I659e0d97c44bf189f457ca04eb49248121278c10
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138919
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2022-09-05 11:42:29 +02:00