/helpers/

o/cib/libreoffice-6-0 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/odk/examples/python
AgeCommit message (Collapse)Author
2024-07-27comphelper, msicreator, odk: fix issues found by Ruff linterIlmari Lauhakangas
Change-Id: I5ef65baeb0100b9d70b5c59c1d5f6f43ab951a22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171092 Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-07-19Fix typoAndrea Gelmini
Change-Id: I4eb00c710a940371b2916ae52127f1ff7f808427 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170501 Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net> Tested-by: Jenkins
2024-07-17tdf#158803 related: remove unnecessary commentsIlmari Lauhakangas
Change-Id: I25093100db0473bb907036b4f80e1bbc440cfb8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170639 Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-07-15Added pyuno demo for key and mouse handlers and listeners.Moritz Duge
Change-Id: I5b2f70061c5eee7a1068ec110d34ddadc5200bff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169584 Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> Tested-by: Jenkins
2024-05-21tdf#158803 pyflakes F821: undefined name 'com' and remove bare except clausesLeonard Sasse
Change-Id: Id116753a19a4fa5a29ad9a4f61f5ba3bf1ce95d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165451 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-01-16Add a minimal Python extensionHossein
This is a minimal Python extension. It is possible to run main.py from: 1. Inside a LibreOffice extension 2. Inside LibreOffice, and also via APSO 3. Outside LibreOffice, as an external process, and also in a Python IDE The provided Python script is very useful for debugging extensions as an example. That is because it is possible to debug it in an IDE before packaging it as a LibreOffice extension. Python file is checked with: $ flake8 --ignore E501 main.py Change-Id: I24d9aefdfda29264bf6b5f9403a40fae35e610f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159938 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2023-12-29tdf#158803 Remove unused imports from odkBogdan B
Used pyflakes to find unused imports from odk module. Then, removed those unused imports. Change-Id: If1a160fa99f0c3581687faecb0c7051625c478c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158821 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2023-12-21tdf#143123 Port SDraw Java SDK example to PythonRicardo Donino
Change-Id: I12e19b4a0d76affa178618cfbaf761692f29152a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160360 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2023-01-19tdf#143123 Port some Spreadsheet Java examples to PythonChenxiong Qi
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>
2022-12-03tdf#143123 Port Text Java examples to PythonChenxiong Qi
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-10-13tdf#143123 port DocumentHandling examples to PythonChenxiong Qi
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>
2021-07-18Fix typosAndrea Gelmini
Change-Id: I0a8ce634944df4af5c9e2000af5f6429b4e40b2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119097 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-07-16Porting C++/Java DocumentLoader example to PythonHossein
* Using UNO for Python * Opening the file in LibreOffice if it is listeing on port 2083 Change-Id: I14b1a38da5d66dd2ee8c859071c148ce08a080d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118142 Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Tested-by: Jenkins
2019-07-20Fix typosAndrea Gelmini
Change-Id: Ib361243332b7219c0073c787c378c648e44705f2 Reviewed-on: https://gerrit.libreoffice.org/75487 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2016-01-10Fix typosAndrea Gelmini
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86 Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2015-04-20Create output dirStephan Bergmann
Change-Id: Iba9f6923e2e7cfefe980a97d7c1cd35e01f437fa
2014-12-01Generate oxt in OUT_BINStephan Bergmann
Change-Id: Idb4569c64060ef9d60e0d090cf46b053a252d750
2013-04-30Move to MPLv2 license headers, with ESC decision and author's permission.Michael Meeks
2013-04-29Remove some obsolete makefile.mkStephan Bergmann
Change-Id: I47f1a72fac3e6678b5dfe880f2f189ffc436333b
2013-04-19Adapt SDK to usage of msvcrtd for Windows --enable-dbgutilStephan Bergmann
* Re-use existing settings/dk.mk to tunnel ENABLE_DEBUG into the SDK. Turns out this was explicitly included in ~all examples Makefiles, but only after settings.mk where it is now used, so include it in settings.mk now and dropped it from all the exmaples Makefiles. * The old settings.mk was apparently confused with using /MT ("link with LIBCMT.LIB") on cl command line and /MD ("link with MSVCRT.LIB") on link command line (where it was ignored), and you apparently can't pass both together to cl, so I settled on /MD (resp. /MDd) now and dropped /MT (resp. /MTd). No idea if that is exactly right, however. * Introduced client-facing LIBO_SDK_LDFLAGS_STDLIBS that covers kernel32.lib and msvcrt.lib vs. msvcrtd.lib on Windows. Adapted examples Makefiles and /ure/source/uretest/Makefile accordingly. Some examples Makefiles additionally use msvcprt.lib, no idea whether that still needs to be addressed. Change-Id: Ia8d9d177e415abfbaf6f9fa6239f0ef9998868be