Commit Graph

506 Commits

Author SHA1 Message Date
00aeabb61d treat ParaShape like CharShape
Change-Id: I7870fdeee6bd097c94d7ae58b67506c4ab2a6fb5
2017-04-21 10:54:36 +01:00
b17177c63a coverity#1405158 Wrong sizeof argument
Change-Id: Ie6b7fc3d2b7d1ac709501698e55aabc72215b187
2017-04-16 14:25:25 +01:00
3b9b4ca5d3 ofz#1062 ensure cshape lifecycle matches expectations
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-13 09:53:04 +02:00
3c3f7d784e Removed duplicated includes
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-13 07:46:16 +02:00
fa73f77401 hwpfilter: remove write-only variable
Change-Id: I03e29b1a3761fcafc70168b04d788dbf3e1584eb
2017-04-12 15:51:39 +02:00
aa09b0c27a loplugin:useuniqueptr extend to catch more localvar cases
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-06 09:22:46 +00:00
7662e92c64 loplugin:redundantcast find cstyle double casts
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-06 07:47:30 +00:00
fd1e4d3b4b Resolves: ofz#727 don't allow negative sizes or indexes
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-04 11:42:56 +00:00
74cc187749 ofz#820 oom terminate
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-04-04 11:39:12 +00:00
6291574d94 Remove unused #include <ctype.h>
Change-Id: I8bf3e30687e20151a9e1936e69362abfe9b3a99d
2017-03-23 17:55:31 +01:00
4a3f2cb747 Fix some usage of std::istream unformatted input in hwpfilter/source/hwpeq.cxx
(Though some deficiencies remain, e.g. when values are assumed to be valid
characters and not eof().)

Change-Id: Ia5ec681a68086e9843206a6b44a44f8ec3800b88
2017-03-23 11:02:10 +01:00
0acd074861 std::istream::get() returns std::istream::traits_type::eof()
Change-Id: I0461e8184e4ad2a9d2dff89879e141bd66555bf5
2017-03-23 09:29:48 +01:00
7778d9f51b Prevent calls to rtl/character.hxx functions with (signed) char arguments
...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-22 09:00:57 +00:00
afabc7d2f2 valgrind: uninitialized reads
Change-Id: Ia1e821d1e323d85c65484c980be09f015af6517b
2017-03-21 09:24:45 +00:00
2ee7ad0151 Resolves: ofz#820 an exception is an acceptable outcome
Change-Id: Ifc5be483387202c371596fd52f1e2ce682151ca8
2017-03-20 15:51:38 +00:00
65dcd1d819 ofz#860 clear old data before reading new data
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-14 09:25:22 +00:00
75f118da50 ofz#798 oom
Change-Id: I6fa8dd999af7e00d6236a1ead5f8bb519f2d128d
2017-03-10 10:36:47 +00:00
db86b38c54 bin is unused
Change-Id: I5168b18898cff023ab014a86e7afc82d7b69f363
2017-03-04 20:42:41 +00:00
681b6361f2 ofz#725 fix hwp leak
Change-Id: I09088981ca63b297781307590092725bc1cbed1b
2017-03-03 11:26:14 +00:00
64cca8d623 Missing include
Change-Id: I2fb82e3c5a9b26b1016cf99e943cf0cc30225495
2017-03-02 11:02:06 +01:00
76201c60a9 ofz: oom in reading hwp data
Change-Id: I1e4dc5f474b229d4d68d3fc34bc23c88767e5e50
2017-03-02 09:43:17 +00:00
425572b9d5 ofz: ReadBlock has to be HWPIDLen to be useful
Change-Id: Iaa349921972bb19b40bf68c6a3b0c7128cff4b8d
2017-03-01 20:49:08 +00:00
86463ec54d ofz#711: direct leak
Change-Id: I65ec47b4290d845f1803b20b93f149d35d9a60ea
2017-03-01 11:41:17 +00:00
b9483aacad hwp: avoid low hanging invalid input
Change-Id: I06133d6db14edb9d915c38e4c120a9d0905495dd
2017-02-28 12:34:43 +00:00
e74152d074 loplugin:loopvartoosmall
Change-Id: If630131272b5ed4c589ed76be340a4107632c461
2017-02-27 12:56:06 +01:00
0a5f97f298 ofz#691 leak of emblist data
Change-Id: Ic4231b93fafe73bf87995f226def64f7c9e131c3
2017-02-26 21:21:13 +00:00
283e843be9 ofz: epic slow use of std::list
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-25 15:03:28 +00:00
40e55cf24d add hwp fuzzer
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-24 14:04:58 +00:00
a438651d2b ofz: don't loop endlessly on failed skip
Change-Id: Ibc105d8156e1b1ddf22948fb02165f8d03b4cfd5
2017-02-23 12:18:18 +00:00
3f6643b927 default ctor is fine here
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-06 04:38:01 +00:00
092adc4991 Typos
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-03 21:55:50 +00:00
2489000d3f loplugin:useuniqueptr extend to check local vars
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-02-01 12:15:22 +00:00
e57ca02849 Remove dynamic exception specifications
...(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>
2017-01-26 12:54:43 +00:00
b4adb0c533 loplugin: unnecessary destructor forms..idlc
Change-Id: I765e0fa61f8134a60e5ea24452c6bbcb3fa8b054
Reviewed-on: https://gerrit.libreoffice.org/33492
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-25 05:20:06 +00:00
98e4013c22 new loplugin useuniqueptr
Change-Id: Ic7a8b32887c968d86568e4cfad7ddd1f4da7c73f
Reviewed-on: https://gerrit.libreoffice.org/33339
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-23 06:59:17 +00:00
0e22ddad37 New loplugin:dynexcspec: Add @throws documentation, hwpfilter
Change-Id: I03131a228843e6848c0b2d2468d160ca0cdaf508
2017-01-19 18:03:19 +01:00
0bab51d8ad use rtl::Reference in HwpReader
instead of storing both a raw pointer and an uno::Reference

Change-Id: I02dd356d9693116f98ad2b96951570b3ba448b14
2017-01-18 14:22:26 +02:00
0cee740c95 replace #ifdef SOLARIS with #ifdef __sun
Check for a macro that is defined by the compiler, we don't really need
one defined by the build system.

Change-Id: Iccb8e3198396881395c97a6b81690ebe64b7e9d2
2017-01-17 16:38:33 +01:00
7a60e90ef0 new loplugin: useuniqueptr: helpcompiler..io
Change-Id: I6b394163c144e6b5540cb160abb613d56fe327de
Reviewed-on: https://gerrit.libreoffice.org/33165
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-17 08:34:42 +00:00
b936cf5838 use rtl::Reference in Formula
instead of storing both a raw pointer and a uno::Reference

Change-Id: I7f8baae687e528e89c7cdea1a92099ff4a759878
Reviewed-on: https://gerrit.libreoffice.org/33169
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-17 06:42:27 +00:00
698bdcdb0c loplugin:externvar (clang-cl)
Change-Id: I29c40113f9248f9041dacc398416f39889f5ddf8
2017-01-11 13:42:41 +01:00
4f36a2fbe6 loplugin:externvar
Change-Id: Iedb9b26dbe33d447de309a763eaeeeb57d1fcdd1
2017-01-09 21:57:02 +01:00
e5cc002165 New loplugin:externvar: hwpfilter
Change-Id: I275d67b2878400cd0774f21b1a7489a0dd392e82
2017-01-09 15:43:18 +01:00
0a840edcc1 includes should be at the top of the file
not randomly scattered through the code

found with something like:
   git ls-files *.cpp | xargs grep -Pzl "(?s){.*#include"

Change-Id: I9c242fa4ef99e8677f2800d7ec9f16d16e488351
Reviewed-on: https://gerrit.libreoffice.org/30952
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-18 09:25:06 +00:00
7cca2c7fb3 new loplugin finalprotected
look for final classes, and make sure they don't have protected members

Change-Id: I1fa810659bba02b61a5160dbfd8e24185ec9abf4
Reviewed-on: https://gerrit.libreoffice.org/30895
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-16 09:10:16 +00:00
1ba4bb6397 loplugin:countusersofdefaultparams in editeng..rsc
Change-Id: I8a8d13faf228cbc934ae21d6763d92d370eb42ec
2016-11-11 12:12:22 +02:00
1a743fd8a2 loplugin:expandablemethods in hwpfilter..linguistic
Change-Id: I62ae20ab4a47b3b7e2b0d503cedcad3319cc9c85
Reviewed-on: https://gerrit.libreoffice.org/30683
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-08 08:41:38 +00:00
990102be61 loplugin:unnecessaryvirtual in hwpfilter..rsc
Change-Id: I2e9df8223d503b813b4c458747e8c44bb8ef8868
Reviewed-on: https://gerrit.libreoffice.org/30661
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-08 06:10:25 +00:00
877774c057 loplugin:expandablemethodds in hwpfilter..linguistic
Change-Id: If20fd4a6cf8a8e005804dbb7caf41cce73d587a5
Reviewed-on: https://gerrit.libreoffice.org/30016
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-19 08:07:18 +00:00
a217e0d012 clang-cl loplugin: hwpfilter
Change-Id: I63677cea6ee2cec0589bd853ca9b135931df63d4
Reviewed-on: https://gerrit.libreoffice.org/29863
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-16 14:19:09 +00:00