summaryrefslogtreecommitdiff
path: root/pyuno
AgeCommit message (Collapse)AuthorFilesLines
2020-07-14pyuno: create instances with uno constructorsNoel Grandin2-37/+9
See tdf#74608 for motivation. Change-Id: I4bdc09b4ba5c2f7ecc4fc8184f2d8230896aef01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98716 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-10replace usage of blacklist with excludelist for IWYUThorsten Behrens1-1/+1
Background and motivation: https://tools.ietf.org/html/draft-knodel-terminology-02 Change-Id: I2f22d455d2a936a85750eaab1fda215ebb6d9d48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98182 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-07-01Upcoming improved loplugin:staticanonymous -> redundantstatic: pyunoStephan Bergmann3-7/+7
Change-Id: I188716d5da92d495b9511f000dd9c1a78259fa9c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97621 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-19tdf#121384 don't leave a bare trailing : in PYTHONPATHCaolán McNamara1-2/+12
and don't insert any empty path entries if that situation was to arise Change-Id: I8d8183485f457c3e4385181fee07390c4bfef603 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96713 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-21use for-range on Sequence in i18npool..sdNoel Grandin1-3/+2
Change-Id: I19eba57bc6058c317473d0746f06699a09ba2830 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94608 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-20fix some more python 3.8 deprecation warningsNoel Grandin1-2/+2
Change-Id: I8bdbf05f1357aea83a3cdda2f06d63c7d04de8f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94561 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-12Fix initialization of Python-3.8--only at-end tp_print memberStephan Bergmann5-12/+12
Until Python 3.7, PyTypeObject had a member tp_print following tp_dealloc, which had then been repurposed as > /* Methods to implement standard operations */ > > destructor tp_dealloc; > - printfunc tp_print; > + Py_ssize_t tp_vectorcall_offset; > getattrfunc tp_getattr; > setattrfunc tp_setattr; > PyAsyncMethods *tp_as_async; /* formerly known as tp_compare (Python 2) in <https://github.com/python/cpython/commit/ aacc77fbd77640a8f03638216fa09372cc21673d> "bpo-36974: implement PEP 590 (GH-13185)" towards Python 3.8. Then only on the 3.8 branch (and prior to tag v3.8.0), <https://github.com/python/cpython/commit/ d917cfe4051d45b2b755c726c096ecfcc4869ceb> "[3.8] bpo-37250: put back tp_print for backwards compatibility (GH-14193)" added > destructor tp_finalize; > vectorcallfunc tp_vectorcall; > > + /* bpo-37250: kept for backwards compatibility in CPython 3.8 only */ > + Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int); > + > #ifdef COUNT_ALLOCS > /* these must be last and never explicitly initialized */ > Py_ssize_t tp_allocs; at the end of PyTypeObject. This was apparently done so that third-party code containing initialization code like X.tp_print = 0; would continue to compile (by just adding back a member with that name, even if at a "random" new---and otherwise unused---location). However, for our way of list-initializing PyTypeObject instances in pyuno that new member caused "missing field 'tp_print' initializer" -Wmissing-field-initializers warnings, so 50ccb7e82b7053306721cbe220323be072306a29 "python 3.8.2 compile: add tp_print to PyTypeObject" added initializers for this new at-end member. But it did so in a way that raises three concerns: 1 The new member was already added in Python 3.8.0 (prior to tag v3.8.0), not only in 3.8.2. 2 The new member was only added to Python 3.8. It has not been added to current master towards 3.9. 3 It is unclear why the comments mention "Py_ssize_t" as the type of that new member, when actually it is of a function pointer type (see above). Probably best to just drop that from the comments, to avoid confusion. Change-Id: Ib44f43befd5f28d4c1ac1e9e14bd55bfb4473507 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94019 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-11More targeted silencing of -Wdeprecated-declarationsStephan Bergmann5-42/+42
...compared to d1786724b8e8e474e1f7e39012c1f19611841dc0 "prevent warnings in pyuno with latest python". For one it is only the /* bpo-37250: kept for backwards compatibility in CPython 3.8 only */ Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int); member (in /usr/include/python3.8/cpython/object.h) that causes a warning. And for another it is only Clang that emits a warning when initializing a deprecated member that way, <http://lists.llvm.org/pipermail/cfe-dev/2020-May/065392.html> "[cfe-dev] Diagnosing initialization of deprecated data member?" Change-Id: I36625118a6bb26f5468d436da4caa82911181202 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94016 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-07prevent warnings in pyuno with latest pythonNoel Grandin5-8/+48
which has marked some members deprecated, but we can't stop initialising them or we run the risk of ASAN complaining Change-Id: I8f4ad0ae083fad9c040613ddde7c40f20d68c7d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93580 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-27Make upcasting css::uno::Reference ctor require complete typesStephan Bergmann1-0/+1
The main reason for the "home-grown" UpCast introduced with 904b3d1fceee5827076758ed2a81f80cb73493ca "Up-cast conversion constructor for css::uno::Reference" in 2013 was probably that we could not yet rely on C++11 std::is_base_of back then. A (welcome) side effect was that the derived class could be incomplete. However, specializations of UpCast relying on whether or not T2 is incomplete are obviously an ODR violation if the type is incomplete in some TUs and complete (and derived from T1) in others. And even if UpCast had internal linkage, it would still be brittle that its behavior depends on the completeness of T2 at the point of the template's instantiation, and not necessarily at the point of use. That means we should better base that ctor on std::is_base_of (which we can do now since 39a1edd6fec902ef378acce8af42c4d7fba280d0 "Make css::uno::Reference upcast ctor LIBO_INTERNAL_ONLY"), which causes a compilation error at least on Clang and GCC if the completeness requirements are not met. This change fixes all the cases where types need to be complete now, plus any resulting loplugin:referencecasting warnings ("the source reference is already a subtype of the destination reference"). Change-Id: Ieb9e3552e90adbf2c5a5af933dcb872e20661a2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92950 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-04-09pyuno: sed Python2/3 string compatibility wrappersMichael Stahl7-78/+37
Change-Id: I9ed25c5efaa4b447ab14a497a58bbe1147a6e7b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91698 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-04-09pyuno,*: kill Python 2 support with fireMichael Stahl12-192/+14
Python 2 support was retained for use with --enable-python=system on RHEL7 and SLES. The time has arrived to remove it. Some .py files that were imported from third parties are not changed to enable easier replacement with updated versions if necessary. solenv/gdb should continue to support Python 2. bin/get-bugzilla-attachments-by-mimetype requires Python 2 to access Launchpad. Change-Id: I26414ae8e9f8402c90336af82020135685694217 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91697 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-04-03loplugin:flatten in pyunoNoel Grandin4-111/+111
Change-Id: I6074463579f1ffc18f5683a3c4b109402b650f9a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91613 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-26Extend loplugin:cstylecast to certain function-style castsStephan Bergmann1-1/+1
...that are equivalent to const_cast or reinterpret_cast, and should arguably better be written that way for clarity. Drawing inspiration from <https://reviews.llvm.org/D76572> "Replace `T(x)` with `reinterpret_cast<T>(x)` everywhere it means reinterpret_cast. No functional change". Change-Id: I27b8f70d324d32ecba658db4d1c2db03e10d5d3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91086 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-03-25Remove unused using declarations in oox...xmlsecurityGabor Kelemen1-1/+0
Found by: run-clang-tidy-10 -checks=-*,misc-unused-using-decls Change-Id: I3e95791e223ef01e140a6217e29a9efae428a784 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90876 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-03-12Revert "loplugin:constfields in package..registry"Noel Grandin1-2/+2
This reverts commit 31138ff7729cbf179079a5e635d3a823e2971f08. Now that we know that making fields has negative side effects like disabling assignment operator generation. Change-Id: I3f1ae65532f441c8be5ebca5866b8a1e1c69318c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90363 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-22python 3.8.2 compile: add tp_print to PyTypeObjectJustin Luth5-0/+18
I couldn't find this documented on the Internet though, as the 3.9 and 3.8.2rc documentation didn't mention it as an added item... I'm using Ubuntu 20.04 alpha with python3 --version Python 3.8.2rc1 This fixes pyuno/source/module/pyuno.cxx:1689:1: error: missing initializer for member ‘_typeobject::tp_print’ [-Werror=missing-field-initializers] Change-Id: Idec5720050572b34628267cd94557dabf7edbf3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89247 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-16GBUILD_TRACE, support for finding out where the build time is spentLuboš Luňák2-0/+6
See instructions in solenv/gbuild/Trace.mk . This generates a file than can be viewed e.g. in the Chromium tracing view. Change-Id: I5f90647c58ca729375525b6daed2d4918adc8188 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88754 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-02-10-Werror,-Wnon-c-typedef-for-linkageStephan Bergmann1-6/+6
...with recent Clant trunk, see <https://github.com/llvm/llvm-project/commit/ 7ae1b4a0ce9c7f269cf3069e41496a78e3f28d49> " Implement P1766R1: diagnose giving non-C-compatible classes a typedef name for linkage purposes." Change-Id: Ida0bbe8f4be7845b8663ea3c86e1faf1db7f55a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88349 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-28sys.version is for displaying; use sys.version_info for version checkMike Kaganski1-1/+1
Change-Id: If0d26019d9f842bcf56c1e01c46cc86c21523c3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87476 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-01-25tdf#124176: Use pragma once instead of include guardsBatuhan Taskaya1-3/+1
Change-Id: Ic35fce6fbc9c41a004f93952df83496ca1809004 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87380 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-01-09pyuno: remove racy debug checkMichael Stahl1-7/+0
The use-after-free is easier to trigger than expected; i don't see how it's possible to check this without a race. Change-Id: I4afb7066d1bf6b34f4f56aa0f51be0643ae40a66 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86481 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-01-08pyuno: remove redundant ifMichael Stahl1-3/+2
Change-Id: Ie0359efa8777439818e357a14db3e2474e936ef6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86403 Reviewed-by: Michael Stahl <michael.stahl@cib.de> Tested-by: Jenkins
2020-01-08pyuno: fix build against system-python-3.6Miklos Vajna1-0/+2
pyuno/source/module/pyuno_runtime.cxx:984:57: error: use of undeclared identifier 'PyThread_get_thread_ident' It's only an assert, so simply do it only for >=3.7. Change-Id: Ia3fffc7a9af30780adff9bc7dbabe1727c1f8f54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86410 Reviewed-by: Michael Stahl <michael.stahl@cib.de> Tested-by: Jenkins
2020-01-08python3: upgrade to release 3.7.6Michael Stahl3-8/+33
* external/python3/python-3.3.3-aix.patch.1: most of it doesn't apply and AIX port isn't maintained anyway so remove it for now * external/python3/ubsan.patch.0: apparently one of the files was removed * 0001-3.6-bpo-17239-Disable-external-entities-in-SAX-parse.patch.1: fixed upstream * python3-osx-avoid-new-10.13.patch.1: replace with simply passing ac_cv_func_utimensat=no to configure * external/python3/python-3.5.4-ssl.patch.1: project files to build OpenSSL removed upstream * There have been changes to how python locates OpenSSL; new variables OPENSSL_INCLUDES etc; it turns out that you have to pass one directory to --with-openssl, as the variables cannot be passed * libuuid.so.1 is a new dependency of the _uuid module * libffi.so.6 is a new dependency of the _ctypes module (the bundled copy of libffi for non-Darwin platforms was removed) * python-3.3.0-pythreadstate.patch.1: the PyThreadState functions have been changed such that CppunitTest_services asserts when there is a PyThreadAttach on top of PyThreadDetach on top of PyThreadAttach, i.e., 2 PyThreadState per thread (PyGILState_Check() fails). Instead of patching in additional workarounds, change PyThreadAttach so that it re-uses an existing PyThreadState if one exists for the thread. Change-Id: I24c19d79b43a30709261fd9db66312b2e3872fd9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/84765 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2019-12-19sal_Char->char in oox..registryNoel Grandin1-1/+1
Change-Id: Icc7f2a32696c30317c1ee77ef39d682d5f5a80b9 Reviewed-on: https://gerrit.libreoffice.org/85512 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-05tdf#97361: Removed getByTindex in Pyuno pytestsMayank Suman8-29/+30
Change-Id: Idf2e8567a154b25b1625b9cd1651bd77cc684859 Reviewed-on: https://gerrit.libreoffice.org/80116 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-11-22make some classes module-privateNoel Grandin1-1/+1
Change-Id: If7303a082e06f6937fca911c578a40475546cda2 Reviewed-on: https://gerrit.libreoffice.org/83442 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-22Extend loplugin:external to warn about classesStephan Bergmann3-0/+18
...following up on 314f15bff08b76bf96acf99141776ef64d2f1355 "Extend loplugin:external to warn about enums". Cases where free functions were moved into an unnamed namespace along with a class, to not break ADL, are in: filter/source/svg/svgexport.cxx sc/source/filter/excel/xelink.cxx sc/source/filter/excel/xilink.cxx svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx All other free functions mentioning moved classes appear to be harmless and not give rise to (silent, even) ADL breakage. (One remaining TODO in compilerplugins/clang/external.cxx is that derived classes are not covered by computeAffectedTypes, even though they could also be affected by ADL-breakage--- but don't seem to be in any acutal case across the code base.) For friend declarations using elaborate type specifiers, like class C1 {}; class C2 { friend class C1; }; * If C2 (but not C1) is moved into an unnamed namespace, the friend declaration must be changed to not use an elaborate type specifier (i.e., "friend C1;"; see C++17 [namespace.memdef]/3: "If the name in a friend declaration is neither qualified nor a template-id and the declaration is a function or an elaborated-type-specifier, the lookup to determine whether the entity has been previously declared shall not consider any scopes outside the innermost enclosing namespace.") * If C1 (but not C2) is moved into an unnamed namespace, the friend declaration must be changed too, see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71882> "elaborated-type-specifier friend not looked up in unnamed namespace". Apart from that, to keep changes simple and mostly mechanical (which should help avoid regressions), out-of-line definitions of class members have been left in the enclosing (named) namespace. But explicit specializations of class templates had to be moved into the unnamed namespace to appease <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92598> "explicit specialization of template from unnamed namespace using unqualified-id in enclosing namespace". Also, accompanying declarations (of e.g. typedefs or static variables) that could arguably be moved into the unnamed namespace too have been left alone. And in some cases, mention of affected types in blacklists in other loplugins needed to be adapted. And sc/qa/unit/mark_test.cxx uses a hack of including other .cxx, one of which is sc/source/core/data/segmenttree.cxx where e.g. ScFlatUInt16SegmentsImpl is not moved into an unnamed namespace (because it is declared in sc/inc/segmenttree.hxx), but its base ScFlatSegmentsImpl is. GCC warns about such combinations with enabled-by-default -Wsubobject-linkage, but "The compiler doesn’t give this warning for types defined in the main .C file, as those are unlikely to have multiple definitions." (<https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/Warning-Options.html>) The warned-about classes also don't have multiple definitions in the given test, so disable the warning when including the .cxx. Change-Id: Ib694094c0d8168be68f8fe90dfd0acbb66a3f1e4 Reviewed-on: https://gerrit.libreoffice.org/83239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-15new loplugin:bufferaddNoel Grandin6-108/+74
look for OUStringBuffer append sequences that can be turned into creating an OUString with + operations Change-Id: Ica840dc096000307b4a105fb4d9ec7588a15ade6 Reviewed-on: https://gerrit.libreoffice.org/80809 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-14New loplugin:getstrStephan Bergmann1-1/+1
...to find matches of ... << s.getStr() (for the rtl string classes) that can be written as just ... << s Some notes: * The OUStringToOString(..., RTL_TEXTENCODING_UTF8) is left explicit in desktop/source/app/crashreport.cxx (even though that would also be done internally by the "<< OUString" operator) to clarify that these values are written out as UTF-8 (and not as what that operator << happens to use, which just also happens to be UTF-8). * OUSTRING_TO_CSTR (include/oox/helper/helper.hxx) is no longer used now. * Just don't bother to use osl_getThreadTextEncoding() in the SAL_WARN in lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx. * The toUtf8() in the SAL_DEBUG in pyuno/source/module/pyuno_module.cxx can just go, too. Change-Id: I4602f0379ef816bff310f1e51b57c56b7e3f0136 Reviewed-on: https://gerrit.libreoffice.org/80762 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-09-18tdf#39593 use getUnoTunnelImplementation in pyunoArkadiy Illarionov4-15/+9
Change-Id: I2cbbaad921b0a3d2ea6def4da2a2527dc4d94549 Reviewed-on: https://gerrit.libreoffice.org/79075 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
2019-08-31Add version resource to executables where it was missingMike Kaganski1-0/+2
Change-Id: Iee965c3f720827b20347f6228e891562c8295d22 Reviewed-on: https://gerrit.libreoffice.org/78327 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-08-30loplugin:noexceptmove in pyunoNoel Grandin1-3/+3
needed to make scratch() and get() noexcept Change-Id: I7d50405698557eb9794adc6523d4878675903db2 Reviewed-on: https://gerrit.libreoffice.org/78284 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-20Fix typosAndrea Gelmini1-1/+1
Change-Id: I5db25074d42fa22f3e36969cb561ad64c1e96dc1 Reviewed-on: https://gerrit.libreoffice.org/77760 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-17tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctorJulien Nabet1-2/+1
in hwpfilter, include/test, io, linguistic, oox, pyuno, reportdesign Change-Id: I5c265c4fde85dd6d7faab8ae82809c4a0e6dd69b Reviewed-on: https://gerrit.libreoffice.org/77646 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-17Simplify Sequence iterations in postprocess..saxArkadiy Illarionov1-27/+11
Use range-based loops, STL and comphelper functions Change-Id: If738d8f4e792c4686870183b0c0fdfbb61fd3351 Reviewed-on: https://gerrit.libreoffice.org/77245 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
2019-08-15loplugin:sequenceloop in postprocess..reportdesignNoel Grandin1-1/+2
Change-Id: I86b9174c37e4a347a3a8ac6c2707052167e6fdc0 Reviewed-on: https://gerrit.libreoffice.org/77522 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): pyunoStephan Bergmann2-2/+2
Change-Id: Ia6778188fbc6f5f4acd696f35ef6d86127b9b8e4 Reviewed-on: https://gerrit.libreoffice.org/76659 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-26Fix typo in codeAndrea Gelmini1-1/+1
Not tested with "make check", but for me cleary a mistake. I have "maybeambiguous" in the rest of the code, but no "maybeambigous". Change-Id: I327143b3e6e188fe661846f5d9b6d2806926d492 Reviewed-on: https://gerrit.libreoffice.org/76201 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-20loplugin:referencecasting in oox..pyunoNoel Grandin2-4/+4
Change-Id: Ie920c154aef3074016704c632b15d99110b219aa Reviewed-on: https://gerrit.libreoffice.org/75974 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-25improve loplugin:simplifyconstructNoel Grandin1-3/+4
Change-Id: If863d28c6db470faa0d22273020888d4219e069e Reviewed-on: https://gerrit.libreoffice.org/74559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-10Adapt to upcoming Python 3.8Stephan Bergmann5-6/+48
...which changed PyTypeObject in <https://github.com/python/cpython/commit/ aacc77fbd77640a8f03638216fa09372cc21673d> "bpo-36974: implement PEP 590 (GH-13185)". Change-Id: I687ec38aeda05d0747b9ed08221db75a758bed51 Reviewed-on: https://gerrit.libreoffice.org/73664 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-17Use hasElements to check Sequence emptiness in [l-r]*Arkadiy Illarionov1-1/+1
Similar to clang-tidy readability-container-size-empty Change-Id: Idd67f332b04857a39df26bad1733aae21236f105 Reviewed-on: https://gerrit.libreoffice.org/71764 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2019-05-10an uno -> a unoCaolán McNamara2-2/+2
Change-Id: I538db88f8477dd2d2ad25c372928fec6c11d979d Reviewed-on: https://gerrit.libreoffice.org/72105 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-04-26tdf#42949 Fix IWYU warnings in pyuno/Gabor Kelemen14-43/+74
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I95575d41a822ff7b1ac5bdba03057f6d3fa61b51 Reviewed-on: https://gerrit.libreoffice.org/71141 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-13loplugin:sequentialassign in oox..reportdesignNoel Grandin3-7/+3
Change-Id: I59ef0a6da411b8af8bdf8d8efb1d733db7475d9c Reviewed-on: https://gerrit.libreoffice.org/70707 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-02For Python extensions, set __file__ before executing the moduleThomas Viehmann1-1/+1
Previously __file__ was set after executing the module. This meant, however that it was not available during execution. This patch moves setting __file__ before the execution. As __file__ is a string (and not bytes), we remove the encoding. Change-Id: I63fe34b6f5d30f53aab16627d413c87b9de81992 Reviewed-on: https://gerrit.libreoffice.org/70048 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-04-02renamed ssl test to testsslShubham Goyal2-3/+3
Renaming used as it was confusing to assume the .mk file based on the python test case, which was testssl.py. Change-Id: I903b59aecf3b167f75494aefcfcde916febee69e Reviewed-on: https://gerrit.libreoffice.org/69217 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-03-18tdf#124011 Add __ne__ method to UNO typesShubham Goyal4-0/+87
Change-Id: I1dcb41b404d69e7437a2cc6f22d3391bb91f3acc Reviewed-on: https://gerrit.libreoffice.org/69216 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>