summaryrefslogtreecommitdiff
path: root/hwpfilter
AgeCommit message (Collapse)AuthorFilesLines
2019-11-08-Werror,-Wunused-macros (clang-cl)Stephan Bergmann1-4/+0
Not sure why the unused-macro warning for isnan only started to show now that I build on Windows with clang-cl against MSVC 2019 (rather than 2017). The code was there ever since 16cba77220efab8204eeecb49ccd3ec033efca38 "#112673# initial checkin of HWP filter", but there appears to never have been any use of isnan at least in hwpfilter/ itself. Change-Id: Ib202da91806baf347bbaf1ac2a47bcc7f81bd868 Reviewed-on: https://gerrit.libreoffice.org/82271 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-06loplugin:indentation find broken if statementsNoel Grandin1-2/+3
so I don't read the "then" block as being a sequential statements Change-Id: Ib2004acd3518bd4ebd2246f02a26c2c0a8bbab4c Reviewed-on: https://gerrit.libreoffice.org/82069 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-02cid#1455209 Wrapper object use after freeCaolán McNamara1-8/+6
Change-Id: I5883d2d954d62301c8d6ca47ceedd6401aee1dc6 Reviewed-on: https://gerrit.libreoffice.org/81935 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-29cid#1448471 Wrapper object use after freeCaolán McNamara1-6/+26
Change-Id: I4a6f31491f857280623302569afa982b37c16e89 Reviewed-on: https://gerrit.libreoffice.org/81629 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-18make bin/update_pch.s always include code in trivial #if'sLuboš Luňák1-1/+25
E.g. #ifdef LIBO_INTERNAL_ONLY is always true for code that builds with our PCHs. Change-Id: I3cf311ea3621b909105754cfea2cb0116b8b67f5 Reviewed-on: https://gerrit.libreoffice.org/80961 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-10-17Remove some memset callsMike Kaganski5-28/+14
Replace them with default initialization or calloc Change-Id: I747f53c2ced2d0473fd5a5ede4f8520a0633dcc1 Reviewed-on: https://gerrit.libreoffice.org/80805 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-11ofz#18116 TimeoutCaolán McNamara1-4/+8
Change-Id: If0bf63bacf9b5f7502287b1e465a34806d18b874 Reviewed-on: https://gerrit.libreoffice.org/80641 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-04ofz#17823 avoid timeoutCaolán McNamara1-0/+9
Change-Id: I3658d476873a502adc0cbd8be9a4f6ffd5b62c87 Reviewed-on: https://gerrit.libreoffice.org/80236 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-01loplugin:stringadd in helpcompiler..ooxNoel Grandin1-5/+5
Change-Id: I858870d883de10a673d7ce2798bda8c8f511cee5 Reviewed-on: https://gerrit.libreoffice.org/79889 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-26loplugin:constmethod in framework..lotuswordproNoel Grandin1-10/+10
Change-Id: I14a3855a75cf081d86c2a404966db38c617c0256 Reviewed-on: https://gerrit.libreoffice.org/79541 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-23do not require $(SRCDIR) in every gb_Library_set_precompiled_headerLuboš Luňák1-1/+1
Change-Id: I7b3a22584bb2e4d501f509ffcd80929feed23a4c Reviewed-on: https://gerrit.libreoffice.org/79360 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-08-17tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctorJulien Nabet1-7/+2
in hwpfilter, include/test, io, linguistic, oox, pyuno, reportdesign Change-Id: I5c265c4fde85dd6d7faab8ae82809c4a0e6dd69b Reviewed-on: https://gerrit.libreoffice.org/77646 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-01new loplugin:mapindexNoel Grandin1-2/+3
Change-Id: I6b5f73b2187009e95d4d666e03e5803f522cee06 Reviewed-on: https://gerrit.libreoffice.org/76584 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): hwpfilterStephan Bergmann1-2/+2
Change-Id: I1dcb28e357b9116fad227e731c59c64d09f0b9d1 Reviewed-on: https://gerrit.libreoffice.org/76672 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-06-25Fix typoAndrea Gelmini1-1/+1
Change-Id: I0b1e92daa83d1bc5aadeb70a730521198571a5d8 Reviewed-on: https://gerrit.libreoffice.org/74663 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-09regenerate PCH headers for the 4 new levelsLuboš Luňák1-21/+13
Plus some build fixes triggered by this. Change-Id: I59b21def706598ceffd45ae5b1f0262ec9c1ad50 Reviewed-on: https://gerrit.libreoffice.org/71581 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-05-03GCC trunk towards GCC 9 still emits a bogus -Wstringop-truncationStephan Bergmann1-2/+2
Change-Id: I1e9e439558025030f79e070680831f1139675993 Reviewed-on: https://gerrit.libreoffice.org/66869 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-04-29Fix conditional around closing #pragma GCC diagnostic popStephan Bergmann1-1/+1
...which 7cf3574ac9208e70c03eeaca2def0235ec90f55f "Avoid -Werror=format/stringop-truncation" had failed to adapt Change-Id: Ide00c8136db27519c2d694576910c423d40d481e Reviewed-on: https://gerrit.libreoffice.org/71521 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-04-29Avoid -Werror=format/stringop-truncationJulien Nabet1-1/+1
It also affects gcc 8.3 Change-Id: I896e84d5e1e96abfe81294e921cfcc060e44fb6f Reviewed-on: https://gerrit.libreoffice.org/71474 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-04-10clang-tidy: Fix suspicious catches of WIP unhandled-self-assignment checkTamás Zolnai1-0/+3
Change-Id: I1cb16b180f4cc5bf4d65485f03c44a06414d3580 Reviewed-on: https://gerrit.libreoffice.org/70481 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
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>