summaryrefslogtreecommitdiff
path: root/hwpfilter
AgeCommit message (Collapse)AuthorFilesLines
2018-05-17loplugin:redundantcast improvements for floating-integer conversionsStephan Bergmann1-7/+7
Change-Id: I63dbf18f144a792ae775fe6706da81657f790016 Reviewed-on: https://gerrit.libreoffice.org/54416 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2018-04-17cppcheck - fix variableScope in some filesGökhan Gurbetoğlu1-2/+1
Reduced the scope of some variables in source. Change-Id: Ib3b521ca5df8b9b254b51eab5f1d7040d6cfd846 Reviewed-on: https://gerrit.libreoffice.org/52974 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-31loplugin:unnecessaryvirtual improve result outputNoel Grandin1-2/+2
and merge some of the template function results Change-Id: I9a7855ce6720d022ea5b988d68f0d59ff81ee5b9 Reviewed-on: https://gerrit.libreoffice.org/51985 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-30loplugin:virtualdown in variousNoel Grandin2-11/+2
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-30Silence lex errors by adding breaksChris Sherlock1-1/+3
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-18Use for-range loops in hwpfilter, i18n*, idl* and ioJulien Nabet1-10/+6
Change-Id: I980464162b73ed9ee0a09acbca1b9050af8d1027 Reviewed-on: https://gerrit.libreoffice.org/51492 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-02-25forcepoint #8 ensure ColumnDef lifetimeCaolán McNamara5-14/+14
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-25forcepoint #7 check ksc5601_2uni_page21 boundsCaolán McNamara1-17/+11
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-21forcepoint #1Caolán McNamara1-1/+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-21forcepoint #2Caolán McNamara1-0/+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-17loplugin:useuniqueptr in HWPFontNoel Grandin2-10/+6
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-01hwpfilter: MSVC: pragma warning: make more specific, remove obsoleteMike Kaganski1-6/+0
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-01-29ofz#5810 the vector has an entry for each charCaolán McNamara2-2/+3
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-26ofz#5717 check state in readblockCaolán McNamara2-16/+14
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-26drop the slow pathCaolán McNamara8-110/+88
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-25ofz#5379 TimeoutCaolán McNamara1-1/+1
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-24loplugin:unused-returns in drawinglayer..svxNoel Grandin2-4/+2
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-23More loplugin:cstylecast on WindowsStephan Bergmann1-1/+1
Automatic rewrite (of loplugin:cstylecast and loplugin:unnecessaryparen) after cab0427cadddb3aaf1349c66f2fa13a4234ba4b2 "Enable loplugin:cstylecast for some more cases" and a409d32e7f6fc09e041079d6dbc3c927497adfed "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-19new loplugin:emptyifNoel Grandin1-1/+1
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-19loplugin:useuniqueptr in hwpfilterNoel Grandin5-25/+19
Change-Id: Id276015425ea7de3cf55b9ef21b4e7ce54c2ce47
2018-01-16ofz#5379 TimeoutCaolán McNamara1-1/+1
Change-Id: I88a33af938c93329780dc9da5a4160aed36fa9b3
2018-01-15convert a<b?a:b to std::min(a,b)Noel Grandin1-3/+3
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-12More loplugin:cstylecast: hwpfilterStephan Bergmann10-61/+61
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
2017-12-29Fix typosAndrea Gelmini1-1/+1
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-20Fix typosAndrea Gelmini1-1/+1
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-11loplugin:salcall fix functionsNoel Grandin2-2/+2
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-05loplugin:salcall fix non-virtual methodsNoel Grandin1-1/+1
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-11-28Fix typoAndrea Gelmini1-1/+1
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-23loplugin:simplifybool for negation of comparison operatorNoel Grandin1-14/+14
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-22Make loplugin:unnecessaryparen warn about (x) ? ... : ... after allStephan Bergmann1-4/+4
...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-20cosmetics: Drop duplicate semicolonTakeshi Abe1-60/+60
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-16ofz: limit depth of hwp parsingCaolán McNamara3-0/+25
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-16loplugin:useuniqueptr in hwpfilterNoel Grandin4-49/+25
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-06loplugin:constparams in various(2)Noel Grandin2-12/+12
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-02ofz#3858 use a single scratch bufferCaolán McNamara2-10/+10
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-01loplugin:finalclasses in h*,i*,j*Noel Grandin1-2/+1
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-10-31loplugin:constantparam in f*Noel Grandin2-3/+3
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-27loplugin:includeform: hwpfilter (Windows)Stephan Bergmann1-2/+2
Change-Id: I35accf3f61cea9bdca93f5b2f0e93dab89dfe41d
2017-10-27hwp fuzzing timeoutCaolán McNamara1-7/+8
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-23loplugin:includeform: hwpfilterStephan Bergmann6-9/+9
Change-Id: I698761540c868b0448be47ffccf663972664f76b
2017-10-19use std::unique_ptr in hwpfilterNoel Grandin5-53/+60
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-18Replace some lists by vectors in hwpfilterJulien Nabet6-98/+65
+ 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-09Replace list by vector for nodelist var (hwpfilter)Julien Nabet3-17/+10
Change-Id: I693d01f63b8bd8b2c78bfd98e1f9310c965f65b2 Reviewed-on: https://gerrit.libreoffice.org/43262 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-30Use explicit function names for fooA/fooW WinAPI; prefer fooWMike Kaganski2-5/+5
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-22Fresh run of bin/update_pch.shMike Kaganski1-4/+9
Change-Id: I69d4157aaf6570cecd51ea59df20556914942e06 Reviewed-on: https://gerrit.libreoffice.org/42565 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-22ofz: alloc+read+discard -> skipblockCaolán McNamara2-7/+3
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-18hwpfilter: [loplugin:redundantcast]Michael Stahl1-6/+3
Change-Id: Ib8fbe3babc9eb2b0b1125de62b0b8012ac710889
2017-09-18Use even more WIN32_LEAN_AND_MEANMike Kaganski1-0/+3
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-16Use more WIN32_LEAN_AND_MEANMike Kaganski2-0/+4
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-11clang-tidy modernize-use-emplace in hwpfilter..lotuswordproNoel Grandin1-1/+1
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>