summaryrefslogtreecommitdiffstats
path: root/pyuno
Commit message (Collapse)AuthorAgeFilesLines
* loplugins:redundantcast teach it about c-style typedef castsNoel Grandin2017-03-231-1/+1
| | | | | | | Change-Id: I1ac11a2481c0f4d8be1e1fd7c7637ac0ece3d65c Reviewed-on: https://gerrit.libreoffice.org/35558 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Revert "comphelper: fix MSVC hang in ThreadPool::shutdown()"Miklos Vajna2017-03-131-16/+5
| | | | | | | | | | | | | | As it causes "unopkg.bin: /home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/comphelper/source/misc/threadpool.cxx:96: comphelper::ThreadPool::~ThreadPool(): Assertion `mbTerminate' failed." in <https://ci.libreoffice.org/job/lo_gerrit/8283/Config=linux_clang_dbgutil_64/console> and also locally. Revert till it's clear if that assert() should be a SAL_WARN() or unopkg has to be fixed. This reverts commit 9899ffd244dd367ba69dffe1f21f4f0222064a46. Change-Id: I72902f7da410012340aa8231d84c6871a3f7b976
* comphelper: fix MSVC hang in ThreadPool::shutdown()Michael Stahl2017-03-111-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit aa68c99d88fd7abe08c4aee5206c859a0cdba38e added some code using std::condition_variable to comphelper. Built with MSVC 2017, this causes many cppunittester.exe processes to deadlock in ThreadPool::shutdown(): maTasksChanged.notify_all(); This ultimately calls NtReleaseKeyedEvent(), which never returns. The reason appears to be a bug in Windows 7, for which a "hotfix"[1] is avaiable here, but it's apparently not distributed via Windows Update so we likely can't rely on users or even developers having this installed. However, the documentation of DllMain[2] and ExitProcess[3] indicates that during shutdown, by the time global destructors are invoked all threads other than the one that called ExitProcess have already been terminated. Returning from main() implicitly calls ExitProcess [4]. As it turns out the problem only happens for some CppUnitTests because soffice.bin will call ThreadPool::shutdown() from Desktop::doShutdown() while it is still safe. [1] http://support.microsoft.com/kb/2582203 [2] https://msdn.microsoft.com/en-US/library/windows/desktop/ms682583(v=vs.85).aspx [3] https://msdn.microsoft.com/en-us/library/windows/desktop/ms682658(v=vs.85).aspx [4] https://blogs.msdn.microsoft.com/oldnewthing/20100827-00/?p=13023 Change-Id: I6137461ca7efe9a5fbe4f8f8478fb96de3570469 Reviewed-on: https://gerrit.libreoffice.org/35066 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
* Fix typosAndrea Gelmini2017-03-021-1/+1
| | | | | | | Change-Id: I35eeb71f4f698e39b7b0d98e3cb30657a64a611a Reviewed-on: https://gerrit.libreoffice.org/34802 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
* new loplugin unoanyNoel Grandin2017-02-281-2/+2
| | | | | | | Change-Id: I5d6c4a67cb2a09e7cd5bd620c6b262d188701b89 Reviewed-on: https://gerrit.libreoffice.org/34714 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:subtlezeroinit: pyunoStephan Bergmann2017-02-214-5/+5
| | | | Change-Id: Id36181c096cbd6f87288fda7f8d37996b538d9bf
* remove some unnecessary OUStringBuffer usageNoel Grandin2017-02-218-77/+32
| | | | | | | Change-Id: Iae9146a3be569107019d9c5af404b94e51e76cd5 Reviewed-on: https://gerrit.libreoffice.org/34469 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Some simplifications, using UNO_QUERY_THROWStephan Bergmann2017-02-153-19/+5
| | | | | | | Change-Id: Ib973a403a830a3ecf8e57a5e70a581ba06f96a05 Reviewed-on: https://gerrit.libreoffice.org/34264 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Remove MinGW supportStephan Bergmann2017-02-106-131/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | In OOo times, there'd originally been efforts to allow building on Windows with MinGW. Later, in LO times, this has been shifted to an attempt of cross- compiling for Windows on Linux. That attempt can be considered abandoned, and the relevant code rotting. Due to this heritage, there are now three kinds of MinGW-specific code in LO: * Code from the original OOo native Windows effort that is no longer relevant for the LO cross-compilation effort, but has never been removed properly. * Code from the original OOo native Windows effort that is re-purposed for the LO cross-compilation effort. * Code that has been added specifially for the LO cross-compilation effort. All three kinds of code are removed. (An unrelated, remaining use of MinGW is for --enable-build-unowinreg, utilizing --with-mingw-cross-compiler, MINGWCXX, and MINGWSTRIP.) Change-Id: I49daad8669b4cbe49fa923050c4a4a6ff7dda568 Reviewed-on: https://gerrit.libreoffice.org/34127 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Add missing #includesStephan Bergmann2017-02-062-0/+2
| | | | | | | | | ...and remove some unncessary using directives/declarations, in preparation of removing now-unnecessary #includes from cppumaker-generated files, post e57ca02849c3d87142ff5ff9099a212e72b8139c "Remove dynamic exception specifications". Change-Id: Iaf1f268871e2ee1d1c76cf90f03557527ebc9067
* Remove dynamic exception specificationsStephan Bergmann2017-01-269-74/+32
| | | | | | | | | | | | | | | | | | | | | | | | | ...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* New loplugin:dynexcspec: Add @throws documentation, pyunoStephan Bergmann2017-01-196-2/+24
| | | | Change-Id: I1888938e447f8ca115d326d5e4849d6b21904b04
* New loplugin:externvar: pyunoStephan Bergmann2017-01-091-2/+2
| | | | Change-Id: Ib6822bf914fe44e8bd590dfe82d25d7c5046ca94
* pyuno osx Sierra problem.jan Iversen2016-12-251-0/+17
| | | | | | | | | | On a fresh installed Sierra pyuno fails to build due to a py_UNICODE conversion problem. Py_UNICODE expand to "unsigned short", and OUString expect a form of sal_UNICODE The hack was done locally and not generally expand OUString functionality. Change-Id: Ib7834c423c1c5cd9cd1e8d1ed8393e80bf8a5e5d
* tdf#97361: Changed naming convention to Python type, object factories ↵n5xgdh2016-12-1210-132/+150
| | | | | | | | | implemented Change-Id: Id42e9a2e2cfd7c95140411123e8702dfdb4054da Reviewed-on: https://gerrit.libreoffice.org/31676 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
* Rewrite some (trivial) assignments inside if/while conditions: pyunoStephan Bergmann2016-11-292-3/+3
| | | | Change-Id: I01ce742c727c66577d747e441a3794c1743f24ce
* make comphelper::containerToSequence a little smarterNoel Grandin2016-11-091-1/+1
| | | | | | | | | So we don't have to specify the source and destination type as often. Change-Id: Id9e286417a1cb246d163cbc3c536b231a4a92624 Reviewed-on: https://gerrit.libreoffice.org/30700 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
* normalize existing emacs/vim mode-lines in python filesMichael Stahl2016-10-2610-18/+21
| | | | | | | | | Bunch of these were setting C++ or Make modes and icky tabs... Also, reportedly Emacs can figure out to enable python-mode automatically. Change-Id: I50072488fb92cb4d27aa3f74f717a28ae3967543
* replace <<= with assign for <<= with rhs AnyJochen Nitschke2016-10-182-5/+5
| | | | | | | | | found by deleting specialization of '<<=' template Change-Id: I253f15177ab20fd3ef9baf4158da8c662cb47e6c Reviewed-on: https://gerrit.libreoffice.org/29956 Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
* clang-cl loplugin: pyunoStephan Bergmann2016-10-162-16/+16
| | | | | | | Change-Id: Ic093b58be1f2b78d904d6d036b52532f97c3b336 Reviewed-on: https://gerrit.libreoffice.org/29857 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Fix typosAndrea Gelmini2016-10-012-2/+2
| | | | | | | Change-Id: Icfc61fcc5ace717bca4bea988243674afe31e6f8 Reviewed-on: https://gerrit.libreoffice.org/29435 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* coverity#1371219 Missing move assignment operatorCaolán McNamara2016-09-231-3/+13
| | | | | | | Change-Id: I72ed6082b561079b45e82d8258fa1abbe23117e2 Reviewed-on: https://gerrit.libreoffice.org/29228 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* python3: put a RPATH into libpython3.soMichael Stahl2016-09-211-1/+1
| | | | | | | | | | | | | | | | libpython3.so is the "ABI compatible" wrapper library around libpython3.5m.so - it is not actually used by anything in LO right now, but let's ensure it has RPATH $ORIGIN just in case. This revealed that the AIX patch in python3 accidentally changed the SONAME of libpython3.5m.so from upstream's libpython3.5m.so.1.0 on ELF platforms, because the SONAME variable was set in the shell command but read as a make variable in the next line, which is actually evaluated earlier. So rename a few files in packages to use the upstream SONAME. Change-Id: I3611f75eee62b0993b853230521a2fa41ac5cd9c
* loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann2016-09-132-2/+2
| | | | | | | | | | | | | | | | | The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
* loplugin:staticaccess: Extend loplugin:staticcall to cover all access...Stephan Bergmann2016-08-251-1/+1
| | | | | | | to static members (data, in addition to function) via class member access syntax. Also covers the (somewhat obscure) access to enumerator members. Change-Id: Iec54b8df2fdb423c0caf21a0dd0f9fe8fdf33897
* coverity#1371437 Uncaught exceptionCaolán McNamara2016-08-192-2/+2
| | | | Change-Id: I2daa658f51a81ce9292f236075dc37c16af4279d
* improve passstuffbyref return analysisNoel Grandin2016-07-272-2/+2
| | | | | | | Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c Reviewed-on: https://gerrit.libreoffice.org/27317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* Improving uno.py code styleKenneth Koski2016-07-141-252/+367
| | | | | | | | | | | | | * Fixing pep8 violations * Improving comments, docstrings, and unifying coding style * Using functionality copied from six library for Python 2/3 compatibility * Using standard traceback formatting Change-Id: I62bd0e8513ffc59202163002fa4adea3d92572c3 Reviewed-on: https://gerrit.libreoffice.org/22848 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
* Clean up uses of Any::getValue() in pyunoStephan Bergmann2016-06-215-11/+17
| | | | Change-Id: I35c4ac0b84e439982f87420aa7587c99ee367920
* Normalize on using @throws instead of @raise[s]Stephan Bergmann2016-06-061-1/+1
| | | | | | ...as the former is used almost exclusively Change-Id: I38ff11cd0d5125534550df99dd427666011c3b7b
* final solution of the ARCHIVE questionDavid Tardon2016-06-012-4/+23
| | | | Change-Id: I70da65e08c75cd732000597a09ed113b3075c5a8
* Just use Any::operator <<= for sal_Unicode valuesStephan Bergmann2016-05-301-2/+1
| | | | | | | | ...now that sal_Unicode no longer clashes with sal_uInt16 on any platform (in LIBO_INTERNAL_ONLY code), after e16fa715c43dcdf836ce8c400b6d54eae87b627d "Handle wchar_t as native C++11 type on windows" Change-Id: Id423dd6235bf14823fa5611b804c0974edbe64b3
* Get rid of unnecessary directory levels $D/inc/$DTor Lillqvist2016-05-273-4/+4
| | | | | | | | Change-Id: Ibf313b8948a493043006ebf3a8281487c1f67b48 Reviewed-on: https://gerrit.libreoffice.org/25532 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
* loplugin:unusedreturntypesNoel Grandin2016-05-261-2/+2
| | | | | | | | | and clean up the python script Change-Id: I0a7068153290fbbb60bfeb4c8bda1c24d514500f Reviewed-on: https://gerrit.libreoffice.org/25439 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* Fix call to deleted Any constructorLuke Deller2016-05-091-4/+2
| | | | | | | | | | | | | A recent commit 6e70103d deleted some Any constructors and methods, and updated all the places where these had been called - except it looks like one call was missed, active only when building against Python 2. Adjust this call following what was done for the Python 3 case. Change-Id: I0f92b7476b617d9fdf0e5f698e363360497d115e Reviewed-on: https://gerrit.libreoffice.org/24759 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* While at it, delete Any functions on sal_Bool*Stephan Bergmann2016-05-041-4/+2
| | | | | | | (at least for LIBO_INTERNAL_ONLY), to help further reduce the occurrences of sal_Bool across the code base Change-Id: I70654a0cb56655984c717b7b894f26c9ab47536e
* Fix typosAndrea Gelmini2016-04-301-1/+1
| | | | | | | Change-Id: Id81b16ff26283611f0b84929d831c827f847ab73 Reviewed-on: https://gerrit.libreoffice.org/24317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
* update loplugin stylepolice to check local pointers varsNoel Grandin2016-04-261-3/+3
| | | | | | | | | | | | are actually pointer vars. Also convert from regex to normal code, so we can enable this plugin all the time. Change-Id: Ie36a25ecba61c18f99c77c77646d6459a443cbd1 Reviewed-on: https://gerrit.libreoffice.org/24391 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* loplugin:salbool: Automatic rewrite of sal_False/TrueStephan Bergmann2016-04-202-3/+3
| | | | Change-Id: I886fa2cc662072ad746d3828ba66bbd368121de8
* clean-up: unused using declarations and includesJochen Nitschke2016-04-189-33/+0
| | | | | | | | | | | | | | Searched source for using declarations. Checked if those symbols reappear in the source file, even in comments or dead code but not in #include statements. If they don't reappear, remove the declaration. Remove includes whose symbol got removed. Change-Id: Ibb77163f63c1120070e9518e3dc0a78c6c59fab0 Reviewed-on: https://gerrit.libreoffice.org/24148 Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
* clang-tidy performance-unnecessary-value-param in variousNoel Grandin2016-04-143-3/+3
| | | | | | | Change-Id: I7168d44dab8e6a8e37bb7920d744ff32f5e52907 Reviewed-on: https://gerrit.libreoffice.org/24019 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* loplugin:passstuffbyref in variousNoel Grandin2016-04-141-2/+2
| | | | Change-Id: I80070c83204e531c2f599f8a56193d6ffe0e5022
* cleanup: remove unused com/sun/star/uno includesJochen Nitschke2016-04-124-5/+0
| | | | | | | | | | | | Sequence.h(xx), Any.h(xx) and Type.h(xx) and remove unused using-declarations from these files. Add a few missing includes provided by them. Change-Id: I6b91b6d1fdf9d0496dd546c0aab9bdcc6831a5d4 Reviewed-on: https://gerrit.libreoffice.org/23805 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* tdf#97499 Fixed containers parameters clearing #3tymyjan2016-04-041-7/+4
| | | | | | | Change-Id: I1c105de7e1df251533179fba77e3797ef1c4e2d4 Reviewed-on: https://gerrit.libreoffice.org/23752 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* cleanup: remove unused Reference.h(xx) includesJochen Nitschke2016-04-024-5/+0
| | | | | | | | | and unused using-declarations from Reference.h Change-Id: I297a7ae6044fa329d245ecf08fd5c4cb930f5b19 Reviewed-on: https://gerrit.libreoffice.org/23735 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
* tdf#97966 Drop 'static' keywordsWastack2016-04-011-1/+1
| | | | | | | | | Including no keywords from extern "C" blocks Change-Id: I87f2ed75888b51ec9e0cb75566bf7c2351b479b4 Reviewed-on: https://gerrit.libreoffice.org/23675 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Avoid reserved identifierStephan Bergmann2016-03-291-2/+2
| | | | Change-Id: Icf8858590d0e1563acebc9d55fe6898ce7416dd5
* pyuno: add some debugging hintsMichael Stahl2016-03-231-0/+11
| | | | Change-Id: Id01e689911de8bc4402803e130db99b1b7c5b365
* Fix python2 build of pyuno with older py2 versionsTomáš Chvátal2016-03-041-1/+4
| | | | | | | | | | | SyntaxError: ('invalid syntax', ('//usr/lib64/libreoffice/program//uno.py', 368, 77, " return _ConstantGroup({c.Name.split('.')[-1]: c.ConstantValue for c in td.Constants})\n")) Change-Id: Ie87c21fbfd83fc4d6f918eb55128db235c2220a8 Reviewed-on: https://gerrit.libreoffice.org/22863 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
* put python starter shell script to Resources folder of OS X appAndras Timar2016-03-031-0/+4
| | | | | | | | Change-Id: Iaed947b9168fbd1e2d2c79da724426b56bd8a830 (cherry picked from commit 4f606fd7bf1ca0bd440fdccac39aa5f4a5e35a36) Reviewed-on: https://gerrit.libreoffice.org/22857 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com>