Commit Graph

219 Commits

Author SHA1 Message Date
Noel Grandin
38898ffcd9 loplugin:useuniqueptr in xmlsecurity::BufferNode
Change-Id: Ifaea9f2f0ef5b84372b2ba51deacdb4149bb66e1
Reviewed-on: https://gerrit.libreoffice.org/60616
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-20 09:30:35 +02:00
Arkadiy Illarionov
87b24ddbba Simplify containers iterations in xmlhelp, xmlreader, xmlscript, xmlsecurity
Use range-based loop or replace with functions from std algorithm.

Change-Id: I5b1859da37c2a6c6e5e70602287bfc2ada951893
Reviewed-on: https://gerrit.libreoffice.org/60463
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-15 09:06:38 +02:00
Noel Grandin
5cd976bdef loplugin:simplifyconstruct in writerfilter..xmlsecurity
Change-Id: Ic2d901ca0dbc2d6fa96611d260c1572da8a783c0
Reviewed-on: https://gerrit.libreoffice.org/60398
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-13 08:30:22 +02:00
Arkadiy Illarionov
8d5779bef3 Simplify containers iterations in xmlsecurity
Use range-based loop or replace with functions from std algorithm.

Change-Id: I0146186b7c42405076dfce7de7805be4228cc6d3
Reviewed-on: https://gerrit.libreoffice.org/60360
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-12 21:54:06 +02:00
Noel Grandin
83d8331581 loplugin:stringloop in svgio..xmlsecurity
Change-Id: I1b2fe5674c8350690efc3d3219b9273cc61d5b0c
Reviewed-on: https://gerrit.libreoffice.org/58332
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-30 21:04:40 +02:00
Noel Grandin
a8a11fbadc loplugin:unusedfields,can-be-const in xmlsecurity
Change-Id: I271b1d69d5231ab76cb49fb0101c09d7c0ef6b79
Reviewed-on: https://gerrit.libreoffice.org/57779
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-23 08:41:51 +02:00
Jochen Nitschke
9401c7c28a remove unused processfactory.hxx includes
and fix fallout

Change-Id: Id06bf31f2075111e426ba40c84c885ae70697bee
Reviewed-on: https://gerrit.libreoffice.org/52206
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-04-01 12:11:26 +02:00
Noel Grandin
73e6a7975b loplugin:unusedmethods
Change-Id: I7805ac9bc6f8c0aa5ba4804777e7d7c2c29a78f3
Reviewed-on: https://gerrit.libreoffice.org/52066
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-29 14:45:43 +02:00
Noel Grandin
5cb225b0b3 loplugin:useuniqueptr in SAXEventKeeperImpl
Change-Id: I1bb683dc8d492db73c2f2cc07c67b4dcb75bc1fb
Reviewed-on: https://gerrit.libreoffice.org/48558
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-25 13:05:30 +01:00
Stephan Bergmann
e5262ed74d More loplugin:cstylecast: xmlsecurity
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable
loplugin:cstylecast for some more cases" plus
solenv/clang-format/reformat-formatted-files

Change-Id: Ica6e96072435aa4df4e74accdfe06f798a640bbe
2018-01-12 20:08:53 +01:00
Stephan Bergmann
6f4f5677ac No need to keep these whitelisted functions decorated with SAL_CALL
The only effect SAL_CALL effectively has on LO-internal code is to change non-
static member functions from __thiscall to __cdecl in MSVC (where all other
functions are __cdecl by default, anyway).  (For 3rd-party code, it could be
argued that SAL_CALL is useful on function declarations in the URE stable
interface other than non-static member functions, too, in case 3rd-party code
uses a compiler switch to change the default calling convention to something
other than __cdecl.  But loplugin:salcall exempts the URE stable interface,
anyway.)

One could argue that SAL_CALL, even if today it effectively only affects non-
static member functions in MSVC, could be extended in the future to affect more
functions on more platforms.  However, the current code would already not
support that.  For example, 3af500580b
"loplugin:salcall fix functions" changed FrameControl_createInstance in
UnoControls/source/base/registercontrols.cxx to no longer be SAL_CALL, even
though its address (in ctl_component_getFacrory, in the same file) is passed to
cppuhelper::createSingleFactory as an argument of type
cppu::ComponentInstantiation, which is a pointer to SAL_CALL function.

Change-Id: I3acbf7314a3d7868ed70e35bb5c47bc11a0b7ff6
Reviewed-on: https://gerrit.libreoffice.org/46436
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-14 13:03:06 +01:00
Noel Grandin
3af500580b loplugin:salcall fix functions
since cdecl is the default calling convention on Windows for
such functions, the annotation is redundant.

Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d
Reviewed-on: https://gerrit.libreoffice.org/46164
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-11 12:13:46 +01:00
Stephan Bergmann
a2656563f1 loplugin:unnecessaryparen: Warn about parentheses around literals
...that are not composed of multiple tokens, like ("foo" "bar").  Also don't yet
warn about Boolean literals, which are sometimes wrapped in parentheses to
silence unreachable-code warnings.

To avoid multiple warnings about code like

  f((0))

switch to generally using a set of ParenExpr to keep track of which occurrences
have already been handled.

Change-Id: I036a25a92836ec6ab6c56ea848f71bc6d63822bc
Reviewed-on: https://gerrit.libreoffice.org/45317
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-27 14:04:40 +01:00
Stephan Bergmann
35a2b55a13 loplugin:includeform: xmlsecurity
Change-Id: I9c3eca51fec52a255fcf280fe4e5ecc2ebbee5f3
2017-10-23 22:45:46 +02:00
Miklos Vajna
86bc72072e xmlsecurity: work with impl directly in SignatureEngine::startEngine()
The only implementation of css::xml::crypto::XXMLSignatureTemplate is
XMLSignatureTemplateImpl, so work with that directly instead of going
via UNO.

Change-Id: I85e2169a909b689620c2ce125a9653f9a6696f45
Reviewed-on: https://gerrit.libreoffice.org/40950
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-08-10 09:50:29 +02:00
Noel Grandin
18f80da7a6 loplugin:checkunusedparams more part2
Change-Id: Ibb940c2a7098313dfa282734894b1abc1ac40bc2
Reviewed-on: https://gerrit.libreoffice.org/40489
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-28 07:18:23 +02:00
Noel Grandin
b32ead5dd2 loplugin:checkunusedparams more part1
seems I got one of the checks wrong, and was missing a bunch of stuff

Change-Id: I2c662fc4e735f8d6cbe56c6f82906a60a580331b
Reviewed-on: https://gerrit.libreoffice.org/40481
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-28 07:17:51 +02:00
Noel Grandin
b064a22f71 loplugin:constparams in xmlsecurity
Change-Id: I41f153af55262d201c0fb024460de0e9f1c14670
Reviewed-on: https://gerrit.libreoffice.org/40472
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-27 10:58:32 +02:00
Thorsten Behrens
0a5d6ac82f xmlsecurity: slightly more modern c++
Change-Id: I680bd57a492fe04dc98f2f61ff292e44e544a483
Reviewed-on: https://gerrit.libreoffice.org/37451
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-05-10 16:24:17 +02:00
Thorsten Behrens
0a4b0db012 xmlsecurity/source/framework: un-screw-up indent
This was painful to read.

Change-Id: I34c8038f5db1b9d3f60e9541fa09bb803a680b54
Reviewed-on: https://gerrit.libreoffice.org/37450
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-05-10 01:13:09 +02:00
Noel Grandin
185ed3ddb8 teach loplugin:constantparam about simple constructor calls
Change-Id: I7d2a28ab5951fbdb5a427c84e9ac4c1e32ecf9f9
Reviewed-on: https://gerrit.libreoffice.org/37280
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-08 08:29:03 +02:00
Chris Sherlock
97eb00c75e revert OSL_ASSERT changes
Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
2017-05-07 17:03:35 +10:00
Chris Sherlock
a85694c4c7 tdf#43157: convert xmlsecurity module away from OSL_ASSERT to assert
Change-Id: Ib5297ceb307e8f8d475b7ff0523e6a57f72434a5
2017-05-07 13:03:03 +10:00
Miklos Vajna
90d88b6e46 xmlsecurity: remove unused XMLEncryptionTemplateImpl
Not needed since commit 0649622956
(loplugin:unusedmethods, 2017-02-21).

Change-Id: I5e8699174202c17309198e541dc904dc1b47a534
Reviewed-on: https://gerrit.libreoffice.org/35031
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-10 11:08:22 +00:00
Noel Grandin
0649622956 loplugin:unusedmethods
Change-Id: I52a9f16f3ed543a3c83ca111df70e3f7ae1ef33c
Reviewed-on: https://gerrit.libreoffice.org/34508
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-21 10:07:37 +00:00
Miklos Vajna
99263598bf xmlsecurity: remove unused DecryptorImpl
No longer necessary since commit 50669de687
(xmlsecurity: remove unused xsec_fw_component_getFactory(), 2017-02-02).

Change-Id: I24ee6fcd01a238151058559a7bf994e27b7b64cf
Reviewed-on: https://gerrit.libreoffice.org/34332
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-02-16 10:49:19 +00:00
Miklos Vajna
91af0067c9 xmlsecurity: remove unused EncryptorImpl
No longer necessary since commit
50669de687 (xmlsecurity: remove unused
xsec_fw_component_getFactory(), 2017-02-02).

Change-Id: Ibbc78888abcd1cb6d7f242c93f28cdaf836cca14
2017-02-09 11:50:12 +01:00
Julien Nabet
223f1f2b81 Typos
Change-Id: I36f443c266670bd26aa6b813075e18653f372f52
Reviewed-on: https://gerrit.libreoffice.org/33900
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-02-03 21:09:44 +00:00
Miklos Vajna
50669de687 xmlsecurity: remove unused xsec_fw_component_getFactory()
No longer needed since commit a4af8986c9
([API CHANGE] offapi: remove unused xsec_fw UNO services, 2017-01-26).

Change-Id: I428c07bfe2846cdc54b35a62554a21197e62245f
2017-02-02 11:56:26 +01:00
Noel Grandin
4142e0a0c0 loplugin: unnecessary destructor writerfilter..xmloff
Change-Id: I511822dc874101ed3b9850b015b746a86d26c3b5
Reviewed-on: https://gerrit.libreoffice.org/33578
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-27 06:51:11 +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
Stephan Bergmann
8ccd11e1ae New loplugin:dynexcspec: Add @throws documentation, xmlsecurity
Change-Id: I2447c028add359952e4bd36dbdc1d5431fe48104
2017-01-19 18:03:08 +01:00
Miklos Vajna
716db7dd4a xmlsecurity: hold XMLEncryptionTemplateImpl by rtl::Reference
Going via UNO for a class in the same directory is an overkill.

Change-Id: Ia06561a95cd10a7aa52a1b84598f88c43e57e7a1
Reviewed-on: https://gerrit.libreoffice.org/33300
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-01-19 10:02:48 +00:00
Noel Grandin
b022985505 loplugin:unusedfields
Change-Id: I9611511cb3480734dea3c3cbaf0d659071366ad1
Reviewed-on: https://gerrit.libreoffice.org/32873
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-10 06:28:22 +00:00
Miklos Vajna
9739392cbd xmlsecurity: hold XMLSignatureTemplateImpl by rtl::Reference
Going via UNO for a class in the same directory is an overkill.

Change-Id: I3dd09a74b6113c472402632bd54bc5bcf32f69bf
Reviewed-on: https://gerrit.libreoffice.org/32748
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-01-05 15:31:33 +00:00
Noel Grandin
46d3163f77 loplugin:unusedmethods
Change-Id: Ife4c8d948ffa116f044d43903de9485e43cfcae5
Reviewed-on: https://gerrit.libreoffice.org/32336
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-23 04:46:35 +00:00
Miklos Vajna
517994c640 xmlsecurity: instantiate SignatureCreatorImpl directly in XSecController
Going via UNO for a class in the same module is an overkill.

Change-Id: I3a24bc770e40be5b0a6fc34206e92f968de060ae
Reviewed-on: https://gerrit.libreoffice.org/32271
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-12-21 08:06:26 +00:00
Miklos Vajna
7920ba294b xmlsecurity: instantiate SAXEventKeeperImpl directly in XSecController
Going via UNO for a class in the same module is an overkill.

Change-Id: I577660513022fde1576df19b412fcdb1ee2ad041
Reviewed-on: https://gerrit.libreoffice.org/31461
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-12-01 09:42:07 +00:00
Miklos Vajna
9691cea443 xmlsecurity: instantiate SignatureVerifierImpl directly in XSecController
Going via UNO for a class in the same module sounds like an overkill.

Change-Id: Iaa5b31d1b888c8d3f1c9b47ee787504191ce3d7d
Reviewed-on: https://gerrit.libreoffice.org/31148
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-11-24 14:22:45 +00:00
Noel Grandin
5f77e6e930 update loplugin:unnnecessaryvirtual to handler destructors
and update modules writerfilter..xmloff with the resulting changes

Change-Id: I54d19c22ddb0ff579b32e4934d266c925b19305c
Reviewed-on: https://gerrit.libreoffice.org/30530
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-04 07:15:03 +00:00
Tor Lillqvist
38dc4ea899 Bin unused XSecuritySAXEventKeeper::cloneElementCollector
Change-Id: Icc0ead769fa0a052f7d4dfbc825c96dbb513b33f
2016-11-03 11:10:59 +02:00
Stephan Bergmann
91dd2db17b loplugin:override: No more need for the "MSVC dtor override" workaround
The issue of 362d4f0cd4 "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
2383d557e5 clang-tidy misc-unused-alias-decls
Change-Id: Iabde7a84b9c2758e0d2b2ffe0fb99fcfa51ff124
Reviewed-on: https://gerrit.libreoffice.org/25075
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-19 13:07:28 +00:00
Stephan Bergmann
f3059ab1dc loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: I96cef821fc1d87963b8928af5dfc8ba97557da74
2016-04-20 17:27:32 +02:00
Noel Grandin
b8eb294651 loplugin:passstuffbyref in various
Change-Id: I80070c83204e531c2f599f8a56193d6ffe0e5022
2016-04-14 10:24:47 +02:00
Stephan Bergmann
ec9b260029 Remove unused _USECOMPRESSEDDOCUMENTHANDLER
...introduced with 9f34fde7a8 "libxmlsec" but
always unconditionally defined.  Fix some indentation.

Change-Id: Ib46d4d7153d84975e9bcd8351779634f8d43240c
2016-04-12 15:50:21 +02:00
Noel Grandin
43d57d105d com::sun::star->css in xmlsecurity/
Change-Id: I4b89f97671ab526e5731d2f1f99802e23f3fd4b5
2016-03-14 13:28:04 +02:00
Miklos Vajna
eb63915f0a xmlsecurity: clean up no longer relevant email addresses
Change-Id: I224a0914bd3506b4e2ce057c53838ec78187b060
2016-03-11 09:11:38 +01:00
Noel Grandin
b4fda7b3f9 new loplugin:constantparam
finds parameters that are only ever being called with a single value

Change-Id: Ibd0c9b6e6dbc1d1b5d5a005eaa19959560a6e50f
2016-03-08 09:04:47 +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