Commit Graph
167 Commits
Author SHA1 Message Date
Noel Grandin aba5d639c4 fix leak in toolkit test
Change-Id: I6d3aa0fca6f48145c9c3b4e7d41a486fae026f06
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116099
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-25 14:11:08 +02:00
Stephan Bergmann 6b00d0576a Improve loplugin:cppunitassertequal for CPPUNIT_ASSERT(a && b)
...by re-enabling the code temporarily #if'ed-out in
a528392e71 "Fixed/improved
loplugin:cppunitassertequals" (and which then triggers lots of other
lopglugin:cppunitassertequal CPPUNIT_ASSERT -> CPPUNIT_ASSERT_EQUAL warnings).

For two css::uno::Reference equality comparisons in cppu/qa/test_any.cxx, it
was more straightforward to rewrite them with an explicit call to operator ==
(which silences loplugin:cppunitassertequal) than to adapt them to
CPPUNIT_ASSERT_EQUAL's requirement for arguments of identical types.

In sc/qa/unit/ucalc_pivottable.cxx, ScDPItemData needs toString, which has been
implemented trivially for now, but might want to combine that with the
DEBUG_PIVOT_TABLE-only ScDPItemData::Dump.

Change-Id: Iae6d09cf69bd4e52fe4411bba9e50c48e696291c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110546
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-08 09:15:01 +01:00
Andrea Gelmini 02caeb507c Fix typo in code
It passed "make check" on Linux

Change-Id: I9114b844b014d561464317ad6f54b54fe5a81d72
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103454
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-09-26 09:44:26 +02:00
Samuel Mehrbrodt fa0d576378 Fix 32bit linux build
Change-Id: I4faf3fb20c632163f98264d162bbf85f80b3603d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93797
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2020-05-11 08:34:20 +02:00
Samuel Mehrbrodt 4021fedf75 Test keeping element order in EventContainer
Change-Id: Ic33d8a83305f70bb3eb60f44da0d9ac0d2b47e16
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93570
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2020-05-07 08:43:03 +02:00
Stephan Bergmann 1be7a056ff Dispose dialog created during test
I experienced crashes during shutdown of CppunitTest_toolkit at least with
--enable-lto,

[...]
> OK (2)
> warn:vcl:109889:109889:vcl/source/app/svmain.cxx:460: DeInitVCL: some top Windows are still alive
> text = "" type = "N7toolkit16ScrollableDialogE", ptr = 0x216b740
>
> warn:fwk.desktop:109889:109889:framework/source/services/desktop.cxx:1065: Desktop disposed before terminating it
> warn:fwk.desktop:109889:109889:framework/source/services/desktop.cxx:179: Desktop not terminated before being destructed
> warn:unotools.config:109889:109889:unotools/source/config/configmgr.cxx:140: ConfigManager not empty
> cppunittester: /home/sbergman/lo2/core/include/vcl/vclptr.hxx:106: VclPtr<reference_type>::~VclPtr() [with reference_type = vcl::Window]: Assertion `m_rInnerRef.get() == nullptr || vclmain::isAlive()' failed.

Change-Id: I419b7ef8e23c94a906e3de6b3a55b63e13650abe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90790
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-03-20 17:18:43 +01:00
Gabor Kelemen bb16f6597d tdf#42949 Fix IWYU warnings in toolkit/
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: Ib49e2f29daa6d9b2a8195915c4ba10a8cef965ce
Reviewed-on: https://gerrit.libreoffice.org/78722
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-09-18 09:14:48 +02:00
Andrea Gelmini 718d9b5e70 Fix typos
Change-Id: I7fdeba2d7407989a00befaad1c186cd6f132cb85
Reviewed-on: https://gerrit.libreoffice.org/78827
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-09-12 14:38:29 +02:00
Andrea Gelmini abf17ce647 Fix typos
Change-Id: Iedac37e0e056815e64294c70a233242df6dbf110
Reviewed-on: https://gerrit.libreoffice.org/77278
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-12 11:26:20 +02:00
Noel Grandin bda438eced loplugin:referencecasting in test..toolkit
Change-Id: Ib1e6ba9c3849256b81fa5fa395e891226a044f7c
Reviewed-on: https://gerrit.libreoffice.org/76029
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-21 08:49:13 +02:00
Noel Grandin a361231b13 fix wrong SET/QUERY flags passed to uno::Reference
By creating deleted methods for the wrong calls.

Avoids the compiler needing to construct a temporary

Change-Id: I3b8c648d6bb22d22827bf74f21ea5a2a17fc0f6a
Reviewed-on: https://gerrit.libreoffice.org/72103
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-13 08:15:27 +02:00
Samuel Mehrbrodt 9c2cf30333 tdf#123772 Add test
Change-Id: Id46bf2b293c4465f5c58f503c75904639d59f168
Reviewed-on: https://gerrit.libreoffice.org/68701
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-03-08 09:17:20 +01:00
Andrea Gelmini d71859ed79 Fix typos
Change-Id: Icfe120db02a70d43e4120d1f4cbb2704640d3990
Reviewed-on: https://gerrit.libreoffice.org/59470
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-09-27 12:14:06 +02:00
Andrea Gelmini 22a34b3b7a Fix typos
Change-Id: I156afb90e159b6e13cf304ac8f6ff9274cb2c7ec
Reviewed-on: https://gerrit.libreoffice.org/53641
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-05-05 09:21:24 +02:00
Andrea Gelmini 0f93692fda Fix typos
Change-Id: Ife28cd9399cfcb375bad764dac7424eda50d430d
Reviewed-on: https://gerrit.libreoffice.org/52198
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-04-16 23:19:34 +02:00
Michael Stahl 64f1d7ad58 toolkit: disable UnitConversion test for non-default resolution on WNT
Apparently this fails currently for unknown reasons, see report
by Luke Benes at
https://lists.freedesktop.org/archives/libreoffice/2017-December/079196.html

Change-Id: Ib4c79fbc6a4353ab51612836f51196bc37a90ae1
Reviewed-on: https://gerrit.libreoffice.org/47444
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-01-05 15:15:49 +01:00
Michael Stahl 7e51276d40 toolkit: convert UnitConversion test to C++
Just translate the test, it checks just a tiny fraction of what it does
just like the Java version.

Change-Id: I85b4c890d970a00402d7f1b6f13d4e9ea2dd6e3c
Reviewed-on: https://gerrit.libreoffice.org/47443
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-01-05 15:15:27 +01:00
Johnny_M dfaceb70ec Translate one German variable name
No functional change is intended.

Change-Id: I47312070bea07b0c4994da4f99aa99684cfd850e
Reviewed-on: https://gerrit.libreoffice.org/41832
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-09-04 03:28:17 +02:00
Andrea Gelmini f7eb8ae9d9 Fix typos
Change-Id: Ieea40e1b7282267157810f9f58ca083e68ae6715
Reviewed-on: https://gerrit.libreoffice.org/35659
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-25 12:57:18 +00:00
Andrea Gelmini 446568bfad Fix typos
Change-Id: I139e6948e92a7bcdce5a2197b9d3754cb9549a33
Reviewed-on: https://gerrit.libreoffice.org/34781
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-02 12:45:15 +00:00
Andrea Gelmini 64d624b651 Fix typos
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86
Reviewed-on: https://gerrit.libreoffice.org/21209
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-10 14:17:20 +00:00
Miklos Vajna 20ff8cc5c3 toolkit: mark AccessibleScrollBar:XAccessibleEventBroadcaster as a known issue
JunitTest_toolkit_unoapi_1 started to fail for me recently in
toolkit.AccessibleScrollBar, though only when ran via 'make check' or
'make toolkit.subsequentcheck', not via 'make
JunitTest_toolkit_unoapi_1' when other junit tests of toolkit are not
running.

Provided that, it's quite hard to debug the exact problem, but it seems
VCLXAccessibleScrollBar doesn't implement XAccessibleEventBroadcaster
itself, but via comphelper::OAccessibleContextHelper, which perhaps
explains why 4 other components have their XAccessibleEventBroadcaster
interface tests disabled already.

In any case, disable the XAccessibleEventBroadcaster test for
AccessibleScrollBar till it's clear if it's the test that is poor or
if there is a real problem here.

Change-Id: I2de618c11e445e4e6111c7ae0d1d8feef11fd9d3
2015-12-21 09:19:59 +01:00
Noel Grandin db8c703240 convert PASSED to COMPLETED in 'make check' test messages
Change-Id: I5501f4f40024d3a47bb7007896e07c6252151cf6
2015-10-16 11:23:12 +02:00
Andrea Gelmini a2a5187a8f Fix typos
Change-Id: Ifddd2533b767924791338555031b848c59980c52
Reviewed-on: https://gerrit.libreoffice.org/18989
Reviewed-by: Joren De Cuyper <jorendc@libreoffice.org>
Tested-by: Joren De Cuyper <jorendc@libreoffice.org>
2015-09-29 22:19:19 +00:00
Noel Grandin 0c18bedb73 java: 'final static' to 'static final'
this is the canonical order, and it makes the code easier to read

Change-Id: I272e7f1e140296e582702b6dbf77a03eefb65470
Reviewed-on: https://gerrit.libreoffice.org/16242
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: David Ostrovsky <david@ostrovsky.org>
2015-06-15 08:45:19 +00:00
Noel Grandin 754ade38dd speed up Java unit tests by removing sleeps
and replacing them with a call to XToolkitExperimental::
processEventsToIdle

Change-Id: I9fd6cb8af43d902587186310aebe78b5a5ee6932
Reviewed-on: https://gerrit.libreoffice.org/16201
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-06-11 06:47:23 +00:00
Noel Grandin 275f0c7b25 Let JUnit take care of exceptions
Inspired by commit
4dd0ac6285

Change-Id: I6ca29aecde357a3cb5852acfc9b5443761052960
Reviewed-on: https://gerrit.libreoffice.org/16094
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-06-05 13:17:50 +00:00
Bjoern Michaelsen 5c85974066 split toolkit unoapi test for performance
- test previously took 3m18s here
- slowest part is now 60s

Change-Id: Ibbcdf9a7f408fcca189bcb7b182a864aea1f7159
Reviewed-on: https://gerrit.libreoffice.org/15958
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2015-05-29 11:52:42 +00:00
Caolán McNamara 309574394b callcatcher: large newly detected unused methods post de-virtualization
i.e lots now able to be detected after...

commit b44cbb26ef
Author: Noel Grandin <noel@peralex.com>
Date:   Tue Jan 20 12:38:10 2015 +0200

    new loplugin: change virtual methods to non-virtual

    Where we can prove that the virtual method is never overriden.

    In the case of pure-virtual methods, we remove the method entirely.
    Sometimes this leads to entire methods and fields being
    eliminated.

Change-Id: I605e2fa56f7186c3d3a764f3cd30f5cf7f881f9d
2015-01-29 23:42:26 +00:00
Noel Grandin 09330056a0 java: simplify sleeping and waiting in tests
- remove the SHORT_WAIT test parameter, no-one is using it
- inline the various independent shortWait() methods
- use the util.utils.shortWait() utility method everywhere

Change-Id: I93cd4a2580172a1441d2ff3d390f52b9505e2721
2015-01-12 08:36:17 +02:00
Noel Grandin 43cc8ad33e java: remove dead code
found by UCDetector

Change-Id: I6b0f49529379072da566e927b86815f173e7a90b
2015-01-05 08:23:29 +02:00
Noel Grandin 9adb820158 java: simplify the getMSF() methods
Change-Id: Ib459799f4a3224f8c9683ac4b6cf37982d2077a3
Reviewed-on: https://gerrit.libreoffice.org/13406
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-12-10 08:04:58 +00:00
Noel Grandin 0063cf2856 java: make fields final where possible
found by PMD

Change-Id: I87780366119c141cd2dafe6ca1bf2d9798b10aec
2014-11-18 12:44:28 +02:00
Andrea Gelmini da40cac540 Fix common typos. No automatic tools. Handmade…
Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959
Reviewed-on: https://gerrit.libreoffice.org/12164
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-12 11:04:11 +00:00
Robert Antoni Buj i Gelonch 68a18a6249 accessibility: The if statement is redundant
Change-Id: I70dd50d8d588c71d391936195bb13ccb767470be
Reviewed-on: https://gerrit.libreoffice.org/11890
Reviewed-by: David Ostrovsky <david@ostrovsky.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-19 10:21:19 +00:00
Robert Antoni Buj i Gelonch 22248b89c0 complex: Use 'import com.sun.star.beans.UnknownPropertyException;'
Change-Id: Ib42baf6f18fd407a879313c042efd74c8f724aa4
Reviewed-on: https://gerrit.libreoffice.org/11864
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2014-10-08 20:30:03 +00:00
Noel Grandin 04ace01ec5 java: remove unnecessary adding of empty strings
Change-Id: I3825ea5fb1eb34ca52659350e202f95abea945a9
2014-10-07 13:20:01 +02:00
rbuj cc5eb804fc toolkit: use String.length()==0 instead of String.equals(empty string)
Change-Id: Id38f28e7138460493fde982cc1ebc75c3cb0b386
Reviewed-on: https://gerrit.libreoffice.org/11365
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-09-09 18:39:44 +00:00
rbuj 91853c8264 toolkit: fix javadoc errors
Change-Id: I6d2268786d22f967be2d5e0dbcda14a074af4475
Reviewed-on: https://gerrit.libreoffice.org/11248
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-09-02 02:08:40 -05:00
Noel Grandin c0415d5f1e java: remove unnecessary constructor declarations
in the absence of any other constructors, the compiler will automatically
generate a public no-arg constructor

Change-Id: I70eca507cd8e16e33580b3398d41d70690bc2909
2014-08-20 12:12:15 +02:00
Noel Grandin ccbb51ad96 use correct loop index variable
Change-Id: I92531f8fc96c0cb0ca944a7dd50c4fe4ea740b37
2014-08-20 10:35:52 +02:00
Noel Grandin 252ed1708a double-checked locking is not thread-safe in Java
found by PMD

Change-Id: Ibd4a9139c626932bec56c0b1dd32b4d59c8440b1
2014-08-20 10:35:51 +02:00
Noel Grandin 3a8d351988 java: remove unused methods
Change-Id: Ibb905e6f3e7d92a0e558f1f6562e5b472cd2717b
2014-08-19 14:57:13 +02:00
Caolán McNamara cc4f4e2054 catch UnknownPropertyException
Change-Id: I3134c574a124a2359c40b139eb5b41198b0e4611
2014-08-17 19:20:55 +01:00
Noel Grandin 0d916bb240 java: remove unused imports
Change-Id: Ic60b30141fd1dc61acfb97b811aec680a2ab9c22
2014-08-14 10:59:49 +02:00
Noel Grandin 34bcf9b498 java: remove dead methods
found by UCDetector

Change-Id: I219caa8e680dba5a395541a778df6144841c4dde
2014-08-13 10:24:10 +02:00
Noel Grandin 68cd011c90 java: reduce scope, make some methods private
found by UCDetector

Change-Id: Ib1425edde146193a65c242dc159b7e3fbf0e4a2e
2014-08-13 08:49:23 +02:00
Noel Grandin 70f56bc22f java: reduce scope, make member classes private
found by UCDetector

Change-Id: Ief32d078090102b14b60b35fc36542f8d4fb252b
2014-08-13 08:49:23 +02:00
Noel Grandin da677dfd59 java: reduce scope, make fields private
found by UCDetector

Change-Id: I7f97e15667159cf8ee776e8f32fdcdec8ec00ed6
2014-08-13 08:49:22 +02:00
Noel Grandin 14d1a11ec4 java: reduce scope, make constructors private
found by UCDetector

Change-Id: If05277fd2fe77ceabb4c7c87aeb8569e3406102d
2014-08-13 08:49:22 +02:00