summaryrefslogtreecommitdiff
path: root/emfio/source
AgeCommit message (Collapse)Author
2017-11-22replace check of eof and GetError with goodCaolán McNamara
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-22drop duplicate methodCaolán McNamara
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-21Resolves: tdf#113956 Revert ofz#3374 Integer-overflowCaolán McNamara
This reverts commit 304d42342bd359de97a5863febd992d2ce2f21ca.
2017-11-20ofz#4318 Integer-overflowCaolán McNamara
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-18silence some coverity warningsCaolán McNamara
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-16ofz#4230 Integer-overflowCaolán McNamara
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-14ofz: stop at min of end of record and end of streamCaolán McNamara
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-14ofz: further limit exttextout to record size is smaller than stream sizeCaolán McNamara
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-13ofz: detect short readCaolán McNamara
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-10ofz#4158 Integer-overflowCaolán McNamara
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-09rename AvoidConfig to FuzzingCaolán McNamara
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-06loplugin:constparams in various(2)Noel Grandin
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-04ofz#4055 Integer-overflowCaolán McNamara
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-01de-sal_uLong emfioCaolán McNamara
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-01ofz#3939 Integer-overflowCaolán McNamara
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-01ofz#3951 Integer-overflowCaolán McNamara
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-10-29ofz#3868 Integer-overflowCaolán McNamara
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-27tdf#111486 Fix description of SAL_ macro after EMF refactorBartosz Kosiorek
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-27ofz#3823 Integer-overflowCaolán McNamara
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-27emfio: don't reinvent read_uInt16s_ToOUStringMichael Stahl
Change-Id: Ib12923762b5dd4d255c89a5acc54fdc5678a58ed
2017-10-27remove GetSwapFloat nonsense from all 3 EMF readersMichael Stahl
SvStream::ReadFloat already does that, and SvStream is initialised to SvStreamEndian::LITTLE by default. Change-Id: I5859e43014533bcebef9d4b8f0678c516193b92e
2017-10-27ofz#3819 Integer-overflowCaolán McNamara
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-26vcl: make MapMode constructor explicitMichael Stahl
Insert constructor everywhere, except a couple places that apparently want to compare GetMapUnit(). Change-Id: I1910deb60562e5e949203435e827057f70a3f988
2017-10-26tdf#31814 EMF/EMF+ implement dual modePatrick Jaap
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>
2017-10-25ofz#3374 Integer-overflowCaolán McNamara
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>
2017-10-25ofz#3776 Divide-by-zeroCaolán McNamara
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>
2017-10-25ofz#3777 Undefined-shiftCaolán McNamara
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>
2017-10-25ofz#3763 Integer-overflowCaolán McNamara
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>
2017-10-25ofz#3766 Integer-overflowCaolán McNamara
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>
2017-10-24ofz Integer-overflowCaolán McNamara
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>
2017-10-24ofz#3743 Divide-by-zeroCaolán McNamara
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>
2017-10-22check emf seekCaolán McNamara
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>
2017-10-21check seek to end of header succeededCaolán McNamara
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>
2017-09-30ofz+ubsanCaolán McNamara
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>
2017-09-26Rename the basegfx::tools namespace to basegfx::utilsTor Lillqvist
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>
2017-09-23ofz#2956: Conditional jump or move depends on uninitialised valueCaolán McNamara
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>
2017-09-04stray debuggingCaolán McNamara
Change-Id: Iabe56218f8914d8d858446eb177cb89dc1cd8601
2017-09-04crashtesting: uninherited GDIObj is also possible hereCaolán McNamara
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>
2017-08-30Missing includeStephan Bergmann
Change-Id: Ic0ab1cc72005f99d7558b06c9a4ec9c94f2f0460
2017-08-30This check for GDIObj subtypes is exhaustiveStephan Bergmann
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
2017-08-13ofz#3028: use of uninitialized valuesCaolán McNamara
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>
2017-07-31loplugin:constparams in dbaccessNoel Grandin
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>
2017-07-15emfplus: corrections for UnitTest in vclArmin Le Grand
The CppunitTest_vcl_filters_test was not working due to a wmf file now being loadable. This leaded to better check errors on stream and react on it in test code. Hrad to find since that test - for whatever reason - is not executed on win. Also need to check result of EmfReader. Added emfio to test's module list Change-Id: Iea2b835408e919a8456e8f178cbfc782885ffebb
2017-07-15emfplus: more corrections due to linux buildArmin Le Grand
Change-Id: Ib2c3bff23043638d315405b5a91b2596e92f7ffa
2017-07-15emfplus: UnitTests and gerrit build correctionsArmin Le Grand
Needed to migrate UnitTest for Emf/Wmf import from vcl to emfio. Corrected stuff based on gerrit build feedback Change-Id: I7fd2456f814ea19583072ba09730a07e9b9d4061
2017-07-15emfplus: completed isolation/migration of Emf/WmfArmin Le Grand
Decided to keep the migrated/isolated Emf/Wmf reader which are now hidden behind a Uno Api. Had to re-implement WMF_EXTERNALHEADER (now WmfExternal, own file/header) to not break anything. It *seems* to just scale something and could be done after import, but I could not be sure. Also needed a callback hook to allow getting the Metafile out of a MetafilePrimitive in a lower module (vcl relative to drawinglayer) which is needed as long as primitives are not completely on Uno Api. Deleted all Emf/Wmf reader stuff from vcl. Change-Id: Ic5540defa8ec770728280df4df3f12e1f48cfc3a
2017-07-15emfplus: more streamlining of metafile importerArmin Le Grand
Change-Id: Ice0f779f8026983fd0884c2a02e9fd7220b498dc
2017-07-15emfplus: reorganized some old filter aspectsArmin Le Grand
Change-Id: I1949e851c560a81a461ec42a992f3b2cb0d019f8
2017-07-15emfplus: add rough version of local readerArmin Le Grand
Complete redevelopent is too expensive, start with adding a copy of the existing vcl importer which will in the next steps be adapted to import primitives instead of MetaFile(Actions). Adapted namespace, made compile and added sample code to roughly use it Change-Id: I79e7ea0d78099fbbe18e2a595457b2ab353f58ea
2017-07-15emfplus: use size of image of metafile fallbackArmin Le Grand
Change-Id: I0de82e0e431c0ce4527a909c2f98194f465ace8d