Age | Commit message (Collapse) | Author |
|
...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 test to vbahelper
Change-Id: Ia7f773511624099505d6a36a8d6e23c0cde4a737
Reviewed-on: https://gerrit.libreoffice.org/58225
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
Build this with RelaxNG <include> feature instead of a complete schema.
This isn't bad but could work better if the schema were a little more
modular...
In order to track down all the uses of extension namespaces like loext,
invoke the validator without "-e".
Change-Id: I92a666fc54c25d66cea38decdc188d60de2a0b74
Reviewed-on: https://gerrit.libreoffice.org/56488
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
|
|
This requires a new validator jar for the -m flag to specify
MathML schema.
Change-Id: If99cf70f386a16a90ba676f8f5ff65a537c9ce56
Reviewed-on: https://gerrit.libreoffice.org/56487
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
|
|
idea originally from either tml or moggi, can't remember which
Change-Id: Id78d75035036d3aa1666e33469c6eeb38f9e624d
Reviewed-on: https://gerrit.libreoffice.org/55126
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Clearly this should be on, but we can't easily pass in a command line
argument like is done in CppunitTest because that doesn't end up in
rtl_getAppCommandArg(), which is empty since it's the python.bin process,
so we'd have to find a way to get the argv from python first...
Change-Id: I9321a9f933f388a659643898e0dc38f295f2068c
Reviewed-on: https://gerrit.libreoffice.org/54083
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
|
|
Change-Id: Ibcbb5b002e8326c484547a825cb295d0f5158a3b
|
|
Larger unit tests collect a lot of events, which are just processed
on shutdown. But since the Scheduler is just an unsorted linked
list, processing these in order is O(n^2) for lookup, which really
adds up, e.g. sw_ooxmlexport8 has 35047 tasks on shutdown.
So this just processes all pending events before running each unit
test.
Also adds missing spellchecking components to some calc tests.
Change-Id: Icf12146015afc17a1f52f79c18f248b72650ad46
Reviewed-on: https://gerrit.libreoffice.org/43199
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
|
|
and the vast majority of translations is to the ui language so default
ctor with that arg
and now drop OModuleResourceClient
Change-Id: I3b85a560ffdfe5f019c2271ac56a5fe4a361522b
|
|
Change-Id: I7e948fe35ce26eb5a3b627ac75f579826dd5ff9d
|
|
It is the error registry that should register the display, not
the error handler. Move this function to the class that is
responsible for it.
Change-Id: I95ca1662b907a7f38a42a39ec729b35fd530bb79
Reviewed-on: https://gerrit.libreoffice.org/36853
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
|
|
ErrorInfo has a hard depency on VCL, yet is in the tools package. It is more
appropriate to have it reside in the VCL module.
Change-Id: Ica54a46c3a7f86cf0331ed7245234bea69c05650
Reviewed-on: https://gerrit.libreoffice.org/36839
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
|
|
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
|
|
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>
|
|
...which was introduced with 3ead3ad52f9bb2f9d1d6cf8dfc73a0a25e6778ed "Gradually
typed Link" to distinguish the new, typed versions from the old, untyped ones,
but is no longer necessary since 382eb1a23c390154619c385414bdbe6f6e461173
"remove untyped Link<>" removed the old versions.
Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c
|
|
The "this is called from pyuno" version in test/source/bootstrapfixture.cxx had
had an empty deinitHook, but it appears to not hurt to give it the same
deinitHook as the version in test/source/vclbootstrapprotector.cxx had had.
Make test::setUpVcl accessible from outside module test for an upcoming use in
<https://gerrit.libreoffice.org/#/c/28322/16> "tdf#99402: fix Metafile Font
handling".
Change-Id: I1d609445690b6ee5e331aa322cd4bf434a3de78e
|
|
Change-Id: I88d3e33823d68745b98625050a8a274f9ef04bcb
Reviewed-on: https://gerrit.libreoffice.org/27135
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
|
|
bffvalidator (Microsoft Office Binary File Format Validator) can now be
used for verification of MS binary export tests
Change-Id: Ibc65e64726a454cdd33946006b36427b9cc6fbd2
Reviewed-on: https://gerrit.libreoffice.org/26405
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
Change-Id: Ie66903c2aae5535a507e1549b58d892b80237842
|
|
Change-Id: I31e61fc91dff70f32143d84ccf308f2bbc9c740e
|
|
Change-Id: I280473a7a9069a86388f608bddc8e48879771bc9
Reviewed-on: https://gerrit.libreoffice.org/18815
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
|
|
Change-Id: I92df586295c11bc9e9276770656901c2e4e714b9
|
|
Change-Id: Iaca21344f6a38f508f79e6d5983e515162a6dca3
|
|
... for the PythonTest, similar to what vclbootstrapprotector does for
CppunitTest; actually no idea if this is a good idea or a bad idea.
Change-Id: Ia4e2e50fdc9c8deb9faf580a2f3f3308533265eb
Reviewed-on: https://gerrit.libreoffice.org/17540
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
|
|
This may reduce some degree of dependency on boost.
Done by running a script like:
git grep -l '#include *.boost/scoped_array.hpp.' \
| xargs sed -i -e 's@#include *.boost/scoped_array.hpp.@#include <memory>@'
git grep -l '\(boost::\)\?scoped_array<\([^<>]*\)>' \
| xargs sed -i -e 's/\(boost::\)\?scoped_array<\([^<>]*\)>/std::unique_ptr<\2[]>/'
... and then killing duplicate or unnecessary includes,
while changing manually
m_xOutlineStylesCandidates in xmloff/source/text/txtimp.cxx,
extensions/source/ole/unoconversionutilities.hxx, and
extensions/source/ole/oleobjw.cxx.
Change-Id: I3955ed3ad99b94499a7bd0e6e3a09078771f9bfd
Reviewed-on: https://gerrit.libreoffice.org/16289
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Ifb032457d6c1b279c4183282ef2b271c706dd71a
|
|
Change-Id: I4788824667c8e0d1d4e0717b7ae7737bb0fd2c90
|
|
Change-Id: I456669f15a659e144fc6ecad053cd0b929859424
|
|
Change-Id: Idbdc5c9aab8fa65df39d66da2461337db6350e52
|
|
...they just "happen" to have the same name
Change-Id: Ia602f9a62e07c3af6fba2ffb84a858e1fb4b09ce
|
|
This reverts commit 05050cdb23de586870bf479a9df5ced06828d498,
not all places that use e.g. OStringToOUString to convert potential UTF-8
are guaranteed to fulfil the prerequisites necessary to use fromUtf8 (and
some places like e.g. in codemaker are happy with the best-effort effect
of OStringToOUString's OSTRING_TO_OUSTRING_CVTFLAGS).
|
|
Change-Id: I771004b7ccab3344a67e827e45bc34c22ffa5f77
|
|
Change-Id: I71d6b65b046bfc31692ba12423288c55fccb2d02
|
|
This required some changes to the framework:
* Init-/DeInitVCL is no longer done per individual test in BootstrapFixture, but
once per CppunitTest invocation in a new vclbootstrapprotector (similarly to
the exisiting unobootstrapprotector). CppunitTests that need VCL now need to
declare gb_CppunitTest_use_vcl.
* For things to work properly, the UNO component context needs to be disposed
from within DeInitVCL (cf. Desktop's Application::DeInit called from
DeInitVCL). The easiest solution was to introduce an
Application::setDeInitHook (where the hook is called from DeInitVCL)
specifically for vclbootstrapprotector to call.
* PythonTests don't (yet) call DeInitVCL; they still hook into
BootstrapFixture's original test_init functionality (to call InitVCL), and do
not make use of the vclbootstrapprotector.
Change-Id: I4f3a3c75db30b58c1cd49d81c51db14902ed68b2
|
|
Change-Id: I711621c89e8f75d4450867e303ccdc8017bcd9d7
|
|
Change-Id: I894ca2eb865405a9991f921997cc22c5a34c4da2
|
|
Change-Id: I15aac53a817ca309697cba8a962e788aea1619d0
|
|
Change-Id: If6c318f1a1f74a39083bf83eed2f80aca1e27bc5
|
|
Change-Id: I8ec20e6a391bd835097af9be44a174e8e7b19cce
|
|
normally this happens in desktop/source/app/langselect.cxx for
the fat app case
Change-Id: I4772172aa6f071ac03d74e2abe7a9e197f0dc964
|
|
Change-Id: I749f4cb8340b4642040baed7f3363e2f1e4b65ad
|
|
Change-Id: I1a613899d18a004149d3e637d796bc2f6687e6c4
|
|
Change-Id: I09f517a49507a2eb31118f88f31dc2ff8b03de6a
|
|
Change-Id: Iaafe30a1095bd5b6dac3637c394818ba8bd848ce
|
|
|
|
This is nice to make them more easily debuggable.
A series of crude hacks are employed to bootstrap enough services from
python so the current tests run.
This is only tested with system python3 on Fedora.
Change-Id: I5e06741e55ead7fddec41ff776ff8ca5d2399469
Reviewed-on: https://gerrit.libreoffice.org/3215
Reviewed-by: David Ostrovsky <David.Ostrovsky@gmx.de>
Tested-by: David Ostrovsky <David.Ostrovsky@gmx.de>
|
|
Change-Id: Ie5ce9157a7ea59db7b0509fbaec61d07f8f9edf0
|
|
Change-Id: I3455a7294b136400f32163626d5a7a7f2bfa898c
|
|
Change-Id: I1f72ca29b2f5b286bfae906dc3ee16581a2b1c36
|