346 Commits

Author SHA1 Message Date
Noel Grandin
5d0e485e82 use actual UNO enums in reportdesign..svtools
Change-Id: Idcd916382b87f8542dc6b5cdcb5ecb01d6947203
Reviewed-on: https://gerrit.libreoffice.org/36043
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-03 09:40:19 +00:00
Noel Grandin
198c41c4fe new loplugin unoany
Change-Id: I5d6c4a67cb2a09e7cd5bd620c6b262d188701b89
Reviewed-on: https://gerrit.libreoffice.org/34714
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-28 10:17:47 +00:00
Stephan Bergmann
36a5d940e7 loplugin:loopvartoosmall
Change-Id: Id2771f413798ed9ceb76e9c4dd3113633d4e481e
2017-02-27 13:03:42 +01:00
Noel Grandin
1c3e84d819 teach lolugin:stringconstant about calling constructors
so we can remove unnecessary calls to the OUString(literal) constructor
when calling constructors like this:
   Foo(OUString("xxx"), 1)

Change-Id: I1de60ef561437c86b27dc9cb095a5deb2e103b36
Reviewed-on: https://gerrit.libreoffice.org/33698
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-31 08:56:20 +00: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
4fabc2347c loplugin: unnecessary destructor scaddins..sdext
Change-Id: I6ae02ad25863ec7e0f780020dbc69c9a99488c24
Reviewed-on: https://gerrit.libreoffice.org/33511
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-25 07:31:25 +00:00
Takeshi Abe
d8aa450396 tdf#105382 Set URL-decoded default filename for minimized presentation
See mailing-list thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2017-January/076702.html>
for a discussion on the original presentation file's URL.

Change-Id: I51ccd7672513118f39518c4ed21902de16b2298f
Reviewed-on: https://gerrit.libreoffice.org/33261
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
2017-01-24 13:22:37 +00:00
Stephan Bergmann
920f1dd4a7 New loplugin:dynexcspec: Add @throws documentation, sdext
Change-Id: Id01b4012d2ac3cf479a96ed496eff3d97e5c80c5
2017-01-19 18:03:14 +01:00
Noel Grandin
02ed1924eb OSL_TRACE->SAL in sd..sdext
Change-Id: I6b224fa890dc96aada7140af27078da5e25c3ff8
Reviewed-on: https://gerrit.libreoffice.org/31898
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-12 12:17:26 +00:00
Jochen Nitschke
8826771e83 style fixes for cppcheck noExplicitConstructor
Change-Id: I2a690caea7656f2a18beb6d09f53154178a30f34
Reviewed-on: https://gerrit.libreoffice.org/30460
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-11-01 18:44:20 +00:00
Takeshi Abe
b589c4cd87 Omit comparator which is the same as default std::less<key_type>
Change-Id: I72a0b618577caececaaf3eb4df53d4cb192251da
Reviewed-on: https://gerrit.libreoffice.org/30369
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-10-31 03:48:49 +00:00
Jochen Nitschke
7567a4c230 '>>=' with rhs Any is a copy assignment
replace '>>=' operator with '=' where return value is not checked
and simplify. (note: switches lhs with rhs)

Change-Id: I0d283e8786ea996ed80d7aa9d8a4ea930a3d52f8
Reviewed-on: https://gerrit.libreoffice.org/30004
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-19 19:28:18 +00:00
Jochen Nitschke
d1ea6ecda6 replace <<= with assign for <<= with rhs Any
found by deleting specialization of '<<=' template

Change-Id: I253f15177ab20fd3ef9baf4158da8c662cb47e6c
Reviewed-on: https://gerrit.libreoffice.org/29956
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-10-18 19:16:44 +00:00
Stephan Bergmann
91dd2db17b loplugin:override: No more need for the "MSVC dtor override" workaround
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark
overriding destructors as 'virtual'" appears to no longer be a problem with
MSVC 2013.

(The little change in the rewriting code of compilerplugins/clang/override.cxx
was necessary to prevent an endless loop when adding "override" to

  OOO_DLLPUBLIC_CHARTTOOLS    virtual ~CloseableLifeTimeManager();

in chart2/source/inc/LifeTime.hxx, getting stuck in the leading
OOO_DLLPUBLIC_CHARTTOOLS macro.  Can't remember what that
isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.)

Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-09-13 13:19:22 +02:00
Noel Grandin
b1164b07f9 loplugin:constantparam in sd
Change-Id: I2bc989802c12b379a1ba4202f54ecfef1f339c8c
Reviewed-on: https://gerrit.libreoffice.org/28774
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-09-10 11:28:16 +00:00
Noel Grandin
6c87b02840 loplugin:countusersofdefaultparams in sd
Change-Id: I848d9b555a26e9d343efdfaaaec44a2c7d8be5b5
Reviewed-on: https://gerrit.libreoffice.org/27765
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-02 05:34:49 +00:00
Stephan Bergmann
768a6fc9c0 loplugin:passstuffbyref also for {css::uno,rtl}::Reference
Change-Id: I3774f16c09b89fc6888bff3a388c290c32bb8a14
2016-07-07 18:59:55 +02:00
Stephan Bergmann
4d49c9601c Let loplugin:passstuffbyref also look at fn defn not preceded by any decl
Change-Id: I752bc96d2d521d790e919283cabb14b6526626f4
2016-06-08 17:14:34 +02:00
Noel Grandin
f3d9aab841 teach passstuffbyref plugin to check for..
unnecessarily passing primitives by const ref.

Suggested by Tor Lillqvist

Change-Id: I445e220542969ca3e252581e5953fb01cb2b2be6
Reviewed-on: https://gerrit.libreoffice.org/24672
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-06 06:48:38 +00:00
Noel Grandin
5abc669599 new plugin stylepolice
check for local variables which follow our member field naming
convention, which is highly confusing

Change-Id: Idacedf7145d09843e96a584237b385f7662eea10
2016-04-21 08:32:47 +02:00
Stephan Bergmann
259ece83e9 loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: I0a24f0d6fa58407f9e365a5c812743151b88513b
2016-04-20 17:25:50 +02:00
Noel Grandin
789055bc2a clang-tidy performance-unnecessary-copy-initialization
probably not much performance benefit, but it sure is good at
identifying leftover intermediate variables from previous
refactorings.

Change-Id: I3ce16fe496ac2733c1cb0a35f74c0fc9193cc657
Reviewed-on: https://gerrit.libreoffice.org/24026
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-18 07:37:31 +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
Stephan Bergmann
028dcd41ab Avoid reserved identifier
Change-Id: I0d75653dcde39b0fbd8af723295262615978d903
2016-04-12 20:03:42 +02:00
Jochen Nitschke
4c7ec9f112 cleanup: remove unused com/sun/star/uno includes
Sequence.h(xx), Any.h(xx) and Type.h(xx)
and remove unused using-declarations from these files.

Add a few missing includes provided by them.

Change-Id: I6b91b6d1fdf9d0496dd546c0aab9bdcc6831a5d4
Reviewed-on: https://gerrit.libreoffice.org/23805
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-12 06:38:26 +00:00
Noel Grandin
50b39947cb loplugin:constantparam in sdext
Change-Id: Ib349a856665776ef51524b3c6613774f739bbdfe
2016-03-23 09:13:14 +02:00
David Tardon
0f0cea28c7 delete hidden pages before deleting unused masters
Change-Id: I40b624c0e6e6cff2c88815f7d16e862f09d79d5c
2016-03-22 09:05:26 +01:00
Noel Grandin
c45d3badc9 new loplugin: commaoperator
Change-Id: I03f24e61f696b7619855e3c7010aa0d874e5a4ff
2016-02-23 08:08:56 +02:00
Chris Sherlock
a238b1f8d3 Remove excess newlines
A ridiculously fast way of doing this is:

for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \
  --exclude-dir=workdir --exclude-dir=instdir '^
{3,}' .)
do
    perl -0777 -i -pe 's/^
{3,}/

/gm' $i
done

Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c
Reviewed-on: https://gerrit.libreoffice.org/22224
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-09 08:18:05 +00:00
Chris Sherlock
538f276ae0 Formatting changes across all modules
+ Removed comment cruft
+ Tab formatting in number of files
+ Some commented out code removed
+ Tab characters replaced with spaces
+ Newline cleanup in quite a few files
+ Tweak header guard #endifs

Change-Id: I3208ff2f047da890edcc49b73389aca22442f5fc
Reviewed-on: https://gerrit.libreoffice.org/22221
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-09 08:11:34 +00:00
Noel Grandin
b696725cf6 loplugin:unusedmethods unused return value in sdext
Change-Id: Ie919a094630da57371b13081ab2f04984dd96c78
2016-01-14 11:45:22 +02:00
Chris Sherlock
90bf2d8064 sdext: change instances of maName to more descriptive names
Change-Id: If1cb55737240ba1e35e18790894d421aae660026
Reviewed-on: https://gerrit.libreoffice.org/20960
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2015-12-26 19:07:18 +00:00
Noel Grandin
42e14a4813 loplugin:unusedfields sdext
Change-Id: I1719d684b0afd348c16a2ba942899e8ccded81c3
2015-12-21 13:51:29 +02:00
Noel Grandin
1f86864e97 loplugin:unusedfields various
Change-Id: I59d9f7f73677358b4ae57efda965d43718bdf0d5
2015-11-25 13:57:29 +02:00
Noel Grandin
990691b144 loplugin:unusedfields in sdext/
Change-Id: Ibf5083cde3553289b3a29c9b992800e4bd82e6e4
2015-11-23 13:30:53 +02:00
Noel Grandin
96c26b0d9d use initialiser for Sequence<OUString>
using variations of:
git grep -lP 'Sequence.*OUString.*\(\s*1\s*\)' | xargs perl -0777 -pi -e "s/Sequence<OUString> (\w+)\(1\)\;
\s*OUString\* pArray.*;
.*\[0\]\s*=\s*(\S+)\;/Sequence<OUString> \1 { \2 };/g"

Change-Id: I03c64334ff30ee14dce0d17b67f5122a3893bbe3
Reviewed-on: https://gerrit.libreoffice.org/19971
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15 12:20:39 +00:00
Noel Grandin
db17d3c17c new loplugin: memoryvar
detect when we can convert a new/delete sequence on a local variable to
use std::unique_ptr

Change-Id: Iecae4e4197eccdfacfce2eed39aa4a69e4a660bc
Reviewed-on: https://gerrit.libreoffice.org/19884
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-11 07:16:20 +00:00
Stephan Bergmann
d930b6c2e6 loplugin:nullptr (automatic rewrite)
Change-Id: I8aec30601862feaeb99e3ce01adf61665688fa9a
2015-11-10 10:31:38 +01:00
Noel Grandin
6c80a8fe89 new loplugin: oncevar
Change-Id: If57390510dde4d166be3141b9f658a7453755d3f
Reviewed-on: https://gerrit.libreoffice.org/19815
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-09 08:34:40 +00:00
Stephan Bergmann
dd4c240818 loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)
Change-Id: I7efbeda973c2cfa2472eec5b3d309e8e22aa5d9b
2015-11-06 09:37:03 +01:00
Stephan Bergmann
8299b8b81c Remove unused PPPOptimizerTokenEnum enumerators
Change-Id: Ia94becb796f71aa602c65375539f8cdafb270bca
2015-11-05 21:29:58 +01:00
Stephan Bergmann
ffde331fbe Remove unused strings
Change-Id: I376a1a9c8198e71eb8fd893ca4382fd25bd55817
2015-11-05 09:18:22 +01:00
Noel Grandin
06302bb3d1 use uno::Reference::set method instead of assignment
Change-Id: I03a8cc8405e1e7ddf75fabd2ba7d85edddf5b30c
2015-11-05 07:41:29 +02:00
Noel Grandin
b5db48ada1 no need to use OUString constructor in call to createInstance
Change-Id: Iaf3d83ba1490cb1d97a5bd4d1f7cd6943d4a7296
Reviewed-on: https://gerrit.libreoffice.org/19704
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-01 15:25:43 +00:00
Noel Grandin
3bc5df7f32 UNO: no need to use OUString constructor when calling createInstance
Change-Id: I37da28539b94706574116d0fff5f008aabfb5526
Reviewed-on: https://gerrit.libreoffice.org/19682
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-30 08:59:59 +00:00
Noel Grandin
ab20a5888d com::sun::star->css in sdext
Change-Id: I1720391c6842a75033aca4e1b852a8cb89ca1efa
Reviewed-on: https://gerrit.libreoffice.org/19638
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-29 06:52:29 +00: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
Julien Nabet
3ad8f409d7 Prefer getSelectedFiles to getFiles (sdext+qadevOOo)
Change-Id: I4827e47b7d67b0112c0f9023c0db4ce8975f06e1
Reviewed-on: https://gerrit.libreoffice.org/19126
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2015-10-04 14:32:30 +00:00
Caolán McNamara
5c26f79467 cppcheck: noExplicitConstructor
Change-Id: Ibb94d40706fced3c1c053fd58ef4e2af2d849587
2015-09-27 21:05:19 +01:00
Takeshi Abe
e15d4b8ee9 sdext: tdf#88206 replace cppu::WeakImplHelper* etc.
with the variadic variants.

Change-Id: I663029b736489b81ed4ccb5f7bd657fbaf091bdf
Reviewed-on: https://gerrit.libreoffice.org/18206
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-01 07:59:50 +00:00