Commit Graph
158 Commits
Author SHA1 Message Date
Andrea Gelmini 9c5f2dc85d Fix typos
Change-Id: I085ff68b4550468eb163d88978c81d8b5335e6ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108561
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-01-01 22:31:36 +01:00
Kevin Suo 6b57cfb71a tdf#128463: Revert the change to license information
per comment by Tor Lillqvist in:
https://bugs.documentfoundation.org/show_bug.cgi?id=128463#c18

The Apache part of the license was added by commit
8c9cc54bd7 due to misunderstanding.

Change-Id: I861e7b13e1900de9287c768a4da8740fdb2e517f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108537
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-01 07:37:47 +01:00
Kevin Suo 8c9cc54bd7 tdf#128463: Rewrite NamedRanges.py to make it work when run from UI
This commit:
1. Updated the license header;
2. Added docstrings and notes to help the users to understand the API and code.
3. Make the code to create a new sheet named "data", define named ranges in it,
   modify the named range, define another named range, fill values in the cells
   related to the named ranges, the calcualte sum of each named range, and also
   calculate the difference between the two named ranges. The results are stored
   in the sheet named "information".
4. Cell alignment and background color methods are also used in this example.
5. Only show the parent function in the UI.

Change-Id: Iba6111dc3754f054deeb0baf902dbff1eb3bfa2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108530
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-31 08:47:32 +01:00
Kevin Suo 97d5144605 tdf#128463: Make SetCellColor python example actually do sth
The previous one, when run from within the application, gives a
runtime exception.

This commit rewrites this example to:
1. Hide the private function from the UI;
2. Create a new blank Calc file instead of operating directly in the existing file;
3. Set cell colors to draw a "LO" picture in the sheet.
4. Added docstrings and API reference links.

Change-Id: I120a3ede0629a5657fec18f1b0909dfc4bc7ad1c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104720
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-31 08:46:15 +01:00
Kevin Suo 5fb0e0f68b Improve example python code in scripting.
* Modified the code to be more pythonic.
* If "len(theString) == 0", then "not theString" evaluates to True.
* "theString[0].isupper()" and "theString[1].isupper()" can be combined.
* Remove unused imported string module
* Wrap long lines
* run autopep8 to prettify
* ...

Change-Id: Ic8aaa0728a43936cd4c6e1ed590e01ba8f0fbf5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104136
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-10-10 14:11:27 +02:00
Ashod Nakashian c7c188c745 python: add sample python script to insert/replace text
Change-Id: Idde3cd22ecc1f1bd34f7519acedc85584ed2deaf
Reviewed-on: https://gerrit.libreoffice.org/58160
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/73477
Tested-by: Jenkins
2019-06-05 11:28:37 +02:00
Samuel Mehrbrodt 9fe1eefe25 Fix product name
Change-Id: I35ac8f6ad54c7990bd5fb24dc0a30ebb8e1e8254
Reviewed-on: https://gerrit.libreoffice.org/67949
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-02-18 09:22:07 +01:00
Matthias Seidel 207045ae59 Fixed typo, deleted whitespace
(cherry picked from commit 31df7841adbd74c9f32cc5cfce86c148d365e01f)

Change-Id: I0f7575544f24142cf27edd4002c09b316f679367
Reviewed-on: https://gerrit.libreoffice.org/64850
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-12-09 21:56:19 +01:00
Tor Lillqvist 79fa6ac73c Use the . separator between sheet name and cell range instead of ! to match UI
Also put a dollar in front of the sheet name.

Change-Id: I93d610dad8ad085718b0fe389e460b588939e5d2
2018-05-09 15:20:31 +03:00
Tor Lillqvist 850b401eba Add mode lines and license blurb
Change-Id: Ifc319e6954665b71f8a98d6ec849a71bbf2b7318
2018-03-28 17:02:28 +03:00
Tor Lillqvist f21e341d0f Add DeleteNamedRange function
Change-Id: I081614cb34aee704c9162f58c78dbaa6a350d30b
2018-03-28 16:52:46 +03:00
Tor Lillqvist e32b4c8a07 Add another sample Python script, to handle named ranges in spreadsheets
Change-Id: Ibe11ab2c3513a05b9aec574602b24df70270908c
Reviewed-on: https://gerrit.libreoffice.org/51968
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-03-28 02:01:08 +02:00
Tor Lillqvist aa27a25d15 Add another sample Python script
Change-Id: I542a8b36a097d8961dc76fdcc3d25a3d7b6eb526
Reviewed-on: https://gerrit.libreoffice.org/51966
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-03-27 20:52:48 +02:00
Miklos Vajna a7d67762f1 scripting: add missing vim modelines to python files
Change-Id: Iedc3a8ab37deeb7a686fa709afb0cf350f815ec6
Reviewed-on: https://gerrit.libreoffice.org/48418
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2018-01-24 09:40:17 +01:00
Andrea Gelmini 0d4996862b Fix typos
Change-Id: I9701cc93a9f4315e71c133237fdd96ef6964c8ff
Reviewed-on: https://gerrit.libreoffice.org/29438
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-01 20:05:49 +00: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
Julien Nabet 5584d73f2d Typos
Change-Id: I434be0034b26ac4719590238817538ecd90b8923
2015-03-25 20:42:37 +01:00
Michael Stahl e557b160fd pyuno, scripting: remove executable bits from python, js, bsh files
Change-Id: Id108693d84fbca7764614e126ee1b3b045baec17
2015-03-02 13:26:28 +01:00
Andrea Gelmini da40cac540 Fix common typos. No automatic tools. Handmade…
Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959
Reviewed-on: https://gerrit.libreoffice.org/12164
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-12 11:04:11 +00:00
Noel Grandin 3f43627ac6 fix import location of XScriptContext
Change-Id: I3b0ec540ed37e40f59210b7fb563196aee63d1ea
2014-10-14 14:44:48 +02:00
Robert Antoni Buj i Gelonch 6f42a71439 scripting: Format_java_code.sh initial run
Conflicts:
	scripting/java/com/sun/star/script/framework/io/UCBStreamHandler.java

Change-Id: I09b94d8c96dfbaf498bd93a0088feb80a9e4afb6
2014-10-02 15:25:29 +02:00
Noel Grandin 3f210b0e75 java: remove unnecessary return statements
found by PMD

Change-Id: I3d150421948d17eaed34fac2b1a212da34288d1a
2014-08-20 10:35:54 +02:00
Noel Grandin 60f152caee java: avoid unnecessary comparisons in boolean expressions
i.e. stuff like "x == true"

Change-Id: Ib82a4a30e736df392405332fa197b588482cffcf
2014-08-20 10:35:53 +02:00
Noel Grandin 4b4bff3402 java: no need to instantiate String objects directly
Change-Id: I7610774c94bf673ed3b574ffce04c4ee6ca93c03
2014-08-19 14:57:18 +02:00
Noel Grandin ff0ad0493e java: use 'Integer.valueOf' instead of 'new Integer'
Change-Id: Ia8befb8d69914ce971174fc5f2ffc0e2f506a940
2014-08-19 14:57:17 +02:00
Noel Grandin be1bb7b1cc java: use Boolean.valueOf instead of instantiating Boolean objects
Change-Id: Ie41d6b0170a035a694dd270c311a137fd1810e74
2014-08-19 14:57:16 +02:00
Noel Grandin 56ef5533fc java: classes in java.lang package do not need to be fully qualified
Change-Id: I7b18f62336c3a8ca4c538b30ce04c99f202a4756
2014-08-19 14:57:16 +02:00
Noel Grandin ac5954d7c5 java: remove commented out code
Change-Id: I05c907a38b562231e968c17f14e09ef80e0a6ed1
2014-08-14 10:59:48 +02:00
Noel Grandin 0c5f51ebbc java: remove commented out code
Change-Id: I44e2043e5da23bc9421c03e550ef1d8b7ebaad36
2014-08-05 11:31:50 +02:00
Andras Timar c79a5f87b1 remove executable bit
Change-Id: I91f6e861f6d0dbea1b57ac73857e0c706b27f681
2014-04-17 15:11:14 +02:00
Alexander Wilms b0308236d2 Remove visual noise from scripting
Change-Id: Id9f177a20d911ce1e041407aa556c9cf13f0efc8
Reviewed-on: https://gerrit.libreoffice.org/8305
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-26 08:37:40 -06:00
Julien Nabet 55d3127f6c Typo: "omited"/"ommitted"/"ommited" -> "omitted"
Change-Id: Icc690b0ae1fc8f7165082774720d265798815faa
2014-02-12 20:08:03 +01:00
Tor Lillqvist c6a7300974 Use subfolder names from <config_folders.h>
Change all instances of hardcoded "program", "share" etc subfolder names to
use those from <config_folders.h> instead. In normal builds, the end result
will not change.

Change-Id: I91c95cd8e482818be67307e889ae6df887763f53
2013-08-18 21:11:16 +03:00
Noel Grandin e527a34005 Java cleanup, convert more Vector to ArrayList
Change-Id: Icb807382eaf50f515f2c9dfada0c061414baed33
2013-05-06 11:45:51 +02:00
Noel Grandin 587c59fbc9 Java cleanup, Convert Vector to ArrayList
Change-Id: I323a6625f93347e69f3114fc10cb04dc759a539f
2013-05-06 11:45:50 +02:00
Tor Lillqvist 616c6924f1 s/the the/the/
Change-Id: Iadacffaad832c6ff06757e8567e24f929f24a4c3
2013-02-22 09:58:19 +02:00
Julien Nabet 54d91caf7b Fix typo
Change-Id: Id5aff315b1d52ac5a869a17b3a654c2d1e670b08
2013-02-18 08:36:48 +01:00
Xisco Fauli 270967f340 fdo#60670: Create a new document in case there's none
Change-Id: I7e03481beb1d4e60601fd93d787bc7354495e41f
2013-02-17 15:19:26 +01:00
Michael Stahl 0e7db6c33b scripting: Capitalise.py example: fix Python 3 syntax errors
Change-Id: I000e32ed1701c657046ae3b7f836012a7fd56fe4
2012-11-25 16:06:41 +01:00
Caolán McNamara 77cb1ca382 Fix "Content is not allowed in prolog" warning
One of the javascript examples parcel-descriptor.xml ended up with a c++
comment instead of a xml comment

Change-Id: Ie63a30e19de2caae08e9a489b6592e1046037416
2012-10-10 10:02:45 +01:00
Michael Meeks 3f281b6f0a re-base on ALv2 code. Includes:
remove onlineregistration with dependencies
Patch contributed by Juergen Schmidt
http://svn.apache.org/viewvc?view=revision&revision=1249245
2012-07-06 20:29:14 +01:00
Michael Meeks 2005a34318 re-base on ALv2 code. 2012-06-29 15:51:49 +01:00
Michael Stahl 3eb78f72a8 .xba files don't need executable bits
Change-Id: Ie122a6befd94c836b6f08a7fe3ec8e4f2d67c690
2012-06-22 22:39:32 +02:00
Michael Stahl b4d9c390f9 .xdl files don't need executable bits
Change-Id: I604244b032855e0e6b94e3ed4217ee87d92c8419
2012-06-22 22:39:32 +02:00
Michael Stahl 1ab899c4c8 .xml files don't need executable bits
Change-Id: I399d086181a9f513cd95157e815551f0be9b9e95
2012-06-22 22:39:31 +02:00
Michael Meeks b6db3e3acc re-base on ALv2 code.
Change-Id: Ice06e639213aeb6f7f23cbf4634947dd25613db1
2012-06-21 13:11:06 +01:00
Michael Stahl dc1b917cda .gif files don't need executable bits 2012-03-23 21:58:14 +01:00
Stephan Bergmann 0b9fda25f3 fdo#46102: Fix Java script examples after gbuild'ification
...they contained no class files anymore, due to missing gb_Jar_set_packageroot
calls.  However, those calls only work for subdirectories, i.e., the example
.java files need to be put into a package (I chose
org.libreoffice.example.java_scripts) for all of them).  This in turn required
adaption of the parcel-descriptor.xml files; not sure what the logicalname
entries there are good for if anything -- the macro names at "Tools - Macros -
Run Macro..." now unfortunately(?) contain the fully qualified paths for the
HelloWorld, HighlightText, and MemoryUpdate examples.  There are additional
examples at scripting/examples/java/ that apparently do not get packaged (but I
adapted them anyway).
2012-03-23 16:20:17 +01:00
Michael Stahl 788a19ceff scripting: don't need x bits for these 2012-03-23 15:37:23 +01:00
Stephan Bergmann b786a33cfd Undo basis/brand split: Move SDK and ure-link, remove OOO_BASE_DIR and BaseInstallation. 2011-10-24 13:59:58 +02:00