summaryrefslogtreecommitdiff
path: root/hwpfilter
AgeCommit message (Collapse)AuthorFilesLines
2019-03-06loplugin:unnecessaryparen improve member expressionNoel Grandin1-6/+6
Change-Id: I304621018cb1e2a47e478e86df4229bcf2176741 Reviewed-on: https://gerrit.libreoffice.org/68757 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-05re-land "new loplugin typedefparam""Noel Grandin1-1/+1
This reverts commit c9bb48386bad7d2a40e6958883328145ae439cad, and adds a bunch more fixes. Change-Id: Ib584d302a73125528eba85fa1e722cb6fc41538a Reviewed-on: https://gerrit.libreoffice.org/68680 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-04Revert "new loplugin typedefparam"Noel Grandin1-1/+1
This reverts commit 9865440d217d975206a3f91612f0666312bc8fd8. This is not ready to land yet, seems like the latest update of the logic reveals a bunch more places I need to fix before it can land.
2019-03-04new loplugin typedefparamNoel Grandin1-1/+1
verify that parameters use the exact same typedef-names (if any) in definition and declaration Change-Id: I55d2817f599b0253904dce2d35a1a93967e15a77 Reviewed-on: https://gerrit.libreoffice.org/68439 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-01Some more WIN32 -> _WIN32Stephan Bergmann1-1/+1
...at least some of which have presumably been missing from ce43d0ae9279edbf1ad108fe0d8325327a038d49 "use consistent #define checks for the Windows platform" by accident (and some just clean up comments) Change-Id: I5532685c7df96ae3c8a25b73d8064d7433964a9b Reviewed-on: https://gerrit.libreoffice.org/68580 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-27loplugin:unusedfields look for classes where we can make all the..Noel Grandin1-1/+1
fields private Change-Id: Id3c6b123f06ab5dcf87628de4c347626110d2d27 Reviewed-on: https://gerrit.libreoffice.org/68302 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-09loplugin:indentation in helpcompiler..ioNoel Grandin9-195/+195
Change-Id: Ia3f05662cc9542feeac3096d29e9dec6d1858620 Reviewed-on: https://gerrit.libreoffice.org/67558 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-24loplugin:constparams in dbaccess..ooxNoel Grandin2-2/+2
Change-Id: I9c04906dd492c6f8a816f57f40bc31406a871a78 Reviewed-on: https://gerrit.libreoffice.org/66793 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-21Avoid -Werror=stringop-truncationStephan Bergmann2-2/+15
...as emitted by at least GCC 8.2 with --enable-optimized. These are not actually problems, as in both cases strncpy(p,...,N-1) is used to copy a string into an area p of length N that has initially been zero-initialized, so p[N-1] will already contain NUL. But add the (redundant) p[N-1]=NUL just in case, and to silence GCC (where the documentation explicitly recommends this additional write as a way to silence the warning). Unfortunately, in hstyle.cxx at least GCC 8.2 with --enable-optimized would still emit the warning, even though it uses the recommended way of handling it, so needs to be silenced with a #pragma. Change-Id: Ie41f420c732c2bfb699903ebd21ce1a89dd2b236 Reviewed-on: https://gerrit.libreoffice.org/66620 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-28Fix typoAndrea Gelmini1-1/+1
Change-Id: Ia445f4377ceab4b6ce147de2dc54cf4edf0ed7d5 Reviewed-on: https://gerrit.libreoffice.org/65564 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-12-21use unique_ptr in hwpfilterNoel Grandin9-131/+113
Change-Id: I3491777281912e095c9222e83028d358d6826841 Reviewed-on: https://gerrit.libreoffice.org/65522 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-19-Werror=class-memaccess (trunk towards GCC 9)Stephan Bergmann1-2/+4
..."‘void* memset(void*, int, size_t)’ clearing an object of type ‘struct HWPDrawingObject’ with no trivial copy-assignment; use value-initialization instead" after 96c85e7d107ad0d79295349f01cd8578ce7daeba "loplugin:useuniqueptr in hwpfilter" Change-Id: Iee2b0ba2ec57233a311c88cb904af2bae71286d0 Reviewed-on: https://gerrit.libreoffice.org/65375 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-08Remove obsolete SAL_FALLTHROUGH completelyStephan Bergmann3-6/+6
...after 7ffdd830d5fb52f2ca25aa80277d22ea6d89970b "HAVE_CPP_ATTRIBUTE_FALLTHROUGH is always true now" Change-Id: I54e5ff4e036a6bb3e5774d1c0524158aae18e937 Reviewed-on: https://gerrit.libreoffice.org/64800 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-25tdf#120703 PVS: V560 A part of conditional expression is always true/falseMike Kaganski1-4/+4
Change-Id: I8d98aa7dd77fbd79611b8a4aba77e8c378fd1cae Reviewed-on: https://gerrit.libreoffice.org/63981 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-11-16loplugin:staticmethods improvementNoel Grandin2-3/+3
Change-Id: I8889ce8a7d2309b54454cfe4c6421282e1c6e755 Reviewed-on: https://gerrit.libreoffice.org/63434 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-10clang-tidy: (WIP) bugprone-too-small-loop-variable findings 2Tamás Zolnai1-3/+1
Change-Id: I1ddf3fe0e5fad265ae14712a23469b684253079d Reviewed-on: https://gerrit.libreoffice.org/63241 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2018-10-24hdo is always a HWPDrawingObjectCaolán McNamara3-4/+6
Change-Id: Ia9484304e9fc3c5bc9aa833bf14711203e9e72fe Reviewed-on: https://gerrit.libreoffice.org/62306 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-24ofz#11119 Direct-leakCaolán McNamara1-3/+3
since... commit 55f0b65b0568b8a8b1d823578eea1cbf633f4134 Date: Tue Oct 23 09:27:51 2018 +0200 loplugin:useuniqueptr in LoadDrawingObject Change-Id: Id5c7929482a1dc00584c4c1a228d993525fc8ed6 Reviewed-on: https://gerrit.libreoffice.org/62307 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-23loplugin:useuniqueptr in LoadDrawingObjectNoel Grandin1-14/+20
Change-Id: I6d6204128f40a87bc05987fa1ce724cf1d95aac1 Reviewed-on: https://gerrit.libreoffice.org/62220 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-21tdf#120703 (PVS): redundant nullptr checkMike Kaganski1-8/+5
V668 There is no sense in testing the 'hdo' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error. Change-Id: Ic889dcba4e9d77a6dd27dd1603ed37d39e9fe581 Reviewed-on: https://gerrit.libreoffice.org/62152 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-19clang-tidy readability-container-size-emptyNoel Grandin1-6/+6
Change-Id: I1df70b7dff5ebb6048f7fc618789faa15ca5d422 Reviewed-on: https://gerrit.libreoffice.org/61967 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-19clang-tidy readability-misleading-indentationNoel Grandin3-32/+32
Change-Id: I4673fc7c694924b41d048a1918ddb8b0e0af1f79 Reviewed-on: https://gerrit.libreoffice.org/61935 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-19clang-tidy modernize-redundant-void-argNoel Grandin1-3/+3
Change-Id: Ia25ac2e40f29e5b766a4c5c013fb53274196f656 Reviewed-on: https://gerrit.libreoffice.org/61934 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-18clang-tidy readability-simplify-boolean-exprNoel Grandin2-7/+2
Change-Id: I78fa01a6c803dec782488490b730af3a11814d64 Reviewed-on: https://gerrit.libreoffice.org/61902 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-18loplugin:staticvar in hwpfilter..salNoel Grandin1-1/+1
Change-Id: I8bf3509637cb295847e0dd667c1862269a192bbe Reviewed-on: https://gerrit.libreoffice.org/61881 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-09Extend loplugin:redundantinline to catch inline functions w/o external linkageStephan Bergmann1-1/+1
...where "inline" (in its meaning of "this function can be defined in multiple translation units") thus doesn't make much sense. (As discussed in compilerplugins/clang/redundantinline.cxx, exempt such "static inline" functions in include files for now.) All the rewriting has been done automatically by the plugin, except for one instance in sw/source/ui/frmdlg/column.cxx that used to involve an #if), plus some subsequent solenv/clang-format/reformat-formatted-files. Change-Id: Ib8b996b651aeafc03bbdc8890faa05ed50517224 Reviewed-on: https://gerrit.libreoffice.org/61573 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-26Fix ID_DELIMETER->ID_DELIMITERAndrea Gelmini3-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>
2018-09-24loplugin:external (clang-cl)Stephan Bergmann1-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>
2018-09-17New loplugin:externalStephan Bergmann4-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>
2018-09-10tdf#42949 Fix IWYU warnings in include/cppuhelper/*Gabor Kelemen1-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>
2018-09-09loplugin:simplifyconstruct in helpcompiler..ioNoel Grandin3-4/+0
Change-Id: Ibdc1933b5d8d6be1fe42a7df93bd7e1c903bb39b Reviewed-on: https://gerrit.libreoffice.org/60202 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-08ofz#10259 ofz#10263 ofz#10264 ofz#10265 use-after-freeCaolán McNamara2-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>
2018-09-07loplugin:useuniqueptr in HWPFileNoel Grandin3-14/+8
Change-Id: I0eb3f09b5ca82ce4810aafbb7d5d53f1faa00e3f Reviewed-on: https://gerrit.libreoffice.org/60111 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-21loplugin:useuniqueptr in HStreamIODevNoel Grandin5-10/+10
Change-Id: I81ab91bce2a83603b25922593c1fd764b5c0b003 Reviewed-on: https://gerrit.libreoffice.org/59358 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-15loplugin:useuniqueptr in mgcLinearSystemDNoel Grandin3-29/+8
Change-Id: I2043b6473ef18828a903a8da9faa98e3fd4dba0a Reviewed-on: https://gerrit.libreoffice.org/59025 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-13loplugin:returnconstant in hwpfilter,testNoel Grandin2-4/+2
Change-Id: I7c7c450f1da4ac3205148d2de8b344f0735f92ba Reviewed-on: https://gerrit.libreoffice.org/58881 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-29loplugin:stringloop in variousNoel Grandin1-8/+9
Change-Id: Ic2436c6d94729211cd5bc72fee18af228381e4a3 Reviewed-on: https://gerrit.libreoffice.org/58250 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-18tdf#108523 Remove @author annotationsAbhyudaya Sharma1-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>
2018-06-11new loplugin:shouldreturnboolNoel Grandin2-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>
2018-06-05tdf#42949 remove unused compheler includes ..Jochen Nitschke1-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>
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>