Stephan Bergmann
f87cbab443
loplugin:unusedcapturedefault (macOS)
...
Change-Id: Id5a69e1307907cebffbdf50732cb4f34868280bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120784
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2021-08-20 15:34:12 +02:00
Stephan Bergmann
2bc1a0431b
New loplugin:unusedcapturedefault
...
In sc/qa/unit/ucalc_formula.cxx, dropping the capture-default from the
lExpectedinF lambda revealed that MSVC in C++17 mode (i.e., when building
without --with-latest-c++) requires ROW_RANGE (a local const int variable from
the enclosing TestFormula::testTdf97369) to be captured, even though all uses of
that variable within the lambda body are constant expressions. That is still
true at least for the latest Visual Studio 2019 version 16.11.1. (This is not
an issue for the lExpectedinH and lExpectedinI lambdas a few lines further down,
as they, in addition to using that ROW_RANGE, also use the local const double
variables SHIFT1 and SHIFT2, whose uses are not constant expressions, so
they are implicitly captured and loplugin:unusedcapturedefault does not suggest
dropping those lambdas' capture-defaults in the first place.)
Change-Id: Iee7efb485187cbe8eba6a2d470afca4993eb1816
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120693
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2021-08-20 14:25:38 +02:00
Noel Grandin
18f2020116
loplugin:constparams
...
Change-Id: Ic7410f836e584df45101e78e345c8b3c8d355e09
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120680
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2021-08-18 21:18:29 +02:00
Noel Grandin
4dbe4a9313
loplugin:passstuffbyref
...
Change-Id: I4f01eb3842ef198f02af274f54afb2760c820a4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120655
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2021-08-18 18:19:09 +02:00
Julien Nabet
997ff7166c
Related tdf#143895: Mysql MEDIUMINT is DataType::INTEGER not DataType::SMALLINT
...
Change-Id: I324b18cc164cb2f38b7b8411c557c6c208e8d69d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120536
Reviewed-by: Lionel Mamane <lionel@mamane.lu >
Tested-by: Jenkins
2021-08-16 15:56:37 +02:00
Stephan Bergmann
43542cc07e
Missing include
...
(for std::unique_ptr, with recent libstdc++ 12 trunk)
Change-Id: I61b7823dd740ea7cdfe0d7403a50ac73b24d1c4e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120229
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2021-08-10 07:39:00 +02:00
Noel Grandin
14cfff500e
Pass context and resource string down to boost::locale separately
...
because this is often on a hot path, and we can avoid the splitting and
joining of strings like this.
Change-Id: Ia36047209368ca53431178c2e8723a18cfe8260a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119220
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2021-08-05 09:39:11 +02:00
Noel Grandin
1597cc5b3e
convert #defines to OUStringLiteral
...
mostly by doing
$ git grep -l '#define.*\"' -- *.cxx
| xargs perl -pi -e
's/^#define\s+(\w+)\s+(\".*\")/constexpr OUStringLiteral \1 =
u\2;/g'
Change-Id: Idface893449b0ef2a3c5254865a300585d752fbb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119669
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2021-08-02 14:43:58 +02:00
Noel Grandin
9ae4f8b5bf
getArray->getConstArray
...
Change-Id: I951dd4a02c9ead98e7eb13ae2995ba2e1e57b38a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119740
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2021-07-31 19:16:06 +02:00
Noel Grandin
bfc1600c6a
loplugin:indentation improve checks for brace alignment
...
Change-Id: I333100fda7e181f68f36b03279b3fbb8cb768310
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117615
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2021-06-28 10:47:34 +02:00
Stephan Bergmann
3e2eee260b
More -Werror,-Wunused-but-set-variable when catching SQLWarning
...
...similar to f09cb84b27
"-Werror,-Wunused-but-set-variable (Clang 13 trunk)", this time with clang-cl 13
trunk in Windows-only code
Change-Id: I6b0da5aa79de07cf7326ad6cf6649cafff3be6a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117879
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2021-06-25 22:39:08 +02:00
Stephan Bergmann
d2a356d2fb
-Werror,-Wunused-but-set-variable (clang-cl 13 trunk)
...
Change-Id: Ic9727cd88faac6c6b4bc132b88ce22ad5d16ecee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117849
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2021-06-25 15:30:22 +02:00
Noel Grandin
3ffb7efa95
remove some unnecessary OUString::intern
...
Change-Id: Ia0f41dfc8a00c115ad544b8236d751e6b2dae5ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117577
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2021-06-21 15:02:53 +02:00
Julien Nabet
b49fce18d0
Simplify vector initializations
...
Change-Id: Icf8972be204799e9b3b3824ab18d8584911fe1c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117061
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
2021-06-11 18:12:48 +02:00
Caolán McNamara
5de138edf0
update firebird modelines
...
with solenv/bin/add-modelines -p connectivity/source/drivers/firebird
because a bunch are missing the trailing ones
Change-Id: I168c22586744cd666e6c18a569e143b6caccd421
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116963
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
2021-06-10 12:01:19 +02:00
Stephan Bergmann
f09cb84b27
-Werror,-Wunused-but-set-variable (Clang 13 trunk)
...
...ever since the code's introduction in
c25ec0608a "initial import". Lets assume that the
accompanying comment, also present since the "initial import", describes what
was actually intended, and augment it with a "TODO".
Change-Id: If94a3b72533459d02b1155653b5093c32f034e27
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116834
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2021-06-09 15:35:26 +02:00
Stephan Bergmann
5f9a90a939
-Werror,-Wunused-but-set-variable (Clang 13 trunk)
...
The only read of aParamterName in the OOperandParam ctor had been commented out
and marked "todo" ever since at least 8b1efd34bf
"moved from ..\..\parse", so lets clean all of that effectively dead code away
completely for now, and just leave a comment for later.
Change-Id: Ia5ee51cd6c45e8bc50bdd4e892ed0a4dfdc690a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116839
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2021-06-09 12:26:26 +02:00
Julien Nabet
6ef69234cf
Simplify Sequences initializations (comphelper+connectivity)
...
Change-Id: I8a91f4bd2a1117acb571f1058af18071bc058c9d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116815
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
2021-06-08 13:27:37 +02:00
Julien Nabet
f790fb5172
Simplify some initializations in connectivity (2)
...
Change-Id: Iacbd1ccc58ebe6ef0a434e7334bc393d3457f889
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116638
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
Tested-by: Jenkins
2021-06-03 14:12:06 +02:00
Noel Grandin
164fecadfd
no need to allocate these on the heap
...
Change-Id: Ic1a1577ed837d3fa2b7b99474f4cee30300628f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116290
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2021-05-28 09:44:57 +02:00
Noel Grandin
cb7bf2ce16
VisualStudio 16.10 doesn't like this construction
...
Change-Id: Idfef618b43735c48c9132d2fb932bc3bcb2ffe9c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116250
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2021-05-27 18:52:04 +02:00
Jan-Marek Glogowski
39276660f8
Fix DISABLE_DYNLOADING unused variable
...
Change-Id: Ie8305364971f324bd834ae6bec851637ca60b9e9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116118
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de >
2021-05-26 09:55:43 +02:00
Stephan Bergmann
4bea744971
loplugin:noexcept (clang-cl)
...
Change-Id: Ife669f959358992b547b408ab5d1f6bf1c1d14bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115744
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2021-05-19 08:53:34 +02:00
Julien Nabet
08ffd34d52
Simplify some initializations in connectivity
...
Change-Id: I980b59f06fb6004ba23279c8364cb0587e7ac8fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115679
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
2021-05-17 18:48:35 +02:00
Julien Nabet
c8cf2e0e08
Directly initialize maps in ADatabaseMetaDataResultSet.cxx
...
Change-Id: I40d88f6b538c1c38589b8cadc8c174ffa6754940
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115599
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
2021-05-17 12:56:05 +02:00
Julien Nabet
e017868984
Directly initialize vector in connectivity (part 3)
...
Change-Id: Ie7f74a3f0fa865994057575b3dfac2bc209c6793
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115631
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
2021-05-14 23:09:11 +02:00
Julien Nabet
46d3e84d7a
Directly initialize vector in connectivity (part 2)
...
Change-Id: I4dc9862a30fc584e600d2952d1110a1ebbcd160d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115611
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
2021-05-14 20:42:15 +02:00
Julien Nabet
2d41535a89
Directly initialize vector in connectivity (part 1)
...
Change-Id: I3b0bf1ca710aba58d7d649687b5d791374be8d6e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115610
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
2021-05-14 20:41:48 +02:00
Julien Nabet
23b39541dd
Directly initialize ODatabaseMetaDataResultSet in CDatabaseMetaData.cxx
...
Change-Id: I32af6d9c699689b688d996c56fd5f64c5ed2f71d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115608
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
2021-05-14 16:16:38 +02:00
Stephan Bergmann
0d913b281d
loplugin:noexcept (macOS)
...
Change-Id: Ib8951e9590d70ffecf8fd6af3070ef9c6d4ae151
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115044
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2021-05-04 07:44:27 +02:00
Stephan Bergmann
10d29c390d
throw() -> noexcept, part 2/3: Automatic loplugin:noexcept rewrite
...
Change-Id: I076f16d0536b534abf0ced4d76051eadb4c0e033
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114949
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2021-05-02 17:02:28 +02:00
Noel Grandin
04aafba860
loplugin:stringadd simplify some *StringBuffer operations
...
pulled from a larger patch which I created with a more permissive
variant of this plugin
Change-Id: I7abf1f3f09e84703b6e0e52fe9587dff691b2187
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114875
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2021-04-29 18:25:31 +02:00
Noel Grandin
39c3574b79
use string_view in INetURLObject::encode
...
Change-Id: Ib686c6872388b02c8939d3b65f6bd25cda348bc8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114754
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2021-04-28 15:41:02 +02:00
Noel Grandin
c7c6f0af6c
loplugin:stringadd convert chained append to +
...
which can use the more efficient *StringConcat
Also fix a crash in stringview plugin which
started happening while I working on this.
Change-Id: I91a5b9b7707d1594d27d80b73930f5afac8ae608
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114568
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2021-04-27 14:07:56 +02:00
Noel Grandin
75997f13ee
no need to create temporaries when appending number to O[U]StringBuffer
...
Change-Id: I36d82423b5f75010552696a66cec7e53ee265ce4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114395
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2021-04-22 21:42:14 +02:00
Noel Grandin
335de1a221
no need makeStringAndClear() when appending to buffer
...
it just creates an unnecessary temporary
Change-Id: Ide3cd99b2ac4f2a621e5d55ce4bdc95d05430709
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114467
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2021-04-22 12:37:39 +02:00
Noel Grandin
b08a2b2994
use OUString::Concat here, not OUStringLiteral
...
Change-Id: Ia2172bcab60f32c9d9d4f6ca0230484343eef69b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114321
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2021-04-20 13:34:43 +02:00
Noel Grandin
46ce0d28b4
loplugin:stringliteralvar look for assignments
...
to O[U]String from char array literals, we can convert the char literals
to O[U]StringLiteral and avoid a runtime allocation
Change-Id: I15d8dddb2cd428b90740e39f20daf98e0941aa6d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114125
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2021-04-15 13:54:53 +02:00
Henry Castro
f153be729e
lok: remove event listener when disposing
...
In order to prevent that the event listener
holds the object reference count when removed,
ensure they are removed when disposing the object.
Change-Id: I7cb4cb7d87acfc9610c2498760ade531456fe22e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113493
Tested-by: Jenkins
Reviewed-by: Henry Castro <hcastro@collabora.com >
2021-04-08 13:58:11 +02:00
Mike Kaganski
86d298f87f
Simplify some static variable initializations
...
Change-Id: I6cdd44aa66b9597ccc51fc3fd69b57485ccb3230
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113515
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2021-04-02 17:22:21 +02:00
Lionel Elie Mamane
d0efd1e280
tdf#141115 semi-userfriendly message on UNION query on file driver
...
Rather than silently returning only the first (left) part of the
UNION, error out.
Change-Id: I6ed1eba55ad33f149d9010933a3c7a835fce0451
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113207
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
Reviewed-by: Lionel Mamane <lionel@mamane.lu >
Tested-by: Jenkins
2021-03-27 17:34:13 +01:00
Lionel Elie Mamane
f4367cfd69
tdf#141115: correctly find the ORDER BY clause of a UNION
...
instead of blindly assuming a SELECT is not a UNION, leading to an
out-of-bounds array access when it is.
Change-Id: I8f904ae65acba8d8ee23b95299058207af68c0ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113189
Reviewed-by: Lionel Mamane <lionel@mamane.lu >
Tested-by: Jenkins
2021-03-27 11:49:51 +01:00
Caolán McNamara
4759ed1e5d
fix connectivity build
...
since...
commit a0656ec6fc
Date: Thu Mar 25 09:53:33 2021 +0300
const OUString -> const OUStringLiteral
Mostly automated rewrite
Change-Id: Id15273edde05933927378e45baadebc0727d558e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113083
Tested-by: Caolán McNamara <caolanm@redhat.com >
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
2021-03-25 12:11:42 +01:00
Mike Kaganski
a0656ec6fc
const OUString -> const OUStringLiteral
...
Mostly automated rewrite
Change-Id: Ie020a083f898bc126b8fb039d4ecb2e687172da1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112965
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2021-03-25 10:06:26 +01:00
Mehmet Sait Gülmez
e8017041a1
tdf#124176: Use pragma once instead of include guards
...
Change-Id: Ie396c62d7743918c36ee0a2041f26c7a7e70c802
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112945
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org >
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org >
2021-03-23 15:13:49 +01:00
Panos
9c6da8a14a
tdf#124176 replace include guards with pragma once
...
Change-Id: Iac0caac45130fd7da21ed9e7869abbd288931747
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112975
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org >
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org >
2021-03-23 15:12:52 +01:00
Vincent LE GARREC
6069a66690
tdf#124176 Use pragma once in connectivity
...
Change-Id: I4a57cd6dcbc180fe9a378d2713c687a66476ee79
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111979
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org >
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org >
2021-03-23 12:12:27 +01:00
Julien Nabet
18e1778fb6
fix typo in code: anylizeSQL->analyzeSQL
...
Change-Id: Ibee6322c03c6bd03a72bcb66b27077527f5529ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112855
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr >
2021-03-21 20:51:50 +01:00
Mike Kaganski
7921f47ec6
Drop 'static_cast<cppu::OWeakObject*>' syntactic noise
...
... a leftover from 96388e5e80 .
Change-Id: I909a470612c421472d8bf94f80e3e94ecb51d6e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112257
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2021-03-10 16:23:14 +01:00
Mike Kaganski
96388e5e80
Drop 'static_cast<cppu::OWeakObject*>' syntactic noise
...
... where the object is created in-place, and its type is known
Change-Id: Ifabfcf2f3ad0d60152f14e8d970c1faa42115288
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112256
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com >
2021-03-10 08:22:26 +01:00