Commit Graph
591 Commits
Author SHA1 Message Date
Noel Grandin 953a5cb1c8 move Bitmap::ScopedWriteAccess inside vcl
would have liked to make the AcquireWriteAccess methods DLLPRIVATE, but
they are needed by the workbench and testing code

Change-Id: I22497788eb68dfb84b7e542e5ef53322892a5274
Reviewed-on: https://gerrit.libreoffice.org/51310
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins <ci@libreoffice.org>
2018-03-15 12:37:35 +01:00
Noel Grandin b3ee860e52 use more Color in vcl
Change-Id: Ia92c52d26b90898c1f7860128b478d1fada9d406
Reviewed-on: https://gerrit.libreoffice.org/50795
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-07 07:08:34 +01:00
Noel Grandin e2cb154195 convert COL_ constants to be of type Color
Change-Id: I0e25c8950ac26b851ff42f71e1471fcbe4770d48
Reviewed-on: https://gerrit.libreoffice.org/50373
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-28 07:34:27 +01:00
Noel Grandin c98d330302 replace Color(COL_*) with COL_*
using

    git grep -lwP "Color\s*\(\s*(COL_\w+)\s*\)"
    | xargs perl -pi -e "s/Color\s*\(\s*(COL_\w+)\s*\)//g"

and then some manual fixup where the resulting expression no longer
compiled

Change-Id: I0e268d78611c3be40bba9f60ecfdc087a36c0df4
Reviewed-on: https://gerrit.libreoffice.org/50372
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-27 11:28:29 +01:00
Noel Grandin 08ab1f46b1 loplugin:oncevar extend to tools/gen.hxx types
Change-Id: I5c75875da44334569c02e2ff039b33c38397a0a2
Reviewed-on: https://gerrit.libreoffice.org/50283
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-26 07:21:04 +01:00
Caolán McNamara a7d7b2b49e oss-fuzz build fix
Change-Id: I64e0839428e238471a75f2609330171e86472429
2018-02-25 17:16:06 +00:00
Caolán McNamara 1724d7db28 oss-fuzz: issue 1188, per-fuzzer config
instead of copying the whole bunch around, now the scheme is to copy
each individual fuzzer and matching config around, so duplicate the
previously shared config for each one an

Change-Id: I479ea13abfab382b6aee23bc04d5f7e535b489c9
2018-02-25 15:45:02 +00:00
Noel Grandin 4a8968039a loplugin:changetoolsgen in vcl
Change-Id: I0fc68cf51fb23ed9bb86a5087e8247c81b024494
Reviewed-on: https://gerrit.libreoffice.org/50107
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-22 20:18:57 +01:00
Caolán McNamara 76c58b1cfb for ~perfect compression link fuzzer input limit to an output limit
Change-Id: I30c3a0b75c818b55f6e73fdb68bf59fdac249d0e
Reviewed-on: https://gerrit.libreoffice.org/49606
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-12 21:36:14 +01:00
Caolán McNamara 575a2b0e25 add sft fuzzer
Change-Id: I0ee43e78b5366f2c23fb0bac9a103af987138411
Reviewed-on: https://gerrit.libreoffice.org/49372
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-09 12:45:18 +01:00
Noel Grandin 7daa249981 sprinkle SAL_WARN_UNUSED over Bitmap/BitmapEx
Change-Id: If6fe5f05ecfc26c38890efde0f5e61edb7c3fbc5
Reviewed-on: https://gerrit.libreoffice.org/49359
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-08 07:17:52 +01:00
Caolán McNamara 5b2b1ee3f3 add basic font parsing to fftester
Change-Id: Iaeebbe5dc569450ca1a47dbda15f168fb3b45ac4
Reviewed-on: https://gerrit.libreoffice.org/49362
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-07 16:36:54 +01:00
Noel Grandin e5012e53b9 use scanline when reading pixel data
extracts code from the innermost part of fairly hot loops

And add a GetIndexFromData method to make the call sites a little easier
to read.

Change-Id: I4ce5c5a687ecdb6982562a0aafce8513d86f9107
Reviewed-on: https://gerrit.libreoffice.org/49337
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-07 10:08:30 +01:00
Noel Grandin 3e0efdb50c convert SetPixel->SetPixelOnData
by extracting out the Y scanline computation from the innermost
loop.

Inspired by commit 078d01c1b6cb9bbd80aeadc49a71cc817413164c.

Change-Id: Ic3c1827c01ed3aec629975749a551c7a68ae4a5e
Reviewed-on: https://gerrit.libreoffice.org/48926
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-06 07:39:11 +01:00
Julien Nabet 8b700053cf Modernize a bit vcl (part5)
by using for range loops

Change-Id: I52d6e6c9e1c2c321dc81d8258943a1a9a611441c
Reviewed-on: https://gerrit.libreoffice.org/48987
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-31 15:56:25 +01:00
Caolán McNamara c23d1d3efd put a ceiling on various fuzzer input sizes
Change-Id: I7a53859377e6228542be50fd26af6b0d6701384c
2018-01-25 20:59:04 +00:00
Stephan Bergmann 72e3c23410 More loplugin:cstylecast: vcl
Change-Id: I74d1555b461fd8ea316380423fcde2d167714170
2018-01-15 09:01:15 +01:00
Noel Grandin 7d8e94444d convert a<b?a:b to std::min(a,b)
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>
2018-01-15 07:26:17 +01:00
Stephan Bergmann 55f07d4daa More loplugin:cstylecast: vcl
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: I363c01a1ae9e863fca4fb4589829492d7280d711
2018-01-12 20:10:40 +01:00
Noel Grandin d460842616 loplugin:unnecessaryparen improve return check
Change-Id: I8128aa4b5fc60efd1dbf5971cdde11e588f5f64b
Reviewed-on: https://gerrit.libreoffice.org/47167
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-29 18:19:23 +01:00
Caolán McNamara 0dc3b103d2 add html fuzzer
This reverts commit 111db5b992.

Change-Id: I1138592ab54865f4c2ac4599fab572c5666bf723
Reviewed-on: https://gerrit.libreoffice.org/46864
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-21 16:00:52 +01:00
Caolán McNamara 111db5b992 remove html fuzzer
still not ready after all

This reverts commit 6fc7f85de7.
2017-12-20 17:30:58 +00:00
Caolán McNamara 6fc7f85de7 add html fuzzer
Change-Id: I03a61421c477642548d9814610faeb570bd34c8d
Reviewed-on: https://gerrit.libreoffice.org/45970
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-20 17:41:43 +01:00
Noel Grandin 3af500580b loplugin:salcall fix functions
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>
2017-12-11 12:13:46 +01:00
Caolán McNamara 124138ec93 add mathtype fuzzer
Change-Id: I14a1f496dfc94bf678112d67f63a2c0101013472
Reviewed-on: https://gerrit.libreoffice.org/45815
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-08 11:08:06 +01:00
Caolán McNamara a3fdcc1a8c incomplete type Graphic
Change-Id: I471d43be4b34f3bdb3db5b5ff316ff0a414c8996
2017-12-07 09:09:35 +00:00
Stephan Bergmann 19f9a7e298 Remove unused #include <vcl/metaact.hxx> from vcl/outdev.hxx
...and fix the fallout

Change-Id: Ie514bd95d5a9f990a887566619031e9844c40b92
Reviewed-on: https://gerrit.libreoffice.org/45195
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-06 20:25:51 +01:00
Caolán McNamara fc26ea9e0e add html to fftester
Change-Id: I85c2ce10ff6142d04310f834b16b2ded474e7a34
Reviewed-on: https://gerrit.libreoffice.org/45814
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-04 22:07:34 +01:00
Caolán McNamara 1706ccb670 add mml fuzzer
Change-Id: If508e804da7ec945deb1034a797d3a11a7a2ca00
Reviewed-on: https://gerrit.libreoffice.org/45684
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-04 10:15:24 +01:00
Caolán McNamara a60d7fde54 Add mathtype to fftester
Change-Id: If082fc85d943c5b2537800456dcebbce3cb10791
Reviewed-on: https://gerrit.libreoffice.org/45730
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-03 10:30:23 +01:00
Caolán McNamara 324af62368 add pptx fuzzer
Change-Id: I50495496914929f9279a455d1acbffab833bf3f5
Reviewed-on: https://gerrit.libreoffice.org/45482
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-01 12:41:40 +01:00
Caolán McNamara 01d64f95dc add mml support to fftester
Change-Id: Ie0c3dd5eddb274cf04b335af6fdcb32b3445d02c
2017-11-30 20:35:26 +00:00
Caolán McNamara 08f7ff0365 add xlsx fuzzer
Change-Id: Icce1317dc3ccfb598ce07ee61eddd873f1f98222
Reviewed-on: https://gerrit.libreoffice.org/45481
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-30 10:00:30 +01:00
Caolán McNamara 434036d810 add pptx support to fftester
Change-Id: I517fa449ec75d8817cc3e03d0d90ab4c289a7c0f
Reviewed-on: https://gerrit.libreoffice.org/45477
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-29 11:44:56 +01:00
Caolán McNamara f6a2c667d1 add xlsx support to fftester
Change-Id: I07198f24a3e096fab67333cf6a98185d5b40fffc
Reviewed-on: https://gerrit.libreoffice.org/45399
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-28 17:53:53 +01:00
Caolán McNamara 6c9562f04f add docx fuzzer
Change-Id: Ib9a3d8a97fbb6281e8ac3ac2cf6c52cf6819304d
Reviewed-on: https://gerrit.libreoffice.org/45216
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-28 11:04:04 +01:00
Caolán McNamara 1dcfa88c30 ofz#4386/ofz#4387 Abrt
Change-Id: I2ed1ade1322102a0d6ac623156b9d3c2084b481c
Reviewed-on: https://gerrit.libreoffice.org/45102
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-22 17:53:28 +01:00
Caolán McNamara 6e3f7cd2d5 auto cancel dialogs during file format testing
Change-Id: Iceef2f46759b28c0d3f60d8dcb8f470af78de3f0
Reviewed-on: https://gerrit.libreoffice.org/45043
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-21 17:34:02 +01:00
Caolán McNamara 6191f701e8 add docx support to fftester
Change-Id: Ia761e23c011c53f8f786ac336efd4b9e94fc6e35
Reviewed-on: https://gerrit.libreoffice.org/45033
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-21 17:31:44 +01:00
Caolán McNamara 01cc5c2bc9 ofz#4245 need more components
Change-Id: Iab8d50dff1f20a31f7863217cfa69fb73727e4ef
Reviewed-on: https://gerrit.libreoffice.org/44874
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-17 14:09:53 +01:00
Caolán McNamara 0845ef8cdb ofz#4245 Abrt add more services
Change-Id: I0241ab5a96b0ba2a458eb34c37ea76e23efe839b
2017-11-16 09:34:27 +00:00
Noel Grandin 5b74eb6811 loplugin:flatten in vcl
Change-Id: I3527477277a9ae96eaf9fd068232f672da7c28c3
Reviewed-on: https://gerrit.libreoffice.org/44753
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-15 12:13:42 +01:00
Caolán McNamara fc59087c9d add dif fuzzer
Change-Id: I6f35cd5696ce6321ce5a729ffb9db9fdecfa61ac
Reviewed-on: https://gerrit.libreoffice.org/44526
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-09 16:43:16 +01:00
Caolán McNamara 9cb2962197 rename AvoidConfig to Fuzzing
cause that's what its really used for and a couple of cases
are not specifically about avoiding config but avoiding uninteresting
disk acccess and what not

Change-Id: I4c6454f98388579fcd0bf9798321d30408ab65ee
Reviewed-on: https://gerrit.libreoffice.org/44491
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-09 00:16:43 +01:00
Caolán McNamara e3e4b799d9 mirror fuzzer setup in fftester
Change-Id: I8bcb834a7e297f43fad6a07c2e861897f962e8d4
Reviewed-on: https://gerrit.libreoffice.org/44468
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-08 18:18:42 +01:00
Stephan Bergmann b536e10390 Retrofit "KeepEmptyLinesAtTheStartOfBlocks: false" into .clang-format
...even if that can cause reformatting of already formatted code.  The problem I
came across is that without this something like

> namespace {
>
> void f1();
>
> void f2();
>
> }

(which is quite a common style in the current code base) would be changed to

> namespace
> {
>
> void f1();
>
> void f2();
> }

instead of

> namespace
> {
> void f1();
>
> void f2();
> }

and I found no other clang-format style option that would result in the
presence or absence of an empty line be identical at the start and end of the
namespace block.

vmiklos asked to reformat the existing new (i.e., non-blacklisted) files at the
same time, so this commit includes that.  Some of those new files had not been
formatted at all, so this commit includes their full reformatting changes.

Change-Id: I54daf0c11098d07d02c802104cf7f56372e61f7c
Reviewed-on: https://gerrit.libreoffice.org/44450
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-08 15:35:18 +01:00
Caolán McNamara 958c09acc1 add dif support to fftester
Change-Id: I1428dcaea579c73712f5228dd6de73c7369a7948
Reviewed-on: https://gerrit.libreoffice.org/44457
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-08 15:34:39 +01:00
Caolán McNamara 7404393f80 add 1-2-3 fuzzer
Change-Id: I74ab2c0d36b619fa3b7ed6d52129264930ea9553
Reviewed-on: https://gerrit.libreoffice.org/44368
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-07 17:44:05 +01:00
Caolán McNamara c96c7c8b6b add 1-2-3 wks to fftester
Change-Id: I4deb6831a809d516d286a90903b7b89c8e07b2b0
Reviewed-on: https://gerrit.libreoffice.org/44367
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-07 10:02:50 +01:00
Caolán McNamara a4b7c54ea8 add calc rtf fuzzer
Change-Id: I11838f35c9c8ae5d754b129ac0fb30a2ca2b0ab2
Reviewed-on: https://gerrit.libreoffice.org/44201
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-06 15:12:26 +01:00