Commit Graph
588 Commits
Author SHA1 Message Date
Noel Grandin f657ab7bbb loplugin:virtualdown in various
Change-Id: I4db71fda953ea1d20712ae8033f6fc09b3b2855d
Reviewed-on: https://gerrit.libreoffice.org/52068
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-30 12:55:56 +02:00
Chris Sherlock 9db5a063e2 Silence lex errors by adding breaks
Change-Id: I4bba761b0bf264933b88777b3e18adec255eb4aa
Reviewed-on: https://gerrit.libreoffice.org/51452
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-30 07:28:55 +02:00
Julien Nabet 1e3a5bb9e9 Use for-range loops in hwpfilter, i18n*, idl* and io
Change-Id: I980464162b73ed9ee0a09acbca1b9050af8d1027
Reviewed-on: https://gerrit.libreoffice.org/51492
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-03-18 11:33:16 +01:00
Caolán McNamara 05bd9ed45d forcepoint #8 ensure ColumnDef lifetime
Change-Id: Idb0c7b1530dc57f4d7c14751f1b76caecc3b03a6
Reviewed-on: https://gerrit.libreoffice.org/50288
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-25 01:00:13 +01:00
Caolán McNamara 86a5c40b4a forcepoint #7 check ksc5601_2uni_page21 bounds
Change-Id: I578e7a63bb50f2088d35174d88f075c00469bad3
Reviewed-on: https://gerrit.libreoffice.org/50285
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-25 00:59:46 +01:00
Caolán McNamara 9ff1a2e861 forcepoint #1
Thanks to Antti Levomäki and Christian Jalio from Forcepoint.

Change-Id: Ic5e9a9d0f8f8d35cb6b39e68338ba029948a4ce0
Reviewed-on: https://gerrit.libreoffice.org/50053
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-21 10:26:47 +01:00
Caolán McNamara f9de525ed6 forcepoint #2
Thanks to Antti Levomäki and Christian Jalio from Forcepoint.

Change-Id: Ie2b644a3c4c1c165334768eea73d451f07f97def
Reviewed-on: https://gerrit.libreoffice.org/50054
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-21 10:24:54 +01:00
Noel Grandin 722d0b9882 loplugin:useuniqueptr in HWPFont
Change-Id: Idd20e180fdd215028cf972e7ed97b37b7b9bed55
Reviewed-on: https://gerrit.libreoffice.org/49872
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-17 07:06:36 +01:00
Mike Kaganski 418a16bff0 hwpfilter: MSVC: pragma warning: make more specific, remove obsolete
Change-Id: I30b53bd7c5105fee6b384441bb2d996b2e216b21
Reviewed-on: https://gerrit.libreoffice.org/48981
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-02-01 17:57:42 +01:00
Caolán McNamara b2d73530b6 ofz#5810 the vector has an entry for each char
but most of it is empty, so use a map instead

Change-Id: I92fe46939e5107926fd4b92167bbace63f0376d5
Reviewed-on: https://gerrit.libreoffice.org/48830
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-29 17:19:27 +01:00
Caolán McNamara 12eb35fb90 ofz#5717 check state in readblock
and change state to a bool and reuse it more

Change-Id: Iaa46004b144836431dd386a68a8ab688fd1477f2
Reviewed-on: https://gerrit.libreoffice.org/48686
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-26 21:32:56 +01:00
Caolán McNamara 90948976a5 drop the slow path
Change-Id: Ibf9721d852c1b57593e34272214d9f11c0188016
Reviewed-on: https://gerrit.libreoffice.org/48611
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-26 09:54:30 +01:00
Caolán McNamara 09af5c6ce2 ofz#5379 Timeout
Change-Id: I876ed253c61a13faae2b31c43fa595b3612cd082
Reviewed-on: https://gerrit.libreoffice.org/48610
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-25 21:31:59 +01:00
Noel Grandin ec02714d6c loplugin:unused-returns in drawinglayer..svx
Change-Id: I033a78cc7fe7d8e5086f1c855c4aa371cc98dc7c
Reviewed-on: https://gerrit.libreoffice.org/48400
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-24 07:57:07 +01:00
Stephan Bergmann 9af8f190ed More loplugin:cstylecast on Windows
Automatic rewrite (of loplugin:cstylecast and loplugin:unnecessaryparen) after
cab0427cad "Enable loplugin:cstylecast for some
more cases" and a409d32e7f "More
loplugin:cstylecast"

Change-Id: Ib3355159dd08333e1b7a8d091caf2069cdcc7862
Reviewed-on: https://gerrit.libreoffice.org/48317
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-23 07:54:51 +01:00
Noel Grandin be94207ecb new loplugin:emptyif
Change-Id: I1092115a0ceb3a5e6680a4b724b129f98a892c42
Reviewed-on: https://gerrit.libreoffice.org/48128
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-19 13:25:54 +01:00
Noel Grandin 96c85e7d10 loplugin:useuniqueptr in hwpfilter
Change-Id: Id276015425ea7de3cf55b9ef21b4e7ce54c2ce47
2018-01-19 08:58:46 +02:00
Caolán McNamara 63bd7c4ccd ofz#5379 Timeout
Change-Id: I88a33af938c93329780dc9da5a4160aed36fa9b3
2018-01-16 09:57:46 +00:00
Noel Grandin 7d8e94444d convert a<b?a:b to std::min(a,b)
with something like

    git grep -nP '(.*)\s*<\s*(.*)\s*\?\s*\g1\s*:\s*\g2' -- *.?xx

Change-Id: Id5078b35961847feb78a66204fdb7598ee63fd23
Note: we also convert a>b?b:a
Reviewed-on: https://gerrit.libreoffice.org/47736
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-15 07:26:17 +01:00
Stephan Bergmann faf01b8d54 More loplugin:cstylecast: hwpfilter
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: I463894b6c99fe1ebb56895c4aca8bd05a13b7c25
2018-01-12 20:23:07 +01:00
Andrea Gelmini a2ef65b09d Fix typos
Change-Id: I0e56430afa65b6b5826d56212ac501c0244fce9b
Reviewed-on: https://gerrit.libreoffice.org/47145
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-29 09:56:34 +01:00
Andrea Gelmini ca9897cf77 Fix typos
Change-Id: I28d73221ea83d89f73460f591723c6f80594ff15
Reviewed-on: https://gerrit.libreoffice.org/46822
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-20 10:39:40 +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
Noel Grandin 9a06b99d2f loplugin:salcall fix non-virtual methods
first, since those are safer to change than virtual methods

Change-Id: Ie3b624019d75ee2b793cee33b3c5f64e994e8bfe
Reviewed-on: https://gerrit.libreoffice.org/45798
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-05 07:32:46 +01:00
Andrea Gelmini 46f091f714 Fix typo
Change-Id: I4de461692ac261600c1b0b760ffb94156893fa0d
Reviewed-on: https://gerrit.libreoffice.org/45429
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-11-28 18:41:41 +01:00
Noel Grandin 7a1c21e53f loplugin:simplifybool for negation of comparison operator
Change-Id: Ie56daf560185274754afbc7a09c432b5c2793791
Reviewed-on: https://gerrit.libreoffice.org/45068
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-23 06:59:31 +01:00
Stephan Bergmann 72ef2b5d98 Make loplugin:unnecessaryparen warn about (x) ? ... : ... after all
...which had been left out because "lots of our code uses this style, which I'm
loathe to bulk-fix as yet", but now in
<https://gerrit.libreoffice.org/#/c/45060/1/> "use std::unique_ptr" would have
caused an otherwise innocent-looking code change to trigger a
loplugin:unnecessaryparen warning for

  pFormat = (pGrfObj)
      ? ...

(barring a change to ignoreAllImplicit in
compilerplugins/clang/unnecessaryparen.cxx similar to that in
<https://gerrit.libreoffice.org/#/c/45083/2> "Make not warning about !! in
loplugin:simplifybool consistent", which should also have caused the warning to
disappear for the modified code, IIUC).

Change-Id: I8bff0cc11bbb839ef06d07b8d9237f150804fec2
Reviewed-on: https://gerrit.libreoffice.org/45088
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-22 19:16:52 +01:00
Takeshi Abe 14f351529e cosmetics: Drop duplicate semicolon
Change-Id: I96d2ffb903f9ed15070572552c9564b5089df12f
Reviewed-on: https://gerrit.libreoffice.org/44914
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
2017-11-20 14:01:44 +01:00
Caolán McNamara f7ffc93bf6 ofz: limit depth of hwp parsing
Change-Id: Iba38cdea1fa9f3df4340988184adb1e8058ae931
Reviewed-on: https://gerrit.libreoffice.org/44816
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-16 14:46:23 +01:00
Noel Grandin 1213036150 loplugin:useuniqueptr in hwpfilter
Change-Id: If6e8dfcec2842a329229e5c57417ca3f00ef74b3
Reviewed-on: https://gerrit.libreoffice.org/44763
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-16 07:55:00 +01:00
Noel Grandin 0d50804e1c loplugin:constparams in various(2)
Change-Id: I533a7eb724b15e168a28dc92cd5962a39bc96e7c
Reviewed-on: https://gerrit.libreoffice.org/44313
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-06 07:13:42 +01:00
Caolán McNamara 9a236714e5 ofz#3858 use a single scratch buffer
Change-Id: Icdea835b89da2e7233e17893c759e411d659811c
Reviewed-on: https://gerrit.libreoffice.org/44213
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-02 21:26:18 +01:00
Noel Grandin dd8060ddc4 loplugin:finalclasses in h*,i*,j*
Change-Id: I3b5f319a88dbe6a9c2ffbfdf991345beda9a2fcd
Reviewed-on: https://gerrit.libreoffice.org/44154
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-01 13:30:59 +01:00
Noel Grandin 7383ab5170 loplugin:constantparam in f*
Change-Id: I87145db3af6c3eb180cea6b4244f98b00205a306
Reviewed-on: https://gerrit.libreoffice.org/44095
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-31 13:29:03 +01:00
Stephan Bergmann 2954641da5 loplugin:includeform: hwpfilter (Windows)
Change-Id: I35accf3f61cea9bdca93f5b2f0e93dab89dfe41d
2017-10-27 19:28:51 +02:00
Caolán McNamara 005ad924ce hwp fuzzing timeout
Change-Id: I88656c558dfe1ef6e701ba54633bfe251bc4e279
Reviewed-on: https://gerrit.libreoffice.org/43884
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-27 09:57:55 +02:00
Stephan Bergmann 9124cfd645 loplugin:includeform: hwpfilter
Change-Id: I698761540c868b0448be47ffccf663972664f76b
2017-10-23 22:46:06 +02:00
Noel Grandin b462fa972e use std::unique_ptr in hwpfilter
Change-Id: I3aa6e1342f975420b19e9e21058a0331ed2d71e0
Reviewed-on: https://gerrit.libreoffice.org/43525
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-19 11:21:10 +02:00
Julien Nabet a05bb7bf71 Replace some lists by vectors in hwpfilter
+ simplify some parts

Change-Id: I340d6b6d17f591a58c405965367c15be674103d0
Reviewed-on: https://gerrit.libreoffice.org/43439
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-18 08:44:00 +02:00
Julien Nabet adb946f984 Replace list by vector for nodelist var (hwpfilter)
Change-Id: I693d01f63b8bd8b2c78bfd98e1f9310c965f65b2
Reviewed-on: https://gerrit.libreoffice.org/43262
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-10-09 23:06:05 +02:00
Mike Kaganski 362a21d3a1 Use explicit function names for fooA/fooW WinAPI; prefer fooW
We should only use generic foo function name when it takes params
that are also dependent on UNICODE define, like
LoadCursor( nullptr, IDC_ARROW )
where IDC_ARROW is defined in MSVC headers synchronised with
LoadCursor definition.

We should always use Unicode API for any file paths operations,
because otherwise we will get "?" for any character in path that
is not in current non-unicode codepage, which will result in failed
file operations.

Change-Id: I3a7f453ca0f893002d8a9764318919709fd8b633
Reviewed-on: https://gerrit.libreoffice.org/42935
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-30 11:23:41 +02:00
Caolán McNamara c75a3ffd88 ofz: alloc+read+discard -> skipblock
Change-Id: I51aa0a1155c468aa5d360c63f6f7c8d347078bf1
Reviewed-on: https://gerrit.libreoffice.org/42638
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-22 17:32:09 +02:00
Michael Stahl 629661de4a hwpfilter: [loplugin:redundantcast]
Change-Id: Ib8fbe3babc9eb2b0b1125de62b0b8012ac710889
2017-09-18 14:04:04 +02:00
Mike Kaganski afeff9102c Use even more WIN32_LEAN_AND_MEAN
Change-Id: I538fe5b41156366e0e87b3a93e58a3947afd18f5
Reviewed-on: https://gerrit.libreoffice.org/42398
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-18 01:13:30 +02:00
Mike Kaganski 3128668599 Use more WIN32_LEAN_AND_MEAN
https://msdn.microsoft.com/en-us/aa383745

Change-Id: I83528dc8e6a5e119e7aa816219d35f1ea3723b96
Reviewed-on: https://gerrit.libreoffice.org/42338
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-16 20:16:15 +02:00
Noel Grandin 7ca4ea54b4 clang-tidy modernize-use-emplace in hwpfilter..lotuswordpro
Change-Id: Ic11634ca28396fd156390c511087bae03bd5fb70
Reviewed-on: https://gerrit.libreoffice.org/42156
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-11 13:50:50 +02:00
Andrea Gelmini 8c21ecc8f5 Removed ancient comment
Change-Id: I3607551397e131990f37eea4ee70e92e19d9c538
Reviewed-on: https://gerrit.libreoffice.org/41657
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-08-29 20:06:27 +02:00
Caolán McNamara 0a76305503 ofz#3201: avoid oom
Change-Id: Ia8e171a003f24c73c7f53ca7240e03c6f2492ad3
Reviewed-on: https://gerrit.libreoffice.org/41670
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-29 11:07:17 +02:00
Caolán McNamara efa8e32389 ofz#3160 Direct-leak
Change-Id: I6dcc35aaa06c2599a4524194e5e633cd4e36474e
Reviewed-on: https://gerrit.libreoffice.org/41634
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-28 16:58:12 +02:00
Caolán McNamara 474178acd1 ofz#3174 disallow header in header
Change-Id: I509fbfe5d7c319f0515896ecfca4183113eef764
Reviewed-on: https://gerrit.libreoffice.org/41635
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-28 16:57:48 +02:00