summaryrefslogtreecommitdiffstats
path: root/emfio
Commit message (Collapse)AuthorAgeFilesLines
* replace check of eof and GetError with goodCaolán McNamara2017-11-221-7/+5
| | | | | | | | 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>
* drop duplicate methodCaolán McNamara2017-11-221-3/+3
| | | | | | | 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>
* Resolves: tdf#113956 Revert ofz#3374 Integer-overflowCaolán McNamara2017-11-211-1/+1
| | | | This reverts commit 304d42342bd359de97a5863febd992d2ce2f21ca.
* ofz#4318 Integer-overflowCaolán McNamara2017-11-201-3/+6
| | | | | | | | 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>
* silence some coverity warningsCaolán McNamara2017-11-182-2/+2
| | | | | | | | 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>
* ofz#4230 Integer-overflowCaolán McNamara2017-11-161-2/+8
| | | | | | | 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>
* ofz: stop at min of end of record and end of streamCaolán McNamara2017-11-142-30/+41
| | | | | | | | 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>
* ofz: further limit exttextout to record size is smaller than stream sizeCaolán McNamara2017-11-141-2/+2
| | | | | | | | 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>
* ofz: detect short readCaolán McNamara2017-11-131-1/+1
| | | | | | | | 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>
* ofz#4158 Integer-overflowCaolán McNamara2017-11-101-4/+5
| | | | | | | | 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>
* rename AvoidConfig to FuzzingCaolán McNamara2017-11-091-1/+1
| | | | | | | | | | | | 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>
* loplugin:constparams in various(2)Noel Grandin2017-11-062-2/+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>
* ofz#4055 Integer-overflowCaolán McNamara2017-11-041-3/+4
| | | | | | | | 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>
* de-sal_uLong emfioCaolán McNamara2017-11-011-10/+7
| | | | | | | | 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>
* ofz#3939 Integer-overflowCaolán McNamara2017-11-011-4/+7
| | | | | | | | 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>
* ofz#3951 Integer-overflowCaolán McNamara2017-11-011-1/+3
| | | | | | | | 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>
* ofz#3868 Integer-overflowCaolán McNamara2017-10-291-3/+3
| | | | | | | 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>
* tdf#111486 Fix description of SAL_ macro after EMF refactorBartosz Kosiorek2017-10-272-68/+68
| | | | | | | 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>
* ofz#3823 Integer-overflowCaolán McNamara2017-10-271-7/+7
| | | | | | | | 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>
* emfio: don't reinvent read_uInt16s_ToOUStringMichael Stahl2017-10-271-12/+1
| | | | Change-Id: Ib12923762b5dd4d255c89a5acc54fdc5678a58ed
* remove GetSwapFloat nonsense from all 3 EMF readersMichael Stahl2017-10-272-23/+0
| | | | | | | SvStream::ReadFloat already does that, and SvStream is initialised to SvStreamEndian::LITTLE by default. Change-Id: I5859e43014533bcebef9d4b8f0678c516193b92e
* ofz#3819 Integer-overflowCaolán McNamara2017-10-271-2/+3
| | | | | | | | 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>
* vcl: make MapMode constructor explicitMichael Stahl2017-10-263-4/+4
| | | | | | | Insert constructor everywhere, except a couple places that apparently want to compare GetMapUnit(). Change-Id: I1910deb60562e5e949203435e827057f70a3f988
* tdf#31814 EMF/EMF+ implement dual modePatrick Jaap2017-10-262-0/+19
| | | | | | | | | | | | | | | | | | There can be a dual mode flag set in the EMF+ data. If set, we should process either EMF or EMF+ data, because the contained information should be equal (says the documentation). The more advanced EMF+ renderer is chosen here. The flag is read in the EMFPlusReader and blocks the reading of other EMF records than HEADER, EOF and COMMENT. Thanks to Chris, for pointing out the dual mode! Change-Id: I8522930cebbb9e9ecc732397cbb3deea9e8c9127 Reviewed-on: https://gerrit.libreoffice.org/43122 Reviewed-by: Patrick Jaap <patrick.jaap@tu-dresden.de> Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl> Tested-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
* ofz#3374 Integer-overflowCaolán McNamara2017-10-251-1/+1
| | | | | | | Change-Id: If9568da924709ef523390b958ec6e8d2fd1b0e3d Reviewed-on: https://gerrit.libreoffice.org/43847 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* ofz#3776 Divide-by-zeroCaolán McNamara2017-10-251-2/+8
| | | | | | | | Change-Id: I2de2bfd6165a53d05e9f222908f6764a608004c3 Reviewed-on: https://gerrit.libreoffice.org/43813 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* ofz#3777 Undefined-shiftCaolán McNamara2017-10-251-1/+1
| | | | | | | Change-Id: I328d939035f31acc690161b17751a5d45577f998 Reviewed-on: https://gerrit.libreoffice.org/43787 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* ofz#3763 Integer-overflowCaolán McNamara2017-10-251-4/+6
| | | | | | | Change-Id: If7c10d0fd188f0aafeece9545fb138761c3a2f5b Reviewed-on: https://gerrit.libreoffice.org/43765 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* ofz#3766 Integer-overflowCaolán McNamara2017-10-251-1/+1
| | | | | | | | Change-Id: I0cd5810497e6baa23d10b905f35e30b694a4c12a Reviewed-on: https://gerrit.libreoffice.org/43778 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* ofz Integer-overflowCaolán McNamara2017-10-241-1/+4
| | | | | | | | Change-Id: I8219dfa79565601681bc236789b0b18886c4f311 Reviewed-on: https://gerrit.libreoffice.org/43745 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* ofz#3743 Divide-by-zeroCaolán McNamara2017-10-241-6/+14
| | | | | | | | Change-Id: I6cdc8b4c852a126c8740fc23c10f9360d8caf1a5 Reviewed-on: https://gerrit.libreoffice.org/43752 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* loplugin:includeform: emfioStephan Bergmann2017-10-232-2/+2
| | | | Change-Id: Icc71e73fad45d397e17ae4b6ba4967ec7a50ae27
* check emf seekCaolán McNamara2017-10-221-3/+3
| | | | | | | | Change-Id: Iace6ac3f56f2496bc43d8f2cdad630a35bc935a2 Reviewed-on: https://gerrit.libreoffice.org/43671 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* check seek to end of header succeededCaolán McNamara2017-10-211-12/+10
| | | | | | | | | | and some other checks Change-Id: I3576a9019329d23d4ce17787cbc03149fbcc475e Reviewed-on: https://gerrit.libreoffice.org/43663 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* ofz+ubsanCaolán McNamara2017-09-302-14/+27
| | | | | | | Change-Id: I03f4bae4dd35eea9b5d3996e0655ca9a2ccd6a5f Reviewed-on: https://gerrit.libreoffice.org/42944 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* Rename the basegfx::tools namespace to basegfx::utilsTor Lillqvist2017-09-263-7/+7
| | | | | | | | | | | | | | Reduce potential confusion with the global tools namespace. Will hopefully make it possible to remove the annoying initial :: when referring to the global tools namespace. Unless we have even more tools subnamespaces somewhere. Thorsten said it was OK. Change-Id: Id088dfe8f4244cb79df9aa988995b31a1758c996 Reviewed-on: https://gerrit.libreoffice.org/42644 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
* Conditional jump or move depends on uninitialised valueCaolán McNamara2017-09-251-0/+16
| | | | Change-Id: I772c38c62950edbcde450889bae61dc37118b8cd
* ofz#2956: Conditional jump or move depends on uninitialised valueCaolán McNamara2017-09-231-1/+1
| | | | | | | Change-Id: I399c2eb2379b23568dda83f9d41473858f33a802 Reviewed-on: https://gerrit.libreoffice.org/42699 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* Fresh run of bin/update_pch.shMike Kaganski2017-09-221-2/+18
| | | | | | | Change-Id: I69d4157aaf6570cecd51ea59df20556914942e06 Reviewed-on: https://gerrit.libreoffice.org/42565 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* consistent naming of externals: jpeg-turbo->libjpeg-turboMichael Stahl2017-09-151-1/+1
| | | | | | | Change-Id: I63fcebc36559c2698bbedd3501285a388ce8c257 Reviewed-on: https://gerrit.libreoffice.org/42291 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
* stray debuggingCaolán McNamara2017-09-041-5/+0
| | | | Change-Id: Iabe56218f8914d8d858446eb177cb89dc1cd8601
* crashtesting: uninherited GDIObj is also possible hereCaolán McNamara2017-09-041-3/+8
| | | | | | | | | | | e.g. kde239472-4.doc and W_META_CREATEPALETTE etc create objects that can be selected but are just a base GDIObj Change-Id: I4b99978c49f5abb7fb1c616d044ba25c793577be Reviewed-on: https://gerrit.libreoffice.org/41869 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* Missing includeStephan Bergmann2017-08-301-0/+1
| | | | Change-Id: Ic0ab1cc72005f99d7558b06c9a4ec9c94f2f0460
* This check for GDIObj subtypes is exhaustiveStephan Bergmann2017-08-301-8/+7
| | | | | | | | For one, catches issues like d5ed3cd6dbd22bb18542778f1c48f4d5b3ae0f95 "Make WinMtfFontStyle's base class EMFIO_DLLPUBLIC, too" earlier. For another, uses if/else to avoid unnecessary, expensive dynamic casts. Change-Id: I695b1e8673d5af22060b05b982789ad0ddcd39c3
* Make WinMtfFontStyle's base class EMFIO_DLLPUBLIC, tooStephan Bergmann2017-08-291-1/+1
| | | | | | | | ...otherwise the dynamic_cast<WinMtfFontStyle*> in MtfTools::SelectObject (emfio/source/reader/mtftools.cxx) would not work on macOS in CppunitTest_emfio_wmf Change-Id: I5c361544fd273bdb65a4b83c7d694bae714815f5
* emfio: unit test for the EMF+ rendererPatrick Jaap2017-08-243-0/+42
| | | | | | | | | | | | | | Two unit tests, which test the EMF+ records DrawString and DrawLine independently. To this end, a fixed view decomposition of metafiles is implemented. The chosen primitives should be optimal, even for future extensions of the EMF+ parser. Change-Id: I12672d3b294ff0fdae63c7a5ce211517ef8f763c Reviewed-on: https://gerrit.libreoffice.org/41425 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
* Consistently use OUString in test::DirectoriesStephan Bergmann2017-08-241-2/+2
| | | | | | | Change-Id: Ia5fd8af34ee9d2f37e4450ab241f6bb9a06445b2 Reviewed-on: https://gerrit.libreoffice.org/41466 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* ofz#3028: use of uninitialized valuesCaolán McNamara2017-08-131-8/+8
| | | | | | | | Change-Id: I87bf37e4ae559c8057ac34b7d6dea52cf9468540 Reviewed-on: https://gerrit.libreoffice.org/41114 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* loplugin:constparams in dbaccessNoel Grandin2017-07-313-7/+7
| | | | | | | Change-Id: I4994c4f0ae614c8f98466f440412f28380ddd6a6 Reviewed-on: https://gerrit.libreoffice.org/40589 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Remove unnecessary dependencyStephan Bergmann2017-07-171-1/+0
| | | | | | | ...added with recent 29cdfa3fc337381e2529eaac2a551137ee8a1aaa "no need to statically link against the emfio library in the tests" Change-Id: Ibbcc5a52a57bde9d332e6660ebf7449f06851731