Commit Graph

1446 Commits

Author SHA1 Message Date
fb8a3fac5d loplugin:nullptr: More NULL -> nullptr automatic rewrite
Change-Id: Ie83819e2bcdc5fa160b39296b005ca9a5ff74b1d
2015-12-10 08:06:06 +01:00
9e36549c68 dbaccess: small cleanup
Change-Id: Id0a0aa66ffd5788873fa5dc99fcc1b912c0e90fa
2015-11-28 09:38:52 +01:00
1f86864e97 loplugin:unusedfields various
Change-Id: I59d9f7f73677358b4ae57efda965d43718bdf0d5
2015-11-25 13:57:29 +02:00
827811ae7e -Werror,-Wunused-private-field
Change-Id: I595f0c2b05b96fbf2055a37e335f8c700044a699
2015-11-24 11:28:56 +01:00
3aff028b8f loplugin:unusedfields in dbaccess
Change-Id: I563c3727c1719fe21acced269e5469c2de7112e8
2015-11-20 14:06:49 +02:00
25aec383f9 use initialiser for Sequence<OUString>
replaced using:
git grep -lP 'Sequence.*OUString.*\(\s*1\s*\)'
| xargs perl -0777 -pi -e
"s/Sequence<\s*OUString\s*> (\w+)\(\s*1\s*\);
.*\[0\] = (\S+);/Sequence<OUString> \1 { \2 };/g"

Change-Id: I20ad0489da887a9712982531c3b127339bb8b3b9
Reviewed-on: https://gerrit.libreoffice.org/19969
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15 12:18:55 +00:00
89c4edc13f loplugin:nullptr (automatic rewrite)
Change-Id: I2bba104b1bff30910864e45b5b032533099742ff
2015-11-10 10:31:22 +01:00
add39c3cc1 loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)
Change-Id: I14bdbad2469d05eb25514d7ab995acb8c6ef7bd1
2015-11-06 09:35:25 +01:00
18ce0560aa loplugin:stringconstant
Change-Id: Id5a07591a1d3a7264a0a979f25e8c2c859ec0492
Reviewed-on: https://gerrit.libreoffice.org/19767
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-04 09:42:42 +00:00
be729e7721 tdf#94269: Replace "n" prefix for bool variables with "b"
Change-Id: I178545792c7354a362658ac7ef8b1d4cf0865797
Signed-off-by: Michael Stahl <mstahl@redhat.com>
2015-11-02 23:40:57 +01:00
e10570565f use uno::Reference::set method instead of assignment
Change-Id: I3d45914e349a4268204af84b95b53ccce7b9d544
2015-10-30 13:52:29 +02:00
189c3a553e dbaccess KeySet: on insert, set NULL only when there is no default value
Change-Id: I4f9ea6760a7e47d28fe378c8429fb286d6e7f33e
2015-10-28 17:53:48 +01:00
17aaa3fed1 tdf#93724 KeySet insert: properly set default values: NULL & right type
Change-Id: I933eed918e18b6923d4e0d24748297cf0dd0088d
2015-10-20 19:15:52 +02:00
28ecf84346 loplugin:defaultparams
Change-Id: I9dccf0538389063648e97575ff4c3765f0b1256b
2015-10-20 11:45:11 +02:00
7ea5ad6e46 Assumed fix of a clang-analyzer-deadcode.DeadStores
...where the "bOk = false" from the leading "if" is always overwritten in the
following check of "bOk = sTableRange == _sUpdateTableName".  The code had been
effectively like that ever since it got introduced with
4ae41a466ad659524809c23c9086df70c5456a39 "INTEGRATION: CWS dba30," but it looks
broken.  I assume the two checks of "sTableRange == _sUpdateTableName" for
pNode->GetChild(0) and pNode->GetChild(2) shall only be done if the leading "if"
is not hit.  (And one remaining uncertainty is if really only one of those
"sTableRange == _sUpdateTableName" checks needs to be true or if both should be
true for bOk to be true.)

Change-Id: I453690d65326ed67d7a074d4e4783a743a60d454
2015-10-13 17:40:33 +02:00
2c5f5976b2 clang-analyzer-deadcode.DeadStores
In 8b9e4e393eff8b89a37a5932548700c0b50bcab8 "initial import" the assignment to
bCheck was in a for loop that used bCheck in its condition,

  sal_Int32 nPos = m_nStartPos+1;
  for(; aIter != m_pMatrix->end() && bCheck;)
  {
      if(!aIter->isValid())
          ...
      m_pCacheSet->fillValueRow(*aIter++,nPos++);
      bCheck = m_pCacheSet->next();
  }

that loop was then replaced with

  sal_Int32 nPos = m_nStartPos;
  bCheck = fill(aIter,m_pMatrix->end(),nPos,bCheck);

(without further use of bCheck) in 2facbebb88fe72614d566c3187c8f86c5c61f8bd
"MWS_SRX644: migrate branch mws_srx644 -> HEAD" (and the braces around

  {
      ORowSetMatrix::iterator aIter(aEnd);
      sal_Int32 nPos = m_nStartPos + 1;
      bCheck = fill(aIter, m_pMatrix->end(), nPos, bCheck);
  }

introduced in 1234d599d4ee67bd725f0513431b2d4c56c9e09d "ORowSetCache: overhaul
internals," presumably to limit the scope of that aIter introduced there).

Change-Id: I1cf4a22fbd1b76d524251a82c3ab4e6ca7a9eca1
2015-10-13 17:40:33 +02:00
b36963c0a6 Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY code
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12 17:52:29 +02:00
bff4c13475 Replace "SAL_DELETED_FUNCTION" with "= delete" in LIBO_INTERNAL_ONLY code
Change-Id: I328ac7a95ccc87732efae48b567a0556865928f3
2015-10-12 17:52:26 +02:00
43d35f56ef Fix typos
Change-Id: I54c32259750c0863a39f56fabaa1a0df7d208c9a
2015-10-06 21:17:27 +02:00
558b08d55f silence warning when not a warning
Change-Id: I31d7835a5ed3053cd1a930b3fb922d689d6ddcbe
2015-09-17 19:35:57 +02:00
ddc2809202 boost->std
Change-Id: Idfbcfa1e5ba7bff92e98693c33c4b33a6beda08f
2015-09-17 14:12:07 +01:00
899c21ce5d dbaccess: replace for_each with range-based for
Replace complex uses of ::std::for_each with a range-based for-loop.

Change-Id: I82331f16cc1994dd9ef36eb80d67b64171cecc74
Reviewed-on: https://gerrit.libreoffice.org/18355
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-07 07:18:33 +00:00
8106bfcdf3 loplugin:stringconstant: OUStringBuffer: appendAscii -> append
Change-Id: Icbef0736acd5143200478410d65cfdd2ce10eeee
2015-08-31 08:03:51 +02:00
9c8fd7d1c5 Clean up sEmpty
Change-Id: If1b2bfe308caa2bce92e73d2c5c86ee273faed93
2015-08-27 08:00:32 +02:00
56af9ab6bb loplugin: defaultparams
Change-Id: Ia66788f5db2da8c6259cd08f655b3cb7cb12ed59
2015-08-14 10:52:47 +02:00
9c1f700aff improve refcounting loplugin to check SvRef-based classes
Change-Id: I2b3c8eedabeaecd8dcae9fe69c951353a5686883
Reviewed-on: https://gerrit.libreoffice.org/17521
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-05 11:26:04 +00:00
7dc5e8731f com::sun::star->css in dbaccess
Change-Id: I4fbdd3fb7d1e0ad4423148aaaed3a15aebb26d14
2015-08-03 13:38:44 +02:00
fb038a0d0d dbaccess: replace boost::function with std::function
Change-Id: I4bea36a9add24f9144c8e222e9ce42c7c9f3678b
2015-07-31 21:54:25 +02:00
a45827b230 loplugin:unusedmethods
Change-Id: Ib4d77ee01e7362f5951f81fceeca3c489872d971
Reviewed-on: https://gerrit.libreoffice.org/17378
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-30 06:23:00 +00:00
38023af6c1 loplugin:unusedmethods
Change-Id: If5090c330e12d6e537766bf4a9be0a2360381a7a
Reviewed-on: https://gerrit.libreoffice.org/17312
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-24 10:36:20 +00:00
e103bf6cfd loplugin:unusedmethods dbaccess
Change-Id: Ifa16acc6d90ebd4f56c5662959010f6228228cb5
Reviewed-on: https://gerrit.libreoffice.org/17209
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-20 11:56:11 +00:00
7fa29ecc72 tdf#88206 replace cppu::WeakImplHelper* etc.
with the variadic variants, for dbaccess.

Change-Id: I60921b1b1d3b65fb9087552ed118c60dc9f89032
Reviewed-on: https://gerrit.libreoffice.org/17146
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-17 07:13:29 +00:00
cbce40e965 Make content of OSL_ASSERT, DBG_ASSERT, etc. visiblie in non-debug builds
...to avoid lots of loplugin:staticmethods warnings.  Also enables DBG_ASSERT
etc. also for --enable-debug builds in addition to --enable-dbgutil builds.

Change-Id: Ib89ecd9ab8ce7abb2c64790ace248b31f9d2b64d
2015-07-13 18:14:11 +02:00
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
89c77994d4 remove some unnecessary typedefs around uno::Reference
Not very useful these days, since we have the css:: prefix to reduce
verbosity.

Found with a search like:
   git grep -nP 'typedef .*uno::Reference.*<.*>\s+\w+;'
       | grep -v 'std::'

Change-Id: I16f41c53837ec5c613545ae45df38b0daddcbadd
Reviewed-on: https://gerrit.libreoffice.org/16730
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-06 06:14:15 +00:00
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
1d498fb0fe some other coverity things
Change-Id: I89ffd2b918f8707cde1b1d015c1ad35ef484b69c
2015-07-02 11:39:34 +01:00
b55166d266 Revert "return and use std::vector from OInterfaceContainerHelper"
This reverts commit e57314f61f67b093510c5a8a8f34a62126ba8734.
2015-06-29 10:11:53 +02:00
e57314f61f return and use std::vector from OInterfaceContainerHelper
since most of the time we don’t need a heavyweight uno::Sequence.
Adds a new method getElementsAsVector().

Change-Id: I9e72bef0c0c723ffd0dd7d4152db5baec6784a7a
Reviewed-on: https://gerrit.libreoffice.org/15747
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-06-29 07:25:22 +00:00
3b4180a8c6 coverity#1308442 Uncaught exception
Change-Id: Id86fbd119c5da322dadadbfd65cbb09dcc403f38
2015-06-27 18:24:56 +01:00
f9f4639dee coverity#1308441 Uncaught exception
Change-Id: I861cc6d427782d52f098542371f13d6fde1280f0
2015-06-27 14:42:23 +01:00
3eb1b04921 coverity#1308440 Uncaught exception
Change-Id: Id0392763efa7041db0dc96a2b08d94274030cdee
2015-06-27 14:42:22 +01:00
37631e1c42 coverity#1308439 Uncaught exception
Change-Id: Ibb5e04c49efddbf4e30615f4e4560414026f520c
2015-06-27 14:42:22 +01:00
582dc20778 coverity#1308436 Uncaught exception
Change-Id: Icdcd3deee724eddbed776db4ee4a77fae2dcc2ee
2015-06-27 14:42:21 +01:00
a6d8adc78b coverity#1308434 Uncaught exception
Change-Id: I7014f77a194af6aae43051b680c02c4f2b97b597
2015-06-27 14:42:19 +01:00
68c09b05f0 loplugin:stringconstant: Flag more inefficiencies
Change-Id: Ifd804fb45fb032dddbf2ba3643ec0964e0e24724
2015-06-25 12:38:35 +02:00
3cb7db75ac gtk3: native render the comically oversized gtk3 spinbuttons
Change-Id: I3e97200d59a97271617a6e9a88c807a07a33edfe
2015-06-22 15:48:46 +01:00
90134af864 cppcheck: noExplicitConstructor
Change-Id: I913f983bb0f55e05bb5ec8994ee75a7e7d69bd1b
2015-06-22 15:46:13 +01:00
1f116adb7c callcatcher: update unused code
Change-Id: I29b3f1408b814a1424d8bab232e9ac618901b4c2
2015-06-20 14:20:33 +01:00
4729774b24 remove unnecessary check for null when calling delete
Idea originally from caolan.
Found using the following command:
find . -name *.cxx | xargs /opt/local/bin/grep -zlP '(?m)if\s*\(\s*\w+\s*\)\s*delete\s+\w+\;'

Change-Id: I3338f4e22193a6dfd6219c8c75835224a3392763
2015-06-15 14:46:41 +02:00