summaryrefslogtreecommitdiff
path: root/pyuno
AgeCommit message (Collapse)AuthorFilesLines
2020-06-20tdf#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/+/96707 Reviewed-by: Tomáš Chvátal <tchvatal@suse.com> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Jenkins
2020-06-17python 3.8--only compile: add tp_print to PyTypeObjectAdministrator5-2/+60
This is a backport of four commits to allow Ubuntu 20.04 to compile. 50ccb7e82b7053306721cbe220323be072306a29 d1786724b8e8e474e1f7e39012c1f19611841dc0 893a5249b934f92f072b89b9b558c9de593aa557 23d9966751566028c50ca95ca203d20f36c64f30 Thanks to Stephan and Noel who corrected various portions of my initial patch. Change-Id: I15f016024754165fd093ef95c52d7ba3f6d34397 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96521 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-15pyuno: 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> (cherry picked from commit 777ae8101e23a31bdf806c1d09f0c849e47bb8ef) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86486 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
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 (cherry picked from commit fb4e15a89d8d8f081c0c152e5047bc0e76870b39) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86421 Tested-by: Michael Stahl <michael.stahl@cib.de>
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> (cherry picked from commit b10be5d48433076f0b7238d818020f708553e114) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86398 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.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>
2019-03-06remove some unnecessary typedef struct... sugarNoel Grandin1-4/+4
Change-Id: I1576282b0a0a3af8ae14c04725d9c4900073f2c4 Reviewed-on: https://gerrit.libreoffice.org/68758 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-26loplugin:indentation (clang-cl)Stephan Bergmann1-12/+12
Change-Id: I94689e4eed290b4505d2caba2d9802ef7fb6cffd Reviewed-on: https://gerrit.libreoffice.org/68378 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-04replace double-checked locking patterns with thread safe local staticsMike Kaganski1-18/+12
Change-Id: I1bf67196e97411aeecc13ed4f91d1088a315e323 Reviewed-on: https://gerrit.libreoffice.org/62839 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-11-01fix pyuno compile on Fedora29Noel Grandin1-0/+4
'PyUnicode_GetSize' is deprecated [-Werror,-Wdeprecated-declarations] Change-Id: Id298d6a2b0af9ce418f9124c9addda55fcdc0318 Reviewed-on: https://gerrit.libreoffice.org/62687 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-13loplugin:constfields in package..registryNoel Grandin1-2/+2
Change-Id: Ie139490f2b008bf294910d002af711f8f41fe76d Reviewed-on: https://gerrit.libreoffice.org/61727 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-12clang-tidy misc-throw-by-value-catch-by-referenceNoel Grandin2-13/+13
Change-Id: I04750771b63551fd3df522753a4ed21b8d5c42f3 Reviewed-on: https://gerrit.libreoffice.org/61680 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-24loplugin:external (clang-cl)Stephan Bergmann1-1/+1
Including: * expanding STDAPI to its definition (as per <https://msdn.microsoft.com/library/ms686631(vs.85).aspx> "STDAPI"), to add __declspec(dllexport) into its middle, in extensions/source/activex/so_activex.cxx; as discussed in the comments at <https://gerrit.libreoffice.org/#/c/60691/> "Get rid of Windows .def files in setup_native, use __declspec(dllexport)", having a function both listed in a .def file EXPORTS and marking it dllexport is OK, and the latter helps the heuristics of loplugin:external; however, the relevant functions in extensions/source/activex/so_activex.cxx probably don't even need to be exported in the first place? * follow-up loplugin:salcall in sal/osl/w32/file-impl.hxx Change-Id: Ida6e17eba19cfa3d7e5c72dda57409005c0a0191 Reviewed-on: https://gerrit.libreoffice.org/60938 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-17New loplugin:externalStephan Bergmann5-42/+42
...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-07DeInitVCL in PythonTestStephan Bergmann12-0/+187
After b9757f5cfdb62b24e79eeb4c0ef0c8b98056cecf "loplugin:useuniqueptr in vcl/svdata" ASan/UBSan builds started to fail (like <https://ci.libreoffice.org//job/lo_ubsan/1025/>) at the end of PythonTest_dbaccess_python (and probably other PythonTests), when during exit the static utl::ConfigManager instance already happens to be destroyed by the time the static ImplSVData's mpSettingsConfigItem is destroyed (which would normally be cleared during DeInitVCL, if PythonTests would call that, and which in the past had thus simply been leaked in PythonTests when that mpSettingsConfigItem was a plain pointer instead of std::unique_ptr). So ensure that PythonTests that initialize VCL also call DeInitVCL, via a new private_deinitTestEnvironment, complementing the existing private_initTestEnvironment. However, while private_initTestEnvironment is called once (typically via UnoInProcess.setUp, which internally makes sure to only call it once) as soon as the first executed test needs it, private_deinitTestEnvironment must be called once after the lasts test needing it has executed. The only way that I found to do that is to override unittest.TextTestResult's stopTestRun method, which is called once after all tests have been executed. Hence a new test runner setup in unotest/source/python/org/libreoffice/unittest.py that is now called from solenv/gbuild/PythonTest.mk. That revealed a few places in PythonTests that didn't yet close/delete documents that they had opened, which has now been added. One remaining problem then is that classes like SwXTextDocument and friends call Application::GetSolarMutex from their dtors, via sw::UnoImplPtrDeleter (a "Smart pointer class ensuring that the pointed object is deleted with a locked SolarMutex", sw/inc/unobaseclass.hxx). That means that any PyUNO proxies to such C++ objects that remain alive after private_deinitTestEnvironment will cause issues at exit, when Python does a final garbage collection of those objects. The ultimate fix will be to remove that unhelpful UnoImplPtrDeleter and its locking of SolarMutex from the dtors of UNO objects; until then, the Python code is now sprinkled with some HACKs to make sure all those PyUNO proxies are released in a timely fashion (see the comment in unotest/source/python/org/libreoffice/unittest.py for details). (Also, it would probably help if UnoInProcess didn't keep a local self.xDoc around referencing (just) the last result of calling one of its open* methods, confusingly making it the responsibility of UnoInProcess to close that one document while making it the responsibility of the test code making the other UnoInProcess.open* calls to close any other documents.) Change-Id: Ief27c81e2b763e9be20cbf3234b68924315f13be Reviewed-on: https://gerrit.libreoffice.org/60100 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-30Add missing sal/log.hxx headersGabor Kelemen1-0/+1
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') to directories from l10ntools to reportdesign Change-Id: Ia2dc93dd848c2dc0b6a8cb6e19849c614ec55198 Reviewed-on: https://gerrit.libreoffice.org/58205 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-26Related: rhbz#1602589 silence coverity leaked_storageCaolán McNamara1-0/+1
Change-Id: Iae694be40b32cc3821d326bb362e6091dba19a35 Reviewed-on: https://gerrit.libreoffice.org/58079 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-07-03const fixes for python3-devel-3.7.0-1.fc29.x86_64Stephan Bergmann3-3/+3
Change-Id: Ia16a8b828e11ce36e9bb77ecf9e8a1179bd9b90c Reviewed-on: https://gerrit.libreoffice.org/56841 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-06-23[API CHANGE] Add a sal_debug method to pyunoTor Lillqvist1-0/+15
Does the obvious thing. Useful to get debug output from Python code at development time into the same format and in the same output file as from SAL_DEBUG() calls in C++ source code. Especially useful when combined with SAL_LOG=+TIMESTAMP or +RELATIVETIMER. Change-Id: I8c3d4fdf83b06846acb56773438401d467e71062 Reviewed-on: https://gerrit.libreoffice.org/56171 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-08look for unnecessary calls to Reference::is() after an UNO_QUERY_THROWNoel Grandin1-1/+0
Since the previous call would throw if there was nothing to be assigned to the value. Idea from tml. Used the following script to find places: git grep -A3 -n UNO_QUERY_THROW | grep -B3 -F 'is()' Change-Id: I36ba7b00bcd014bdf16c0455ab91056f82194969 Reviewed-on: https://gerrit.libreoffice.org/55417 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-05-25Improve re-throwing of UNO exceptionsNoel Grandin2-2/+6
(*) if we are already throwing a Wrapped*Exception, get the exception using cppu::getCaughtexception. (*) when catching and then immediately throwing UNO exceptions, use cppu::getCaughtException to prevent exception slicing (*) if we are going to catch an exception and then immediately throw a RuntimeException, rather throw a WrappedTargetRuntimeException and preserve the original exception information. Change-Id: Ia7a501a50ae0e6f4d05186333c8517fdcb17d558 Reviewed-on: https://gerrit.libreoffice.org/54692 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-09configure,pyuno: require at least Python 2.7Michael Stahl4-8/+0
Nobody needs to use 2.6 any more, so reduce the maintenance burden. https://lists.freedesktop.org/archives/libreoffice/2018-March/079670.html Change-Id: I101e26fbceffbe6119f4a6484530f27760b03eb4 Reviewed-on: https://gerrit.libreoffice.org/50816 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Jenkins <ci@libreoffice.org>
2018-04-05Fix Python file URL construction on WindowsStephan Bergmann1-10/+3
...after d76281864b0e83812c0edf7490b1e8271e89fff5 "Create temp copies of test docs in Python/UITests" Change-Id: I0f331ca9567e9a54842cc35b35628046d29b176d Reviewed-on: https://gerrit.libreoffice.org/52470 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-04-03Create temp copies of test docs in Python/UITestsStephan Bergmann1-3/+2
...where necessary, so the tests will succeed if SRCDIR is a read-only tree. Change-Id: Iea4c52d5982d3eba079088ef1670ff557ce30c3f Reviewed-on: https://gerrit.libreoffice.org/52122 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-03-12loplugin:redundantfcast look for redundant copies in return statementsNoel Grandin1-1/+1
Change-Id: I5f416c865dfe1c36018784246a8007452eb42008 Reviewed-on: https://gerrit.libreoffice.org/50996 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-02pyuno: MSVC: pragma warning: make more specific, remove obsoleteMike Kaganski2-8/+0
Change-Id: Id907f466bc9dc45f3e522fb948488eb35c011bfe Reviewed-on: https://gerrit.libreoffice.org/49041 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-02-01tdf#114815 pyuno: avoid 2 threads initing python in parallelMichael Stahl1-4/+16
According to the crash reports, it's possible for the grammar checking thread to call GetGrammarChecker, instantiating lightproof, at the same time as the main thread instantiates LngSvcMgr, which also instantiates (some?) (all?) grammar checkers. Ensure that pyuno_loader::CreateInstance() initialises Python only once with a C++11 thread safe static. Change-Id: I5b1faba9107355c508831a078366e4a29fdbfadf
2018-01-15More loplugin:cstylecast: pyunoStephan Bergmann4-5/+5
Change-Id: I2d3e2104c63bdff1a18fd32c2db37a565e9380e2
2018-01-12More loplugin:cstylecast: pyunoStephan Bergmann7-20/+20
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I11e4fde47c5da601e4ffeada31083c3bdb4286f9
2018-01-11loplugin:redundantcast: pyunoStephan Bergmann1-1/+1
(after a to-be-committed improved loplugin:cstylecast would have rewritten the C-style casts into static_casts) Change-Id: If46940b66accb95d82ce9f129b274940086d906e