Commit Graph

116 Commits

Author SHA1 Message Date
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
Stephan Bergmann
042033f1e6 loplugin:stringviewparam: operator +
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-29 16:42:33 +01:00
Stephan Bergmann
ae4efac701 loplugin:stringviewparam (Library_postgresql-sdbc-impl)
Change-Id: I9f37f6abfe7d923f8ca0a2d4fd5b699d7034f9f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106901
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-30 19:38:40 +01:00
Andrea Gelmini
081d3a1b67 Fix typos
Change-Id: I9385704bea54ff504457f7ac1ec39ed98cfdaf97
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101276
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-08-24 16:53:10 +02:00
Julien Nabet
b11293297e Postgresql: replace specific log mechanism by generic SAL_INFO/SAL_WARN
Change-Id: I601ff29cede5ef5f594fd00c8bea810080cb8388
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89383
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-27 07:32:53 +01:00
Gabor Kelemen
1dd9200be9 tdf#42949 Fix IWYU warnings in connectivity/*/*cxx
Except for platform specific drivers/ado and drivers/macab dirs

Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I24b741cded8995e29ac3d518aeaa0d60b3c55b56
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86317
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-14 10:21:47 +01:00
Stephan Bergmann
a5130f2b3d Use SAL_STRINGIFY
Change-Id: I0a82d32b93369461c2edaff5524bfdd0d1752359
Reviewed-on: https://gerrit.libreoffice.org/84408
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-04 15:45:07 +01:00
Stephan Bergmann
c8eaadb5d7 Remaining loplugin:bufferadd
...that had been missing because the plugin didn't implement postRun, so it
didn't report anything when run as part of the shared plugin.  (But did report
the expected warnings when run as a standalone plugin during
CompilerTest_compilerplugins_clang.)

Most fixes are straightforward.  A noteworthy one is PreparedStatement::setBytes
in connectivity/source/drivers/postgresql/pq_preparedstatement.cxx:  The old
preallocation of a 20 character OStringBuffer might have prevented

  buf.append( reinterpret_cast<char *>(escapedString), len -1 );

from potentially throwing std::bad_alloc, which would have caused escapedString
to be leaked.  Even though that 20-character preallocation was likely just
random junk and not meant to address the potential leak, lets address it now.

Change-Id: Ib506332d061684a22a74e5e39e591539fd2c4900
Reviewed-on: https://gerrit.libreoffice.org/80925
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-17 09:03:53 +02:00
Julien Nabet
1ec93ef100 Replace getDefaultValue by getColExprForDefaultSettingVal (postgresql)
Change-Id: I8e0eea84a711ce45d991c07d7811094e33bcce38
Reviewed-on: https://gerrit.libreoffice.org/80787
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-10-15 07:24:26 +02:00
Julien Nabet
0c46c81e04 tdf#128111: "adsrc" doesn't exist from Postgresql 12
Before Postgresql 8.0, there was only "adsrc"
then it's been deprecated
"The adsrc field is historical, and is best not used, because it does not track outside changes
 that might affect the representation of the default value.
 Reverse-compiling the adbin field (with pg_get_expr for example) is a better way to display the default value
"
and finally it's been removed with version 12

See evolution with:
- https://www.postgresql.org/docs/8/catalog-pg-attrdef.html
- https://www.postgresql.org/docs/11/catalog-pg-attrdef.html
- https://www.postgresql.org/docs/12/catalog-pg-attrdef.html

Change-Id: I57e9da423a23b5a96bbb64b0e026b160e9643ab9
Reviewed-on: https://gerrit.libreoffice.org/80722
Tested-by: Jenkins
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
2019-10-13 16:40:15 +02:00
Stephan Bergmann
d4ef035e2d Improved loplugin:stringconstant (now that GCC 7 supports it): connectivity
Change-Id: I80dab66757b1f541d448a642a5ecddc876f55c7b
Reviewed-on: https://gerrit.libreoffice.org/76689
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-31 13:00:14 +02:00
Andrea Gelmini
85b1d47450 Fix typos
Change-Id: Icefd5a9e2a8bd929caa486c4cf3283925237d707
Reviewed-on: https://gerrit.libreoffice.org/75980
Tested-by: Jenkins
Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2019-07-20 04:17:41 +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
Andrea Gelmini
0b853017a2 Fix typo
Change-Id: I80e83c04f3001fefad6cbdffc19ce8e05272dc88
Reviewed-on: https://gerrit.libreoffice.org/66562
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-01-18 07:08:57 +01:00
Stephan Bergmann
7ceee0f1ec Extend loplugin:redundantinline to catch inline functions w/o external linkage
...where "inline" (in its meaning of "this function can be defined in multiple
translation units") thus doesn't make much sense.  (As discussed in
compilerplugins/clang/redundantinline.cxx, exempt such "static inline" functions
in include files for now.)

All the rewriting has been done automatically by the plugin, except for one
instance in sw/source/ui/frmdlg/column.cxx that used to involve an #if), plus
some subsequent solenv/clang-format/reformat-formatted-files.

Change-Id: Ib8b996b651aeafc03bbdc8890faa05ed50517224
Reviewed-on: https://gerrit.libreoffice.org/61573
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-09 14:47:17 +02:00
Julien Nabet
8d3d04ef58 Modernize a bit connectivity (part2)
by using for range loops

Change-Id: Ibbc4cdaa78c4c9d88487132a2761ac1040b1ecd8
Reviewed-on: https://gerrit.libreoffice.org/48713
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-27 09:31:10 +01:00
Stephan Bergmann
f8558f8446 More loplugin:cstylecast: connectivity
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable
loplugin:cstylecast for some more cases" plus
solenv/clang-format/reformat-formatted-files

Change-Id: Idbefb16acae20ab137497e78c9bc5dc5634c07fe
2018-01-12 20:27:27 +01:00
Andrea Gelmini
d0222ba1fd Fix typos
Change-Id: I3d16dc162e5fa2e08134d848a835eb392e64056e
Reviewed-on: https://gerrit.libreoffice.org/47126
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-29 09:54:33 +01:00
Noel Grandin
2b4cb88c02 loplugin:unusedfields in basctl..connectivity
Change-Id: I2f10daadb84e48eaf96f6cc63899b2f4fce7326e
Reviewed-on: https://gerrit.libreoffice.org/40295
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-22 14:07:49 +02:00
Stephan Bergmann
41dbfa9ec7 loplugin:casttovoid: connectivity
Change-Id: I03127890499dac67816bb43a8c3fb9dd87eefcab
2017-07-02 22:34:08 +02:00
Stephan Bergmann
bb6277394c In DatabaseMetaData::getIndexInfo, isPrimary has always been ignored
...ever since the code's introduction with
e28033fdfa "Apply sdbc-postgresql.diff"

Change-Id: Ia0a1581c0284d96c73367ac6ea52fb0bab8e3c88
Reviewed-on: https://gerrit.libreoffice.org/39310
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-06-28 19:24:46 +02:00
Noel Grandin
809e2d33b4 create comphelper::RefCountedMutex
and merge the two existing implementations of the idea - SotMutexHolder
from package and RefCountedMutex from connectivity

Change-Id: I87f09f359ac798cf934381a2c75225dab71dd43e
Reviewed-on: https://gerrit.libreoffice.org/38972
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-20 14:13:35 +02:00
Andrea Gelmini
7668d4e616 Fix typos
Change-Id: I56e429ff1b8ee55ccb8df16002b509770762172c
Reviewed-on: https://gerrit.libreoffice.org/35618
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-25 16:17:21 +00:00
Noel Grandin
198c41c4fe new loplugin unoany
Change-Id: I5d6c4a67cb2a09e7cd5bd620c6b262d188701b89
Reviewed-on: https://gerrit.libreoffice.org/34714
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-28 10:17:47 +00:00
Stephan Bergmann
e57ca02849 Remove dynamic exception specifications
...(for now, from LIBO_INTERNAL_CODE only).  See the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html>
"Dynamic Exception Specifications" for details.

Most changes have been done automatically by the rewriting loplugin:dynexcspec
(after enabling the rewriting mode, to be committed shortly).  The way it only
removes exception specs from declarations if it also sees a definition, it
identified some dead declarations-w/o-definitions (that have been removed
manually) and some cases where a definition appeared in multiple include files
(which have also been cleaned up manually).  There's also been cases of macro
paramters (that were used to abstract over exception specs) that have become
unused now (and been removed).

Furthermore, some code needed to be cleaned up manually
(avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no
configurations available that would actually build that code.  Missing @throws
documentation has not been applied in such manual clean-up.

Change-Id: I3408691256c9b0c12bc5332de976743626e13960
Reviewed-on: https://gerrit.libreoffice.org/33574
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-26 12:54:43 +00:00
Jochen Nitschke
48c100d730 remove unused typedefs
Change-Id: I99c44caabca3d799c783d57cd2c3a1692c899191
Reviewed-on: https://gerrit.libreoffice.org/32911
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-10 08:52:14 +00:00
Jochen Nitschke
32e45a6f2a convert LogLevel constants to scoped enum
rename some variables to distinguish them from type name
use enumarray for log level strings
remove unused DATA member

Change-Id: Id3c38b82e679b3aede5ce790735443e769d5f236
Reviewed-on: https://gerrit.libreoffice.org/28920
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-15 14:10:07 +00:00
Noel Grandin
a52231c785 com::sun::star->css in connectivity
Change-Id: I9489e92dc89a6d83a26ff4f0d9aad26acd28ad9f
Reviewed-on: https://gerrit.libreoffice.org/25537
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-30 08:37:11 +00:00
Stephan Bergmann
6e70103da0 While at it, delete Any functions on sal_Bool*
(at least for LIBO_INTERNAL_ONLY), to help further reduce the occurrences of
sal_Bool across the code base

Change-Id: I70654a0cb56655984c717b7b894f26c9ab47536e
2016-05-04 11:59:23 +02:00
Stephan Bergmann
15e410e5af loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: I6fada7331ee369c35cbe019db4e730ce56cd1a1f
2016-04-20 17:25:37 +02:00
Wastack
62d1632498 tdf#97966 Drop 'static' keywords
Including no keywords from extern "C" blocks

Change-Id: I18ddafbf3d41f6779fb43e36ba1f1c48b37757a0
Reviewed-on: https://gerrit.libreoffice.org/23671
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-04-01 06:44:18 +00:00
Julien Nabet
a8ef64199b Use const_iterator when possible (connectivity)
Change-Id: I749e4c3ffa0c89f919459c376edad4804b2b66ca
Reviewed-on: https://gerrit.libreoffice.org/23573
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2016-03-28 20:28:28 +00:00
Jaskaran
00ecf7899a tdf#97499 Remove some Default arguments in unordered container
Change-Id: Ic008e244b8ae1888fa45379371f5525ee77f6087
Reviewed-on: https://gerrit.libreoffice.org/22887
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-03-07 12:50:15 +00:00
Lionel Elie Mamane
606efa8fb4 pgsql-sdbc: put local code and constants in anonymous namespace
Change-Id: Iaccda39ddf651f6b2ef326c9b3903670c25bcdde
2016-03-04 13:16:43 +01:00
Lionel Elie Mamane
5cbb6631e6 pgsql-sdbc: factorise common code
Change-Id: Iea185bc216e92baee9f97157b8ac13a9a64f99b5
2016-03-04 13:16:42 +01:00
Lionel Elie Mamane
0b0c99edbb tdf#92538 pgsql-sdbc make a reasonable sorting of types
Change-Id: I74283234834b5057857620ed2466068e88628585
2016-03-04 13:16:41 +01:00
Lionel Elie Mamane
a55f22ef4c fixup startsWith vs == in string comparisons
probably left-over from OUString transition

Change-Id: I29f8f34ad44828608aa16b0b0a0759e887e280af
2016-03-04 13:16:40 +01:00
Lionel Elie Mamane
a70586d998 fixup tdf#92538
Change-Id: I57650fe955a31f433d611d9e74a0762d349bed64
2016-03-04 09:23:05 +01:00
Lionel Elie Mamane
280f234e5e fixup tdf#92538
Change-Id: I62fbead59ac83147da6da984f89b64b1d7e4f90d
2016-03-04 09:22:32 +01:00
Lionel Elie Mamane
ac2505632c tdf#92538 use proper schema name for type names
Change-Id: I7e428e4530765925bd35c7f4fcde7f95ceb12243
2016-03-03 19:45:24 +01:00
Noel Grandin
383e11040c sequence->vector in postgresql
Change-Id: I57bf8f4404df9f73d9a52c651c9f27784f10c937
2016-02-09 13:44:42 +02:00
Chris Sherlock
a238b1f8d3 Remove excess newlines
A ridiculously fast way of doing this is:

for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \
  --exclude-dir=workdir --exclude-dir=instdir '^
{3,}' .)
do
    perl -0777 -i -pe 's/^
{3,}/

/gm' $i
done

Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c
Reviewed-on: https://gerrit.libreoffice.org/22224
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-09 08:18:05 +00:00
Noel Grandin
98c343604d boost::hash->std::hash
Change-Id: If4d1e4071995f07212fad958b0226d5824d168f8
Reviewed-on: https://gerrit.libreoffice.org/21989
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-02 09:20:47 +00:00
Noel Grandin
cb4fa1d1e2 use uno::Reference::set method instead of assignment
Change-Id: I080668f86f0ab8b3bba857ee21411f907ae285c4
2015-10-30 11:08:36 +02:00
Stephan Bergmann
7bff36d45d loplugin:stringconstant: OUStringBuffer: appendAscii -> append
Change-Id: I68b02ad101c4c2165b4618ed5d97cbffc2c43d2d
2015-08-31 08:04:12 +02:00
Noel Grandin
8601307838 loplugin: defaultparams
Change-Id: Id0a933d3507bc0f8145afa04effadf8475c8e210
2015-08-14 10:52:46 +02:00
Andrea Gelmini
87dc6c82d5 Fix typos
Change-Id: Ideb5688a8c9e7cf10038f2e9d00991e8653b1875
Reviewed-on: https://gerrit.libreoffice.org/16706
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2015-07-03 09:02:48 +00:00
Andrea Gelmini
8a2efbb717 Fix PostgreSQL function name
Change-Id: Ic089540c07c7fe7c85705fc3513411a7e2571a12
Reviewed-on: https://gerrit.libreoffice.org/16640
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
2015-07-02 13:40:06 +00:00
Stephan Bergmann
17e74bf1a0 Replace remaining getCppuType et al with cppu::UnoType
Change-Id: Id2361bd7b50f4724211661b024583b8a3445500b
2015-04-01 08:36:20 +02:00
Noel Grandin
c7a50d072f new constantfunction loplugin
Change-Id: Ie9b7a0c41fc4dbd2560ceff6bae9ab85357f518b
2015-03-25 08:55:31 +02:00