summaryrefslogtreecommitdiff
path: root/unotest
AgeCommit message (Collapse)Author
2023-05-05loplugin:unnecessarygetstrStephan Bergmann
The plugin in its current form is probably not intending to find these cases. But it happened to do so on macOS with libc++, where the std::basic_string ctors taking a final defaulted Allocator argument are instead implemented by a pair of overloaded ctors, one taking no Allocator at all (see 671d1c6cd14b28b5960ad56086299bd69533dfd8 "Adapt loplugin:unnecessarygetstr to libc++"). But these changes here are useful regardless, so lets leave it at that. Change-Id: I2776671e2953182bdcad36432951a75f82412ebb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151410 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-02-21qa: call ProcessEventsToIdle inside dispatchCommandXisco Fauli
Change-Id: I909e6f334f4a659282141a97ccb3ffdea6ecc364 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147397 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-02-21tdf#153752: SbxObject::Execute: extra characters in Option Compatible modeMike Kaganski
Change-Id: Ib3e4bd9eb9a249123a686f2434ded7b529fb050f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147345 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-12-10Introduce CPPUNIT_PROPAGATE_EXCEPTIONS environment variableStephan Bergmann
Often a developer debugging a failing CppUnit test wants a core dump with the place where an uncaught exception is thrown. So if the newly introduced CPPUNIT_PROPAGATE_EXCEPTIONS environment variable is set (to any value), disable all the protectors that would otherwise catch such exceptions (and just report some limited information about them). Change-Id: I3052f71c0787583c496279a6f5b35a0299c357b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143882 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-11-06tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macrojsala
Also change some range based for. Change-Id: I32c5cbe0033c40cde3f1fc86ec8af90e558f2652 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141666 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2022-11-03swmodeltestbase: remove duplicated codeXisco Fauli
parseExportStream is already in MacrosTest Change-Id: Ibde88b176db1521966b6877bda90e06c278c397d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142218 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-11Deduplicate O(U)StringConcatenationMike Kaganski
And use an overloaded helper function with a better (?) unified name to show that the result is not an O(U)String. Change-Id: I8956338b05d02bf46a6185828130ea8ef145d46b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141203 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-09-29split utl::TempFile into fast and named variantsNoel Grandin
which makes it easier to know what each variant requires to stay on it's happy path Change-Id: I3275a2543573367714bc78092e882f6535507285 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140469 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-29Verify signing certificate cryptographically before use in testsMike Kaganski
Documents signed using an invalid (e.g., not having a trusted root) certificate give signatures that obviously can't pass validity tests. Change-Id: Id4b097516e06c548ea42cad65d76bbd8a6853cc4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137620 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-07-29Better valid certificate check, consider filter dataMike Kaganski
Otherwise, testSignCertificateSubjectName that has an explicit certificate subject name requirement would fail when user has other valid certificates, but not this one. Change-Id: Ic3c440a8316314c922a53a51085a3e829f235f6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137593 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-04-29unotest: fix NSS initialization for CentOS7 system NSSMichael Stahl
When given an unprefixed path, CentOS7 system NSS 3.67 apparently ignores the nice unit test database and creates a legacy "dbm:" one in the same directory, which is of course empty. This causes: xmlsecurity/qa/unit/signing/signing.cxx:570:aaa_testODFX509CertificateChain::TestBody equality assertion failed - Expected: 0 - Actual : 1 The intermediate/root CA certificates are read from the signature and added with CERT_NewTempCertificate(), which then does a lookup in the database to find the trust flags of the certificate: 0 nssTrust_GetCERTCertTrustForCert () at pki3hack.c:610 1 fill_CERTCertificateFields () at pki3hack.c:819 2 stan_GetCERTCertificate () at pki3hack.c:926 3 STAN_GetCERTCertificate () at pki3hack.c:973 4 add_cert_to_cache () at tdcache.c:721 5 nssTrustDomain_AddCertsToCache () at tdcache.c:849 6 cert_createObject () at pkibase.c:1023 7 nssPKIObjectCollection_GetObjects () at pkibase.c:853 8 nssPKIObjectCollection_GetCertificates () at pkibase.c:1077 9 nssTrustDomain_FindCertificateByIssuerAndSerialNumber () at trustdomain.c:796 10 nssTrustDomain_FindCertificateByEncodedCertificate () at trustdomain.c:839 11 NSSTrustDomain_FindCertificateByEncodedCertificate () at trustdomain.c:852 12 CERT_NewTempCertificate () at stanpcertdb.c:366 13 __CERT_NewTempCertificate () at stanpcertdb.c:474 14 SecurityEnvironment_NssImpl::verifyCertificate() () at xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx:524 Change-Id: If334d056a9e13ad806e3ea1a03d395d606fd3d84 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133622 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-03-01Fix the test failing when invalid certificate is in cert storeMike Kaganski
testSigningMultipleTimes_ODT was failing for me locally because of an expired certificate present in my store. Change-Id: Ie3dfb9ee1a110259ba747a03fc28c205df2eea91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130743 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-02-28Fix the tests failing when invalid certificate is in cert storeMike Kaganski
Change-Id: I72055c814a11a76c4934610bcad9c24aae21164e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130690 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-03Fix --disable-scripting for DESKTOP buildJan-Marek Glogowski
Unfortunatly we cannot add --disable-scripting to sub_conf_defaults, because Java currently has no equivalent to the PYTHON_FOR_BUILD setting. Change-Id: I89938a17307a363f5de808200914940503312829 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126186 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-02PPTX export: handle theme colors from the doc model for shape textMiklos Vajna
As a start, do this only in case there are no effects used. If there is no theme color or there are effects, fall back to the old code. Also move parseExportStream() from SdModelTestBaseXML up to MacrosTest, so oox/ test code can use it as well. Change-Id: Ia76581dcef110341f6c3e60f22c34818ed0dcabc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126215 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-11-12Fix (mis-)uses of temporary O[U]StringLiteralStephan Bergmann
...as sub-expressions of ternary operators, which happened to keep compiling after 4b9e440c51be3e40326bc90c33ae69885bfb51e4 "Turn OStringLiteral into a consteval'ed, static-refcound rtl_String" and e6dfaf9f44f9939abc338c83b3024108431d0f69 "Turn OUStringLiteral into a consteval'ed, static-refcound rtl_uString" because both branches are of the same type O[U]StringLiteral<N>, and which didn't cause any issues because no dangling pointers to those temporary objects escaped the surrounding full expressions. This was found with an experimental build with VS 2022 with --enable-latest-c++, which would support HAVE_CPP_CONSTEVAL after some linking fix in the configure.ac detection code (which is forthcoming in a later commit) and flagged all these uses in ternary operators as error C7595 "call to immediate function is not a constant expression". That error looks bogus (and it also caused a false > sd/source/ui/unoidl/unoobj.cxx(742): error C7595: 'Color::Color': call to immediate function is not a constant expression so HAVE_CPP_CONSTEVAL will need to remain undefined for VS 2022 until that compiler bug is fixed), but it nicely found all these cases that should arguably be cleaned up. Change-Id: I81de94e8af5a6c50e5fe7dfa1a4b253e0c2a68f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125082 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-18xmlsecurity: fix new tests on WNTMichael Stahl
Tests added in commit 40d70d427edddb589eda64fafc2e56536953d274 don't actually run on WNT but that wasn't obvious because commit 149df1fec6472e30582162e17e04c75aee91d26a prevented running them in Jenkins on master, they failed only in the libreoffice-7-1 backport. xmlsecurity/qa/unit/signing/signing.cxx(631) : error : Assertion Test name: testODFDoubleX509Certificate::TestBody assertion failed - Expression: (nActual == SignatureState::NOTVALIDATED || nActual == SignatureState::OK) - 2 This is an oddity where NSS claims the signature in the document is valid but CryptoAPI claims it is invalid; the hashes passed into the validation functions are the same. Just allow BROKEN as an additional result value on WNT. xmlsecurity/qa/unit/signing/signing.cxx(550) : error : Assertion Test name: testODFX509CertificateChain::TestBody equality assertion failed - Expected: 0 - Actual : 1 The problem here is that with NSS the tests use a custom NSS database in test/signing-keys so we need to make these certificates available for CryptoAPI too. The following one-liner converts the NSS database to a PKCS#7 that can be loaded by CrytpAPI: > openssl crl2pkcs7 -nocrl -certfile <(certutil -d sql:test/signing-keys -L | awk '/^[^ ].*,[^ ]*,/ { printf "%s", $1; for (i = 2; i < NF; i++) { printf " %s", $i; } printf "\n"; }' | while read name; do certutil -L -d sql:test/signing-keys -a -n "${name}" ; done) > test/signing-keys/test.p7b Then one might naively assume that something like this would allow these certificates to be added temporarily as trusted CAs: + HCERTSTORE hRoot = CertOpenSystemStoreW( 0, L"Root" ) ; + HCERTSTORE const hExtra = CertOpenStore( + CERT_STORE_PROV_FILENAME_A, + PKCS_7_ASN_ENCODING | X509_ASN_ENCODING, + NULL, + CERT_STORE_OPEN_EXISTING_FLAG | CERT_STORE_READONLY_FLAG, + path); + if (hExtra != NULL && hRoot != NULL) + { + BOOL ret = CertAddStoreToCollection( + hRoot, + hExtra, + CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG, + 0); + SAL_DEBUG("XXX hExtra done " << ret); + } There is no error from this, but it doesn't work. Instead, check if CertGetCertificateChain() sets the CERT_TRUST_IS_UNTRUSTED_ROOT flag and then look up the certificate manually in the extra PKCS#7 store. Change-Id: Ic9865e0b5783211c2128ce0327c4583b7784ff62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123667 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-10-15test: upgrade test NSS database from dbm: to sql:Michael Stahl
Fedora nss-3.69.0-1.fc34.x86_64 and Debian libnss3:amd64 2:3.70-1 no longer support the old BerekelyDB databases, so convert them to the new SQLite format for the benefit of --with-system-nss builds. This worked to do the upgrade: > certutil -N -d sql:test/new --empty-password > LD_LIBRARY_PATH=instdir/program workdir/UnpackedTarball/nss/dist/out/bin/certutil --merge -d sql:test/new --source-dir dbm:test/signing-keys Builds would fail running tests added in commit 40d70d427edddb589eda64fafc2e56536953d274 signing.cxx:551:Assertion Test name: testODFX509CertificateChain::TestBody equality assertion failed - Expected: 0 - Actual : 1 Change-Id: I00aa20703e117ebf583c3331b84e966c2cfc78cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123586 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-10-03A more lightweight O[U]StringConcatenationStephan Bergmann
...compared to a full-blown O[U]String, for temporary objects holding an O[U]StringConcat result that can then be used as a std::[u16]string_view. It's instructive to see how some invocations of operator ==, operator !=, and O[U]StringBuffer::insert with an O[U]StringConcat argument required implicit materialization of an O[U]String temporary, and how that expensive operation has now been made explicit with the explicit O[U]StringConcatenation ctor. (The additional operator == and operator != overloads are necessary because the overloads taking two std::[u16]string_view parameters wouldn't even be found here with ADL. And the OUString-related ones would cause ambiguities in at least sal/qa/rtl/strings/test_oustring_stringliterals.cxx built with RTL_STRING_UNITTEST, so have simply been disabled for that special test-code case.) Change-Id: Id29799fa8da21a09ff9794cbc7cc9b366e6803b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122890 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-08-06make --disable-scripting compileCaolán McNamara
Change-Id: Ie2be232e062389b74408dd9f001b1cf4db7db7d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120123 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-07-21Avoid external processes picking up instdir/program/libnspr4.soStephan Bergmann
...which is a problem in ASan builds, as seen with a failing CppunitTest_sd_import_tests (among lots of other similarly failing tests): > Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-11-openjdk-11.0.11.0.9-5.fc34.x86_64/lib/libsystemconf.so: ~/lo/core/instdir/program/libnspr4.so: undefined symbol: __asan_option_detect_stack_use_after_return > at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method) > at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2442) > at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2498) > at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2694) > at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2648) > at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:830) > at java.base/java.lang.System.loadLibrary(System.java:1873) > at java.base/java.security.SystemConfigurator$1.run(SystemConfigurator.java:67) > at java.base/java.security.SystemConfigurator$1.run(SystemConfigurator.java:65) > at java.base/java.security.AccessController.doPrivileged(Native Method) > at java.base/java.security.SystemConfigurator.<clinit>(SystemConfigurator.java:65) > at java.base/java.security.Security.initialize(Security.java:208) > at java.base/java.security.Security$2.run(Security.java:93) > at java.base/java.security.Security$2.run(Security.java:91) > at java.base/java.security.AccessController.doPrivileged(Native Method) > at java.base/java.security.Security.<clinit>(Security.java:91) > at java.base/sun.security.jca.ProviderList.<init>(ProviderList.java:176) > at java.base/sun.security.jca.ProviderList$2.run(ProviderList.java:94) > at java.base/sun.security.jca.ProviderList$2.run(ProviderList.java:92) > at java.base/java.security.AccessController.doPrivileged(Native Method) > at java.base/sun.security.jca.ProviderList.fromSecurityProperties(ProviderList.java:91) > at java.base/sun.security.jca.Providers.<clinit>(Providers.java:54) > at java.base/java.security.SecureRandom.getDefaultPRNG(SecureRandom.java:264) > at java.base/java.security.SecureRandom.<init>(SecureRandom.java:219) > at java.base/java.util.UUID$Holder.<clinit>(UUID.java:101) > at java.base/java.util.UUID.randomUUID(UUID.java:147) > at org.probatron.officeotron.sessionstorage.Store.putZippedResource(Unknown Source) > at org.probatron.officeotron.CommandLineSubmission.<init>(Unknown Source) > at org.probatron.officeotron.Driver.main(Unknown Source) > warn:svl.items:1258842:1258842:svl/source/items/itempool.cxx:358: old secondary pool: EditEngineItemPool of pool: XOutdevItemPool must be empty. > ~/lo/core/test/source/bootstrapfixture.cxx:232:SdImportTest::testDocumentLayout > equality assertion failed > - Expected: 0 > - Actual : 256 > - failed to execute: sh ~/lo/core/bin/officeotron.sh ~/lo/tmp/SdImportTest__testDocumentLayout_16w8dw.tmp > ~/lo/tmp/SdImportTest__testDocumentLayout_16w8dy.tmp The solution reuses the arg-env bootstrap variable already used by test::OfficeConnection::setUp (unotest/source/cpp/officeconnection.cxx) and for that makes test::getArgumnet available outside Library_unotest. (For simplicity, it adds the relevant gb_CppunitTest_add_arguments calls unconditionally to the various *.mk files, even though the data is only used conditionally for non-_WIN32 in test::BootstrapFixture::validate in test/source/bootstrapfixture.cxx, at least for now.) Not sure what exactly started to cause this issue now for my ASan builds on Fedora 34. Change-Id: I7a4d6c0e36b94935442c6c91d5ee967fcad61763 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119317 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-04-21loplugin:stringadd replace OUStringLiteral temporaries with OUString::ConcatNoel Grandin
Change-Id: I656f06a74d9f0180ae460264563d6a935c7d2c60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114377 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-19Updated README.md filesHossein
* Updated README.md contents to fix various issues * Fixed source links by using [git:], processed by mkdocs scripts * Added README.md for ios, setup_native, unotest * Fixed issues with "underline" and "less than" sign Change-Id: I3e52a1d3372586c390ee6c42a2ef48bbabc81398 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114248 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-04-01Exclude tests based on device color depth, not RDPMike Kaganski
After 5c9ba1f47d00ed10960b59928befd68f6c020b15, the failures on Jenkins (see 21191d0d8953a3ca6eac6022c0a14a87fe9c5e2a) made it apparent that (at least some of) Jenkins builds also run in RDP sessions. Since the tests excluded in commit 9c6142ec26a0ba61b1cf58d1e6bf0b5376394bcd never failed in Jenkins builds before, it is wrong to exclude all those tests in all RDP sessions: our CI would not test those on Windows. In the meanwhile, I discovered that the system that failed the tests actually had 16-bit color depth, despite RDP being configured to use 32-bit colors; that was the reason why the colors were modified on roundtrip. So it is better to test the actual problem to exclude tests. This reimplements the check that was introduced in commit 9c6142ec26a0ba61b1cf58d1e6bf0b5376394bcd to test default virtual device color depth. Change-Id: I329a3e2d8eca21732c77dcacf15394d1246b2e18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113460 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-31This should be a static methodMike Kaganski
Change-Id: I70b725d42a91151e0c1f2f1fedc4be18433a7cf4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113397 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-30Exclude some tests in Windows RDP sessionMike Kaganski
It seems that RDP may change (limit?) color space (even configured to use 32-bit colors), and then some tests start failing like this: Test name: BackendTest::testDrawAlphaBitmapMirrored equality assertion failed - Expected: c[80000000] - Actual : c[84000000] Debugging ImplDrawBitmap in vcl/win/gdi/gdiimpl.cxx, and adding a call to GetPixel immediately after the call to StretchDIBits, shows that the resulting color on the device is different from the color in the bitmap data: e.g., for original color {128, 0, 0} the result is {132, 0, 0}. Calling GetColorAdjustment shows that there's no color adjustments set for the device, so I can't detect or modify the behavior this way. So just disable the tests for now when running in RDP sessions. Change-Id: Ie89d07f18f53e56bed6f7fa58432b8575b4d9f12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113388 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-23tdf#124176 Use pragma once in u*Vincent LE GARREC
ucb, uno*, uui Change-Id: Ic4b6d541eb0df8bf7bceddf178ebb5177ad2b87b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112046 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2020-12-29loplugin:stringviewparam: operator +Stephan Bergmann
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-18throw exception in SvStream when reading past end of fileNoel
to avoid chasing weird problems where we read past the end of file, which leads to random data in the variable we read into. I expect a couple of possible regressions from this change (1) memory leaks caused by non-exception-safe memory handling. Of which there should not be much because we're pretty good about using smart pointer classes these days. (2) Broken files which used to load, will no longer do so. These will have to be debugged by putting a breakpoint on the SvStreamEOFException constructor, and examining the backtrace to see where we should be catching and ignoring the exception to make the code continue to handle such broken files. Change-Id: I351be031bb083a3484a9a1b650a58892700e6fb7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105936 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-11Adapt the remaining OUString functions to std string_viewStephan Bergmann
...for LIBO_INTERNAL_ONLY. These had been missed by 1b43cceaea2084a0489db68cd0113508f34b6643 "Make many OUString functions take std::u16string_view parameters" because they did not match the multi-overload pattern that was addressed there, but they nevertheless benefit from being changed just as well (witness e.g. the various resulting changes from copy() to subView()). This showed a conversion from OStringChar to std::string_view to be missing (while the corresponding conversion form OUStringChar to std::u16string_view was already present). The improvement to loplugin:stringadd became necessary to fix > [CPT] compilerplugins/clang/test/stringadd.cxx > error: 'error' diagnostics expected but not seen: > File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 43 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:42): simplify by merging with the preceding assignment [loplugin:stringadd] > File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 61 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:60): simplify by merging with the preceding assignment [loplugin:stringadd] > 2 errors generated. Change-Id: Ie40de0616a66e60e289c1af0ca60aed6f9ecc279 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107602 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-18tdf#123936 Formatting files in module unotest with clang-formatPhilipp Hofer
Change-Id: Ic67aedc492e3382eeea92f5bda0b4e7ab7e2857c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105725 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2020-10-29python test shutdown robustnessNoel
so when a test fails, we don't get spurious additional stacktraces Change-Id: Id2885be9ca628fc25a55f90f6c5c1b50f887a37a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104928 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-11Fix the minimal build-tools targetJan-Marek Glogowski
The revert commits change the build-tools target for a DESKTOP build to build the complete LO. This restores the original, minimal one and also adds a whitelist of allowd build types. OpenCL needs a configure switch, as it's status is also stored in a config header, so preventing the build is not enough. This also reverts: - commit 802161a505272732566210e9ebbd8fe1b23fb86d - commit 02d931a59e2966d0c2736db8dee7be3e3dcd6bae Change-Id: Ibfcb0c54e72da1b7c2e63c082ea6586520a787fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102480 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2020-08-11loplugin:flattenNoel Grandin
Change-Id: I6560756eb63856a22b43e3e65a7b7843cd2d5376 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100447 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-19Move data for signing tests to test/Miklos Vajna
This was duplicated under xmlsecurity and made it hard to have test code outside xmlsecurity, even if the core of the pdf signing is nowadays under svl/. Change-Id: If5ce8269bb72f503263727d8255fe856742dfa60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96745 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-05-06Move all public Java classes to libreoffice.jarSamuel Mehrbrodt
This moves the classes from juh.jar and ridl.jar to libreoffice.jar The goal is to have one single jar (and Java module, will be added later) which developers can include to work with LO. juh.jar and ridl.jar are kept as basically empty jars with libreoffice.jar on its classpath to keep backwards compatibility. This is a continuation of ae855bf48163ff64d94cfc34aff8e37abdb5518d and a preparation to have Java 9 module support. Change-Id: Ifbbfb97f60373d14256e62ae3122913bd17d5bbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91930 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-04-09pyuno,*: kill Python 2 support with fireMichael Stahl
Python 2 support was retained for use with --enable-python=system on RHEL7 and SLES. The time has arrived to remove it. Some .py files that were imported from third parties are not changed to enable easier replacement with updated versions if necessary. solenv/gdb should continue to support Python 2. bin/get-bugzilla-attachments-by-mimetype requires Python 2 to access Launchpad. Change-Id: I26414ae8e9f8402c90336af82020135685694217 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91697 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-02-06Fix mis-mergeStephan Bergmann
d4b1d9b75572fdcc55a925254943a3cf29354f98 "sb123: #i111655# when, within build env, calling javaldx within OOo installation sets, set UNO_JAVA_JFW_ENV_JREHOME, but not UNO_JAVA_JFW_ENV_CLASSPATH" had removed the -env:UNO_JAVA_JFW_ENV_CLASSPATH=true arg, but 8c59580b88a33d7f0c892c9c53776716ad661fcf "Merge commit 'ooo/DEV300_m101' into integration/dev300_m101", in what looks like an accidental mis-merge, brought it back Change-Id: If2313642a1a737c9711fb36dcab5c340bf7dcecb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88133 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-02-04tdf#117331 Merge jurt and unoil into ridlSamuel Mehrbrodt
jurt.jar and unoil.jar are kept as effectively empty jars, each with a Class-Path: ridl.jar in their meta-inf/manifest.mf, so that 3rd-party code loading them (with or without also loading ridl.jar) will still have access to their content. Conceptually, the UNOIDL entities in unoil.jar (corresponding to module offapi) are not part of the URE, but are now made available by URE's ridl.jar. This should probably not cause problems in practice. At least for now, we seal exactly those packages in ridl.jar that were originally sealed in jurt.jar. Ideally, all of ridl.jar could be sealed now, but that would be mildly incompatible, as it would prevent 3rd-party code from introducing additional UNOIDL entities in the relevant namespaces (even if that is something we do not want 3rd-party code to do anyway). However, some JunitTest_jurt_* define classes in those sealed packages. In the past they got away with that by using gb_JunitTest_use_jar_classset,*,jurt. Instead they now need to gb_JunitTest_use_jar_classset,*,ridl and drop the gb_JunitTest_use_jar,*,ridl. But the former only makes available the classes that are specified in ridljar/Jar_ridl.mk with gb_Jar_add_sourcefiles, not the UNOIDL entities specified via gb_Jar_add_packagedirs. But the tests need the udkapi UNOIDL entities, so introduce gb_JunitTest_add_classpath to let the tests get them explicitly. (Curiously, JunitTest_jurt_uno and JnitTest_jurt_util use gb_JunitTest_use_jar_classset,*,jurt but don't seem to acutally need it; lets leave that for a follow-up clean up.) As a follow-up clean up, relevant files could be moved from jurt/ to ridljar/. Change-Id: I836f4e7bb47fb41f1306e3f223da90dba988eb9a Co-authored-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/84946 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-02-03tdf#42949 Fix IWYU warnings in unotest/Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ia33a10041f2411361cc849241d51b614754cda00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87310 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-31clang-tidy modernize-concat-nested-namespaceNoel Grandin
Change-Id: Iab35a8b85b3ba1df791c774f40b037f9420a071a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86708 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-17Clean up duplicated command dispatch test functionalityMiklos Vajna
Used in both Writer and Calc at 5 different places, so host it in unotest/. Change-Id: I013e6df471deb8693cf4ae62f0958b12e16fda7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86972 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-12-29Avoid crash in shutdown when accessing already destroyed BASIC_DLLMike Kaganski
... in ImplRepository::~ImplRepository. Running on Windows: make UITest_manual_tests UITEST_TEST_NAME=calc.ManualCalcTests.test_cell_recalc fails: ... Execution time for calc.ManualCalcTests.test_cell_recalc: 8.876 tearDown: calling terminate()... ...done ERROR ====================================================================== ERROR: test_cell_recalc (calc.ManualCalcTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\lo\src\core\uitest\uitest\framework.py", line 46, in tearDown self.connection.tearDown() File "C:\lo\src\core\uitest\libreoffice\connection.py", line 178, in tearDown self.connection.tearDown() File "C:\lo\src\core\uitest\libreoffice\connection.py", line 138, in tearDown raise Exception("Exit status indicates failure: " + str(ret)) Exception: Exit status indicates failure: 3221225477 ---------------------------------------------------------------------- Ran 1 test in 131.616s FAILED (errors=1) Tests run: 1 Tests failed: 0 Tests errors: 1 Tests skipped: 0 The call stack at the point of failure is sblo.dll!std::unique_ptr<SbxAppData,std::default_delete<SbxAppData>>::operator*() Line 1886 sblo.dll!GetSbxData_Impl() Line 110 sblo.dll!SbxBase::RemoveFactory(const SbxFactory * pFac) Line 122 sblo.dll!StarBASIC::~StarBASIC() Line 964 sblo.dll!StarBASIC::`vbase destructor'() sblo.dll!StarBASIC::`vector deleting destructor'(unsigned int) tllo.dll!SvRefBase::ReleaseRef() Line 163 sblo.dll!tools::SvRef<StarBASIC>::~SvRef<StarBASIC>() Line 56 sblo.dll!BasicLibInfo::~BasicLibInfo() sblo.dll!BasicLibInfo::`scalar deleting destructor'(unsigned int) sblo.dll!std::default_delete<BasicLibInfo>::operator()(BasicLibInfo * _Ptr) Line 1765 sblo.dll!std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>>::~unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>>() Line 1875 sblo.dll!std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>>::`scalar deleting destructor'(unsigned int) sblo.dll!std::_Default_allocator_traits<std::allocator<std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>>>>::destroy<std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>>>(std::allocator<std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>>> & __formal, std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>> * const _Ptr) Line 677 sblo.dll!std::_Destroy_range<std::allocator<std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>>>>(std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>> * _First, std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>> * const _Last, std::allocator<std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>>> & _Al) Line 951 sblo.dll!std::vector<std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>>,std::allocator<std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>>>>::_Destroy(std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>> * _First, std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>> * _Last) Line 1616 sblo.dll!std::vector<std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>>,std::allocator<std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>>>>::_Tidy() Line 1698 sblo.dll!std::vector<std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>>,std::allocator<std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>>>>::~vector<std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>>,std::allocator<std::unique_ptr<BasicLibInfo,std::default_delete<BasicLibInfo>>>>() Line 674 sblo.dll!BasicManagerImpl::~BasicManagerImpl() sblo.dll!BasicManagerImpl::`scalar deleting destructor'(unsigned int) sblo.dll!std::default_delete<BasicManagerImpl>::operator()(BasicManagerImpl * _Ptr) Line 1765 sblo.dll!std::unique_ptr<BasicManagerImpl,std::default_delete<BasicManagerImpl>>::~unique_ptr<BasicManagerImpl,std::default_delete<BasicManagerImpl>>() Line 1875 sblo.dll!BasicManager::~BasicManager() Line 824 sblo.dll!BasicManager::`vector deleting destructor'(unsigned int) sblo.dll!std::default_delete<BasicManager>::operator()(BasicManager * _Ptr) Line 1765 sblo.dll!std::unique_ptr<BasicManager,std::default_delete<BasicManager>>::~unique_ptr<BasicManager,std::default_delete<BasicManager>>() Line 1875 sblo.dll!std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>::~pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>() sblo.dll!std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>::`scalar deleting destructor'(unsigned int) sblo.dll!std::_Default_allocator_traits<std::allocator<std::_Tree_node<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>,void *>>>::destroy<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>>(std::allocator<std::_Tree_node<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>,void *>> & __formal, std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>> * const _Ptr) Line 677 sblo.dll!std::_Tree_node<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>,void *>::_Freenode<std::allocator<std::_Tree_node<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>,void *>>>(std::allocator<std::_Tree_node<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>,void *>> & _Al, std::_Tree_node<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>,void *> * _Ptr) Line 379 sblo.dll!std::_Tree<std::_Tmap_traits<com::sun::star::uno::Reference<com::sun::star::uno::XInterface>,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>,std::less<com::sun::star::uno::Reference<com::sun::star::uno::XInterface>>,std::allocator<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>>,0>>::_Erase_unchecked(std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>>>,std::_Iterator_base0> _Where) Line 1389 sblo.dll!std::_Tree<std::_Tmap_traits<com::sun::star::uno::Reference<com::sun::star::uno::XInterface>,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>,std::less<com::sun::star::uno::Reference<com::sun::star::uno::XInterface>>,std::allocator<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>>,0>>::erase<std::_Tree_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>>>>,void>(std::_Tree_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>>>> _Where) Line 1417 sblo.dll!basic::ImplRepository::Notify(SfxBroadcaster & _rBC, const SfxHint & _rHint) Line 580 svllo.dll!SfxBroadcaster::Broadcast(const SfxHint & rHint) Line 50 sblo.dll!BasicManager::~BasicManager() Line 823 sblo.dll!BasicManager::`vector deleting destructor'(unsigned int) sblo.dll!std::default_delete<BasicManager>::operator()(BasicManager * _Ptr) Line 1765 sblo.dll!std::unique_ptr<BasicManager,std::default_delete<BasicManager>>::~unique_ptr<BasicManager,std::default_delete<BasicManager>>() Line 1875 sblo.dll!std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>::~pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>() sblo.dll!std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>::`scalar deleting destructor'(unsigned int) sblo.dll!std::_Default_allocator_traits<std::allocator<std::_Tree_node<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>,void *>>>::destroy<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>>(std::allocator<std::_Tree_node<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>,void *>> & __formal, std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>> * const _Ptr) Line 677 sblo.dll!std::_Tree_node<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>,void *>::_Freenode<std::allocator<std::_Tree_node<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>,void *>>>(std::allocator<std::_Tree_node<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>,void *>> & _Al, std::_Tree_node<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>,void *> * _Ptr) Line 379 sblo.dll!std::_Tree_val<std::_Tree_simple_types<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>>>::_Erase_tree<std::allocator<std::_Tree_node<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>,void *>>>(std::allocator<std::_Tree_node<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>,void *>> & _Al, std::_Tree_node<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>,void *> * _Rootnode) Line 745 sblo.dll!std::_Tree_val<std::_Tree_simple_types<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>>>::_Erase_head<std::allocator<std::_Tree_node<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>,void *>>>(std::allocator<std::_Tree_node<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>,void *>> & _Al) Line 753 sblo.dll!std::_Tree<std::_Tmap_traits<com::sun::star::uno::Reference<com::sun::star::uno::XInterface>,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>,std::less<com::sun::star::uno::Reference<com::sun::star::uno::XInterface>>,std::allocator<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>>,0>>::~_Tree<std::_Tmap_traits<com::sun::star::uno::Reference<com::sun::star::uno::XInterface>,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>,std::less<com::sun::star::uno::Reference<com::sun::star::uno::XInterface>>,std::allocator<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>>,0>>() Line 1191 sblo.dll!std::map<com::sun::star::uno::Reference<com::sun::star::uno::XInterface>,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>,std::less<com::sun::star::uno::Reference<com::sun::star::uno::XInterface>>,std::allocator<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>>>::~map<com::sun::star::uno::Reference<com::sun::star::uno::XInterface>,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>,std::less<com::sun::star::uno::Reference<com::sun::star::uno::XInterface>>,std::allocator<std::pair<com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const ,std::unique_ptr<BasicManager,std::default_delete<BasicManager>>>>>() sblo.dll!basic::ImplRepository::~ImplRepository() sblo.dll!`basic::ImplRepository::Instance'::`2'::`dynamic atexit destructor for 'repository''() ucrtbased.dll!_execute_onexit_table::__l2::<lambda>() Line 206 ucrtbased.dll!__crt_seh_guarded_call<int>::operator()<void <lambda>(void),int <lambda>(void) &,void <lambda>(void)>(__acrt_lock_and_call::__l2::void <lambda>(void) && setup, _execute_onexit_table::__l2::int <lambda>(void) & action, __acrt_lock_and_call::__l2::void <lambda>(void) && cleanup) Line 204 ucrtbased.dll!__acrt_lock_and_call<int <lambda>(void)>(const __acrt_lock_id lock_id, _execute_onexit_table::__l2::int <lambda>(void) && action) Line 975 ucrtbased.dll!_execute_onexit_table(_onexit_table_t * table) Line 231 sblo.dll!__scrt_dllmain_uninitialize_c() Line 399 sblo.dll!dllmain_crt_process_detach(const bool is_terminating) Line 182 sblo.dll!dllmain_crt_dispatch(HINSTANCE__ * const instance, const unsigned long reason, void * const reserved) Line 220 sblo.dll!dllmain_dispatch(HINSTANCE__ * const instance, const unsigned long reason, void * const reserved) Line 293 sblo.dll!_DllMainCRTStartup(HINSTANCE__ * const instance, const unsigned long reason, void * const reserved) Line 335 ntdll.dll!LdrpCallInitRoutine() ntdll.dll!LdrShutdownProcess() ntdll.dll!RtlExitUserProcess() kernel32.dll!ExitProcessImplementation() ucrtbased.dll!exit_or_terminate_process(const unsigned int return_code) Line 144 ucrtbased.dll!common_exit(const int return_code, const _crt_exit_cleanup_mode cleanup_mode, const _crt_exit_return_mode return_mode) Line 282 ucrtbased.dll!exit(int return_code) Line 294 soffice.bin!__scrt_common_main_seh() Line 297 soffice.bin!__scrt_common_main() Line 331 soffice.bin!mainCRTStartup() Line 17 kernel32.dll!BaseThreadInitThunk() ntdll.dll!RtlUserThreadStart() Two problems here: 1. Deleting a function-local static ImplRepository object happens after BASIC_DLL destruction either in SfxApplication::~SfxApplication or in MacroSnippet::~MacroSnippet, so BasicManager dtor indirectly trying to access BASIC_DLL segfaults. 2. Implicit clearing of m_aStore in ImplRepository dtor calls dtors of owned BasicManager objects, which in turn notify parent ImplRepository, which again deletes the objects. This change limits lifetime of ImplRepository object with SbxAppData in BASIC_DLL, and avoids "owned BasicManager is deleting" notifications in its dtor. In dbaccess_complex test, ODatabaseContext accesses ImplRepository instance independently of SfxAppData_Impl lifetime: the latter is created before the former is created (and accesses ImplRepository instance first time), and destroyed before the former is destroyed (and accesses ImplRepository last time). So BASIC_DLL lifetime made ref-counted, to allow correct sharing of common instance between objects with independent lifetime. See also commit 3ebf6a090b227c0097ff8668fe023e7bdbdadc5d. Change-Id: I2ca36a87ddaf669557b3c3c7678e3d74aae66cce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85892 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-10-02WTF "WTF 255 return value?"Stephan Bergmann
0e68bac85293e2d60fa6db3e46de8b74ab5d502b "set up python unit test infrastructure" had introduced unotest/source/python/org/libreoffice/unotest.py with the comment and commented-out code. It claims it has extraced "boostraping code from convwatch.py to unotest.py", but I can't find a trace in the git history of a prior incarnation of that comment and commented-out code. It is unclear what problem exactly the commenting-out of the check was supposed to address. So put the check in place and see what, if anything, breaks. (The commented-out return appears to be truly unnecessary, and has been removed completely.) Change-Id: Ie2108d70fbe076cd0832bd23bfb29fc60eedffef Reviewed-on: https://gerrit.libreoffice.org/80029 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-09-19Improve test output a bitStephan Bergmann
Change-Id: Id10d8243ce0b8f1d1c44ebc56ba7f62e2bda7803 Reviewed-on: https://gerrit.libreoffice.org/79114 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-09-06Fixing "...."Andrea Gelmini
Change-Id: I3424e17cfdfb563fdc5882942031deafae8689fe Reviewed-on: https://gerrit.libreoffice.org/78678 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-12Fix typosAndrea Gelmini
Change-Id: I151508c5d0b5d010f55d2324d36659ab5715a70c Reviewed-on: https://gerrit.libreoffice.org/77274 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-21loplugin:referencecasting in unotools..uuiNoel Grandin
Change-Id: Ia2c991591e65deb00710ab7a5b73bc42ae6b1b46 Reviewed-on: https://gerrit.libreoffice.org/76031 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-10an is used before a vowel soundCaolán McNamara
not before vowels with a consonant sound so its a url not an url Change-Id: Ic27ff3bee67469284d460c31ced6f63cb3633db2 Reviewed-on: https://gerrit.libreoffice.org/72062 Reviewed-by: Jens Carl <j.carl43@gmx.de> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-08tdf#42949 Fix IWYU warnings in include/comphelper/[m-z]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I04c5ba277d5b3398c07de6ae66713d977636088d Reviewed-on: https://gerrit.libreoffice.org/61347 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>