Xisco Fauli
c382c5202c
tdf#163486: PVS: variable was assigned the same value
...
Since
commit 2387c2a46e
Author: Matthew J. Francis <mjay.francis@gmail.com >
Date: Wed Jul 29 15:22:54 2015 +0800
Give PyUNO structs/exceptions their own separate type
V1048 The 'me' variable was assigned the same value.
Change-Id: Ia75c524c9cf459ff2961206c9a17dac1de0125a1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176530
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org >
Tested-by: Jenkins
2024-11-13 20:12:29 +01:00
Noel Grandin
2cb43c6b88
clang-tidy: performance-unnecessary-copy-initialization in various
...
Change-Id: Ib7d75d4d8207261898568402e7983e0f11da14bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176417
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2024-11-11 21:02:55 +01:00
Noel Grandin
8030c5cfbb
loplugin:reftotemp in pyuno..sax
...
Change-Id: Ia616256e06f64ad3c635ac30abf521e5dab107d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176401
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2024-11-11 15:47:38 +01:00
Mike Kaganski
56f3dbffdf
Simplify a bit
...
Change-Id: I618b0f8bcb2e8032ee12367c73e1136685f66b3e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176183
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2024-11-08 05:34:20 +01:00
Noel Grandin
33d4760998
loplugin:passstuffbyref in lotuswordpro..pyuno
...
Change-Id: I9cd7a98d74b1896951124740b66d873ca41cceae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176197
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
Tested-by: Jenkins
2024-11-07 13:17:27 +01:00
Caolán McNamara
7bbe74b2be
cid#1555789 COPY_INSTEAD_OF_MOVE
...
and
cid#1556865 COPY_INSTEAD_OF_MOVE
cid#1556871 COPY_INSTEAD_OF_MOVE
cid#1556939 COPY_INSTEAD_OF_MOVE
cid#1556951 COPY_INSTEAD_OF_MOVE
cid#1556964 COPY_INSTEAD_OF_MOVE
cid#1556966 COPY_INSTEAD_OF_MOVE
cid#1556968 COPY_INSTEAD_OF_MOVE
cid#1556971 COPY_INSTEAD_OF_MOVE
cid#1556989 COPY_INSTEAD_OF_MOVE
cid#1557001 COPY_INSTEAD_OF_MOVE
cid#1557011 COPY_INSTEAD_OF_MOVE
cid#1557032 COPY_INSTEAD_OF_MOVE
cid#1557038 COPY_INSTEAD_OF_MOVE
cid#1557041 COPY_INSTEAD_OF_MOVE
cid#1557055 COPY_INSTEAD_OF_MOVE
cid#1557056 COPY_INSTEAD_OF_MOVE
cid#1557057 COPY_INSTEAD_OF_MOVE
cid#1557065 COPY_INSTEAD_OF_MOVE
cid#1557068 COPY_INSTEAD_OF_MOVE
cid#1557087 COPY_INSTEAD_OF_MOVE
cid#1557090 COPY_INSTEAD_OF_MOVE
cid#1557093 COPY_INSTEAD_OF_MOVE
cid#1557113 COPY_INSTEAD_OF_MOVE
cid#1557122 COPY_INSTEAD_OF_MOVE
cid#1557126 COPY_INSTEAD_OF_MOVE
cid#1557145 COPY_INSTEAD_OF_MOVE
cid#1557151 COPY_INSTEAD_OF_MOVE
cid#1557152 COPY_INSTEAD_OF_MOVE
cid#1557197 COPY_INSTEAD_OF_MOVE
cid#1557216 COPY_INSTEAD_OF_MOVE
cid#1557245 COPY_INSTEAD_OF_MOVE
cid#1557272 COPY_INSTEAD_OF_MOVE
cid#1557310 COPY_INSTEAD_OF_MOVE
cid#1557314 COPY_INSTEAD_OF_MOVE
cid#1557318 COPY_INSTEAD_OF_MOVE
cid#1557333 COPY_INSTEAD_OF_MOVE
cid#1557340 COPY_INSTEAD_OF_MOVE
cid#1557358 COPY_INSTEAD_OF_MOVE
cid#1557359 COPY_INSTEAD_OF_MOVE
cid#1557365 COPY_INSTEAD_OF_MOVE
cid#1557367 COPY_INSTEAD_OF_MOVE
cid#1557395 COPY_INSTEAD_OF_MOVE
cid#1557418 COPY_INSTEAD_OF_MOVE
cid#1557488 COPY_INSTEAD_OF_MOVE
cid#1557493 COPY_INSTEAD_OF_MOVE
cid#1557506 COPY_INSTEAD_OF_MOVE
cid#1557514 COPY_INSTEAD_OF_MOVE
cid#1557528 COPY_INSTEAD_OF_MOVE
cid#1557534 COPY_INSTEAD_OF_MOVE
cid#1557537 COPY_INSTEAD_OF_MOVE
cid#1557562 COPY_INSTEAD_OF_MOVE
cid#1557563 COPY_INSTEAD_OF_MOVE
cid#1557592 COPY_INSTEAD_OF_MOVE
cid#1557608 COPY_INSTEAD_OF_MOVE
cid#1557615 COPY_INSTEAD_OF_MOVE
cid#1557619 COPY_INSTEAD_OF_MOVE
cid#1557637 COPY_INSTEAD_OF_MOVE
cid#1557648 COPY_INSTEAD_OF_MOVE
cid#1557712 COPY_INSTEAD_OF_MOVE
cid#1557750 COPY_INSTEAD_OF_MOVE
cid#1557762 COPY_INSTEAD_OF_MOVE
cid#1557765 COPY_INSTEAD_OF_MOVE
Change-Id: I10db1910627e04a26e25836c05ad5c2707abd18b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175696
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com >
Tested-by: Jenkins
2024-10-27 20:19:12 +01:00
Caolán McNamara
6f1508f4de
cid#1555767 COPY_INSTEAD_OF_MOVE
...
and
cid#1555770 COPY_INSTEAD_OF_MOVE
cid#1555788 COPY_INSTEAD_OF_MOVE
cid#1555789 COPY_INSTEAD_OF_MOVE
cid#1555798 COPY_INSTEAD_OF_MOVE
cid#1555816 COPY_INSTEAD_OF_MOVE
cid#1555822 COPY_INSTEAD_OF_MOVE
cid#1555835 COPY_INSTEAD_OF_MOVE
cid#1555845 COPY_INSTEAD_OF_MOVE
cid#1555859 COPY_INSTEAD_OF_MOVE
cid#1555864 COPY_INSTEAD_OF_MOVE
cid#1555868 COPY_INSTEAD_OF_MOVE
cid#1555892 COPY_INSTEAD_OF_MOVE
cid#1555896 COPY_INSTEAD_OF_MOVE
cid#1555921 COPY_INSTEAD_OF_MOVE
cid#1555932 COPY_INSTEAD_OF_MOVE
cid#1555935 COPY_INSTEAD_OF_MOVE
cid#1555944 COPY_INSTEAD_OF_MOVE
cid#1555952 COPY_INSTEAD_OF_MOVE
cid#1555985 COPY_INSTEAD_OF_MOVE
cid#1556024 COPY_INSTEAD_OF_MOVE
cid#1556038 COPY_INSTEAD_OF_MOVE
cid#1556042 COPY_INSTEAD_OF_MOVE
cid#1556044 COPY_INSTEAD_OF_MOVE
cid#1556060 COPY_INSTEAD_OF_MOVE
cid#1556083 COPY_INSTEAD_OF_MOVE
cid#1556085 COPY_INSTEAD_OF_MOVE
cid#1556090 COPY_INSTEAD_OF_MOVE
cid#1556136 COPY_INSTEAD_OF_MOVE
cid#1556157 COPY_INSTEAD_OF_MOVE
cid#1556159 COPY_INSTEAD_OF_MOVE
cid#1556172 COPY_INSTEAD_OF_MOVE
cid#1556179 COPY_INSTEAD_OF_MOVE
cid#1556187 COPY_INSTEAD_OF_MOVE
cid#1556255 COPY_INSTEAD_OF_MOVE
cid#1556256 COPY_INSTEAD_OF_MOVE
cid#1556266 COPY_INSTEAD_OF_MOVE
cid#1556275 COPY_INSTEAD_OF_MOVE
cid#1556290 COPY_INSTEAD_OF_MOVE
cid#1556294 COPY_INSTEAD_OF_MOVE
cid#1556301 COPY_INSTEAD_OF_MOVE
cid#1556311 COPY_INSTEAD_OF_MOVE
cid#1556318 COPY_INSTEAD_OF_MOVE
cid#1556326 COPY_INSTEAD_OF_MOVE
cid#1556369 COPY_INSTEAD_OF_MOVE
cid#1556374 COPY_INSTEAD_OF_MOVE
cid#1556387 COPY_INSTEAD_OF_MOVE
cid#1556388 COPY_INSTEAD_OF_MOVE
cid#1556417 COPY_INSTEAD_OF_MOVE
cid#1556425 COPY_INSTEAD_OF_MOVE
cid#1556435 COPY_INSTEAD_OF_MOVE
cid#1556495 COPY_INSTEAD_OF_MOVE
cid#1556497 COPY_INSTEAD_OF_MOVE
cid#1556501 COPY_INSTEAD_OF_MOVE
cid#1556503 COPY_INSTEAD_OF_MOVE
cid#1556520 COPY_INSTEAD_OF_MOVE
cid#1556523 COPY_INSTEAD_OF_MOVE
cid#1556562 COPY_INSTEAD_OF_MOVE
cid#1556573 COPY_INSTEAD_OF_MOVE
cid#1556576 COPY_INSTEAD_OF_MOVE
cid#1556598 COPY_INSTEAD_OF_MOVE
cid#1556615 COPY_INSTEAD_OF_MOVE
cid#1556626 COPY_INSTEAD_OF_MOVE
cid#1556671 COPY_INSTEAD_OF_MOVE
cid#1556689 COPY_INSTEAD_OF_MOVE
cid#1556701 COPY_INSTEAD_OF_MOVE
cid#1556713 COPY_INSTEAD_OF_MOVE
cid#1556758 COPY_INSTEAD_OF_MOVE
cid#1556759 COPY_INSTEAD_OF_MOVE
cid#1556788 COPY_INSTEAD_OF_MOVE
cid#1556811 COPY_INSTEAD_OF_MOVE
cid#1556821 COPY_INSTEAD_OF_MOVE
cid#1556824 COPY_INSTEAD_OF_MOVE
cid#1556825 COPY_INSTEAD_OF_MOVE
cid#1556862 COPY_INSTEAD_OF_MOVE
Change-Id: I4925a79688a983bb07252600430039ec0bcb75b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175678
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com >
Tested-by: Jenkins
2024-10-26 19:25:03 +02:00
Julien Nabet
bda6201f81
tdf#163190: [pyuno] SyntaxWarning: invalid escape sequence '\P'
...
Use raw string to fix this.
Regression from d8978a8c4f
tdf#116156 tdf#157162 tdf#159528 Fix glitches in officehelper.py
Change-Id: I6f68fdc5988c05b41dc91619947d0d97d04bc739
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174108
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
Tested-by: Jenkins
2024-09-29 20:17:13 +02:00
Stephan Bergmann
d02310ba14
Remaining GCC -Wcast-function-type issues
...
As Clang supports that warning now too, lots of occurrences have meanwhile been
cleaned up for good (0c29c417ef "Avoid
-Werror,-Wcast-function-type-mismatch", 1344e6261a
"Avoid -Werror,-Wcast-function-type-mismatch",
85a2bb9f52 "Avoid
-Werror,-Wcast-function-type-mismatch", etc.), so
ce99754e9b "Globally disable -Wcast-function-type
new with upcoming GCC 8" in solenv/gbuild/platform/com_GCC_defs.mk should no
longer be necessary.
One remaining issue I encountered was dae7304df6
"Silence Clang 19 trunk -Werror,-Wcast-function-type-mismatch", where GCC needs
a different way for silencing the warnings in pyuno/source/module/ than had been
used there for Clang.
Change-Id: I5d0404b957d798114051209c31e022a898cf91f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173623
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de >
Tested-by: Jenkins
2024-09-19 07:35:49 +02:00
Michael Stahl
8ed755cfb0
pyuno,unotest,xmlsecurity: copy GPG test files for UITtest
...
The problem was that running UITest_xmlsecurity_gpg changed the files in
test/signing-keys/ ... prevent that by copying the directory in that
test, which is more complicated than initially expected.
Change-Id: Ie3be922e0b2e9dae49f9a70e35ad5270c90b4fc4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171322
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de >
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de >
Tested-by: Jenkins
2024-08-01 11:18:30 +02:00
Ilmari Lauhakangas
2c3bf9471d
odk, oox, pyuno: fix issues found by Ruff linter
...
Change-Id: I79d56453877a10502768b522ca93da3990891c0b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171098
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org >
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org >
2024-07-27 18:52:48 +02:00
Gabor Kelemen
e1a351ca19
Remove now unneeded osl/diagnose.h
...
followup to commit 57c228803e
Change-Id: Iebfb23bb65e2bf898bf27f367cc9641f47a14cf3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167998
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de >
Tested-by: Jenkins
2024-07-20 10:20:31 +02:00
Caolán McNamara
e68f28ec9f
cid#1607892 COPY_INSTEAD_OF_MOVE
...
and
cid#1607910 COPY_INSTEAD_OF_MOVE
cid#1607818 COPY_INSTEAD_OF_MOVE
cid#1557402 COPY_INSTEAD_OF_MOVE
cid#1556530 COPY_INSTEAD_OF_MOVE
cid#1557396 COPY_INSTEAD_OF_MOVE
cid#1556522 COPY_INSTEAD_OF_MOVE
cid#1555628 COPY_INSTEAD_OF_MOVE
cid#1554705 COPY_INSTEAD_OF_MOVE
Change-Id: Iae3fbf4a04bf3714f416995640b9d70fe204cf73
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170321
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com >
2024-07-11 09:26:28 +02:00
Xisco Fauli
f9cd7e2801
tdf#161947: test setuptools is imported on mac
...
Change-Id: Ie0908e610b3eade41aa5e7f1953ddaa55afce68d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170173
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org >
Tested-by: Jenkins
2024-07-09 10:28:29 +02:00
Xisco Fauli
4a3706db4f
pyuno: fix deprecated warnings
...
* Replace PyUnicode_FromUnicode(str, len) with PyUnicode_FromWideChar(str, len)
* Replace PyUnicode_AS_UNICODE(PyObject) with PyUnicode_AsWideCharString(PyObject, size)
Change-Id: I1d8b46059d72f4de261d99393e1681f1e41eafdf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169625
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org >
2024-07-05 23:14:52 +02:00
Xisco Fauli
1e2c17a350
tdf#116412: Add unittest
...
Change-Id: Iab051c91900768a3bf3f26b6de3b443dc18a6928
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169990
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org >
2024-07-04 15:45:15 +02:00
Xisco Fauli
b7bcc716fc
pyuno: re-enable pytest_ssl on mac
...
it was disabled in 731f7fe778
"disable pytest_ssl on mac" with no apparent reason
Change-Id: I7d867ad771f1459a598c4ca346390e732929d705
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169985
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org >
2024-07-04 15:26:52 +02:00
Andrea Gelmini
7cfefdd01b
Fix typo
...
Change-Id: I633ad7aa1a8167795e76bfacfaeec9a42b9db3f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169157
Tested-by: Julien Nabet <serval2412@yahoo.fr >
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
2024-06-19 08:39:22 +02:00
Noel Grandin
ed699baa92
workaround clang segfault on macos-intel
...
Change-Id: Icfced4a990e2d02995bff4078f14b8ee26e9cca3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167497
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2024-05-11 14:50:28 +02:00
Alain Romedenne
28a43d53b2
Unit tests for officehelper.py
...
Depend upon previous patch d8978a8c4f for
officehelper.py which fixed some glitches.
Change-Id: Icc5c717d7f0f5a0a08202b6b57e475e7afe6f5c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164195
Reviewed-by: Hossein <hossein@libreoffice.org >
Tested-by: Jenkins
Tested-by: Hossein <hossein@libreoffice.org >
2024-05-11 11:25:44 +02:00
Noel Grandin
79f4f724b9
loplugin:ostr in pyuno
...
Change-Id: I54555110b5c66ea92f2675edc50dccd252558e28
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167435
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
Tested-by: Jenkins
2024-05-10 13:16:45 +02:00
Ilmari Lauhakangas
da0e9240bf
tdf#158447 Use PyConfig for setting Python home directory with Python >= 3.8
...
Change-Id: Ic5b7c60613b22f5215cb1a2a13fecf3e0946ca49
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161089
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org >
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org >
2024-05-09 09:32:47 +02:00
Christian Lohmaier
0c4c84a14b
makefile simplification: replace $(call gb_CustomTarget_get_workdir,foo)
...
…by a simple/static $(gb_CustomTarget_workdir)/foo
The build system has a lot of overly complicated leftovers from when it
was introduced and had not only deal with split repositories but also
had to coexist with another buildsystem. Along with lots of copy'n'paste
along the years the makefiles became hard to grasp for newcomers with
all our calls and evals.
As a first step to streamline that, the macros from TargetLocations that
simply prefix a static path to the argument (and similar of the same
kind) are a natural pick before simplifying the rules themselves/getting
rid of a bunch of eval statements.
Change-Id: Ia06dbbcd5d1994755a2ff05b84f72ccbc4e3cab5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167005
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com >
2024-05-03 16:06:14 +02:00
Alain Romedenne
61337efb8c
minor fixes to officehelper.py
...
- erroneous code sample in code comment -retry delays
- fix when raising OSError exception - undefined variable
Change-Id: I2cae4e8b6bbb3153e79f290ae1d316aa22a86b4f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165714
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2024-04-03 17:50:11 +02:00
Alain Romedenne
2146e66d8d
officehelper.py memory cleanup
...
- main program must stop subprocesses it initiates before it throws exceptions
Change-Id: I6e87d79e2f21cd41f7cd8e470cc166f8d5282954
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164819
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk >
2024-03-26 21:01:24 +01:00
Stephan Bergmann
dae7304df6
Silence Clang 19 trunk -Werror,-Wcast-function-type-mismatch
...
Change-Id: Icd0af828e47c770ca8964656188d0d722a7f1ddc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165250
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de >
2024-03-24 23:13:48 +01:00
Justin Luth
daa04d405a
allow build with python 3.12.0: initialize new tp_watched
...
This fixes the build failure after I updated Ubuntu 24.04 (alpha),
which upgraded python 3.11.7 to python 3.12.0, causing the error:
libreoffice/pyuno/source/module/pyuno_callable.cxx:249:1:
error: missing initializer for member ‘_typeobject::tp_watched’
[-Werror=missing-field-initializers]
...
I gleaned this information from a July 2023 commit for
https://github.com/xbmc/xbmc/issues/23503
tp_watched was added in upstream commit python/cpython@82ccbf6
https://github.com/python/cpython/commit/82ccbf69a842db25d8117f1c41b47aa5b4ed96ab
This change first appeared in Python v3.12.0a1
Change-Id: If82ff1eb47d66d2669d90d6e00e0feff3c55b5ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164775
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com >
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de >
2024-03-13 17:45:49 +01:00
Gabor Kelemen
ab95ed2c4b
Use less boost_headers in low level libraries
...
Most of these don't use boost themselves, nor do they need
it transitively since the use of boost::optional was removed
Change-Id: Ic9dee1c4e160b313ec5b91677b02ffdea6c5779d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164440
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de >
2024-03-06 21:23:17 +01:00
Alain Romedenne
d8978a8c4f
tdf#116156 tdf#157162 tdf#159528 Fix glitches in officehelper.py
...
- MacOs & GNU/Linux distributions are supported, next to Windows
- Connection attempts are customisable
- Reporting to console can be configured
- Python source doc. added
- service memory cleanup suggestion examples intended for QA as well as inclusion in wiki pages
officehelper documentation:
https://wiki.documentfoundation.org/Documentation/DevGuide/First_Steps#First_Contact
Change-Id: I6a7c19429e78a1736e4a1479c4bbc1950228d93f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164118
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2024-03-02 13:00:12 +01:00
Mike Kaganski
8f6b412581
Define a name for the extended path buffer size, instead of a literal
...
Change-Id: If6d40c818e021b3241d6b6b33aceca07c6393511
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163926
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2024-02-26 05:59:10 +01:00
Mike Kaganski
08e2c56ced
Replace an instance of MAX_PATH with 32767
...
... which is the approximate maximum of Windows API, as documented in
https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation
Change-Id: I8b10e41d3a8bf85e266f071bdc2eb88eb9403917
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163914
Tested-by: Mike Kaganski <mike.kaganski@collabora.com >
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2024-02-26 03:20:17 +01:00
Mike Kaganski
7411caca66
Replace an instance of MAX_PATH with 32767
...
... which is the approximate maximum of Windows API, as documented in
https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation
Change-Id: I22aecd9b9e1423b74b61985cad11bb3c194f2bdc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163913
Tested-by: Mike Kaganski <mike.kaganski@collabora.com >
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2024-02-26 03:20:04 +01:00
Mike Kaganski
3234c4e35f
Avoid MAX_PATH limitation in launcher
...
... and drop some manual memory management.
Change-Id: I4c60ce559ff185d4685a6b9799a97651438115b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162502
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2024-02-25 07:29:40 +01:00
Aron Budea
6efe49e729
pyuno: Use expected return value (-1) on failure
...
Both PyObject_SetAttr and PyObject_SetItem are expected to:
Raise an exception and return -1 on failure; return 0 on success.
https://docs.python.org/3/c-api/object.html
Change-Id: Id1f6129e91e9da2f5d3bc1858422eeee4c3393d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163418
Tested-by: Jenkins
Reviewed-by: Aron Budea <aron.budea@collabora.com >
2024-02-15 12:49:31 +01:00
Mike Kaganski
0fa827dbb2
Drop std::as_const from css::uno::Sequence iterations
...
Obsoleted by commit 2484de6728 (Remove
non-const Sequence::begin()/end() in internal code, 2021-10-15) and
commit fb3c04bd19 (Drop non-const
Sequence::operator[] in internal code, 2021-11-05).
Change-Id: Idbafef5d34c0d4771cbbf75b9db9712e504164cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162640
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2024-01-27 12:43:48 +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
Stephan Bergmann
208a637796
Add back XComponentContext to officecfg::...::get() calls
...
4256c764ae "do not pass XComponentContext to
officecfg::...::get() calls" had removed it, for performance reasons, but
8a695046cf "tdf#158375 Hack to make sure process
service factory is set" is a case where it should be passed in. To hopefully
avoid performance regressions, don't default to
comphelper::getProcessComponentContext() for what gets passed in, but default to
an empty Reference and only call comphelper::getProcessComponentContext() when
actually needed in the implementation.
Change-Id: I5b75ac2c28f36e21d1c8bc368b0b972c33c61a51
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162205
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de >
2024-01-17 21:33:02 +01:00
Stephan Bergmann
8a695046cf
tdf#158375 Hack to make sure process service factory is set
...
(TODO: A more clean fix would pass XComponentContext into the configuration
wrapper.)
Change-Id: I1936a4517877f30cc7a825ce1c94923b350f7173
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162198
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de >
2024-01-17 19:02:49 +01:00
Sarper Akdemir
5372538648
tdf#158375: add expert option DisablePythonRuntime
...
When DisablePythonRuntime is set, anything that utilizes pyuno
bindings won't work (e.g. python macros and extensions).
Change-Id: Id42d01647eebee42b120b399470a1f944e4ba00f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160968
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de >
2024-01-09 00:48:18 +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
Stephan Bergmann
115e7a00c3
Extended loplugin:ostr: pyuno
...
Change-Id: Ie8ec1e8b3debd1501b16d40567a063390749a19b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159683
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2023-11-19 20:39:16 +01:00
sahil
c0e687edf4
tdf#130924 replace '*printf' with 'SAL_*' logging macros in pyuno
...
Change-Id: I2c491629f52fe0b90517c563f221d7d0345b6ee9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156452
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org >
2023-10-23 16:54:59 +02:00
Mike Kaganski
176e8cf09a
Use exception ctors, instead of setting members later
...
Avoids overwriting source location in message
Change-Id: Ia0290c7dd1ab3ea1357712a27ecab75c7b583dd4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157893
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2023-10-14 15:37:17 +02:00
Caolán McNamara
86160b081b
cid#1546834 Unchecked return value
...
Change-Id: Id2c54c61d3d44611ab02db81b8e64cedb0010ba7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157398
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com >
2023-09-29 14:14:13 +02:00
Szymon Kłos
e78f60a369
Categories for link targets in Impress
...
Writer and Calc presented possible link targets inside
documents as a Tree, with items under their categories.
This patch makes the same for Impress so we don't mix
master pages with regular pages.
Change-Id: Ifd98300b0d609c28d6c1880332fff7e750b5e1b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152389
Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com >
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com >
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153985
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com >
2023-07-12 07:56:37 +02:00
Caolán McNamara
c7b4d15c5c
WaE: Py_SetPythonHome is deprecated since python 3.11
...
not obvious how to replace it, so just accept for now
Change-Id: Id3fc4c95a5cc60e078f06faaa024faa9c770de20
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152504
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com >
2023-06-01 18:23:28 +02:00
Stephan Bergmann
1c8df0fd1a
loplugin:stringadd
...
Change-Id: I04dad33cad121eba7189fc78cac762e31d7c4c2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150477
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2023-04-17 11:42:07 +02:00
Noel Grandin
7f91e4a982
loplugin:stringadd in oox..pyuno
...
after my patch to merge the bufferadd loplugin into stringadd
Change-Id: I5fdc0a33923fe00e7b588f4576607515a93e5c13
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149579
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2023-03-27 11:04:46 +00:00
buldi
8ca611b212
tdf#143148 Use pragma once instead of include guards
...
Change-Id: I5a88b699425a37b914a71400e918965a9f6116eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146730
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
2023-02-13 11:26:27 +00:00
Bogdan B
de419b94b3
Remove unused imports from pyuno/demo and pyuno/qa
...
Change-Id: I777eb19059030d2c1ce870b5839b541cbc7e90d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142520
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org >
2023-01-02 09:37:00 +00:00