Commit Graph

4059 Commits

Author SHA1 Message Date
Stephan Bergmann
49c88d8b23 -fsanitize=nullability
Change-Id: I27336c512ed0b46b32344a05611e6ba17e45adef
Reviewed-on: https://gerrit.libreoffice.org/73023
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-27 15:24:46 +02:00
Andrea Gelmini
9e6ca513ac Fix typo
Change-Id: I715da280563c7c3f03eb9b521478db4481ae4b2f
Reviewed-on: https://gerrit.libreoffice.org/72322
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-15 07:07:07 +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
Caolán McNamara
fbc038cc4f an uno -> a uno
Change-Id: I538db88f8477dd2d2ad25c372928fec6c11d979d
Reviewed-on: https://gerrit.libreoffice.org/72105
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-10 14:50:59 +02:00
Caolán McNamara
29d35c823f downgrade warning to info
Change-Id: Id337f26471f54d7d52c293629b9d19901b188c63
Reviewed-on: https://gerrit.libreoffice.org/71897
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-07 15:09:29 +02:00
Jens Carl
9f71d0f3f9 tdf#68339 Other: BASIC Syntax error
Allow expressions (operands) of comparison operators prefixed with the
Logical Operator "Not".

Change-Id: I1b070e2288dac26b1f1186d38cf5d2f4ad99a406
Reviewed-on: https://gerrit.libreoffice.org/71332
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-05-03 08:24:18 +02:00
Eike Rathke
15c39bb2e7 Resolves: tdf#124605 ditch "if operand 1 is Empty, result is operand 2"
It has been like that since the initial import but is utter
nonsense. It might had (doubtfully) served some early StarBasic
compatibility quirk, but is wrong and was implementation defined
buggy behaviour. The Option VBASupport 1 even explicitly disabled
it.

In future we may want to implement the VBA Nothing value for an
SbxEMPTY at least for boolean operators, but this for Calc user
defined macro functions might even need a distinguished
SbxEMPTYCELL or such. Or an explicit SbxNOTHING.

Change-Id: I28919d982d0e60b9b840a12271dc717effa59662
Reviewed-on: https://gerrit.libreoffice.org/71701
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
2019-05-02 22:35:35 +02:00
Noel Grandin
22f2cf3ccc implement std::hash for css::uno::Reference and rtl::Reference
The declaration in BarChart.cxx is particularly suspicious, because it
was using a < for the KeyEqual template parameter.
Been there since:
    commit b2c3233e5f
    Date:   Thu Dec 21 20:08:33 2017 +0900
    chart2: suspend/resume setting rects dirty for 3D shapes

comphelper::OInterfaceCompare is no longer necessary

Change-Id: I8278c4a3d9113a18570ca237cd05d553ec8f3975
Reviewed-on: https://gerrit.libreoffice.org/71537
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-30 08:43:04 +02:00
Andrea Gelmini
4a88cba2ed Fix typo
Change-Id: I7db23f84a3de4772b38c9538704f501a9169ce09
Reviewed-on: https://gerrit.libreoffice.org/71267
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-25 07:05:13 +02:00
Tomoyuki Kubota
47d25dc5ab tdf#123043 make type character detection unicode-aware
Change-Id: I98886a7d13a43cc3202d45f96ceb5062f76f0784
Reviewed-on: https://gerrit.libreoffice.org/71013
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2019-04-23 12:51:51 +02:00
Stephan Bergmann
0e335af4d3 Fix uses of variables before their lifetimes begin
All of those have been broken with recent loplugin:sequentialassign changes (and
have been found with a new plugin to be commited).

The code in SbUnoClass::Find (basic/source/classes/sbunoobj.cxx) looks
suspicious, but has been effectively like that ever since at least
c25ec0608a "initial import", so just marked it
with a TODO comment for now.

Change-Id: I0d691cb55ef317cf2b16b0490169de7ec97375cf
Reviewed-on: https://gerrit.libreoffice.org/70874
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-04-17 18:56:04 +02:00
Noel Grandin
d028c1be17 loplugin:sequentialassign in accessiblity..canvas
Change-Id: I984717138ac85c1af5fc363fda06f5c2b5497965
Reviewed-on: https://gerrit.libreoffice.org/70641
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-12 13:06:26 +02:00
Andrea Gelmini
a271c15d85 Fix typo
Change-Id: I1413e1872b1f2cd29256b33cdc7ac7ae09faf46c
Reviewed-on: https://gerrit.libreoffice.org/70394
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-08 07:37:24 +02:00
Andrea Gelmini
75b51d34f8 Fix typo
Change-Id: Ia5b4b50e919964b0746a68b008c9f7a86240c3a6
Reviewed-on: https://gerrit.libreoffice.org/70398
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-08 07:36:55 +02:00
Andrea Gelmini
65922c2631 Fix typo
Change-Id: I7b9802f224b497004df8cce7abd2bb8e52c79128
Reviewed-on: https://gerrit.libreoffice.org/70395
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-08 07:34:36 +02:00
Mike Kaganski
3feb65096a tdf#120703 PVS: Silence V522 warnings
V522 There might be dereferencing of a potential null pointer.

Change-Id: I680f1628133216de6336ac5ffa846447ffd55a41
Reviewed-on: https://gerrit.libreoffice.org/70352
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-07 13:52:51 +02:00
Andrea Gelmini
1a0250c6b8 Fix typo
Change-Id: I27f9b30f76b6bbd255a346c00d64e2499e7f3b5e
Reviewed-on: https://gerrit.libreoffice.org/70360
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-07 08:04:52 +02:00
Andrea Gelmini
b391088456 Fix typo
Change-Id: I88a8fb94cb1e7653d63a77bdb63d1303cc848704
Reviewed-on: https://gerrit.libreoffice.org/70361
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-07 08:04:31 +02:00
Andrea Gelmini
533d51519c Fix typo
Change-Id: I9df2f892066d5072f63f5bf68e1f9b2aa3905772
Reviewed-on: https://gerrit.libreoffice.org/70229
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-04 07:52:17 +02:00
Mike Kaganski
184be2d135 tdf#120703 PVS: remove redundant static casts
V572 It is odd that the object which was created using 'new' operator
     is immediately cast to another type.

Change-Id: I54976062dc3f62eaaa79f89eff54454f0b24ac2c
Reviewed-on: https://gerrit.libreoffice.org/69989
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-03-31 07:27:24 +02:00
Gabor Kelemen
d9e0eade62 Remove unused using declarations in directories [a-d]*
Found with:
run-clang-tidy-7 -checks=-*,misc-unused-using-decls

Change-Id: I50f6dfa881ac4e752668e762ade0943aaf28ab96
Reviewed-on: https://gerrit.libreoffice.org/69601
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-27 10:44:44 +01:00
Arkadiy Illarionov
10a48c737d Simplify containers iterations in basctl, basegfx, basic, bridges
Use range-based loop or replace with STL functions

Change-Id: I8594740103bdc2091c2d03d4b92bbe8393f5378c
Reviewed-on: https://gerrit.libreoffice.org/69223
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-16 20:16:46 +01:00
Gabor Kelemen
754c6af45a tdf#42949 Fix IWYU warnings in include/basic/*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I9dd7984affc4343f148c66077feaac19176adf51
Reviewed-on: https://gerrit.libreoffice.org/68769
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-07 14:20:10 +01:00
Noel Grandin
8b5e23eac3 log nice exception messages whereever possible
Change-Id: Idd125c18bee1a39b9ea8cc4f8c55cddfd37c33e1
Reviewed-on: https://gerrit.libreoffice.org/68579
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-07 07:12:39 +01:00
Noel Grandin
83db9afa20 remove some unnecessary typedef struct... sugar
Change-Id: I1576282b0a0a3af8ae14c04725d9c4900073f2c4
Reviewed-on: https://gerrit.libreoffice.org/68758
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-06 06:47:21 +01:00
Noel Grandin
28239c4043 simplify UNO getTypes methods
Change-Id: Ia8b07edec54527fb4904536fabb03a18e8452550
Reviewed-on: https://gerrit.libreoffice.org/68659
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-04 08:52:39 +01:00
Stephan Bergmann
e1e39fac22 Some more WIN32 -> _WIN32
...at least some of which have presumably been missing from
ce43d0ae92 "use consistent #define checks for the
Windows platform" by accident (and some just clean up comments)

Change-Id: I5532685c7df96ae3c8a25b73d8064d7433964a9b
Reviewed-on: https://gerrit.libreoffice.org/68580
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2019-03-01 17:40:47 +01:00
Noel Grandin
183debd7e0 pretty up logging of exceptions
Add exceptionToString() and getCaughtExceptionAsString() methods in
tools.

Use the new methods in DbgUnhandledException()

Add special-case case code for most of the exceptions that contain extra
fields, so all of the relevant data ends up in the log

Change-Id: I376f6549b4d7bd480202f8bff17a454657c75ece
Reviewed-on: https://gerrit.libreoffice.org/67857
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-19 09:39:48 +01:00
Noel Grandin
c7f5da8b04 fix comparison of std::lower_bound result
turns out using a compare operator that takes something other than the
element type as a parameter is really hard to get right.

The changes in:
    basic/source/classes/propacc.cxx
    comphelper/source/property/propagg.cxx
    vcl/source/font/font.cxx
are a regression from
    commit 35e80e9726
    Date:   Fri Oct 19 16:01:19 2018 +0200
    when calling std::lower_bound

The change in
    toolkit/source/awt/vclxtoolkit.cxx
is a regression from
    commit 76dd28afc9
    Date:   Tue Oct 9 16:27:11 2018 +0200
    loplugin:staticvar in various

Change-Id: Icf6db22e1fc091517a53dd3624913c8c2071c106
Reviewed-on: https://gerrit.libreoffice.org/67954
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-18 11:04:27 +01:00
Yusuf Sonmez
3b5dd1d49e tdf#112689: Replace chained O(U)StringBuffer::append() with operator+
Change-Id: I84fcc109087fe72cf68cf6cc1b8cf4045488ff46
Reviewed-on: https://gerrit.libreoffice.org/67601
Tested-by: Jenkins
Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2019-02-11 14:33:12 +01:00
Noel Grandin
0d1253c232 new loplugin writeonlyvars
largely based on the relevant portion of the unusedfields loplugin, but
adapted for local vars

Change-Id: Ic522a941573940e8f75c88f90ba5f37508ca49b1
Reviewed-on: https://gerrit.libreoffice.org/66835
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-11 13:25:31 +01:00
Muzaffer Kadir YILMAZ
3e214676b9 tdf#112689: Replace chained O(U)StringBuffer::append() with operator+
Change-Id: Iba19864313dc5039f5ca27be3d0c68785612346a
Reviewed-on: https://gerrit.libreoffice.org/67602
Tested-by: Jenkins
Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2019-02-11 09:09:52 +01:00
Noel Grandin
587ac01f97 loplugin:indentation in basctl..bridges
Change-Id: Ie4e27466c4258c6f774a3ebb82ec3a88c28fd753
Reviewed-on: https://gerrit.libreoffice.org/67525
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-08 10:01:05 +01:00
Andrea Gelmini
53a3181968 Fix typo
Change-Id: I9b57e73303cb12e818cd761878d0c11c38f4cc3e
Reviewed-on: https://gerrit.libreoffice.org/67481
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-02-07 07:21:21 +01:00
Andrea Gelmini
af2c169b7c Fix typo
Change-Id: Iccc171ce433e38c4eea4e73dcdba76720aa78056
Reviewed-on: https://gerrit.libreoffice.org/66969
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-01-27 09:46:25 +01:00
Gabor Kelemen
e48e063254 o3tl::make_unique -> std::make_unique in basctl...bridges
Since it is now possible to use C++14, it's time to replace
the temporary solution with the standard one

Change-Id: I9a20a58c68d12656359dcaa060d8ab41f621af32
Reviewed-on: https://gerrit.libreoffice.org/66262
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-16 07:20:49 +01:00
Noel Grandin
1977291fc0 tdf#122250 Crash when running extension
as a consequence of

    commit 4e07987ce8
    Date:   Thu Aug 25 15:08:55 2016 +0200
    cid#1371154 Missing move assignment operator

this extensions appears to pass bogus data into VCLXWindow::setProperty,
so I had to workaround that when debugging

Change-Id: Ib6728c0a990bd7cfbfed43d79b7560bd2f7f5a67
Reviewed-on: https://gerrit.libreoffice.org/66293
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-14 15:03:32 +01:00
Stephan Bergmann
70519a43e0 Replace OUStringBuffer::appendCopy with append(std::u16string_view)
...which is more general

Change-Id: I94f28f8eda887120cf5f143b4549e0339b60e6a7
Reviewed-on: https://gerrit.libreoffice.org/66155
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-11 13:55:14 +01:00
Doğa Deniz Arıcı
f0f462bfa5 tdf#112689: Replace chained O(U)StringBuffer::append() with operator+
Change-Id: Ieb5c1e13ae647b49fd563f1759d744bd5f008ce1
Reviewed-on: https://gerrit.libreoffice.org/65758
Tested-by: Jenkins
Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-10 08:50:31 +01:00
Noel Grandin
17dd2662cc convert "*xxx.get()" to "*xxx"
Change-Id: Ic307226591ff9702957ccdec486ccf70357eb6d9
Reviewed-on: https://gerrit.libreoffice.org/65951
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-08 10:38:35 +01:00
Gabor Kelemen
6256797dac tdf#42949 Fix IWYU warnings in include/vcl/[v-x]*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I98f49765c6b74808dcbd692e0f375dd2848fcfd4
Reviewed-on: https://gerrit.libreoffice.org/65614
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-01-07 09:13:14 +01:00
Matteo Casalin
854b6a5f00 Remove unneeded cast, constify OUString
Change-Id: I4a92779f86104cdad420069620eec50cea85b29c
Reviewed-on: https://gerrit.libreoffice.org/65662
Tested-by: Jenkins
Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2018-12-28 16:46:11 +01:00
Takeshi Abe
538ed5f348 basic: Spare temporary variable
Change-Id: I6c39061e04537c01c87f6cb2f40a35dd0a551a08
Reviewed-on: https://gerrit.libreoffice.org/65597
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-26 08:13:42 +01:00
Noel Grandin
bd26a8efd5 use unique_ptr in SbiExpression
Change-Id: I8b44215c438b749afce4ad056cab2c2ac66d4bda
Reviewed-on: https://gerrit.libreoffice.org/65534
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-21 18:52:05 +01:00
Noel Grandin
30eb0839c5 loplugin:useuniqueptr in basic and framework
Change-Id: I409c9c572eb8f3d68c8a387844b43988b4ab5c32
Reviewed-on: https://gerrit.libreoffice.org/64949
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-12 07:28:49 +01:00
Gabor Kelemen
00b49f9ff9 tdf#42949 Fix IWYU warnings in include/vcl/s*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: Ie87d27dd2c385a63349e0b322fd067ba03d2d152
Reviewed-on: https://gerrit.libreoffice.org/64479
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-12-10 14:19:50 +01:00
Andrea Gelmini
a35bfce31f Fix typo
Change-Id: I9de253ee55e662b0356f1fe305cd0acb050474da
Reviewed-on: https://gerrit.libreoffice.org/64826
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-12-09 09:12:25 +01:00
Stephan Bergmann
ab9b67bbb0 Remove obsolete SAL_FALLTHROUGH completely
...after 7ffdd830d5
"HAVE_CPP_ATTRIBUTE_FALLTHROUGH is always true now"

Change-Id: I54e5ff4e036a6bb3e5774d1c0524158aae18e937
Reviewed-on: https://gerrit.libreoffice.org/64800
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-08 13:28:16 +01:00
Noel Grandin
38187ec15b loplugin:singlevalfields extend to all static vars
Change-Id: Ic238bb5291539fd1b7e98cb4afc9b25f37e7d528
Reviewed-on: https://gerrit.libreoffice.org/64710
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-07 07:38:24 +01:00
Andrea Gelmini
f4e5cdcc28 Fix typo
Change-Id: I0345811912003e308054df426e533ac7c3866284
Reviewed-on: https://gerrit.libreoffice.org/64416
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-12-05 08:41:11 +01:00