summaryrefslogtreecommitdiffstats
path: root/hwpfilter
Commit message (Collapse)AuthorAgeFilesLines
* Fix ID_DELIMETER->ID_DELIMITERAndrea Gelmini2018-09-263-4/+4
| | | | | | | | | It passed "make check" on Linux Change-Id: Ic119935ca45f985b3cd088b16db4128ffaf2d1a2 Reviewed-on: https://gerrit.libreoffice.org/60642 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* loplugin:external (clang-cl)Stephan Bergmann2018-09-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | Including: * expanding STDAPI to its definition (as per <https://msdn.microsoft.com/library/ms686631(vs.85).aspx> "STDAPI"), to add __declspec(dllexport) into its middle, in extensions/source/activex/so_activex.cxx; as discussed in the comments at <https://gerrit.libreoffice.org/#/c/60691/> "Get rid of Windows .def files in setup_native, use __declspec(dllexport)", having a function both listed in a .def file EXPORTS and marking it dllexport is OK, and the latter helps the heuristics of loplugin:external; however, the relevant functions in extensions/source/activex/so_activex.cxx probably don't even need to be exported in the first place? * follow-up loplugin:salcall in sal/osl/w32/file-impl.hxx Change-Id: Ida6e17eba19cfa3d7e5c72dda57409005c0a0191 Reviewed-on: https://gerrit.libreoffice.org/60938 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* New loplugin:externalStephan Bergmann2018-09-174-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* tdf#42949 Fix IWYU warnings in include/cppuhelper/*Gabor Kelemen2018-09-101-0/+2
| | | | | | | | | | Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ib420e9216b8313f5ed7634ec375e39ceb741fd45 Reviewed-on: https://gerrit.libreoffice.org/59297 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
* loplugin:simplifyconstruct in helpcompiler..ioNoel Grandin2018-09-093-4/+0
| | | | | | | Change-Id: Ibdc1933b5d8d6be1fe42a7df93bd7e1c903bb39b Reviewed-on: https://gerrit.libreoffice.org/60202 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* ofz#10259 ofz#10263 ofz#10264 ofz#10265 use-after-freeCaolán McNamara2018-09-082-3/+4
| | | | | | | | Change-Id: I3e845c21f7a4e853ce9548f2992cab324dec05a8 Reviewed-on: https://gerrit.libreoffice.org/60200 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* loplugin:useuniqueptr in HWPFileNoel Grandin2018-09-073-14/+8
| | | | | | | Change-Id: I0eb3f09b5ca82ce4810aafbb7d5d53f1faa00e3f Reviewed-on: https://gerrit.libreoffice.org/60111 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:useuniqueptr in HStreamIODevNoel Grandin2018-08-215-10/+10
| | | | | | | Change-Id: I81ab91bce2a83603b25922593c1fd764b5c0b003 Reviewed-on: https://gerrit.libreoffice.org/59358 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:useuniqueptr in mgcLinearSystemDNoel Grandin2018-08-153-29/+8
| | | | | | | Change-Id: I2043b6473ef18828a903a8da9faa98e3fd4dba0a Reviewed-on: https://gerrit.libreoffice.org/59025 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:returnconstant in hwpfilter,testNoel Grandin2018-08-132-4/+2
| | | | | | | Change-Id: I7c7c450f1da4ac3205148d2de8b344f0735f92ba Reviewed-on: https://gerrit.libreoffice.org/58881 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:stringloop in variousNoel Grandin2018-07-291-8/+9
| | | | | | | Change-Id: Ic2436c6d94729211cd5bc72fee18af228381e4a3 Reviewed-on: https://gerrit.libreoffice.org/58250 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* tdf#108523 Remove @author annotationsAbhyudaya Sharma2018-06-181-1/+0
| | | | | | | Change-Id: I85e364da59ce70ddd97fdae9bc03a4ea76b007fc Reviewed-on: https://gerrit.libreoffice.org/55263 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
* new loplugin:shouldreturnboolNoel Grandin2018-06-112-8/+8
| | | | | | | | | | | | look for methods returning only 1 and/or 0, which (most of the time) should be returning bool. Off by default, because some of this is a matter of taste Change-Id: Ib17782e629888255196e89d4a178618a9612a0de Reviewed-on: https://gerrit.libreoffice.org/54379 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* tdf#42949 remove unused compheler includes ..Jochen Nitschke2018-06-051-1/+0
| | | | | | | | | and fix the fallout Change-Id: I15bc5d626f4d157cbc69a87392078b41e621d14e Reviewed-on: https://gerrit.libreoffice.org/54882 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
* loplugin:redundantcast improvements for floating-integer conversionsStephan Bergmann2018-05-171-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>
* cppcheck - fix variableScope in some filesGökhan Gurbetoğlu2018-04-171-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>
* loplugin:unnecessaryvirtual improve result outputNoel Grandin2018-03-311-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>
* loplugin:virtualdown in variousNoel Grandin2018-03-302-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>
* Silence lex errors by adding breaksChris Sherlock2018-03-301-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>
* Use for-range loops in hwpfilter, i18n*, idl* and ioJulien Nabet2018-03-181-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>
* forcepoint #8 ensure ColumnDef lifetimeCaolán McNamara2018-02-255-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>
* forcepoint #7 check ksc5601_2uni_page21 boundsCaolán McNamara2018-02-251-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>
* forcepoint #1Caolán McNamara2018-02-211-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>
* forcepoint #2Caolán McNamara2018-02-211-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>
* loplugin:useuniqueptr in HWPFontNoel Grandin2018-02-172-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>
* hwpfilter: MSVC: pragma warning: make more specific, remove obsoleteMike Kaganski2018-02-011-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>
* ofz#5810 the vector has an entry for each charCaolán McNamara2018-01-292-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>
* ofz#5717 check state in readblockCaolán McNamara2018-01-262-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>
* drop the slow pathCaolán McNamara2018-01-268-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>
* ofz#5379 TimeoutCaolán McNamara2018-01-251-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>
* loplugin:unused-returns in drawinglayer..svxNoel Grandin2018-01-242-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>
* More loplugin:cstylecast on WindowsStephan Bergmann2018-01-231-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>
* new loplugin:emptyifNoel Grandin2018-01-191-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>
* loplugin:useuniqueptr in hwpfilterNoel Grandin2018-01-195-25/+19
| | | | Change-Id: Id276015425ea7de3cf55b9ef21b4e7ce54c2ce47
* ofz#5379 TimeoutCaolán McNamara2018-01-161-1/+1
| | | | Change-Id: I88a33af938c93329780dc9da5a4160aed36fa9b3
* convert a<b?a:b to std::min(a,b)Noel Grandin2018-01-151-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>
* More loplugin:cstylecast: hwpfilterStephan Bergmann2018-01-1210-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
* Fix typosAndrea Gelmini2017-12-291-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>
* Fix typosAndrea Gelmini2017-12-201-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>
* loplugin:salcall fix functionsNoel Grandin2017-12-112-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>
* loplugin:salcall fix non-virtual methodsNoel Grandin2017-12-051-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>
* Fix typoAndrea Gelmini2017-11-281-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>
* loplugin:simplifybool for negation of comparison operatorNoel Grandin2017-11-231-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>
* Make loplugin:unnecessaryparen warn about (x) ? ... : ... after allStephan Bergmann2017-11-221-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>
* cosmetics: Drop duplicate semicolonTakeshi Abe2017-11-201-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>
* ofz: limit depth of hwp parsingCaolán McNamara2017-11-163-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>
* loplugin:useuniqueptr in hwpfilterNoel Grandin2017-11-164-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>
* loplugin:constparams in various(2)Noel Grandin2017-11-062-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>
* ofz#3858 use a single scratch bufferCaolán McNamara2017-11-022-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>
* loplugin:finalclasses in h*,i*,j*Noel Grandin2017-11-011-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>