Commit Graph

1613 Commits

Author SHA1 Message Date
8ddca0648a tdf#42949 remove unused compheler includes ..
and fix the fallout

Change-Id: I15bc5d626f4d157cbc69a87392078b41e621d14e
Reviewed-on: https://gerrit.libreoffice.org/54882
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-06-05 10:56:36 +02:00
62667aac83 tdf#96099 Remove some trivial std::vector typedefs
Change-Id: I21171bd90b5e19fe8e5b8f2d125b6dfcb9a8b766
Reviewed-on: https://gerrit.libreoffice.org/55198
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-06-03 09:38:42 +02:00
3a51daeace Improve re-throwing of UNO exceptions
(*) if we are already throwing a Wrapped*Exception, get the
exception using cppu::getCaughtexception.

(*) when catching and then immediately throwing UNO exceptions,
use cppu::getCaughtException to prevent exception slicing

(*) if we are going to catch an exception and then
immediately throw a RuntimeException, rather throw a
WrappedTargetRuntimeException and preserve the original exception information.

Change-Id: Ia7a501a50ae0e6f4d05186333c8517fdcb17d558
Reviewed-on: https://gerrit.libreoffice.org/54692
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-25 21:46:49 +02:00
ac13f4db59 loplugin:unusedfields in dbaccess..drawinglayer
Change-Id: I069badbce9b899d176fd3db91243139579dec6b1
Reviewed-on: https://gerrit.libreoffice.org/54456
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-17 08:40:55 +02:00
a245e5c60f loplugin:useuniqueptr in ORowSet
hold this by rtl::Reference since we are taking references to it
elsewhere and passing them around.

Change-Id: Iae68d7da67cf84f01deb6bb42c00e4c74d7a99d7
Reviewed-on: https://gerrit.libreoffice.org/54169
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-14 11:10:15 +02:00
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
b4d36b5dcf remove some unused comphelper includes
and fix the fallout

Change-Id: I5d0c2040f57a3ac354a7e277592da31d09a5f359
Reviewed-on: https://gerrit.libreoffice.org/52894
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-04-15 11:17:24 +02:00
70ebdb5919 Removed duplicated include
Change-Id: Ibfea1c4a87a719ba92111787fd74a6176f8b6458
Reviewed-on: https://gerrit.libreoffice.org/52850
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins <ci@libreoffice.org>
2018-04-13 21:56:19 +02:00
83d247b991 tdf#42949 Remove unnecessary localization headers from dbaccess
Found by searching for the header names and the localization function:
git grep -l -e \<core_resource.hxx\> -e \<strings.hrc\> dbaccess | xargs grep -c -e "loadString" -e "DBA_RES" | grep :0$ | grep -v /pch

Since certain files use the strings with other functions as well
the above command still gives some false positives.

Change-Id: Ib41c5d8d18f3a00729fcf2c4cd8203a2047ef0df
Reviewed-on: https://gerrit.libreoffice.org/52480
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-04-13 16:39:14 +02:00
dc823f5fa4 tdf#116890: make unique column names in prepared statement
...like we do resultset.

Thanks to Lionel for this solution

Change-Id: I44f307cd6bddf76716d7c73b8783070abe43bdf3
Reviewed-on: https://gerrit.libreoffice.org/52662
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Jenkins <ci@libreoffice.org>
2018-04-10 23:55:59 +02:00
48fbfe38f6 use more DBG_UNHANDLED_EXCEPTION
so we get nice logs of the exception dynamic type for UNO exceptions.

Change-Id: Ic0b10dc14d354a2c9a0591b3a51d2f1640d54bdb
Reviewed-on: https://gerrit.libreoffice.org/52465
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-09 08:46:34 +02:00
e29435932d tdf#116772 adapt handling of LIKE conditions to cleaned up StructuredFilter
Change-Id: Ifc60da9a95833ee7820a0e03354fa1a8c006e136
Reviewed-on: https://gerrit.libreoffice.org/52573
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
2018-04-08 17:05:45 +02:00
ccc57c8f8f this looks suspicious in light of cleaned up StructuredFilter
Change-Id: I88f9834403e016e849dcd6c46638626b40252cf3
Reviewed-on: https://gerrit.libreoffice.org/52574
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
2018-04-08 17:05:38 +02:00
0e493cae40 new loplugin:dbgunhandledexception
enforce that DBG_UNHANDLED_EXCEPTION is called first in a catch block,
otherwise it cannot do it's job properly

Change-Id: I906436c6861212c44f8f21552ccbceb54f15c6e1
Reviewed-on: https://gerrit.libreoffice.org/52303
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-03 14:54:55 +02:00
4450b2a166 pass area param to DBG_UNHANDLED_EXCEPTION
and update sallogareas plugin to enforce this

Change-Id: Id0782c8a1f619372e10d931aec3c6a4743a4c86a
Reviewed-on: https://gerrit.libreoffice.org/52249
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-03 08:38:50 +02:00
9401c7c28a remove unused processfactory.hxx includes
and fix fallout

Change-Id: Id06bf31f2075111e426ba40c84c885ae70697bee
Reviewed-on: https://gerrit.libreoffice.org/52206
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-04-01 12:11:26 +02:00
4162339adb loplugin:unnecessaryvirtual improve result output
and merge some of the template function results

Change-Id: I9a7855ce6720d022ea5b988d68f0d59ff81ee5b9
Reviewed-on: https://gerrit.libreoffice.org/51985
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-31 15:05:40 +02:00
f657ab7bbb loplugin:virtualdown in various
Change-Id: I4db71fda953ea1d20712ae8033f6fc09b3b2855d
Reviewed-on: https://gerrit.libreoffice.org/52068
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-30 12:55:56 +02:00
e0d59468b1 loplugin:useuniqueptr in OSingleSelectQueryComposer
Change-Id: I02eb65c7a5a1dfd768e35b596303eb3e49c3dfd0
Reviewed-on: https://gerrit.libreoffice.org/51196
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-13 11:27:05 +01:00
d6b33e49a5 Use for-range loops in dbaccess (part 3)
Change-Id: I4cec44ea6366b6a38992e583d6290223d5c469f6
Reviewed-on: https://gerrit.libreoffice.org/50849
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-03-08 00:15:34 +01:00
28799d303c loplugin:useuniqueptr in dbaccess(2)
Change-Id: I49e69d8ab5b7a9ce699a2e0e0cad7ce4c4d0b62f
Reviewed-on: https://gerrit.libreoffice.org/50714
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-05 07:29:49 +01:00
e1e1bd191a loplugin:useuniqueptr in dbaccess
Change-Id: I9b1892f3d453320302f5f82cb964aff5cd9fa643
Reviewed-on: https://gerrit.libreoffice.org/50713
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-05 07:29:36 +01:00
f77302d76a loplugin:useuniqueptr in OQueryDescriptor_Base
Change-Id: I9cea18df52bc0a35f94c2a42dfbe3edb61e1e8c0
Reviewed-on: https://gerrit.libreoffice.org/50699
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-05 07:29:27 +01:00
5c7b954935 loplugin:useuniqueptr in OTable
use rtl::Reference here since these are reference counted data
structures, and we hand out references to me via our API

Change-Id: I8f69dde2db08519cb3d9de20b4ad54462e3ecc98
Reviewed-on: https://gerrit.libreoffice.org/49180
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-05 12:04:36 +01:00
32b2a1831d Fix typos
Change-Id: I334f0bd5636940ea8105dcf93b95b3af28894aad
Reviewed-on: https://gerrit.libreoffice.org/48546
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-26 11:39:58 +01:00
624f84c07e Fix typos
Change-Id: I078626eaa3155cc429320cc8c1532003b382b22a
Reviewed-on: https://gerrit.libreoffice.org/47855
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-16 12:40:51 +01:00
d597bb77b2 More loplugin:cstylecast: dbaccess
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: I96df8923f7791288bbd350d75582a9220006ece6
2018-01-12 20:25:56 +01:00
84466e76a9 Incrementing end iterator has undefined behavior (dbaccess/cacheset)
Change-Id: I9f4cdacd87cc4802b13c99c15e1d24d11285a375
Reviewed-on: https://gerrit.libreoffice.org/47188
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-30 10:54:48 +01:00
c91281c950 Use returned iterator (dbaccess/rowsetcache)
Change-Id: If53bbc8e3cdbbf71bed0d343f1ff358b72c46d21
Reviewed-on: https://gerrit.libreoffice.org/47147
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-28 20:51:27 +01:00
9c89caa036 Optimize a bit RowSetCache (dbacess)
Change-Id: I051cb40b5dd854a4a104eae7124564cab8a35de1
Reviewed-on: https://gerrit.libreoffice.org/47151
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Jenkins <ci@libreoffice.org>
2017-12-28 20:28:37 +01:00
f2dafc6e2c Use for-range loops in dbaccess
Change-Id: I0be3aba4f03dcaba188670548901e4aef59c5ec0
Reviewed-on: https://gerrit.libreoffice.org/47148
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-28 20:16:36 +01:00
66d7540bcf dbaccess OStatementBase: correctly check database metadata
the previous test didn't make any sense:
 * if xMeta.is(), then the test evaluated to false
 * if !xMeta.is(), then it called supportsMultipleResultSets
   (or supportsBatchUpdates, respectively) on a NULL pointer,
   which guaranteed a segfault / assert.

Change-Id: I6d6b93350557936b924a286732ae6d4f5ab2ce56
Reviewed-on: https://gerrit.libreoffice.org/47118
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-28 09:36:46 +01:00
63099940c7 Use for-range loops in dbaccess/RowSet
Change-Id: I27c280eaaf5ff6a4c1970e91ae227206bb712cea
Reviewed-on: https://gerrit.libreoffice.org/47073
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-27 12:32:30 +01:00
965c93c377 Use for-range loops in dbaccess/OptimisticSet
Change-Id: Iccd0848e772867ece243444dc697e264907b28d4
Reviewed-on: https://gerrit.libreoffice.org/47072
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-27 11:34:51 +01:00
a9b202a6b7 Use for-range loops in dbaccess/KeySet (2nd pass)
+ remove an unused var

Change-Id: I62659f4ca5ac734f46d00e59b12fb6f54a177ecb
Reviewed-on: https://gerrit.libreoffice.org/47071
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-26 23:33:25 +01:00
df8623e7ed Use for-range loops in dbaccess/KeySet (1st pass)
+ remove an unused var
+ fix a slight indent pb

Change-Id: Ie6e801c9d2b7ce6e7f5d352b2175fa9d7d6b9c7d
Reviewed-on: https://gerrit.libreoffice.org/46995
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-22 23:01:45 +01:00
16a3594e6a inline typedefs in connectivity/StdTypeDefs
Change-Id: I614833ed2418ff99057c7d496ddb64f06e8395db
Reviewed-on: https://gerrit.libreoffice.org/46809
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-20 07:09:43 +01:00
e6e85f139b remove unused typedefs
Change-Id: I6fd7a9fed3a80c91a3766fceefd43c5db0aa5275
Reviewed-on: https://gerrit.libreoffice.org/46763
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-19 12:39:14 +01:00
a5be07d6b6 inline use-once typedefs
Change-Id: I5c3ffc03c26b3428f1f336e6ecba7838a1cf1157
Reviewed-on: https://gerrit.libreoffice.org/46764
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-19 11:57:57 +01:00
8efd39be74 Fix typos
Change-Id: Ibffe19c1dfda9d0f4ba8d2a0761ad1222491007f
Reviewed-on: https://gerrit.libreoffice.org/46599
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-19 07:19:35 +01:00
4e144751f1 loplugin:unusedindex
Change-Id: I256a807dd2a4c81126b5a76f3d472e31b8224146
Reviewed-on: https://gerrit.libreoffice.org/46652
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-18 07:36:32 +01:00
3af500580b loplugin:salcall fix functions
since cdecl is the default calling convention on Windows for
such functions, the annotation is redundant.

Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d
Reviewed-on: https://gerrit.libreoffice.org/46164
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-11 12:13:46 +01:00
e1755ac8c4 loplugin:countusersofdefaultparams in connectivity
Change-Id: Ia613257f2de1395c6629c1c37026ed48d4b927c8
Reviewed-on: https://gerrit.libreoffice.org/45854
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-07 07:19:33 +01:00
c0ac78c971 loplugin:salcall handle virtual methods
Change-Id: Iab95db31188ea2914a46d63a7ebef3d825e6ec42
Reviewed-on: https://gerrit.libreoffice.org/45851
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-06 07:42:50 +01:00
2326619cba Replace deprecated std::mem_fun et al in dbaccess
(as std::mem_fun is gone by default at least from recent libc++ in C++17 mode)

Change-Id: I98fabd88212001ac6f2cfe66f2c75a41a4cb4a3e
Reviewed-on: https://gerrit.libreoffice.org/45860
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-05 13:54:56 +01:00
9a06b99d2f loplugin:salcall fix non-virtual methods
first, since those are safer to change than virtual methods

Change-Id: Ie3b624019d75ee2b793cee33b3c5f64e994e8bfe
Reviewed-on: https://gerrit.libreoffice.org/45798
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-05 07:32:46 +01:00
4f4486c61d look for =() in loplugin:unnecessaryparen
Change-Id: I4f9b71ff7767e90987bb40358fc46ed5d1d571d0
Reviewed-on: https://gerrit.libreoffice.org/44944
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-20 12:31:32 +01:00
315bf65459 loplugin:finalclasses in dbaccess
Change-Id: I7cbc786407ee798950a7fdc98f43aee0845ff862
Reviewed-on: https://gerrit.libreoffice.org/44347
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-06 11:55:28 +01:00
8c9b5a901d loplugin:constantparam in connectivity
Change-Id: Ia13d0931bbdf642fe04119ea1112788fb143eba8
Reviewed-on: https://gerrit.libreoffice.org/44110
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-01 07:12:36 +01:00
c45a3488af loplugin:constantparam in d*
Change-Id: I65c395157d2b68a549a6fecf9abf1fd46446d960
Reviewed-on: https://gerrit.libreoffice.org/44109
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-01 07:12:23 +01:00