summaryrefslogtreecommitdiff
path: root/svgio
AgeCommit message (Collapse)AuthorFilesLines
2018-07-26crashtesting: infinite recurse with moz455984-5.svgCaolán McNamara2-20/+52
Change-Id: Idef368c44454ae144b091132cd0d6103f92a6dde Reviewed-on: https://gerrit.libreoffice.org/57855 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-07-26crashtesting: infinite recurse with moz609361-1.svgCaolán McNamara2-56/+144
Change-Id: I18c2dd159dd7a64c3627abdb472d65013453b1b9 Reviewed-on: https://gerrit.libreoffice.org/57892 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-07-26crashtesting: infinite recurse with moz384637-1.svgCaolán McNamara2-0/+9
Change-Id: Ia4bbc9d471c63812dc3ef490f32e8490bda72bfe Reviewed-on: https://gerrit.libreoffice.org/57889 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2018-07-18crashtesting: infinite recurse on moz330387-6.svgCaolán McNamara2-21/+55
Change-Id: I3c39d49504a4651b92f41c07e4cef8887366dc2b Reviewed-on: https://gerrit.libreoffice.org/57627 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-07-12tdf#118232 Allow load and insert of SVGs with no GeometryArmin Le Grand1-0/+17
Change-Id: Iaf3d6a0423c5f11dda1e623dd730af01dbd6551c Reviewed-on: https://gerrit.libreoffice.org/57284 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de> (cherry picked from commit 0613ce41da0b94bc481b94b8141afcf15df8abe7) Reviewed-on: https://gerrit.libreoffice.org/57350
2018-06-14Replace SVGFilter using SVGIOArmin Le Grand2-17/+104
Next step is to put more logic into the decision if Draw or Impress should be loaded - if we have a self-exported Impress, import as Impress, else (including all not-self-created SVG Graphics) import to Draw. To do this it is necessary to be able to import to different document formats at all. To do this, add an internal filter type to the filter mechanism (types/registration/...) and decide in the SVG XExtendedFilterDetection::detect from SVGFilter which one to use. Added tooling for SVG detection and more, see SVGFileInfo. This allows to detect for SVG, but also if the creator was LO and if it was Draw or Impress. The document format/filter is choosen accordingly. Corrected the error with <g visibility="hidden"> Slides inisde <g class="SlideGroup"> for import of self-exported Impress documents. No idea why this was written that way, but needs to be fixed to get a visible content at all. Also adapted the final mapping from pt to 100thmm in SvgSvgNode::decomposeSvgNode. Unfortunately (and also for unknown reasons) the self-exported Impress does not write svg:width/height values, thus the adaption from assumed svg-units (px) to 100thmm has to be skipped. Have identified the place in svgio where I can embed Pages/Slides to a helper-Primitive to later be able to 'break' such GraphicObjects to multiple Pages/Slides. I have added a Primitive called PageHierarchyPrimitive2D for this purpose. Change-Id: I38bfef6e7b16479a025fc754e38b4e21a006ad38 Reviewed-on: https://gerrit.libreoffice.org/55434 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de> (cherry picked from commit 3087011e2eb810866276e270a6fc61a7e0998fec) Reviewed-on: https://gerrit.libreoffice.org/55786 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-05-13svgio: fix rendering when the width/height isn't present in SVGTomaž Vajngerl4-19/+124
The general size of the image should be the same when width/height attributes are present. It is very wrong to assume the size of the image is the area covered by all the primitives in the image. Change-Id: I56f241e84dee37796f9804ce2569c4eb416e83a0 Reviewed-on: https://gerrit.libreoffice.org/54191 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-04-11new loplugin:unusedvariablemoreNoel Grandin1-2/+2
collection of heuristics to look for local variables that are never read from i.e. do not contribute to the surrounding logic This is an expensive plugin, since it walks up the parent tree, so it is off by default. Change-Id: Ib8ba292241bd16adf299e8bba4502cb473513a06 Reviewed-on: https://gerrit.libreoffice.org/52450 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-06tdf#114738 Add support for transparency for EMF+ recordsBartosz Kosiorek2-4/+0
With current EMF+ implementation all filled figures, does not support transparency. This patch add transparency support for following EMF+ records: - DrawDriverString - DrawString - FillEllipse - FillRects - FillPolygon - FillPie - FillPath - FillRegion Change-Id: I1e59ea90bdf5fafc07ff9417fccace44872bbecd Reviewed-on: https://gerrit.libreoffice.org/50609 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2018-04-01remove unused processfactory.hxx includesJochen Nitschke1-1/+0
and fix fallout Change-Id: Id06bf31f2075111e426ba40c84c885ae70697bee Reviewed-on: https://gerrit.libreoffice.org/52206 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-03-28use boost::optional in sc and svgioNoel Grandin2-22/+15
instead of using std:unique_ptr to allocate small objects on the heap Change-Id: Ifd309a9bf331910354406b827b89a0363f3b7eda Reviewed-on: https://gerrit.libreoffice.org/51945 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-12loplugin:redundantfcast look for redundant copies in return statementsNoel Grandin1-1/+1
Change-Id: I5f416c865dfe1c36018784246a8007452eb42008 Reviewed-on: https://gerrit.libreoffice.org/50996 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-05drop sax::tools::*base64 methodsNoel Grandin2-1/+3
and use the underlying comphelper methods rather. This is so that I can break the dependency that tools has on sax, and can add methods that make sax depend on tools. Change-Id: I8a2d6ce2ffc3529a0020710ade6a1748ee5af7d5 Reviewed-on: https://gerrit.libreoffice.org/50767 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-05loplugin:useuniqueptr in SvgNodeNoel Grandin5-25/+18
Change-Id: I7ab382bd90050302c24464eed645d20a435dbd63 Reviewed-on: https://gerrit.libreoffice.org/50657 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-05loplugin:useuniqueptr in SvgPolyNodeNoel Grandin2-7/+5
Change-Id: I0227c8a36abbdb88f17cfea186eea28c9f566bd5 Reviewed-on: https://gerrit.libreoffice.org/50656 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-05loplugin:useuniqueptr in SvgPatternNodeNoel Grandin2-8/+8
Change-Id: Icf0390d3667c3d55db2266285cacea36e2171e0a Reviewed-on: https://gerrit.libreoffice.org/50655 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-05loplugin:useuniqueptr in SvgPathNodeNoel Grandin2-8/+6
Change-Id: I8e4485a308edecf05a2bc70d5c067af3b0eef5d1 Reviewed-on: https://gerrit.libreoffice.org/50654 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-25Fix typosAndrea Gelmini1-1/+1
Change-Id: Ieef0e3f21eb12cb5b72d39da4bc0a8c60dd0d5ce Reviewed-on: https://gerrit.libreoffice.org/48545 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-22ofz#5565 Indirect-leakCaolán McNamara1-2/+8
Change-Id: I7e201494edcf128389951e09ccfb6c7fc1e53315 Reviewed-on: https://gerrit.libreoffice.org/48309 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-17ofz#5431 Direct-leakCaolán McNamara1-2/+0
Change-Id: I4ab6739bd2ae63170ade7019036827455f764666 Reviewed-on: https://gerrit.libreoffice.org/48014 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-12More loplugin:cstylecast: svgioStephan Bergmann2-28/+28
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: Id7f822baae5e5f853308e52eba3633f879af3140
2018-01-02loplugin:passstuffbyref improved return in sd,variousNoel Grandin2-2/+2
Change-Id: I4b6ea89ae2072f4389a696ea3c96d8f7a5731e7a Reviewed-on: https://gerrit.libreoffice.org/47246 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-29loplugin:unnecessaryparen improve return checkNoel Grandin1-1/+1
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-20Fix typosAndrea Gelmini1-1/+1
Change-Id: I28d73221ea83d89f73460f591723c6f80594ff15 Reviewed-on: https://gerrit.libreoffice.org/46822 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-19inline use-once typedefsNoel Grandin3-6/+3
Change-Id: I5c3ffc03c26b3428f1f336e6ecba7838a1cf1157 Reviewed-on: https://gerrit.libreoffice.org/46764 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-19loplugin:unusedenumconstantsNoel Grandin1-7/+0
Change-Id: I9dc4b369872a7c6c076ae9be1dcdf2f8385af8a7 Reviewed-on: https://gerrit.libreoffice.org/46684 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-16Fix typosAndrea Gelmini1-1/+1
Change-Id: Iedb99e41887ebfd6fa290bc113b473c5cc9693b4 Reviewed-on: https://gerrit.libreoffice.org/46600 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-11loplugin:salcall fix functionsNoel Grandin3-5/+5
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-10-23loplugin:includeform: svgioStephan Bergmann30-58/+58
Change-Id: I5832529b0200295cc54a85dff42bf5692bd59ab5
2017-10-23overload std::hash for OUString and OStringNoel Grandin3-6/+4
no need to explicitly specify it anymore Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec Reviewed-on: https://gerrit.libreoffice.org/43567 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-04add << operator for css::uno::ExceptionNoel Grandin1-1/+1
Change-Id: Ia23dafd07133779144965682df3b7125a3214235 Reviewed-on: https://gerrit.libreoffice.org/43046 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-09-26Rename the basegfx::tools namespace to basegfx::utilsTor Lillqvist14-43/+43
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-22Fresh run of bin/update_pch.shMike Kaganski1-2/+5
Change-Id: I69d4157aaf6570cecd51ea59df20556914942e06 Reviewed-on: https://gerrit.libreoffice.org/42565 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-12clang-tidy modernize-use-emplace in svgio..svtoolsNoel Grandin2-4/+3
Change-Id: I4f3b0762e197d5397e723aba1dc43e3c857be145 Reviewed-on: https://gerrit.libreoffice.org/42193 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-24Consistently use OUString in test::DirectoriesStephan Bergmann1-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>
2017-08-17remove UL/L suffixes from integer constants in initialiser/call expressionsNoel Grandin1-1/+1
Change-Id: Iae081567c4fa5b88edbd12cf2fbafd2b8f31b300 Reviewed-on: https://gerrit.libreoffice.org/41214 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-21loplugin:constparams in svgioNoel Grandin10-13/+13
Change-Id: I35dd8b1373ce3c46a10b1da1ddc6dc3722ffa760 Reviewed-on: https://gerrit.libreoffice.org/40245 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-17extend loplugin useuniqueptr to OUString pointersNoel Grandin2-12/+9
Change-Id: Ieb5bab3895e1edaff497c4a1a88303ccac097edc Reviewed-on: https://gerrit.libreoffice.org/39948 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-15emfplus: create a wmf/emf/emf+ primitive based importerArmin Le Grand1-3/+3
First steps to organize an importer that can read/interpret wmf/emf/emf+ and deliver a primitive representation for the content by parsing it. Use the same mechanisms as already applied for Svg, so to reuse abilities to keep original binary data to allow save again and embedding in files and have an implemented replacement bitmap based representation. For this, unify the used helper classes to handle more than just Svg. For 1st try, add test code and static bool switches Change-Id: I6e0a82943541d811a8f8d65a84115569fcd8cee7
2017-07-14 use more OUString::operator== in sfx2..svtoolsNoel Grandin1-1/+1
Change-Id: I859b77319f551eabd19dae54bd69c212221112a8 Reviewed-on: https://gerrit.libreoffice.org/39938 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-14extend loplugin useuniqueptr to POD typesNoel Grandin2-8/+9
Change-Id: I6ff24f048bd8f75bf87a78b718f37b57855d4781 Reviewed-on: https://gerrit.libreoffice.org/39932 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-13bah, wrong resetCaolán McNamara1-1/+1
Change-Id: Iaee7f4f038000c7009c9c74b822b7599559f09ca
2017-07-13Resolves: tdf#108903 avoid recurse to deathCaolán McNamara2-2/+7
Change-Id: Iadde719a024c5fce97aa0f4c58947a5012639a84 Reviewed-on: https://gerrit.libreoffice.org/39918 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-06-27loplugin:oncevar in starmath..svlNoel Grandin4-64/+49
Change-Id: I20e3796407c7e429a88d2811673929ac1141a41c Reviewed-on: https://gerrit.libreoffice.org/39280 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-21loplugin:unusedfields store..svlNoel Grandin4-50/+1
Change-Id: I6070a683e5128271b84a10caccb548d07c950927 Reviewed-on: https://gerrit.libreoffice.org/39021 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-12clang-tidy readability-delete-null-pointerNoel Grandin1-14/+3
which in turn triggered some loplugin:useuniqueptr Change-Id: I0c38561fc9b68dac44e8cf58c8aa1f582196cc64 Reviewed-on: https://gerrit.libreoffice.org/38281 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-06cppcheck: knownConditionTrueFalseJochen Nitschke1-2/+2
Change-Id: I231113eaf3117e13ed18de906e3787643abe9335 Reviewed-on: https://gerrit.libreoffice.org/38423 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-02convert GRFILTER constants to ERRCODE_GRFILTER_Noel Grandin1-2/+2
since various code mixes these constants in with ErrCode values from other code, let us just make it into real ErrCode values. Change-Id: Ifa3d0f7526172609a44e6749bed9f730ab6b1a95 Reviewed-on: https://gerrit.libreoffice.org/38313 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-28remove unnecessary use of OString::getStrNoel Grandin3-23/+3
Change-Id: I0490efedf459190521f4339854b3394d57765fdb Reviewed-on: https://gerrit.libreoffice.org/38058 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-04loplugin:checkunusedparams in svgioNoel Grandin26-29/+28
Change-Id: I2e05fc51715902737ead6e57d0fbe167d715b822 Reviewed-on: https://gerrit.libreoffice.org/37194 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>