Commit Graph

191 Commits

Author SHA1 Message Date
Stephan Bergmann
c0bd59c15b loplugin:nullptr (automatic rewrite)
Change-Id: Iefeeb51c2b101c097a8d77a4625f84baf1f2da44
2015-11-10 10:31:20 +01:00
Noel Grandin
c7e36de238 loplugin:stringconstant
Change-Id: I736e0d63ed891aee1582844aff25b9bdacab8db9
2015-11-02 15:04:05 +02: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
cb85f1c6ab loplugin:defaultparams
Change-Id: I7e232e92cc9d058f93eff9f7249e37ed3a9cd9ac
2015-10-20 11:45:02 +02:00
Stephan Bergmann
b36963c0a6 Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY code
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12 17:52:29 +02:00
Stephan Bergmann
7bff36d45d loplugin:stringconstant: OUStringBuffer: appendAscii -> append
Change-Id: I68b02ad101c4c2165b4618ed5d97cbffc2c43d2d
2015-08-31 08:04:12 +02:00
Andrea Gelmini
799cc41b53 Fix typos
Change-Id: I70b03c152f63e48341dc5629a99b0eeab7b497c0
Reviewed-on: https://gerrit.libreoffice.org/16834
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2015-07-08 05:48:18 +00:00
Andrea Gelmini
5b1337f7b2 tdf#62475: partial handmade fixes
Change-Id: Ib9af202c43b916b9af4b4e18db35d470a8692fe4
Reviewed-on: https://gerrit.libreoffice.org/15712
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2015-05-15 17:55:15 +00:00
Noel Grandin
6d5ae48427 loplugin:staticmethods
Change-Id: I200fdb2e193127f0c9e8cec4859845d3ec19cea0
2015-04-23 13:08:47 +02:00
Noel Grandin
71b809959b remove unnecessary use of void in function declarations
ie.
    void f(void);
becomes
    void f();

I used the following command to make the changes:

  git grep -lP '\(\s*void\s*\)' -- *.cxx \
    | xargs perl -pi -w -e 's/(\w+)\s*\(\s*void\s*\)/$1\(\)/g;'

and ran it for both .cxx and .hxx files.

Change-Id: I314a1b56e9c14d10726e32841736b0ad5eef8ddd
2015-04-15 11:47:12 +02:00
Stephan Bergmann
373a9b9bb6 loplugin:redundantcast: redundant const_cast followed by implicit upcast
Change-Id: I58297ba336d96358eb0683684bbd763870ef56cb
2015-04-13 12:36:36 +02:00
Stephan Bergmann
17e74bf1a0 Replace remaining getCppuType et al with cppu::UnoType
Change-Id: Id2361bd7b50f4724211661b024583b8a3445500b
2015-04-01 08:36:20 +02:00
Stephan Bergmann
5209884f61 Reduce to static_cast any reinterpret_cast from void pointers
Change-Id: I24dc3a9b16abb1397cdd6a4f6cfafb81cc61d0f9
2015-03-31 13:12:41 +02:00
Stephan Bergmann
cead54b6e5 Use vector::data
...in some places where it is obvious that it does not hurt that for an empty
vector the obtained pointer is not necessarily a nullptr.

Change-Id: Id5d66b1559ca8b8955d379bcdbfae6986ef46a51
2015-01-28 17:56:18 +01:00
Noel Grandin
705c48d32e fdo#38835 strip out OUString globals
they are largely unnecessary these days, since our OUString infrastructure
gained optimised handling for static char constants.

Change-Id: I07f73484f82d0582252cb4324d4107c998432c37
2014-11-05 08:44:19 +02:00
Thomas Arnhold
a2db194ea0 connectivity: fix includes
Change-Id: I5d5dc6871789865189c78fe9135e7f8bff829489
2014-06-04 21:18:39 +02:00
Noel Grandin
624a116d14 use OUString::startsWith()
Change-Id: I0fc77b50792e48be175ab7cc151509e097676849
2014-05-29 09:01:40 +02:00
Julien Nabet
b09b5f8f7c Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part19
Change-Id: Iab50c52a132c90389992ef68c2d31df95a193ab9
2014-05-22 23:21:18 +02:00
Julien Nabet
fa51b55680 Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part9
Change-Id: I82ed4a4868cb22566706ca0f4b1321e0d45016cf
2014-05-10 23:54:07 +02:00
Noel Grandin
199d333f13 connectivity: sal_Bool->bool
Change-Id: I96371121ce6697f153f4e973e65831ea2265eb56
2014-04-16 11:51:51 +02:00
Stephan Bergmann
d4b8fe32f5 Clean up function declarations and some unused functions
Change-Id: I4c63cd304908ce0e8ae3f9938d7323225dd314a5
2014-04-11 17:16:52 +02:00
Noel Grandin
8728c34662 connectivity: sal_Bool->bool
Change-Id: Iafa52d3643b9313c20c75cf98f6b1ec231bf9d6d
2014-04-01 07:38:09 +02:00
Noel Grandin
3194d22a24 connectivity: sal_Bool->bool and fix method name
Convert method name
  getBoleanComparisonPredicate
to
  getBooleanComparisonPredicate

Change-Id: I00c726b1fecd8352dc49f2af98c3ae3c799ef424
2014-04-01 07:38:08 +02:00
Noel Grandin
2c7bef7b8d connectivity: sal_Bool->bool
Change-Id: Ic583deda8b0be3c89bcd644a1872ebd83276487a
2014-04-01 07:38:08 +02:00
Stephan Bergmann
70cc2b191b First batch of adding SAL_OVERRRIDE to overriding function declarations
...mostly done with a rewriting Clang plugin, with just some manual tweaking
necessary to fix poor macro usage.

Change-Id: I71fa20213e86be10de332ece0aa273239df7b61a
2014-03-26 16:39:26 +01:00
Noel Grandin
358be80f65 comphelper,connectivity: prefer passing OUString by reference
Change-Id: I19b2613918ec62ee39bb3e447f3587c5dba1e36a
2014-03-14 07:47:01 +02:00
Alexander Wilms
ac9212feed Remove visual noise from connectivity
Conflicts:
	connectivity/source/inc/odbc/OConnection.hxx

Change-Id: I5ca98359e18cf1b27bf53037dde211774d798626
Reviewed-on: https://gerrit.libreoffice.org/8245
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2014-02-27 06:54:35 -06:00
Stephan Bergmann
5e21a413c7 cppuhelper: retrofit std::exception into overriding exception specs
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-26 18:22:20 +01:00
Alexander Wilms
0ce0c369aa Remove unneccessary comments
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb
Reviewed-on: https://gerrit.libreoffice.org/8182
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-23 03:38:49 +00:00
Julien Nabet
d1bc27c2aa User grants debug Mysql part: first steps
Select all user/host instead of just user
so we'll have 'root'@'localhost', 'root'@'127.0.0.1', etc. instead of just root

Next step: retrieve IS_GRANTABLE value (so patch mysqlcppconn)

Change-Id: Ib0ce7d0745ace17ce8058f3ff9806bea2bdc56f1
Reviewed-on: https://gerrit.libreoffice.org/7140
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
2014-01-30 15:37:12 +00:00
Julien Nabet
bfefe113f6 User grants debug Mysql part: retrieve IS_GRANTABLE + update column privs
(See http://dev.mysql.com/doc/refman/5.6/en/grant-table-structure.html
Table 6.7. Set-Type Privilege Column Values Section)

Change-Id: I6173ba0df84f722a872afa59d7d7dc9eefe3e368
Reviewed-on: https://gerrit.libreoffice.org/7155
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
2014-01-30 15:14:37 +00:00
Julien Nabet
2d01704330 We want to drop the user here not revoke some rights
Change-Id: Ia31345d9e3cf8dce147402bc6c6592fd57bc88b9
Reviewed-on: https://gerrit.libreoffice.org/7178
Reviewed-by: Andrzej Hunt <andrzej.hunt@collabora.com>
Tested-by: Andrzej Hunt <andrzej.hunt@collabora.com>
Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
2014-01-30 15:09:16 +00:00
Stephan Bergmann
ead1525417 bool improvements
Change-Id: If35c939adede6a912dee14714a7ceeab84ac977e
2014-01-28 20:24:39 +01:00
Norbert Thiebaud
92864323e7 coverity#4407301 Dereference after null check
Change-Id: I3cbb28a65dc75ac641cac88148e36ec3a819ffc4
2014-01-25 03:10:53 -06:00
Stephan Bergmann
9ed364774c Adapt all (non-extension, SharedLibrary) .components to environment="..."
Change-Id: I56f38bd786f3a026cb2908f28540dc9c4003af83
2013-12-17 11:06:00 +01:00
Noel Grandin
08fe82e59c Remove unnecessary use of OUString constructor in + expressions
Convert code like
  aFilename =  OUString::number(nFilePostfixCount) + OUString(".bmp");
to
  aFilename =  OUString::number(nFilePostfixCount) + ".bmp";

Change-Id: I03f513ad1c8ec8846b2afbdc67ab12525ed07e50
2013-12-17 11:49:03 +02:00
Noel Grandin
f8b2265419 remove RTL_CONSTASCII_STRINGPARAM in OUString::matchAsciiL calls
Convert code like:
    defaultValue.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( "nextval(" ) );
to:
    defaultValue.startsWith( "nextval(" );

Change-Id: I77bdcbf46bec6ded3c16a8248634b1424a1eb4f0
2013-11-20 13:56:09 +02:00
Noel Grandin
2c35fff7ec remove most use of RTL_CONSTASCII_USTRINGPARAM macro
This is largely unnecessary when working with OUString

Change-Id: I3cf4d68357a43665d01162ef4a2d5346a45da9be
2013-11-19 10:29:30 +02:00
Noel Grandin
1bdb2b6f06 remove unnecessary use of OUString constructor in CONNECTIVITY module
Change-Id: Ie32d03920d996db2793ead9940fc90668cde03dd
2013-11-11 11:21:25 +02:00
Noel Grandin
5285beeaa4 remove redundant calls to OUString constructor in if expression
Convert code like:
  if( aStr == OUString("xxxx") )
to this:
  if( aStr == "xxxx" )

Change-Id: I8d201f048477731eff590fb988259ef0935c080c
2013-11-04 10:11:08 +02:00
Noel Grandin
aeb41c9b9b remove redundant calls to OUString constructor
Change code like this:
  aStr = OUString("xxxx");
into this:
  aStr = "xxxx";

Change-Id: I31cb92e21658d57bb9e14b65c179536eae8096f6
2013-11-04 10:11:07 +02:00
Noel Grandin
e2451bd729 Convert indexOf->startsWith and lastIndexOf->endsWith
This is both an optimisation and a cleanup.

This converts code like
   aStr.indexOf("XX") == 0
to
  aStr.startsWith("XX")
and converts code like
  aStr.lastIndexOf("XXX") == aStr.getLength() - 3
to
  aStr.endsWith("XXX")

Note that in general
  aStr.lastIndexOf("X") == aStr.getLength() - 1
converts to
  aStr.isEmpty() || aStr.endsWith("X")
so I used the surrounding context to determine if aStr could be empty
when modifying the code.

Change-Id: I22cb8ca7c2a4d0288b001f72adb27fd63af87669
2013-10-31 08:34:21 +02:00
Marcos Paulo de Souza
2b91dc3ae6 fdo#54938: Adapt connectivity module to use cppu::supportsService
Change-Id: I885b4c7a60ff51d44138c4f8a56a584c38a9804a
Reviewed-on: https://gerrit.libreoffice.org/6172
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2013-10-09 15:03:38 +00:00
Stephan Bergmann
63897351fc rhbz#989246: Honor user's JavaDriverClass override in mysql driver
Change-Id: Ic7dbddb5b17af0bd23864fd19ab2bd815969d008
2013-07-30 09:03:28 +02:00
Ariel Constenla-Haile
ac66cb60b0 Ensure socket or pipe are passed to the native driver
(cherry picked from commit ad1186563ea12ce63dfdf738c332bf712084f633)

Change-Id: Ib556732abb42dd3371331368c2b2eb717d505461
2013-05-29 12:58:47 +01:00
Stephan Bergmann
e8ff469da5 Remove any remaining remnants of unused component_canUnload feature
Change-Id: I635fd006b5ba9f5fb0091748ee2ff9bc3c1a2d2a
2013-04-19 16:52:03 +02:00
Luboš Luňák
1946794ae0 mass removal of rtl:: prefixes for O(U)String*
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk
have kept them, in order not to break external API (the automatic using declaration
is LO-internal).

Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
2013-04-07 14:23:11 +02:00
Thomas Arnhold
39d45390f4 removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings declarations
s/(OUString\s+[a-zA-Z_][A-Za-z0-9_]*\s*)\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/$1\($2\)/gms

Change-Id: Iad20f242c80c4bdc69df17e2d7a69d58ea53654b
Reviewed-on: https://gerrit.libreoffice.org/2835
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-03-19 10:48:30 +00:00
Thomas Arnhold
8b27d78b4a automated removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings
Done with a perl regex:

s/OUString\s*\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/OUString\($1\)/gms

Change-Id: Idf28320817cdcbea6d0f7ec06a9bf51bd2c3b3ec
Reviewed-on: https://gerrit.libreoffice.org/2832
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-03-19 09:00:26 +00:00
Thomas Arnhold
919e277466 loplugin: unused variables and commented code
Change-Id: I01f1f1d112767b576d7cfc6e25fe95385de2c0cf
2013-03-03 11:48:02 +01:00