summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2020-03-14tdf#130975 replace `rtl::math::isNan` with `std::isnan`.Yukio Siraichi1-1/+1
Change-Id: I5d53e6369d35093445b2efd8936bbf8c6775ff47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90451 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-03-13Revert "loplugin:constfields in sw"Noel Grandin1-2/+2
This reverts commit 4969f4c0d3e2581aaa8a5b5a5769840fa6b6f8ea. Change-Id: I527e9366b05e8a20633720e334395b285991c524 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90473 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-05Fix typoAndrea Gelmini1-3/+3
Change-Id: Id1adbd647f8be20fa3ccd4d07b879885e56ea776 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89958 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-03-03test: log the validator cmdlineMiklos Vajna1-0/+1
The validator cmdline is fairly nontrivial, log it so that in case it fails, one can invoke it manually without having to hunt down the string in a debugger. Change-Id: Id18c6d67f1b3b78da31e8be8c60f703623b80309 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89875 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-03-03remove some dead codeNoel Grandin1-65/+0
GpgComponentFactory is unused since: commit 06d7dbb3568889aa50f46d6307a39fa53a17313b Date: Sun May 21 14:28:57 2017 +0200 gpg4libre: share static xmlsec lib between nss and gpg tableautoformatfield.cxx should have been removed in: commit 5990beed9aba690ea9487e2c4a64615b7504a0a1 Date: Fri Aug 29 16:37:43 2014 +0200 Dead code xmlRow is unused since initial import Change-Id: Ief186e9ef46238cc8cdb49f4adde52a45a98cbc4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89830 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-27convert AnimationImport to fast-parser APIsNoel Grandin1-0/+2
And... (*) space out the namespace constant values so I dont keep forgetting and making them overlap. (*) Remove CreateDocumentContext from SvXMLImport since it is now unused. Change-Id: I30f54bfc1389e91b18e4fee8b83e1b297419899b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88938 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-10cppcheck: redundantInitialization in XSheetCondition::testGetSetOperator()Muhammet Kara1-1/+1
Change-Id: I0895478ec5bbb69cc8a7d88d848755aeabe7b51d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88350 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-02-07test: move component context from subclasses to BootstrapFixtureMiklos Vajna1-0/+2
To avoid duplication. Change-Id: I0ee7c26d5d55bd868ead04c77e7f4ef2582f90e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88138 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-03make some headers privateCaolán McNamara4-3/+30
as shown with ./bin/find-headers-to-move-inside-modules.py Change-Id: I7662417e76fe00c0fc352957560e104b6c2a3d61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87850 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-31clang-tidy modernize-concat-nested-namespaceNoel Grandin3-24/+6
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-28New loplugin:unsignedcompareStephan Bergmann1-1/+2
"Find explicit casts from signed to unsigned integer in comparison against unsigned integer, where the cast is presumably used to avoid warnings about signed vs. unsigned comparisons, and could thus be replaced with o3tl::make_unsigned for clairty." (compilerplugins/clang/unsignedcompare.cxx) o3tl::make_unsigned requires its argument to be non-negative, and there is a chance that some original code like static_cast<sal_uInt32>(n) >= c used the explicit cast to actually force a (potentially negative) value of sal_Int32 to be interpreted as an unsigned sal_uInt32, rather than using the cast to avoid a false "signed vs. unsigned comparison" warning in a case where n is known to be non-negative. It appears that restricting this plugin to non- equality comparisons (<, >, <=, >=) and excluding equality comparisons (==, !=) is a useful heuristic to avoid such false positives. The only remainging false positive I found was 0288c8ffecff4956a52b9147d441979941e8b87f "Rephrase cast from sal_Int32 to sal_uInt32". But which of course does not mean that there were no further false positivies that I missed. So this commit may accidentally introduce some false hits of the assert in o3tl::make_unsigned. At least, it passed a full (Linux ASan+UBSan --enable-dbgutil) `make check && make screenshot`. It is by design that o3tl::make_unsigned only accepts signed integer parameter types (and is not defined as a nop for unsigned ones), to avoid unnecessary uses which would in general be suspicious. But the STATIC_ARRAY_SELECT macro in include/oox/helper/helper.hxx is used with both signed and unsigned types, so needs a little oox::detail::make_unsigned helper function for now. (The ultimate fix being to get rid of the macro in the first place.) Change-Id: Ia4adc9f44c70ad1dfd608784cac39ee922c32175 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87556 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-25tdf#124176: Use pragma once instead of include guardEfdal İncesu1-4/+1
Change-Id: Ic525a57880067fc589346b87237c08fae4644ac5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87403 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2019-12-23sal_Char->char in test..testtoolsNoel Grandin1-2/+2
Change-Id: I060d5fc9124dc46b57400d108a889e4c879b5e8c Reviewed-on: https://gerrit.libreoffice.org/85731 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-23XStyleLoader::loadStylesFromURL Allow loading from streamSamuel Mehrbrodt1-0/+30
Change-Id: Iab0c301096118203466dd91c724c25f1283a0488 Reviewed-on: https://gerrit.libreoffice.org/85392 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-12-20sidebarwrap is conforming nowCaolán McNamara1-1/+0
Change-Id: Idca7964555a3ede2842473ec47752095d612bff2 Reviewed-on: https://gerrit.libreoffice.org/85576 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-12-20remove unused sidebarpage.uiCaolán McNamara1-1/+0
since... commit 292560a957498bed70b625c992ec6bcf631dceb3 Date: Mon Oct 17 13:23:23 2016 +0200 loplugin:unusedmethods Change-Id: I3a954cbeef459195247d22e17d2a0377f516f307 Reviewed-on: https://gerrit.libreoffice.org/85575 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-12-19these .ui no longer need special handlingCaolán McNamara1-8/+1
Change-Id: I1b112ea6780ff5da2b8aa86f8039b47e98219f08 Reviewed-on: https://gerrit.libreoffice.org/85407 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-12-19tdf#42949 Fix IWYU warnings in test/Gabor Kelemen163-284/+233
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Id1ee9b6d44315443d023bdfbf9ae8e5aa2158ab2 Reviewed-on: https://gerrit.libreoffice.org/85171 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-12-06Test results across all imported and inserted sheets.Eike Rathke1-0/+54
Change-Id: I573467a962a2835765cc5672b81cce4c7772ddff Reviewed-on: https://gerrit.libreoffice.org/84669 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2019-12-06Swap expected and actual valuesEike Rathke1-8/+8
in CPPUNIT_ASSERT... the first parameter is the expected value and the second the actual value. Passing them swapped is confusing if the test is failing. Change-Id: I06f8f345d52c3743d10441aae6d8c943f9b49b41 Reviewed-on: https://gerrit.libreoffice.org/84635 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2019-12-06Use correct destination sheet instead of arbitrary leftover of expected nameEike Rathke1-2/+2
Tests are executed in sequence, inserting a sheet with each importSheetToCopy(), ended up with 'SheetToCopy_4' as the first sheet (last sheet inserted), but obtained "destination" values from sheet 'SheetToCopy' (the first sheet inserted) whatever may have happened to its references during the previous tests or by inserting more sheets in front of it. Instead of obtaining the destination sheet by name 'SheetToCopy', obtain it by index 0 where it was inserted We could also remove the inserted sheet after each test, but likely a cleaner approach would be to setup a fresh document to be inserted into for each test to avoid any side effects like names already being present from a previous insertion. Change-Id: I38f35ccac7d656026b6fec8d3c5faa68d6f4a642 Reviewed-on: https://gerrit.libreoffice.org/84631 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2019-12-03Silence false -Werror=maybe-uninitializedStephan Bergmann3-14/+14
...where success of >>= has already been checked with CPPUNIT_ASSERT Change-Id: I9aa553749988b6b2e26d9a5ac5b376cc5997aba7 Reviewed-on: https://gerrit.libreoffice.org/84335 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-22Extend loplugin:external to warn about classesStephan Bergmann5-0/+14
...following up on 314f15bff08b76bf96acf99141776ef64d2f1355 "Extend loplugin:external to warn about enums". Cases where free functions were moved into an unnamed namespace along with a class, to not break ADL, are in: filter/source/svg/svgexport.cxx sc/source/filter/excel/xelink.cxx sc/source/filter/excel/xilink.cxx svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx All other free functions mentioning moved classes appear to be harmless and not give rise to (silent, even) ADL breakage. (One remaining TODO in compilerplugins/clang/external.cxx is that derived classes are not covered by computeAffectedTypes, even though they could also be affected by ADL-breakage--- but don't seem to be in any acutal case across the code base.) For friend declarations using elaborate type specifiers, like class C1 {}; class C2 { friend class C1; }; * If C2 (but not C1) is moved into an unnamed namespace, the friend declaration must be changed to not use an elaborate type specifier (i.e., "friend C1;"; see C++17 [namespace.memdef]/3: "If the name in a friend declaration is neither qualified nor a template-id and the declaration is a function or an elaborated-type-specifier, the lookup to determine whether the entity has been previously declared shall not consider any scopes outside the innermost enclosing namespace.") * If C1 (but not C2) is moved into an unnamed namespace, the friend declaration must be changed too, see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71882> "elaborated-type-specifier friend not looked up in unnamed namespace". Apart from that, to keep changes simple and mostly mechanical (which should help avoid regressions), out-of-line definitions of class members have been left in the enclosing (named) namespace. But explicit specializations of class templates had to be moved into the unnamed namespace to appease <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92598> "explicit specialization of template from unnamed namespace using unqualified-id in enclosing namespace". Also, accompanying declarations (of e.g. typedefs or static variables) that could arguably be moved into the unnamed namespace too have been left alone. And in some cases, mention of affected types in blacklists in other loplugins needed to be adapted. And sc/qa/unit/mark_test.cxx uses a hack of including other .cxx, one of which is sc/source/core/data/segmenttree.cxx where e.g. ScFlatUInt16SegmentsImpl is not moved into an unnamed namespace (because it is declared in sc/inc/segmenttree.hxx), but its base ScFlatSegmentsImpl is. GCC warns about such combinations with enabled-by-default -Wsubobject-linkage, but "The compiler doesn’t give this warning for types defined in the main .C file, as those are unlikely to have multiple definitions." (<https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/Warning-Options.html>) The warned-about classes also don't have multiple definitions in the given test, so disable the warning when including the .cxx. Change-Id: Ib694094c0d8168be68f8fe90dfd0acbb66a3f1e4 Reviewed-on: https://gerrit.libreoffice.org/83239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-17Rename OUStringLiteral1 to OUStringCharStephan Bergmann1-1/+1
It started out as a wrapper around character literals, but has by now become a wrapper around arbitrary single characters. Besides updating the documentation, this change is a mechanical for i in $(git grep -Fl OUStringLiteral1); do sed -i -e s/OUStringLiteral1/OUStringChar/g "$i"; done Change-Id: I1b9eaa4b3fbc9025ce4a4bffea3db1c16188b76f Reviewed-on: https://gerrit.libreoffice.org/80892 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-15new loplugin:bufferaddNoel Grandin1-4/+4
look for OUStringBuffer append sequences that can be turned into creating an OUString with + operations Change-Id: Ica840dc096000307b4a105fb4d9ec7588a15ade6 Reviewed-on: https://gerrit.libreoffice.org/80809 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-14use common PCH for more librariesLuboš Luňák1-0/+2
Change-Id: I53164be413426691025a63cfba731cf5f9d1b7f8 Reviewed-on: https://gerrit.libreoffice.org/80790 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-10-14loplugin:stringadd look for unnecessary temporariesNoel Grandin2-14/+15
which defeat the *StringConcat optimisation. Also make StringConcat conversions treat a nullptr as an empty string, to match the O*String(char*) constructors. Change-Id: If45f5b4b6a535c97bfeeacd9ec472a7603a52e5b Reviewed-on: https://gerrit.libreoffice.org/80724 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-11simplify "a = a +" to "a +="Noel Grandin1-2/+1
mostly so that my stringadd loplugin can point out places to improve Change-Id: I9920ee1c99cdb6b811ba67ff9d8e32aa261884b5 Reviewed-on: https://gerrit.libreoffice.org/80618 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-10support screenshotting .ui files with GtkBuilderCaolán McNamara1-51/+55
so... SAL_USE_VCLPLUGIN=gtk3 make screenshot for the "unknown dialog" cases of make screenshot, which loads .ui files and tries to render them, will render them with the native gtk infrastructure Change-Id: Ifc8fe264155887c4d01b7ce0e2aa53e12acbfcb0 Reviewed-on: https://gerrit.libreoffice.org/80545 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-09log output filenameCaolán McNamara1-0/+1
Change-Id: Ib6c0045edb5d4a5d86c40f354dc99ab2fb693ca4 Reviewed-on: https://gerrit.libreoffice.org/80534 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-08implement gtk dialog screenshottingCaolán McNamara1-1/+4
Change-Id: If4e570f775bd1e29dfb75cb7e5dd9d9dfc35e654 Reviewed-on: https://gerrit.libreoffice.org/80416 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-09-23toggle default away from legacyCaolán McNamara1-5/+5
Change-Id: If89fec63d91f4d3df38a365a606036517e6b1c37 Reviewed-on: https://gerrit.libreoffice.org/79392 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-09-23fix make screenshotCaolán McNamara1-0/+1
Change-Id: Ic8724e149a2d1507810d19622e4c6e1b9be7907b Reviewed-on: https://gerrit.libreoffice.org/79389 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-09-10Fix typosAndrea Gelmini1-4/+4
Change-Id: I263a4348774051626f57547f3fdab00a18a92f75 Reviewed-on: https://gerrit.libreoffice.org/78792 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2019-08-24loplugin:returnconstval in test..writerfilterNoel Grandin1-1/+1
Change-Id: Iea7d15f0a54921514cc4b71c5dc8caaa2ee573c8 Reviewed-on: https://gerrit.libreoffice.org/78063 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-20loplugin:constvars in test..unotoolsNoel Grandin2-4/+4
Change-Id: I087dc53ca5c18893974bbd9d959de56d5a4cdfa0 Reviewed-on: https://gerrit.libreoffice.org/77827 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-15loplugin:sequenceloop in test..toolkitNoel Grandin7-10/+10
Change-Id: Ic8dad06c535b0af713bfe7cd46e601c8ea7ba6c7 Reviewed-on: https://gerrit.libreoffice.org/77531 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-12Fix typosAndrea Gelmini2-2/+2
Change-Id: Iedac37e0e056815e64294c70a233242df6dbf110 Reviewed-on: https://gerrit.libreoffice.org/77278 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-29loplugin:sequentialassignNoel Grandin1-3/+1
Change-Id: I56a9bf698b60bd278c71cc632aacef2bd2f4c13f Reviewed-on: https://gerrit.libreoffice.org/76501 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-28loplugin:oncevarNoel Grandin1-2/+1
Change-Id: I3c014f53607a849c743a2fd1aa47d03d5af978fb Reviewed-on: https://gerrit.libreoffice.org/76495 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-23tdf#42949 Fix IWYU warnings in include/testGabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. New IWYU and recent developments in f-u-i helped to identify some non self contained files, those were fixed too. Change-Id: I527f7c2cf2660a758b13eabb4c444ff79ae35f8c Reviewed-on: https://gerrit.libreoffice.org/75186 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-07-21loplugin:referencecasting in test..toolkitNoel Grandin1-2/+1
Change-Id: Ib1e6ba9c3849256b81fa5fa395e891226a044f7c Reviewed-on: https://gerrit.libreoffice.org/76029 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-20test: check validator exit code *after* checking validator outputMichael Stahl1-3/+3
ODF validator may now actually exit with non-0 since commit b14e2f6c63c18894286c99ee8dde9070e24b41c2 - look for validation errors in this case too. Change-Id: I36f4437c54d9a60afee0663a0b9be206773c5378 Reviewed-on: https://gerrit.libreoffice.org/75964 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2019-07-04cid#1448518: Resource leak (test/xmltesttools)Julien Nabet1-3/+16
Change-Id: I7894b65e2b20ce94d53a7ca04eb229347145686c Reviewed-on: https://gerrit.libreoffice.org/75097 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-04cid#1448515: Resource leak (test/xmltesttools)Julien Nabet1-0/+3
Change-Id: Ifadb599697fca738a41e4aad098edf4de32e174f Reviewed-on: https://gerrit.libreoffice.org/75096 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Jenkins
2019-07-01Simplify Sequence iterations in testArkadiy Illarionov6-35/+34
Use range-based loops or replace with STL functions Change-Id: I93efa86f49eb49dbdd3b7572dbd538bc300ded05 Reviewed-on: https://gerrit.libreoffice.org/74932 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
2019-06-25improve loplugin:simplifyconstructNoel Grandin2-4/+4
Change-Id: If863d28c6db470faa0d22273020888d4219e069e Reviewed-on: https://gerrit.libreoffice.org/74559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-19tdf#45904 Move XShape Java tests to C++Jens Carl2-0/+57
Move XShape Java tests to C++ for ScShapeObj. Change-Id: I349c4abb09c3e9e43285b63ee5f19f55d967b38f Reviewed-on: https://gerrit.libreoffice.org/74331 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-06-18tdf#45904 Move XGluePointsSupplier Java test to C++Jens Carl2-0/+33
Move XGluePointsSupplier Java test to C++ for ScShapeObj. Change-Id: I75babf46b664cccbb4d1df2af1764c3fa296903a Reviewed-on: https://gerrit.libreoffice.org/74140 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-06-17tdf#45904 Move XShapeDescriptor Java test to C++Jens Carl2-0/+31
Move XShapeDescriptor Java test to C++ for ScShapeObj. Change-Id: I2d530ea73c6f25e36665db0bd65f734e509d97a6 Reviewed-on: https://gerrit.libreoffice.org/74139 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>