Commit Graph

1434 Commits

Author SHA1 Message Date
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
81b954718f loplugin:unnecessaryvirtuals
Improve the plugin a little.
Create a python script to process the output.
Run it again.

Change-Id: I05c21d8a21c8f4243af739c412fda0a521f9b5f0
2015-06-09 10:06:57 +02:00
8538026000 loplugin:cstylecast: deal with remaining pointer casts
Change-Id: If951c1982314c5a045d51bc4fff62a3e2b265e08
2015-06-08 16:24:31 +02:00
08e278b411 loplugin:implicitboolconversion
Change-Id: Ic0c6487661286efa04452427fc3a64da747c2ce8
2015-05-31 13:55:45 +02:00
d6d19acaca do not try to get bookmark when in invalid position
Change-Id: I64fc14e527af4f0f846bbfae84cf8d1d2914b6b9
2015-05-30 17:32:51 +02:00
b4e6dd8200 handle getParameters being called before execute()
Change-Id: If81e745ee15df3848c6577a9e979672523718daf
2015-05-30 17:32:50 +02:00
8607f8b552 tdf#82591 ORowSetBase::getRow handles insert row correctly
and critically for this bug, modified row, too.

Change-Id: I11c418d8926cabe81fcdb65d7293a4283e566f7a
2015-05-30 17:32:48 +02:00
6c1cabe677 loplugin:unnecessarysuperclass, merge IWarningsContainer..
..into WarningsContainer

Change-Id: I682528a4eb1b1298faf12b2d498db65f94800cd5
Reviewed-on: https://gerrit.libreoffice.org/15905
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-05-29 06:46:40 +00:00
add1351e59 loplugin:staticmethods
Change-Id: Ie6867e04156f40cacee275d5bbf3d63ac4965b30
2015-05-05 09:30:39 +02:00
7259901b25 dbaccess: log exception messages in ORowSetCache
Change-Id: I1c76d4ce91d1f22d88106918ab139b17f6f017f0
2015-04-29 16:13:10 +02:00
6cb8d552eb loplugin:simplifybool
Change-Id: I77d80494ab99b4cd70f623798389f8dc35772d8a
2015-04-24 12:36:20 +02:00
2240118177 Improved loplugin:literaltoboolconversion looking into cond. exprs.
...automatic rewriter fixes

Change-Id: I6b04ca80f08f8a71ff94e309fd52f44d736751ee
2015-04-23 18:39:07 +02:00
a1a25f4c6c tdf#88710 Cleanup after removing dbtoolsclient
Removes "virtualdbtools" and its implementation under "simpledbt", which are
mostly wrappers around various dbtools functions and classes, previously aiding
the now removed dynamic loading logic.

Removes IDataAccessTools, IDataAccessTypeConversion and IDataAccessToolsFactory
interfaces and their accompanying implementations which are completely unused.

Removes IDataAccessCharSet (implemented by ODataAccessCharSet) and moves the
implementation into a function which replaces ODataAccessCharsetHelper.

Removes ISQLParseNode and ISQLParser and their implementation in
OSimpleParseNode and OSimpleSQLParser, which simply wrap around OSQLParseNode
and OSQLParser respectively. To avoid including "sqlbison.hxx" unnecessarily,
includes to "sqlbison.hxx" are now only used where needed.

Change-Id: Id882dfbf43514d84a1eaffc1f916d627830c8cd6
Reviewed-on: https://gerrit.libreoffice.org/15450
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: David Tardon <dtardon@redhat.com>
2015-04-22 07:25:17 +00:00