summaryrefslogtreecommitdiff
path: root/pyuno
AgeCommit message (Collapse)AuthorFilesLines
2017-05-12Clean up uses of SAL_U/SAL_W: pyunoStephan Bergmann1-17/+5
...and clean up MACOSX specific code Change-Id: I1796b4b8f2695359557a5374b5d7592ccf8f86a6
2017-05-12remove unused uno::Reference varsNoel Grandin1-1/+0
found by temporarily marking Reference as SAL_WARN_UNUSED. Change-Id: I18809b62654467f890016adcc92576980ced393b Reviewed-on: https://gerrit.libreoffice.org/37511 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-09cleanup osl/diagnose.h includesJochen Nitschke1-1/+0
with command > git grep -l osl/diagnose.h *.cxx | xargs grep -L -w 'OSL_\w*' | xargs sed -i '/#include *\(<\|\"\)osl\/diagnose.h\(>\|\"\).*/d' headers need more work Change-Id: I906519ebbd47a04703b4fa5943b2f7abea7a97ab Reviewed-on: https://gerrit.libreoffice.org/37350 Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-05-07revert OSL_ASSERT changesChris Sherlock2-2/+2
Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
2017-05-07tdf#43157: convert pyuno from OSL_ASSERT to assertChris Sherlock2-2/+2
Change-Id: I2eb634ed3f5403df910371631f42219a9f8744eb
2017-04-04Finally switch MSVC to sal_Unicode = char16_t, tooStephan Bergmann1-2/+2
There is lots of (Windows-only) code that relied on sal_Unicode being the same as wchar_t, and the best change may be different in each case (and doing the changes may be somewhat error prone). So for now add SAL_U/SAL_W scaffolding functions to sal/types.h, remove their uses one by one again, and finally drop those functions again. Change-Id: I2cc791bd941d089901abb5f6fc2f05fbc49e65ea Reviewed-on: https://gerrit.libreoffice.org/36077 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-04make UNO enums scoped for internal LO codeNoel Grandin1-23/+22
this modifies codemaker so that, for an UNO enum, we generate code that effectively looks like: #ifdef LIBO_INTERNAL_ONLY && HAVE_CX11_CONSTEXPR enum class XXX { ONE = 1 }; constexpr auto ONE = XXX_ONE; #else ...the old normal way.. #endif which means that for LO internal code, the enums are scoped. The "constexpr auto" trick acts like an alias so we don't have to use scoped naming everywhere. Change-Id: I3054ecb230e8666ce98b4a9cb87b384df5f64fb4 Reviewed-on: https://gerrit.libreoffice.org/34546 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-25Fix typosAndrea Gelmini1-1/+1
Change-Id: I14dca0d55c09187690dc1d94936c40b890ca5cea Reviewed-on: https://gerrit.libreoffice.org/35637 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-23loplugins:redundantcast teach it about c-style typedef castsNoel Grandin1-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>
2017-03-13Revert "comphelper: fix MSVC hang in ThreadPool::shutdown()"Miklos Vajna1-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
2017-03-11comphelper: fix MSVC hang in ThreadPool::shutdown()Michael Stahl1-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>
2017-03-02Fix typosAndrea Gelmini1-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>
2017-02-28new loplugin unoanyNoel Grandin1-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>
2017-02-21loplugin:subtlezeroinit: pyunoStephan Bergmann4-5/+5
Change-Id: Id36181c096cbd6f87288fda7f8d37996b538d9bf
2017-02-21remove some unnecessary OUStringBuffer usageNoel Grandin8-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>
2017-02-15Some simplifications, using UNO_QUERY_THROWStephan Bergmann3-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>
2017-02-10Remove MinGW supportStephan Bergmann6-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>
2017-02-06Add missing #includesStephan Bergmann2-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
2017-01-26Remove dynamic exception specificationsStephan Bergmann9-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>
2017-01-19New loplugin:dynexcspec: Add @throws documentation, pyunoStephan Bergmann6-2/+24
Change-Id: I1888938e447f8ca115d326d5e4849d6b21904b04
2017-01-09New loplugin:externvar: pyunoStephan Bergmann1-2/+2
Change-Id: Ib6822bf914fe44e8bd590dfe82d25d7c5046ca94
2016-12-25pyuno osx Sierra problem.jan Iversen1-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
2016-12-12tdf#97361: Changed naming convention to Python type, object factories ↵n5xgdh10-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>
2016-11-29Rewrite some (trivial) assignments inside if/while conditions: pyunoStephan Bergmann2-3/+3
Change-Id: I01ce742c727c66577d747e441a3794c1743f24ce
2016-11-09make comphelper::containerToSequence a little smarterNoel Grandin1-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>
2016-10-26normalize existing emacs/vim mode-lines in python filesMichael Stahl10-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
2016-10-18replace <<= with assign for <<= with rhs AnyJochen Nitschke2-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>
2016-10-16clang-cl loplugin: pyunoStephan Bergmann2-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>
2016-10-01Fix typosAndrea Gelmini2-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>
2016-09-23coverity#1371219 Missing move assignment operatorCaolán McNamara1-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>
2016-09-21python3: put a RPATH into libpython3.soMichael Stahl1-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
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann2-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
2016-08-25loplugin:staticaccess: Extend loplugin:staticcall to cover all access...Stephan Bergmann1-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
2016-08-19coverity#1371437 Uncaught exceptionCaolán McNamara2-2/+2
Change-Id: I2daa658f51a81ce9292f236075dc37c16af4279d
2016-07-27improve passstuffbyref return analysisNoel Grandin2-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>
2016-07-14Improving uno.py code styleKenneth Koski1-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>
2016-06-21Clean up uses of Any::getValue() in pyunoStephan Bergmann5-11/+17
Change-Id: I35c4ac0b84e439982f87420aa7587c99ee367920
2016-06-06Normalize on using @throws instead of @raise[s]Stephan Bergmann1-1/+1
...as the former is used almost exclusively Change-Id: I38ff11cd0d5125534550df99dd427666011c3b7b
2016-06-01final solution of the ARCHIVE questionDavid Tardon2-4/+23
Change-Id: I70da65e08c75cd732000597a09ed113b3075c5a8
2016-05-30Just use Any::operator <<= for sal_Unicode valuesStephan Bergmann1-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
2016-05-27Get rid of unnecessary directory levels $D/inc/$DTor Lillqvist3-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>
2016-05-26loplugin:unusedreturntypesNoel Grandin1-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>
2016-05-09Fix call to deleted Any constructorLuke Deller1-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>
2016-05-04While at it, delete Any functions on sal_Bool*Stephan Bergmann1-4/+2
(at least for LIBO_INTERNAL_ONLY), to help further reduce the occurrences of sal_Bool across the code base Change-Id: I70654a0cb56655984c717b7b894f26c9ab47536e
2016-04-30Fix typosAndrea Gelmini1-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>
2016-04-26update loplugin stylepolice to check local pointers varsNoel Grandin1-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>
2016-04-20loplugin:salbool: Automatic rewrite of sal_False/TrueStephan Bergmann2-3/+3
Change-Id: I886fa2cc662072ad746d3828ba66bbd368121de8
2016-04-18clean-up: unused using declarations and includesJochen Nitschke9-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>
2016-04-14clang-tidy performance-unnecessary-value-param in variousNoel Grandin3-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>
2016-04-14loplugin:passstuffbyref in variousNoel Grandin1-2/+2
Change-Id: I80070c83204e531c2f599f8a56193d6ffe0e5022