Age | Commit message (Collapse) | Author | Files | Lines |
|
...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>
(cherry picked from commit 2bd585f31d7abb066e3f53d9b29c822af20aea69)
Reviewed-on: https://gerrit.libreoffice.org/73778
|
|
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>
|
|
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>
|
|
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>
|
|
Change-Id: I59ef0a6da411b8af8bdf8d8efb1d733db7475d9c
Reviewed-on: https://gerrit.libreoffice.org/70707
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
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>
|
|
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>
|
|
Change-Id: I1dcb41b404d69e7437a2cc6f22d3391bb91f3acc
Reviewed-on: https://gerrit.libreoffice.org/69216
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
|
|
Change-Id: I1576282b0a0a3af8ae14c04725d9c4900073f2c4
Reviewed-on: https://gerrit.libreoffice.org/68758
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I94689e4eed290b4505d2caba2d9802ef7fb6cffd
Reviewed-on: https://gerrit.libreoffice.org/68378
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I1bf67196e97411aeecc13ed4f91d1088a315e323
Reviewed-on: https://gerrit.libreoffice.org/62839
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
'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>
|
|
Change-Id: Ie139490f2b008bf294910d002af711f8f41fe76d
Reviewed-on: https://gerrit.libreoffice.org/61727
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I04750771b63551fd3df522753a4ed21b8d5c42f3
Reviewed-on: https://gerrit.libreoffice.org/61680
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
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>
|
|
...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>
|
|
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>
|
|
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>
|
|
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>
|
|
Change-Id: Ia16a8b828e11ce36e9bb77ecf9e8a1179bd9b90c
Reviewed-on: https://gerrit.libreoffice.org/56841
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
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>
|
|
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>
|
|
(*) 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>
|
|
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>
|
|
...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>
|
|
...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>
|
|
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>
|
|
Change-Id: Id907f466bc9dc45f3e522fb948488eb35c011bfe
Reviewed-on: https://gerrit.libreoffice.org/49041
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
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
|
|
Change-Id: I2d3e2104c63bdff1a18fd32c2db37a565e9380e2
|
|
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
|
|
(after a to-be-committed improved loplugin:cstylecast would have rewritten the
C-style casts into static_casts)
Change-Id: If46940b66accb95d82ce9f129b274940086d906e
|
|
since cdecl is the default calling convention on Windows for
such functions, the annotation is redundant.
Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d
Reviewed-on: https://gerrit.libreoffice.org/46164
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Id6820abec4b8ca8bee26d62b333fd30b42a14aec
Reviewed-on: https://gerrit.libreoffice.org/46007
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ie56daf560185274754afbc7a09c432b5c2793791
Reviewed-on: https://gerrit.libreoffice.org/45068
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ic770d1fb8e3735123786a73a7b57f71ad8005d5d
Reviewed-on: https://gerrit.libreoffice.org/44301
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I07b13573fb45847bd31be6d195d0ebb5943e25bb
|
|
Change-Id: If6090dc77275b4a8cdfeaedb437036801e981a9b
|
|
no need to explicitly specify it anymore
Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec
Reviewed-on: https://gerrit.libreoffice.org/43567
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...where the original code caused an "Unsupported URL <file://C%3A/...>" error,
while just using pathname2url instead of quote caused "Unsupported URL
<file:///C://...>", so had to add the silly re.sub. Hopefully keeps working
with all sorts of Python 2 and 3 that we want to support. (And is there really
no better way to convert a pathname to a file URL in Python?)
Change-Id: I43f450707fe5206a1e6b91918962d2d90a880463
Reviewed-on: https://gerrit.libreoffice.org/43092
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I92c84d0d0fba1adcd0adfc93e3fe9b5ea6b8cbf2
Reviewed-on: https://gerrit.libreoffice.org/43065
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
This is type-safe, and allows to catch cases where a source type
is changed for some reason, but reinterpret_cast masks that
Change-Id: Ib64b6fa2e22d94a6bba890f0ccc3e20325c6f0a1
Reviewed-on: https://gerrit.libreoffice.org/42961
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
...instead of the 'make PythonTest_pytests' hack introduced with
4e887567c5b4b06646ab1340376e240d6c5af9cb "A rudimentary framework for additional
Python tests not run by default".
PythonTest_pyuno_pytests_insertremovecells and
PythonTest_pyuno_pytests_testcollections apparently have various dependencies
that are not spelled out, so simply add them to subsequentcheck for now (also,
the latter appears to take quite some time to execute).
Change-Id: Ie9d3c301af28f67ab65c09eba93d9778a3c82c8a
Reviewed-on: https://gerrit.libreoffice.org/42822
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...instead of once for each class derived from CollectionsTestBase (as listed in
pyuno/PythonTest_pyuno_pytests_testcollections.mk), causing the
assert(!pSVData->maDeInitHook.IsSet());
in Application::setDeInitHook (vcl/source/app/svapp.cxx) to fire.
This is probably far from being idiomatic Python code...
Change-Id: I8cd1470c085b16b7b82468a308cfd1dead2db034
|
|
Change-Id: Ibf9d3b24b0caa6b84f403d7bbbc90912fe64a559
Reviewed-on: https://gerrit.libreoffice.org/42728
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I7ddc0b76532d26910f78642200750459508c2861
Reviewed-on: https://gerrit.libreoffice.org/42617
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I3d13e1c0bb6aa4a7aacc463198747c1368ebc9b4
Reviewed-on: https://gerrit.libreoffice.org/38114
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: If6c2b980a2916c4ee8ac108fbb84b006a35f49c5
Reviewed-on: https://gerrit.libreoffice.org/40570
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I5e8e4a9a31aa7c3ff54cc7ce137d08770ea297e1
Reviewed-on: https://gerrit.libreoffice.org/40279
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I832f7ef0f1bd55e365db7e49823fe8bc30390c04
Reviewed-on: https://gerrit.libreoffice.org/38215
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|