summaryrefslogtreecommitdiff
path: root/scripting
AgeCommit message (Collapse)Author
2024-10-03cid#1556166 Data race conditionNoel Grandin
Change-Id: I2b5e4fe19c8ba4792b3cb89a90278540733192d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174431 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-01remove unnecessary null checksNoel Grandin
Change-Id: I73805881eef49fc6886f7f4fbc212da3aac1fd6f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174290 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-09-12use more concrete UNO classes in scriptingNoel Grandin
Change-Id: I4eddf7ccdf2d0720a4204e578c9f21d8c78dbd35 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173249 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-09-02cid#1608218 silence Overflowed return valueCaolán McNamara
Change-Id: I42f536c0c48b750ba7f8db0784bf5f525af99c7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172772 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-31cid#1607209 PA: Public AttributeCaolán McNamara
Change-Id: Ice339715762177e7a2905ec1de1703da7d9b74ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172695 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-08-26cid#1554835 COPY_INSTEAD_OF_MOVECaolán McNamara
Change-Id: Ic9e07bb0f571b89af2c8b2dd9ca0a660dfb1b1e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172384 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-11cid#1608302 XML external entity processing enabledCaolán McNamara
reformat to get it seen by scanner Change-Id: I44ce2c6ecd24e81e3b146b7f8b42b51f7d426e90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171731 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-06cid#555593 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1555849 COPY_INSTEAD_OF_MOVE cid#1555936 COPY_INSTEAD_OF_MOVE cid#1555951 COPY_INSTEAD_OF_MOVE cid#1555955 COPY_INSTEAD_OF_MOVE cid#1555960 COPY_INSTEAD_OF_MOVE cid#1555964 COPY_INSTEAD_OF_MOVE cid#1555965 COPY_INSTEAD_OF_MOVE cid#1555975 COPY_INSTEAD_OF_MOVE cid#1555979 COPY_INSTEAD_OF_MOVE cid#1555987 COPY_INSTEAD_OF_MOVE cid#1555990 COPY_INSTEAD_OF_MOVE cid#1555991 COPY_INSTEAD_OF_MOVE cid#1556002 COPY_INSTEAD_OF_MOVE cid#1556008 COPY_INSTEAD_OF_MOVE cid#1556011 COPY_INSTEAD_OF_MOVE cid#1556015 COPY_INSTEAD_OF_MOVE cid#1556017 COPY_INSTEAD_OF_MOVE cid#1556023 COPY_INSTEAD_OF_MOVE Change-Id: I8ab99d8e52a1780173a4272c59d408432c29de9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171572 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-04cid#1608462 XML external entity processing enabledCaolán McNamara
and cid#1608334 XML external entity processing enabled cid#1608302 XML external entity processing enabled cid#1608234 XML external entity processing enabled cid#1608094 XML external entity processing enabled cid#1607973 XML external entity processing enabled cid#1607890 XML external entity processing enabled cid#1607706 XML external entity processing enabled cid#1607366 XML external entity processing enabled cid#1607026 XML external entity processing enabled cid#1606764 XML external entity processing enabled Change-Id: I7894d335f244ed3ddbbe43d9bdbc2818065830f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171461 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-01scripting: fix issues found by Ruff linterIlmari Lauhakangas
Change-Id: I104f1b1e1d907fbd01feeb37e3fc69ee3e2fc121 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171332 Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-07-30tdf#158803: F401 Remove unused imports.Leonard Sasse
Also did some extensive reformat in this one as trailing whitespaces and bad formatting prevented commiting because it gave the following error: * * You have some suspicious patch lines: * * In scripting/source/pyprov/mailmerge.py * indent with Tab (line 446) scripting/source/pyprov/mailmerge.py:446: return PyMailSMTPService(self.ctx) * indent with Tab (line 448) scripting/source/pyprov/mailmerge.py:448: return PyMailPOP3Service(self.ctx) * indent with Tab (line 450) scripting/source/pyprov/mailmerge.py:450: return PyMailIMAPService(self.ctx) Change-Id: Ie6a7a81dda851548a06057fb712cd3e094c9b97d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165498 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-07-28cid#1556624 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1556622 COPY_INSTEAD_OF_MOVE cid#1556629 COPY_INSTEAD_OF_MOVE cid#1556632 COPY_INSTEAD_OF_MOVE cid#1556634 COPY_INSTEAD_OF_MOVE cid#1556642 COPY_INSTEAD_OF_MOVE cid#1556644 COPY_INSTEAD_OF_MOVE cid#1556663 COPY_INSTEAD_OF_MOVE cid#1556674 COPY_INSTEAD_OF_MOVE cid#1556682 COPY_INSTEAD_OF_MOVE cid#1556683 COPY_INSTEAD_OF_MOVE cid#1556685 COPY_INSTEAD_OF_MOVE cid#1556694 COPY_INSTEAD_OF_MOVE cid#1556708 COPY_INSTEAD_OF_MOVE cid#1556711 COPY_INSTEAD_OF_MOVE cid#1556712 COPY_INSTEAD_OF_MOVE cid#1556714 COPY_INSTEAD_OF_MOVE cid#1556719 COPY_INSTEAD_OF_MOVE cid#1556727 COPY_INSTEAD_OF_MOVE cid#1556744 COPY_INSTEAD_OF_MOVE cid#1556757 COPY_INSTEAD_OF_MOVE cid#1556782 COPY_INSTEAD_OF_MOVE cid#1556784 COPY_INSTEAD_OF_MOVE Change-Id: I5d5bc884cd7351a81c18b35aaf4e304256242988 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171128 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-07-13Python: use is None/is not None instead of == None/!= NoneJulien Nabet
Change-Id: I1c34181897506ad29a063865d752cb85ab76dbc3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170408 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2024-07-13Reindent mailmerge.py to use 4 spaces instead of tabsJulien Nabet
No functional change. I used reindent.py from https://github.com/certik/python-3.2/blob/master/Tools/scripts/reindent.py Change-Id: I03c5425ef26131f09e0b9de56737b2e069722e7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170419 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-05-16Fix typoAndrea Gelmini
Change-Id: Ia19534f38ed01a44262b47ad04e98dde6948669b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167601 Tested-by: Jenkins Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2024-05-13loplugin:ostr in scriptingNoel Grandin
Change-Id: Idde1ec2254cebc9acd8aab092e52632b1625877f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167576 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-12Drop some uses of css::uno::Sequence::getConstArrayMike Kaganski
where it was obsoleted by commits 2484de6728bd11bb7949003d112f1ece2223c7a1 (Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and fb3c04bd1930eedacd406874e1a285d62bbf27d9 (Drop non-const Sequence::operator[] in internal code 2021-11-05). Change-Id: I64683093afc48ddf2307dc1dee2302cf0b3cbecc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167110 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-05-01WaE: C6011 Dereferencing NULL pointer warningsCaolán McNamara
Change-Id: Ic2c2e227a50994298377485e9e807cd9142cc386 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166949 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-30Drop some uses of css::uno::Sequence::getConstArray ...Mike Kaganski
where it was obsoleted by commits 2484de6728bd11bb7949003d112f1ece2223c7a1 (Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and fb3c04bd1930eedacd406874e1a285d62bbf27d9 (Drop non-const Sequence::operator[] in internal code 2021-11-05). Change-Id: I4ccc647bb794515c8c11f8dfd9a26563f4aa094b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166819 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-04-09tdf#146619 Drop unused 'using namespace' in: scripting/Gabor Kelemen
Change-Id: I84194df451ea990c515ae914741078c80e53e45b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165694 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-04-07cid#1596251 Dereference null return valueCaolán McNamara
and cid#1596249 Dereference null return value Change-Id: I2d50e8be5ec20001527c20ccd46a9a0336792d8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165871 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-02Update to latest Rhino 1.7.14Stephan Bergmann
...at the expense of losing, at least for now, the script editor for it (which had been hacked into the old upstream sources in a hard-to-maintain way). rhino-1.7.14.zip is taken from <https://github.com/mozilla/rhino/releases/download/Rhino1_7_14_Release/rhino-1.7.14.zip>. Building it would now use Gradle, but instead just hack together an invocation of javac and jar in external/rhino/ExternalProject_rhino.mk that effectively generates the same jar as the upstream-built jar available at <https://github.com/mozilla/rhino/releases/download/Rhino1_7_14_Release/rhino-1.7.14.jar>. All the various patches are no longer necessary: * external/rhino/rhino1_5R5.patch and external/rhino/OfficeScriptInfo.java were mostly for the hacked-in script editor, which has been abandoned at least for now (see above). * external/rhino/rhino1_5R5-find_swing.patch (originally from 0a7f9346503a557f583bced269655fa1996550af "ause109: #i106296# make build.xml aware of TARFILE_LOCATION") appears to be obsolete. * external/rhino/rhino1_5R5-updateToolTip.patch is covered by <https://github.com/mozilla/rhino/commit/ab20a73b16f68daf715c7ac4808c119bb15d698c> "Fix bug 414869: Rhino debugger fails to launch due to updates in mac os x leopard". * external/rhino/rhino-classpath.patch.1 from bb58293296f843654045d7b0eba6899d11533a4a "rhino: unbreak build on Fedora 34" was only relevant when building with Ant. Change-Id: I5fca5915d785716f7aaf313ff2469a20f55f707a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165190 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-03-29convert BasicScriptImplodNodeImpl to comphelper::WeakImplHelperNoel Grandin
and remove OBroadcastHelperHolder, since nothing uses it anymore Change-Id: Id07b4589e0893950974c6bf41e0d4f2d8dc7ee81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165491 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-28convert BasicMethodNodeImpl to comphelper::WeakImplHelperNoel Grandin
Change-Id: I568800deabc82185afafc4415efd55bbe762901c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165444 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-28convert EventListener to comphelper::WeakComponentImplHelperNoel Grandin
Change-Id: I3c83fabae8e2fc6a32fe92a596ed93ebc00140fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165443 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-28tdf#158803 remove unused importsLeSasse
Change-Id: If5b9a627d807f8bd6310ca1cc9753f331f012345 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165385 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-28tdf#158803 remove unused importsLeSasse
Change-Id: Id3e4434294386e0ca2a0971cf7e30aeface7b665 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165384 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-01-29tdf#159412: make sure to keep the value while changing the typeMike Kaganski
SbxValue::SetType clears the original value. We need to use the Get/Put cycle, asking for a specific type in Get, and then making sure that the variable is not fixed on Put. Change-Id: I0a6c106d511e8491c89a5a2153f47a708f83ee1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162664 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-01-12cid#1546414 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1546408 COPY_INSTEAD_OF_MOVE cid#1546367 COPY_INSTEAD_OF_MOVE cid#1546283 COPY_INSTEAD_OF_MOVE cid#1546268 COPY_INSTEAD_OF_MOVE Change-Id: I8b6067f70bc0e8cce7117bb3f366227add279887 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161964 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-19cid#1545222 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1545241 COPY_INSTEAD_OF_MOVE cid#1545303 COPY_INSTEAD_OF_MOVE cid#1545315 COPY_INSTEAD_OF_MOVE cid#1545319 COPY_INSTEAD_OF_MOVE cid#1545322 COPY_INSTEAD_OF_MOVE Change-Id: I284ba6e395f72abd7939667a8367ac99ab64194d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160955 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-10cid#1546281 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1546278 COPY_INSTEAD_OF_MOVE cid#1546276 COPY_INSTEAD_OF_MOVE cid#1546247 COPY_INSTEAD_OF_MOVE cid#1546244 COPY_INSTEAD_OF_MOVE cid#1546243 COPY_INSTEAD_OF_MOVE cid#1546220 COPY_INSTEAD_OF_MOVE cid#1546209 COPY_INSTEAD_OF_MOVE cid#1546207 COPY_INSTEAD_OF_MOVE cid#1546206 COPY_INSTEAD_OF_MOVE cid#1546205 COPY_INSTEAD_OF_MOVE cid#1546197 COPY_INSTEAD_OF_MOVE cid#1546180 COPY_INSTEAD_OF_MOVE cid#1546172 COPY_INSTEAD_OF_MOVE cid#1546165 COPY_INSTEAD_OF_MOVE cid#1546164 COPY_INSTEAD_OF_MOVE cid#1546158 COPY_INSTEAD_OF_MOVE cid#1546151 COPY_INSTEAD_OF_MOVE cid#1546135 COPY_INSTEAD_OF_MOVE cid#1546132 COPY_INSTEAD_OF_MOVE cid#1546129 COPY_INSTEAD_OF_MOVE cid#1546128 COPY_INSTEAD_OF_MOVE cid#1546122 COPY_INSTEAD_OF_MOVE cid#1546117 COPY_INSTEAD_OF_MOVE cid#1546113 COPY_INSTEAD_OF_MOVE cid#1546106 COPY_INSTEAD_OF_MOVE cid#1546099 COPY_INSTEAD_OF_MOVE cid#1546091 COPY_INSTEAD_OF_MOVE cid#1546085 COPY_INSTEAD_OF_MOVE cid#1546069 COPY_INSTEAD_OF_MOVE cid#1546063 COPY_INSTEAD_OF_MOVE cid#1546062 COPY_INSTEAD_OF_MOVE cid#1546058 COPY_INSTEAD_OF_MOVE cid#1546056 COPY_INSTEAD_OF_MOVE cid#1546051 COPY_INSTEAD_OF_MOVE cid#1546040 COPY_INSTEAD_OF_MOVE cid#1546030 COPY_INSTEAD_OF_MOVE cid#1546028 COPY_INSTEAD_OF_MOVE cid#1546015 COPY_INSTEAD_OF_MOVE cid#1546001 COPY_INSTEAD_OF_MOVE Change-Id: Ib954c92a300fc323b29f27880fdf8bc46ed98862 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160520 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-04cid#1546422 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1546416 COPY_INSTEAD_OF_MOVE cid#1546415 COPY_INSTEAD_OF_MOVE cid#1546391 COPY_INSTEAD_OF_MOVE cid#1546390 COPY_INSTEAD_OF_MOVE cid#1546317 COPY_INSTEAD_OF_MOVE cid#1546252 COPY_INSTEAD_OF_MOVE cid#1546251 COPY_INSTEAD_OF_MOVE cid#1546249 COPY_INSTEAD_OF_MOVE cid#1546243 COPY_INSTEAD_OF_MOVE cid#1546195 COPY_INSTEAD_OF_MOVE cid#1546193 COPY_INSTEAD_OF_MOVE cid#1546137 COPY_INSTEAD_OF_MOVE cid#1545738 COPY_INSTEAD_OF_MOVE cid#1545782 COPY_INSTEAD_OF_MOVE Change-Id: I10d5091aa72b682371764b8a18cc5062e272c031 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160285 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-11-09scripting: PyMailServiceProvider: implement AllowInsecureProtocolsMichael Stahl
The "ehlo" calls look redundant, smtplib will do these implicitly if required (checked in Python 3.5.9); it will also check that the STARTTLS is successful which very old versions of Python didn't do. Change-Id: Ice8b24bc2c9773c1171e856f1aefb191b1e2e947 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159078 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-11-02'new Float' is deprecated in JavaNoel Grandin
replace with Float.valueOf Change-Id: Ib6408b24dac2953789d0ec67e73b8be8aefca252 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158784 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-20Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: scriptingStephan Bergmann
Change-Id: I74516d08ed48f2c9f4a0d4e105c96f95c127485b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158218 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-09-02no need to use UNO_QUERY_THROW hereNoel Grandin
Change-Id: I01b4e401fec1792829fc2efaad5a74a035a418f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156476 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-25Revert "use more Reference::query instead of UNO_QUERY_THROW"Noel Grandin
This reverts commit 7fc6063914432d58d86cfcbd728d967e7c86ebfd. sberg noticed that there is a difference now: there's a subtle difference now, in that if y was null originally, it would have thrown a (caught) exception, whereas now it will crash in the y.query<X>() call. Change-Id: Idbb5a08d635d15b5ca63f4822eddf05fb0a5afa0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156002 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-19loplugin: new global analysis locking2Noel Grandin
look for methods where we don't need to guard access to the field, because the field is never modified Change-Id: I62c33cc3f52881557515765d3733c4afc78547aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155836 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-18use more Reference::query instead of UNO_QUERY_THROWNoel Grandin
since querying with exceptions is consideably more expensive Change-Id: I968a9a40766b2abb0d3058549b0ed44011fd5716 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155791 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-30Log SSL default verification path for mailmerge debugThorsten Behrens
related: follow python recommendation and pass SSL contexts Change-Id: I992535a7fbe0bd21ff1de8241715babc0cb5cdc3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155050 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-07-29follow python recommendation and pass SSL contextsCaolán McNamara
i.e. https://docs.python.org/3/library/ssl.html#security-considerations Change-Id: I67a0f9e1c25abc6644412b014f30933a7e681da2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155016 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-04-30Use getXWeak in scriptingMike Kaganski
Change-Id: I4370c0bfaa75b150bd05f03a5961e7152ac41e7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150864 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-18Avoid NullPointerExceptionStephan Bergmann
...when dispose is called without a preceding call to initialize (as would happen with an improved CppunitTest_services) Change-Id: Ic632d736ecb27509b092ef526cf0dfc964023663 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150576 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-03-23rtl::Static to thread-safe-staticNoel Grandin
Change-Id: Ife02e6d2be3ebfbb08522ab0183ef4aa31a99e19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149415 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-20Fix some errors in the scripting module's XInputStreamImpl:Damjan Jovanovic
- Check the loop termination in readBytes() properly: currently it increments totalBytesRead while also decrementing nBytesToRead, so when compared to each other, the loop terminates when the buffer is half full. Only check for nBytesToRead instead. - Deal with the possibility of available() returning 0 in readSomeBytes(). Patch by: me Cherry-picked from https://github.com/apache/openoffice/commit/7e29bacc90c4b1b9788c3b71dfacd17daecde7a7 "Fix some errors in the scripting module's XInputStreamImpl:" Change-Id: I951dc10565afa3519b0ddf98de559a7b585b1627 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149156 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2023-02-13Fix/simplify some vnd.sun.star.expand: handlingMike Kaganski
The vnd.sun.star.expand: payload must be URL-decoded prior to passing it to expandMacros; the protocol must be checked case-insensitively. Use startsWithIgnoreAsciiCase for that. Change-Id: I2be993a0400a27cb7dc57207cd0824b4505afd2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146855 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-02-12tdf#153571: properly unquote (URL-decode) vnd.sun.star.expand payloadMike Kaganski
Similar to what is done in bootstrap_expandUri, expandUnoRcUrl, UrlReference::expand, JavaLoader.expand_url, and is documented in XVndSunStarExpandUrl interface. Change-Id: I65349b52734f212e6a04e615d39fa2563f62d472 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146840 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-12-16check SfxObjectShell::Current()Caolán McNamara
SfxObjectShell::Current() can return null, it's based on the equally vile SfxViewFrame::Current() Change-Id: Ia5c7783680e9d8e5d3075078f16a2c15cb6f7a47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144339 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-22loplugin:unusedfieldsNoel Grandin
Change-Id: I4a7276ffc36b4f954fe1fa39fb5666fa184e66e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143016 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-10-22use more TempFileFastService in scriptingNoel Grandin
Change-Id: Ic04abad55e655fa0e0434bd09f797c6f1b2cc245 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141649 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>