Commit Graph
79 Commits
Author SHA1 Message Date
Noel Grandin 16b7ec7b2e move emf code to vcl
part of making ScopedWriteAccess an internal detail of vcl

Change-Id: If66de7c248d442a860508bbddf68e390983da240
Reviewed-on: https://gerrit.libreoffice.org/51309
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-03-15 11:08:58 +01:00
Caolán McNamara 7cfb3d2873 ofz: timeout
Change-Id: I7cdd39f51943bd97e0e0931f44d3338a23044ab0
Reviewed-on: https://gerrit.libreoffice.org/50802
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-06 13:28:03 +01:00
Noel Grandin 3d40032191 tdf#116001 Incorrect Colors in Chart Wall Area
regression from

    commit b10c7022f1
    "use RawBitmap in BPixelRasterToBitmapEx"

we need to implement alpha support in vcl::bitmap::CreateFromData

Change-Id: I68bebbe1dd15e3bb04de312309c1631d6bb7fe2d
Reviewed-on: https://gerrit.libreoffice.org/50556
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-01 12:40:03 +01:00
Noel Grandin b8ececb409 drop old tools/gen methods in accessibility..formula
Change-Id: I075e29173945200854f2ef8e420867871659766a
Reviewed-on: https://gerrit.libreoffice.org/50446
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-01 07:19:10 +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
Caolán McNamara 2624a24af1 ofz#6563 nBytesPerScan of 0
Change-Id: I00263d06fc06e1b4efb9938ea57d09fa5381adf8
Reviewed-on: https://gerrit.libreoffice.org/50350
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-26 16:50:30 +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
Noel Grandin a4664759fe use RawBitmap in W_META_BITBLT
part of making BitmapWriteAccess an internal detail of vcl/

Change-Id: I23393872fca5a924ceb7ca70edd8e6f70a3cfc13
Reviewed-on: https://gerrit.libreoffice.org/49965
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-19 10:13:47 +01:00
Noel Grandin 6d9d8a723f Revert "loplugin:changetoolsgen in editeng..extensions" and reapply plugin
because I
(a) forgot to insert parentheses which changes the meaning of some expressions and
(b) I now use the AdjustFoo calls when changing unary operations, which reads much better

This reverts commit 2096aac8b9.

Change-Id: I4b5941c4119b95aaefb9180a0ca95a1dbb4ec317
Reviewed-on: https://gerrit.libreoffice.org/49844
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-16 19:52:06 +01:00
Noel Grandin 2096aac8b9 loplugin:changetoolsgen in editeng..extensions
Change-Id: I476fd8b988216a300c57fcf184ea3742139363fe
Reviewed-on: https://gerrit.libreoffice.org/49656
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-14 07:27:50 +01:00
Caolán McNamara e5ace62c32 ofz: timeout
Change-Id: I7f6ea74c51012eb0fb64a3633241d67d10cae12b
Reviewed-on: https://gerrit.libreoffice.org/49595
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 17:26:13 +01:00
Caolán McNamara 37e5c9efb1 ofz: timeout
Change-Id: I3eff48549761aa8fa2569cd23c122f98fb2ea491
Reviewed-on: https://gerrit.libreoffice.org/49419
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-08 15:58:44 +01:00
Caolán McNamara af8fc34702 ofz: timeout
Change-Id: Ia99ce4efe5ad7740f1cae7afcc199bc164b760ca
Reviewed-on: https://gerrit.libreoffice.org/49418
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-08 15:26:46 +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
Caolán McNamara ede60a762b tweak clippath fuzzing path
Change-Id: Iebcf12eec5cf5282e798ff5d4fe6649e3a8eea3f
2018-01-31 09:14:35 +00:00
Caolán McNamara 0c7d0f718b ofz: solveCrossovers performance is abysmal on large polygons
just give up on it for fuzzing purposes

Change-Id: I8d91fa547d83bc2f28454812280b0a7054e05b62
Reviewed-on: https://gerrit.libreoffice.org/48835
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-29 17:59:26 +01:00
Caolán McNamara f69e2f739c ofz#5475 Integer-overflow
Change-Id: I11d706c544698d57b75231e33e3d49f1ac1d4d73
Reviewed-on: https://gerrit.libreoffice.org/48159
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-19 21:51:31 +01:00
Stephan Bergmann 769ad348b0 More loplugin:cstylecast: emfio
Change-Id: I52e540bdd8ba0090dec752deb7b1fa5c67ae3c85
2018-01-15 09:05:51 +01:00
Noel Grandin d7d9edb27e loplugin:useuniqueptr in PolyPolygon
Also
- convert to o3tl::cow_wrapper
- drop the second param to the constructor and just
  let vector use it's own resize logic
- bump MAX_POLYGONS from 0x3FF0 to 0xffff so that the
  ios2met filter can load it's files properly.

Change-Id: I9db19e4f7b4f946e801ea07c31d2d0ded7837a0e
Reviewed-on: https://gerrit.libreoffice.org/47789
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-13 07:10:55 +01:00
Stephan Bergmann 126f10840b More loplugin:cstylecast: emfio
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: Idffd3ef04b007f04b7022e54881254da9b2aa4a0
2018-01-12 20:24:43 +01:00
Caolán McNamara 040b1fc333 ofz#4980 bail early with 0 points
even if start is 1 of 0

Change-Id: I7e6ad8bcd20f160e08d8795aa38e52fe3aa3cbee
Reviewed-on: https://gerrit.libreoffice.org/47515
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-06 22:08:16 +01:00
Noel Grandin 17ee20b161 loplugin:passstuffbyref improved return in emfio,writerfilter
Change-Id: I237936d62d0f1b17574dd88b5c9de932dc03238e
Reviewed-on: https://gerrit.libreoffice.org/47214
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-31 16:03:43 +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
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
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 df2e78f1a8 replace check of eof and GetError with good
Change-Id: I7d9f04262ab5420e9a14813fa1274bb9d01e3291
Reviewed-on: https://gerrit.libreoffice.org/45076
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-22 13:33:46 +01:00
Caolán McNamara 2161d04688 drop duplicate method
Change-Id: Idadd0a64e41cd02f5167b275081c3576a6224b12
Reviewed-on: https://gerrit.libreoffice.org/45075
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-22 13:33:25 +01:00
Caolán McNamara c8b0bd4f75 Resolves: tdf#113956 Revert ofz#3374 Integer-overflow
This reverts commit 304d42342b.
2017-11-21 10:56:15 +00:00
Caolán McNamara 5cfbc85514 ofz#4318 Integer-overflow
Change-Id: I7ad1f39d82e44e4fa8dd78700b25deea0c19c81a
Reviewed-on: https://gerrit.libreoffice.org/44913
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-20 09:58:09 +01:00
Caolán McNamara 5280b3eaa6 silence some coverity warnings
Change-Id: I5a530e37156b5cd36e8a07ac20851880a46f520d
Reviewed-on: https://gerrit.libreoffice.org/44875
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-18 21:59:23 +01:00
Caolán McNamara ec1e5e9573 ofz#4230 Integer-overflow
Change-Id: If7c7591780fe7fa8d6fde3d17b606a4ab0acbf56
Reviewed-on: https://gerrit.libreoffice.org/44794
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-16 09:54:41 +01:00
Caolán McNamara 7d6f8b48ad ofz: stop at min of end of record and end of stream
Change-Id: I61c7cf74ea75ec56b6ccb3661f6fdd54a1ff12e1
Reviewed-on: https://gerrit.libreoffice.org/44705
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-14 13:25:36 +01:00
Caolán McNamara b5344daa0c ofz: further limit exttextout to record size is smaller than stream size
Change-Id: I5f59db9e0c32f601537860d7574044b713d1c39d
Reviewed-on: https://gerrit.libreoffice.org/44696
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-14 09:50:29 +01:00
Caolán McNamara 1243f89c6b ofz: detect short read
Change-Id: I1d394e914c4791a2bc3a8f3dbb1cf200e7d528fe
Reviewed-on: https://gerrit.libreoffice.org/44691
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-13 21:26:07 +01:00
Caolán McNamara 2352a8e8e3 ofz#4158 Integer-overflow
Change-Id: I117156abf0e1f52491bf6bbe42bf18f4efd364f7
Reviewed-on: https://gerrit.libreoffice.org/44579
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-10 13:55:56 +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
Noel Grandin 0d50804e1c loplugin:constparams in various(2)
Change-Id: I533a7eb724b15e168a28dc92cd5962a39bc96e7c
Reviewed-on: https://gerrit.libreoffice.org/44313
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-06 07:13:42 +01:00
Caolán McNamara ffb5ad4681 ofz#4055 Integer-overflow
Change-Id: I15f0a48c1e0c4c03f99a74d4d9b58e064d108c72
Reviewed-on: https://gerrit.libreoffice.org/44304
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-04 18:27:41 +01:00
Caolán McNamara c4bac94488 de-sal_uLong emfio
Change-Id: If1fea844350446547c9f50d0316aedd50a3f4c25
Reviewed-on: https://gerrit.libreoffice.org/44161
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-01 20:10:47 +01:00
Caolán McNamara aab1018339 ofz#3939 Integer-overflow
Change-Id: Ic35cf6dd77d536ba3ab486b1c752d81037fe7cae
Reviewed-on: https://gerrit.libreoffice.org/44103
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-01 00:25:29 +01:00
Caolán McNamara d4dba27466 ofz#3951 Integer-overflow
Change-Id: I30a6b7c00cc7895ed4c307fe0bbe685bd29217ed
Reviewed-on: https://gerrit.libreoffice.org/44121
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-01 00:21:48 +01:00
Caolán McNamara fc4f2f1b0f ofz#3868 Integer-overflow
Change-Id: Id5de484e365567487cdeaf73f9fa88ef5a735e3e
Reviewed-on: https://gerrit.libreoffice.org/44011
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-29 14:07:44 +01:00
Bartosz Kosiorek b3ec92eaab tdf#111486 Fix description of SAL_ macro after EMF refactor
Change-Id: Ia4530d987e8555a5c09d49492e09079a3710b53b
Reviewed-on: https://gerrit.libreoffice.org/43838
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-27 20:39:57 +02:00
Caolán McNamara 38e5169db3 ofz#3823 Integer-overflow
Change-Id: Idb8ba0972dbfe2cf6ec43caef9b6984851f8f7ca
Reviewed-on: https://gerrit.libreoffice.org/43878
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-27 16:53:48 +02:00
Michael Stahl 404208f23c emfio: don't reinvent read_uInt16s_ToOUString
Change-Id: Ib12923762b5dd4d255c89a5acc54fdc5678a58ed
2017-10-27 12:37:46 +02:00
Michael Stahl a3cb93b391 remove GetSwapFloat nonsense from all 3 EMF readers
SvStream::ReadFloat already does that, and SvStream is initialised
to SvStreamEndian::LITTLE by default.

Change-Id: I5859e43014533bcebef9d4b8f0678c516193b92e
2017-10-27 12:37:45 +02:00
Caolán McNamara 7ee3953ce5 ofz#3819 Integer-overflow
Change-Id: Ic45692152b039c0ee2f5659d7739c3a2517c5e83
Reviewed-on: https://gerrit.libreoffice.org/43876
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-27 12:28:30 +02:00
Michael Stahl 11d2f3d6e1 vcl: make MapMode constructor explicit
Insert constructor everywhere, except a couple places that apparently
want to compare GetMapUnit().

Change-Id: I1910deb60562e5e949203435e827057f70a3f988
2017-10-26 23:17:45 +02:00