Commit Graph
27 Commits
Author SHA1 Message Date
Michael Weghorn e00ddac69b odk: Drop a11y UNO API use from InputEvents example
The UNO a11y API is unpublished and has no stability
guarantuee whatsoever and is not meant to be used by external
users, so don't use it in the InputEvents example.

Change-Id: Ie98dc344b0459946976d881134f6fac9b7e1452a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185847
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-05-28 18:03:04 +02:00
Michael Weghorn 24c86762b1 odk examples: Drop unused recursive_acc_ctx
The only uses are commented ever since this
example was added in

    commit 2e52ac48e5
    Date:   Thu Jun 27 00:17:31 2024 +0200

        Added pyuno demo for key and mouse handlers and listeners.

and the UNO a11y API is unpublished, i.e. not meant
to be used in external code.

Change-Id: I39f50cdfca938bd260ee6c558c23e13776583565
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185846
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-05-28 18:02:53 +02:00
Ilmari Lauhakangas 558b20d1ac comphelper, msicreator, odk: fix issues found by Ruff linter
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-27 15:42:26 +02:00
Andrea Gelmini 3a018f568b Fix typo
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-19 14:41:40 +02:00
Ilmari Lauhakangas 4058ca814a tdf#158803 related: remove unnecessary comments
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-17 19:39:56 +02:00
Moritz Duge 2e52ac48e5 Added pyuno demo for key and mouse handlers and listeners.
Change-Id: I5b2f70061c5eee7a1068ec110d34ddadc5200bff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169584
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
Tested-by: Jenkins
2024-07-15 06:45:00 +02:00
Leonard Sasse f97944cca2 tdf#158803 pyflakes F821: undefined name 'com' and remove bare except clauses
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-05-21 11:43:46 +02:00
Hossein b9a36edc6d Add a minimal Python extension
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>
2024-01-16 10:54:20 +01:00
Bogdan B 6e67802648 tdf#158803 Remove unused imports from odk
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-29 17:33:48 +01:00
Ricardo Donino dac8885090 tdf#143123 Port SDraw Java SDK example to Python
Change-Id: I12e19b4a0d76affa178618cfbaf761692f29152a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160360
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-12-21 10:02:43 +01: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 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
Andrea Gelmini e6af563b99 Fix typos
Change-Id: I0a8ce634944df4af5c9e2000af5f6429b4e40b2e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119097
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-07-18 12:14:16 +02:00
Hossein ff93afcc76 Porting C++/Java DocumentLoader example to Python
* 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
2021-07-16 16:05:01 +02:00
Andrea Gelmini dd950a6edb Fix typos
Change-Id: Ib361243332b7219c0073c787c378c648e44705f2
Reviewed-on: https://gerrit.libreoffice.org/75487
Tested-by: Jenkins
Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2019-07-20 22:39:25 +02:00
Andrea Gelmini 64d624b651 Fix typos
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86
Reviewed-on: https://gerrit.libreoffice.org/21209
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-10 14:17:20 +00:00
Stephan Bergmann 423cfc2061 Create output dir
Change-Id: Iba9f6923e2e7cfefe980a97d7c1cd35e01f437fa
2015-04-20 14:59:26 +02:00
Stephan Bergmann 542120c306 Generate oxt in OUT_BIN
Change-Id: Idb4569c64060ef9d60e0d090cf46b053a252d750
2014-12-01 15:32:18 +01:00
Michael Meeks 72e5d0c8fb Move to MPLv2 license headers, with ESC decision and author's permission. 2013-04-30 13:34:06 +01:00
Stephan Bergmann 23a87a8622 Remove some obsolete makefile.mk
Change-Id: I47f1a72fac3e6678b5dfe880f2f189ffc436333b
2013-04-29 13:05:51 +02:00
Stephan Bergmann 5051209534 Adapt SDK to usage of msvcrtd for Windows --enable-dbgutil
* 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
2013-04-19 14:02:18 +02:00
Michael Stahl b4d9c390f9 .xdl files don't need executable bits
Change-Id: I604244b032855e0e6b94e3ed4217ee87d92c8419
2012-06-22 22:39:32 +02:00
Andras Timar 1917825c53 add makefile.mk that copies Python example to SDK 2011-12-14 12:52:31 +01:00
Laurent Godard fc0f0610fe minor around python and SDK
- add Python as available language desc. in SDK homepage
- replace OpenOffice.org with LibreOffice in examples index file
- add a readme file to toolpanel example

Signed-off-by: Lionel Elie Mamane <lionel@mamane.lu>
2011-12-11 08:43:55 +01:00
Stephan Bergmann ac579e29ad Added Makefile for SDK Python example. 2011-12-08 15:12:44 +01:00
Laurent Godard 07249785a7 SDK examples : add Python section and ToolPanel python example
correct minor css rendering too
2011-12-08 15:12:44 +01:00