summaryrefslogtreecommitdiff
path: root/hwpfilter
AgeCommit message (Collapse)AuthorFilesLines
2017-06-09clang-tidy readability-non-const-parameterNoel Grandin2-4/+4
Change-Id: I7b2680898dbfc49185fb949349d81f4ac615a470 Reviewed-on: https://gerrit.libreoffice.org/38593 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-05Improved loplugin:cstylecast to reference types: hwpfilterStephan Bergmann1-1/+1
Change-Id: Iab9d3845556b66341ca3298d6929502f50863f60
2017-06-05spelling instanciate -> instantiateNoel Grandin1-1/+1
Change-Id: Ic1393da64328c0dc7e2860334b204139bf537d81 Reviewed-on: https://gerrit.libreoffice.org/38401 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-01ofz#1193 we only set these values, never read themCaolán McNamara4-14/+1
Change-Id: Ia2f54b536a4262e19abe260e8e19c9b15cc2d0ec Reviewed-on: https://gerrit.libreoffice.org/36779 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-31clang-tidy readability-redundant-control-flowNoel Grandin1-1/+0
Change-Id: I832f7ef0f1bd55e365db7e49823fe8bc30390c04 Reviewed-on: https://gerrit.libreoffice.org/38215 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-23enhance useuniqueptr lopluginNoel Grandin2-5/+4
teach it to look for the following sequence in a destructor: delete m_pfoo; m_pfoo = nullptr; Change-Id: Icd6271a63a024e32b53cc9e599f8f59952160380 Reviewed-on: https://gerrit.libreoffice.org/37900 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-09cleanup osl/diagnose.h includesJochen Nitschke4-4/+0
with command > git grep -l osl/diagnose.h *.cxx | xargs grep -L -w 'OSL_\w*' | xargs sed -i '/#include *\(<\|\"\)osl\/diagnose.h\(>\|\"\).*/d' headers need more work Change-Id: I906519ebbd47a04703b4fa5943b2f7abea7a97ab Reviewed-on: https://gerrit.libreoffice.org/37350 Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-05-03remove empty commentsNoel Grandin1-15/+10
found with: git ls-files | xargs grep -Pzl '/\*\* (\*|\s| )*\*/' Change-Id: I1f47bcb94d5a7b290a6c622c6941195fbb578597 Reviewed-on: https://gerrit.libreoffice.org/37159 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-02loplugin:checkunusedparams in hwpfilter..lotuswordproNoel Grandin2-10/+6
Change-Id: I4925a95cc74571c2e0ffd413d7ac8bc162c247d7 Reviewed-on: https://gerrit.libreoffice.org/37143 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-28ofz: avoid timeout and return early on failureCaolán McNamara2-5/+8
Change-Id: I083aa07b311fa073ea5eeb1d569b0902e0f9c095
2017-04-28convert to std::vectorCaolán McNamara3-14/+8
Change-Id: I315755d49df5d29c6c7075237b7401f16c89b449
2017-04-28fix indentCaolán McNamara1-57/+55
Change-Id: I75faea4d701f401c5367142e4710ae613c8834be
2017-04-25tools: svstream.hxx needs only errcode.hxx & not errinf.hxxChris Sherlock2-0/+2
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca Reviewed-on: https://gerrit.libreoffice.org/36896 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-04-24clang-tidy readability-simplify-boolean-expr in hwpfilter..lotuswordproNoel Grandin2-6/+2
Change-Id: I945d3fe6af5f88937b341dfc3696bf1d36344862 Reviewed-on: https://gerrit.libreoffice.org/36874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-21gbuild: Remove MSVC 2013 legacy codeDavid Ostrovsky2-2/+0
Uwinapi is discontinued. Change-Id: I063b4d0d8fab2d60de168e960a63b8181158ac01 Reviewed-on: https://gerrit.libreoffice.org/23198 Reviewed-by: David Ostrovsky <david@ostrovsky.org> Tested-by: David Ostrovsky <david@ostrovsky.org>
2017-04-21treat ParaShape like CharShapeCaolán McNamara4-21/+22
Change-Id: I7870fdeee6bd097c94d7ae58b67506c4ab2a6fb5
2017-04-16coverity#1405158 Wrong sizeof argumentCaolán McNamara1-1/+1
Change-Id: Ie6b7fc3d2b7d1ac709501698e55aabc72215b187
2017-04-13ofz#1062 ensure cshape lifecycle matches expectationsCaolán McNamara5-44/+31
Change-Id: I586e9b3546516a0f05d86b2f7dd93e7c292a6795 Reviewed-on: https://gerrit.libreoffice.org/36298 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-13Removed duplicated includesAndrea Gelmini1-1/+0
No automatic tools. Manual checked and tested. Change-Id: Ife260fa4e1d786cf81f2917a901664cc54943754 Reviewed-on: https://gerrit.libreoffice.org/36371 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-12hwpfilter: remove write-only variableMichael Stahl1-3/+0
Change-Id: I03e29b1a3761fcafc70168b04d788dbf3e1584eb
2017-04-06loplugin:useuniqueptr extend to catch more localvar casesNoel Grandin2-37/+25
i.e. where the code looks like { foo * p = new foo; ... delete p; return ...; } Change-Id: Id5f2e55d0363fc62c72535a23faeaaf1f0ac6aee Reviewed-on: https://gerrit.libreoffice.org/36190 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-06loplugin:redundantcast find cstyle double castsNoel Grandin1-1/+1
Change-Id: I5507be190dac781e5cdb545a60acf3d50056c9f8 Reviewed-on: https://gerrit.libreoffice.org/36187 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-04Resolves: ofz#727 don't allow negative sizes or indexesCaolán McNamara2-17/+15
remove extra size in favour of vector size and don't resize and memcpy data, just use vector::insert Change-Id: I8efb91a8c11fbd862c0458042554cf7e94b813cd Reviewed-on: https://gerrit.libreoffice.org/34891 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-04ofz#820 oom terminateCaolán McNamara5-42/+42
comments claim return is len of data, but negative numbers for compressed data errors are returned. Make things return the amount of successful data read and turn into unsigned size_t to match ofz#727 Change-Id: Iadddfae67bb5d4960ddf82e169fc2592ded85950 Reviewed-on: https://gerrit.libreoffice.org/35077 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-03-23Remove unused #include <ctype.h>Stephan Bergmann3-4/+0
Change-Id: I8bf3e30687e20151a9e1936e69362abfe9b3a99d
2017-03-23Fix some usage of std::istream unformatted input in hwpfilter/source/hwpeq.cxxStephan Bergmann1-20/+32
(Though some deficiencies remain, e.g. when values are assumed to be valid characters and not eof().) Change-Id: Ia5ec681a68086e9843206a6b44a44f8ec3800b88
2017-03-23std::istream::get() returns std::istream::traits_type::eof()Stephan Bergmann1-3/+5
Change-Id: I0461e8184e4ad2a9d2dff89879e141bd66555bf5
2017-03-22Prevent calls to rtl/character.hxx functions with (signed) char argumentsStephan Bergmann2-10/+15
...that would implicitly be sign extended (for plain char only if it is signed), so non-ASCII char values would trigger the isUnicodeCodePoint assert. Change-Id: Iaf8024ad509e64525558e882fe3fd078cfb4ea91 Reviewed-on: https://gerrit.libreoffice.org/35523 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-21valgrind: uninitialized readsCaolán McNamara1-0/+1
Change-Id: Ia1e821d1e323d85c65484c980be09f015af6517b
2017-03-20Resolves: ofz#820 an exception is an acceptable outcomeCaolán McNamara1-12/+19
Change-Id: Ifc5be483387202c371596fd52f1e2ce682151ca8
2017-03-14ofz#860 clear old data before reading new dataCaolán McNamara1-0/+2
Change-Id: I3bf5c2072a328052004c4c0551c2b125cb8ab19b Reviewed-on: https://gerrit.libreoffice.org/35165 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-03-10ofz#798 oomCaolán McNamara3-13/+7
Change-Id: I6fa8dd999af7e00d6236a1ead5f8bb519f2d128d
2017-03-04bin is unusedCaolán McNamara3-6/+2
Change-Id: I5168b18898cff023ab014a86e7afc82d7b69f363
2017-03-03ofz#725 fix hwp leakCaolán McNamara3-66/+52
Change-Id: I09088981ca63b297781307590092725bc1cbed1b
2017-03-02Missing includeStephan Bergmann1-0/+1
Change-Id: I2fb82e3c5a9b26b1016cf99e943cf0cc30225495
2017-03-02ofz: oom in reading hwp dataCaolán McNamara1-2/+16
Change-Id: I1e4dc5f474b229d4d68d3fc34bc23c88767e5e50
2017-03-01ofz: ReadBlock has to be HWPIDLen to be usefulCaolán McNamara1-1/+1
Change-Id: Iaa349921972bb19b40bf68c6a3b0c7128cff4b8d
2017-03-01ofz#711: direct leakCaolán McNamara3-5/+6
Change-Id: I65ec47b4290d845f1803b20b93f149d35d9a60ea
2017-02-28hwp: avoid low hanging invalid inputCaolán McNamara1-0/+6
Change-Id: I06133d6db14edb9d915c38e4c120a9d0905495dd
2017-02-27loplugin:loopvartoosmallStephan Bergmann1-1/+1
Change-Id: If630131272b5ed4c589ed76be340a4107632c461
2017-02-26ofz#691 leak of emblist dataCaolán McNamara1-3/+5
Change-Id: Ic4231b93fafe73bf87995f226def64f7c9e131c3
2017-02-25ofz: epic slow use of std::listCaolán McNamara3-68/+30
Change-Id: I790a3098272101fd33f83f21bdcef1bb061efd76 Reviewed-on: https://gerrit.libreoffice.org/34635 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-02-24hwpfilter needs a new filter for each documentCaolán McNamara2-12/+4
setUp is called just once at the start of the sequence of loads so we're reusing the previous import state which isn't what this filter expects This reverts commit 0af436083e12516eb9251d4cc6f594f80ed06d3d. Change-Id: Iae355ed6099086fd3cc1c79203786017507d4ed4
2017-02-24add hwp fuzzerCaolán McNamara1-3/+2
Change-Id: I07fe351a182328f9ef98cb9866529637a6688c64 Reviewed-on: https://gerrit.libreoffice.org/34570 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-02-23remove test for the momentCaolán McNamara1-0/+0
Change-Id: Ib583e336f5ba560b9c1648291853b14582446ee3
2017-02-23ofz: don't loop endlessly on failed skipCaolán McNamara2-2/+6
Change-Id: Ibc105d8156e1b1ddf22948fb02165f8d03b4cfd5
2017-02-06default ctor is fine hereJochen Nitschke2-3/+0
this was hiding a Wunused-variable warning Change-Id: I32bd853846bc6f56c082541109eedfdab2402c3d Reviewed-on: https://gerrit.libreoffice.org/33942 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-03TyposJulien Nabet3-3/+3
Change-Id: Ic54695e86b4b462419fa7d5ded7b1ddb19ee8ed5 Reviewed-on: https://gerrit.libreoffice.org/33904 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-02-01loplugin:useuniqueptr extend to check local varsNoel Grandin1-3/+1
just the simple and obvious case for now, of a local var being allocated and deleted inside a single local block, and the delete happening at the end of the block Change-Id: I3a7a094da543debdcd2374737c2ecff91d644625 Reviewed-on: https://gerrit.libreoffice.org/33749 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-26Remove dynamic exception specificationsStephan Bergmann4-32/+28
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>