84 Commits

Author SHA1 Message Date
Noel Grandin
ed76d1d350 loplugins:redundantcast teach it about c-style typedef casts
Change-Id: I1ac11a2481c0f4d8be1e1fd7c7637ac0ece3d65c
Reviewed-on: https://gerrit.libreoffice.org/35558
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-23 09:48:10 +00:00
Stephan Bergmann
6551a14138 loplugin:loopvartoosmall
Change-Id: Ic85cce722a0c1702ffbb7a45001fdf869ca6accf
2017-03-07 19:54:08 +01: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
Noel Grandin
bbf6c51717 loplugin:expandablemethods in forms..formula
Change-Id: Idc948ad06913def28cb642c3a4e5ea9322b9fb3b
Reviewed-on: https://gerrit.libreoffice.org/30688
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-08 09:49:48 +00:00
Noel Grandin
0aa24916cb loplugin:expandablemethodds in filter..forms
Change-Id: Ic1f64f804acc10b1a48d82de9fc6a2b39af465a0
Reviewed-on: https://gerrit.libreoffice.org/30014
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-19 06:32:58 +00:00
Stephan Bergmann
14cd5182c5 Replace fallthrough comments with new SAL_FALLTHROUGH macro
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in
preparation of enabling -Wimplicit-fallthrough.  (This is only relevant for
C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.)

Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but
that would require adding back in dependencies on boost_headers to many
libraries where we carefully removed any remaining Boost dependencies only
recently.  (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its
future evolution will not have any impact on the stable URE interface.)  C++17
will have a proper [[fallthroug]], eventually removing the need for a macro
altogether.

Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
2016-05-10 16:42:16 +02:00
Stephan Bergmann
715d4d803a Avoid reserved identifiers
Change-Id: Icc658a3adce2e93c3cc4e8a88689f462b1c7c8a1
2016-04-22 10:22:00 +02:00
Stephan Bergmann
bfb185c408 loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: I74cf43df85a878ee9af69901b2535f63461cb61e
2016-04-20 17:25:41 +02:00
Jochen Nitschke
150ac9cf05 clean-up: unused using declarations and includes
Searched source for using declarations.
Checked if those symbols reappear in the source file,
even in comments or dead code but not in #include statements.
If they don't reappear, remove the declaration.
Remove includes whose symbol got removed.

Change-Id: Ibb77163f63c1120070e9518e3dc0a78c6c59fab0
Reviewed-on: https://gerrit.libreoffice.org/24148
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-18 07:25:24 +00:00
Noel Grandin
62633dfe02 clang-tidy performance-unnecessary-value-param in various
Change-Id: I7168d44dab8e6a8e37bb7920d744ff32f5e52907
Reviewed-on: https://gerrit.libreoffice.org/24019
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-14 11:37:19 +00:00
Wastack
20ba5d464a tdf#97966 Drop 'static' keywords
Including no keywords from extern "C" blocks

Change-Id: I8bcd7e8a492ee4dbfa5141416c7c038a1391cf20
Reviewed-on: https://gerrit.libreoffice.org/23673
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-04-01 06:45:36 +00:00
Noel Grandin
aa4dc89352 loplugin:unusedmethods unused return value in forms
Change-Id: I9da3e72ca12e040e7fb5bea7ccaa071edfd34f27
2016-01-11 13:14:08 +02:00
Andrea Gelmini
64d624b651 Fix typos
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86
Reviewed-on: https://gerrit.libreoffice.org/21209
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-10 14:17:20 +00:00
Noel Grandin
8e234c5b7d use initialiser syntax for Sequence<OUString>
replaced using the script:

git grep -lP 'Sequence.*OUString.*\(1\)'
  | xargs perl -0777 -pi
    -e "s/Sequence< OUString > (\w+)\(1\);
.*\[0\] = (\S+);/Sequence< OUString > \1 { \2 };/g"

Change-Id: I23688a91562051a8eed11fc2a85599545c285c34
Reviewed-on: https://gerrit.libreoffice.org/19967
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15 10:13:08 +00:00
Stephan Bergmann
11d3652418 loplugin:nullptr (automatic rewrite)
Change-Id: Ic67c3138ca66c6b6d6fcf76b09d4581e23f51f8d
2015-11-10 10:31:26 +01:00
Noel Grandin
1b41208608 use uno::Reference::set method instead of assignment
Change-Id: I3d94c94a9829161663a7ed18421ace38ce95a659
Reviewed-on: https://gerrit.libreoffice.org/19733
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-02 06:17:21 +00:00
Noel Grandin
de020fc9c3 com::sun::star->css in forms/
Change-Id: I1c09e88f839bdf11c6ff809ec95769e8f729c7cd
2015-10-02 08:20:11 +02:00
Stephan Bergmann
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
Stephan Bergmann
3a05a08ba7 loplugin:redundantcast: const_cast to same type
Change-Id: I5fe081bc2edfe14c81372ae0fd407e493d80d689
2015-05-29 12:04:32 +02:00
Noel Grandin
e95b073790 loplugin:staticmethods
Change-Id: I60678dfd1bd0d2e4754dbbe6ba053e90d5870780
2015-05-05 09:30:40 +02:00
Michael Meeks
8a65284fe3 Automated conversion of VclPtr construction to use Instance template.
Change-Id: I8be9141b9653e73ebd23a5a3d810f240c376f97e
2015-04-10 13:40:25 +01:00
Noel Grandin
61b224f392 vclwidget: fixup locally allocated vcl::Window objects
They need to be wrapped in ScopedVclPtr in order to be disposed properly.

Change-Id: Ib64dba353774f54711e4de7f5d15d859c6a4dc7e
2015-04-10 12:37:44 +01:00
Noel Grandin
00f2787a4a vclwidgets: wrap all vcl::Window subclasses allocated on stack in VclPtr
Change-Id: Ia8b0d84bbf69f9d8f85505d019acdded14e25133

Conflicts:
	sw/qa/tiledrendering/tiledrendering.cxx
2015-04-09 22:17:00 +01:00
Matúš Kukan
39c4b2787e forms: Replace these macros
Change-Id: I656905cf6f0e3647824ff3836fcea93920251264
2015-03-28 11:52:41 +01:00
Caolán McNamara
186dbb6890 callcatcher: update unused code
Change-Id: If6e0cbf8544ca7a4668cdc67fcf390d8835b7017
2015-02-19 09:55:18 +00:00
Chris Sherlock
5d05f7ed85 forms: use constructor feature for form modules
Change-Id: I8f1588cbd338e2f8b5bc6047d84b17c697a7d2d3
2015-02-17 11:34:20 +01:00
Michael Weghorn
afb5143639 fdo#39440 reduce scope of local variables
This addresses some cppcheck warnings.

Change-Id: I1d037e87c69b1a7de019f1abf1f729bf7e28d762
Reviewed-on: https://gerrit.libreoffice.org/13494
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-12-17 07:31:17 +00:00
Caolán McNamara
12bcfec04f markup with event type not checker type
Change-Id: I14c0c5d90b67000cb4fe9e6be647854abfe784da
2014-11-05 14:58:00 +00:00
Stephan Bergmann
86c89322ea loplugin:staticcall
Change-Id: I3c43c34e66772ce7e42b42be04e0591f2e78ec01
2014-06-13 17:54:27 +02:00
Chris Laplante
04f31d13c5 Remove ASCII art, useless comments and whitespace from forms module
Change-Id: Ib6157a493092a137a6b0bf5b96d0e760d307f9da
Reviewed-on: https://gerrit.libreoffice.org/9472
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-05-25 14:35:17 -05:00
Noel Grandin
78b9537b6a various: sal_Bool->bool
Change-Id: I30fa5227f30373f95060148f269450d2945c1bb9
2014-05-08 11:48:14 +02:00
Noel Grandin
c0d037a6ec forms: sal_Bool->bool
Change-Id: Ifa15f4ed3107b1075b504f09d2cae69ee38d347a
2014-05-06 12:38:16 +02:00
Tor Lillqvist
f12237c4c6 More hacking on --disable-database-connectivity
Change-Id: Iefa6b104c60464e5a0d793bd676d8ea7ff2727c1
2014-04-22 13:04:19 +03:00
Stephan Bergmann
1d057cca8c Clean up function declarations and some unused functions
Change-Id: I47bdc668ecf703d85f4d50c71f1347fb9e8e89d8
2014-04-14 12:46:57 +02:00
Tor Lillqvist
6835d9f307 It's "its", not "it's"
Change-Id: Ieaa787afd7cc622b4750a2ee8f17f6dad934ba63
2014-04-10 20:22:50 +03:00
Noel Grandin
5babf1b903 remove unnecessary scope qualifier from sal_Bool uses
i.e. convert "::sal_Bool" to "sal_Bool"

Change-Id: Ie5943aee4fee617bf2670655558927ed25b7e067
2014-04-03 13:54:02 +02:00
Alexander Wilms
bed18b128f Remove visual noise from forms
Conflicts:
	forms/source/component/DatabaseForm.cxx

Change-Id: I4005fe65e89794bd92191c37221c252a3e964917
Reviewed-on: https://gerrit.libreoffice.org/8262
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-26 14:54:56 -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
Michael Stahl
45befb3685 "stati" considered both pretentious and incorrect Latin
As one knows, the Latin plural of the noun status is statūs.

Change-Id: I6b19c57aa2aedcc1337736becc93d8802fe03f2e
2014-01-30 14:04:29 +01:00
Stephan Bergmann
6d993bc5b4 bool improvements
Change-Id: I78099f87510355a43ba9b01ca9d545d44ce11a50
2014-01-28 20:26:28 +01:00
Stephan Bergmann
bbd9668d5f bool improvements (related to mixing bool/sal_Bool in &=, |=, ^=)
Change-Id: I9869d9709f28b68ef7b518527175589d80644668
2014-01-22 15:00:54 +01:00
Stephan Bergmann
459c8131ac bool improvements
Change-Id: Iba5bf2d2207f80098cb43ff8ce290eef741d21c9
2014-01-14 21:28:07 +01:00
Noel Grandin
610b2b94b3 remove unnecessary use of OUString constructor when assigning
change code like
   aStr = OUString("xxxx");
to
   aStr = "xxxx";

Change-Id: Ib981a5cc735677ec5dba76ef9279a107d22e99d4
2013-11-19 10:29:31 +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
Marcos Paulo de Souza
da5449da0c fdo#54938: More uses of cppu::supportsService
Change-Id: Id6bed78d92eba52283a17ab3ca66e751c225e48d
Reviewed-on: https://gerrit.libreoffice.org/6423
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2013-10-25 08:07:04 +00:00
Luboš Luňák
64b993e046 finish deprecation of O(U)String::valueOf()
Compiler plugin to replace with matching number(), boolean() or OUString ctor,
ran it, few manual tweaks, mark as really deprecated.

Change-Id: I4a79bdbcf4c460d21e73b635d2bd3725c22876b2
2013-08-21 15:10:35 +02:00
Thomas Arnhold
ba0a57702c remove OUString wrap for string literals
For some functions and all kinds of Exceptions.

CannotConvertException
CloseVetoException
DisposedException
EmptyUndoStackException
ErrorCodeIOException
Exception
GridInvalidDataException
GridInvalidModelException
IOException
IllegalAccessException
IllegalArgumentException
IllegalTypeException
IndexOutOfBoundsException
NoMasterException
NoSuchElementException
NoSupportException
PropertyVetoException
RuntimeException
SAXException
ScannerException
StorageWrappedTargetException
UnsupportedFlavorException
VetoException
WrappedTargetException
ZipIOException
throwGenericSQLException
throwIllegallArgumentException

createInstance
createInstanceWithContext
forName
getByName
getPackageManager
getPropertyValue
getUnpackedValueOrDefault
getValueByName
hasPropertyByName
openKey
setName
setPropertyValue
supportsService

bash command:

for i in `cat list`; do git grep "$i\s*(\s*OUString(\s*\"" -- '*.[hc]xx'
	| cut -d ':' -f1 | sort -u
	| xargs sed -i
		-e "s/\(\<$i\s*(\)\s*OUString(\s*\(\"[^\")\\]*\"\)\s*)\s*/\1\2/g"
		-e "s/\($i.*\)\"+ /\1\" + /g";
done

Change-Id: Iaf8e641b0abf28c082906014f87a183517630535
Reviewed-on: https://gerrit.libreoffice.org/4624
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-06-29 21:52:54 +00:00
Noel Grandin
d209e13319 fdo#46808, Convert comphelper::ComponentContext in forms module
Change-Id: I8a9913d964633381f00c0a4885cc655805fa1974
2013-06-03 10:00:03 +02:00
Lionel Elie Mamane
7bb77f3de9 janitorial: correct method name in assert message
Change-Id: I11ee124af09e9806fc45945316ae947757458d5b
2013-05-12 05:07:54 +02:00