summaryrefslogtreecommitdiffstats
path: root/svgio
Commit message (Collapse)AuthorAgeFilesLines
* clang-tidy readability-container-size-emptyNoel Grandin2018-10-192-7/+7
| | | | | | | Change-Id: I1df70b7dff5ebb6048f7fc618789faa15ca5d422 Reviewed-on: https://gerrit.libreoffice.org/61967 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* clang-tidy readability-misleading-indentationNoel Grandin2018-10-191-4/+4
| | | | | | | Change-Id: I4673fc7c694924b41d048a1918ddb8b0e0af1f79 Reviewed-on: https://gerrit.libreoffice.org/61935 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Turn SvgMarkerNode::MarkerUnits into scoped enumStephan Bergmann2018-10-183-5/+5
| | | | | | | | | | | | ...to avoid -Werror,-Wshadow from Clang trunk with <https://reviews.llvm.org/D52400> "Improve -Wshadow warnings with enumerators", warning about shadowing of userSpaceOnUse in enum SvgUnits in svgio/inc/svgtools.hxx Change-Id: Ie1438e6ad0f73c73ad643157e5f8366a6e3f6851 Reviewed-on: https://gerrit.libreoffice.org/61933 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* loplugin:constfields in stoc..svgioNoel Grandin2018-10-083-3/+3
| | | | | | | Change-Id: Icfd936fe9b83e0e122af5b09f7ed6dde2ead4400 Reviewed-on: https://gerrit.libreoffice.org/61512 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:useuniqueptr in SvgDocumentNoel Grandin2018-09-265-20/+12
| | | | | | | Change-Id: I299e97c276b60be86491bfeee22d46774739ca44 Reviewed-on: https://gerrit.libreoffice.org/60969 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* remove duplicate lineNoel Grandin2018-09-171-1/+0
| | | | | | | | accidentally introduced with commit 23f9d2b092989c5f105144083e79066e3070afbc match_colorKeyword should be using static const lookup table Change-Id: I64c85504af6edba9f5e6a20b20ef245d43fd611b
* New loplugin:externalStephan Bergmann2018-09-172-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* match_colorKeyword should be using static const lookup tableNoel Grandin2018-09-141-152/+150
| | | | | | | | | no need to re-init this every time we look up a color Change-Id: I68113fc6a36880752f5eb7813df1f0d971678013 Reviewed-on: https://gerrit.libreoffice.org/60493 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:simplifyconstruct in stoc..svlNoel Grandin2018-09-1220-31/+6
| | | | | | | Change-Id: I81d465d66a979e9a1e092e5d23ed339840d1fb2d Reviewed-on: https://gerrit.libreoffice.org/60315 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* tdf#119557 style hierarchy isn't stable so looping check fails falselyCaolán McNamara2018-08-312-92/+94
| | | | | | | | | | | | | | | Given the css stuff a given style can end up with itself as a grandparent but then the css mutates things so it doesn't loop around to give itself as a grandgrandparent. So undo the loop detection check and turn it into a parse depth test instead with an arbitrary, but high, level Change-Id: If28684ad2b2adc664bc2da6b176b93248b377162 Reviewed-on: https://gerrit.libreoffice.org/59813 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* Consolidate: basegfx::clamp -> o3tl::clampStephan Bergmann2018-08-171-7/+10
| | | | | | | Change-Id: Iffd8b0a19d4479b6c70dc834c6f64499e87e01b1 Reviewed-on: https://gerrit.libreoffice.org/59265 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Use more basegfx deg<->rad functions, instead of direct formulasMike Kaganski2018-08-042-5/+3
| | | | | | | | | | | | | | | Also make the functions constexpr. Due to slight changes in floating-point arithmetics (90.0 instead of 180.0, M_PI2 instead of M_PI resp.), results might differ in last digits (usually 17th decimal digit). This has lead to need to tweak char2dump's PieChartTest unit test. Change-Id: I20323dd7dab27e4deb408ea4181e390cc05e7cd3 Reviewed-on: https://gerrit.libreoffice.org/58583 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* Add missing sal/log.hxx headersGabor Kelemen2018-08-024-0/+4
| | | | | | | | | | | | | | rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') to directories from stoc to svx Change-Id: If562b1aa1d676d2c1cf513e953238abbb846c65c Reviewed-on: https://gerrit.libreoffice.org/58224 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
* Fix typosAndrea Gelmini2018-07-311-1/+1
| | | | | | | Change-Id: Iaa00d65b518b3e638c2d31912e247cb91bdd0950 Reviewed-on: https://gerrit.libreoffice.org/58347 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* loplugin:stringloop in svgio..xmlsecurityNoel Grandin2018-07-301-3/+3
| | | | | | | Change-Id: I1b2fe5674c8350690efc3d3219b9273cc61d5b0c Reviewed-on: https://gerrit.libreoffice.org/58332 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* crashtesting: infinite recurse with moz609361-1.svgCaolán McNamara2018-07-242-56/+144
| | | | | | | Change-Id: I18c2dd159dd7a64c3627abdb472d65013453b1b9 Reviewed-on: https://gerrit.libreoffice.org/57891 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* crashtesting: infinite recurse with moz384637-1.svgCaolán McNamara2018-07-242-0/+9
| | | | | | | | Change-Id: Ia4bbc9d471c63812dc3ef490f32e8490bda72bfe Reviewed-on: https://gerrit.libreoffice.org/57888 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* crashtesting: infinite recurse with moz455984-5.svgCaolán McNamara2018-07-232-20/+52
| | | | | | | | Change-Id: Idef368c44454ae144b091132cd0d6103f92a6dde Reviewed-on: https://gerrit.libreoffice.org/57854 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* crashtesting: infinite recurse on moz330387-6.svgCaolán McNamara2018-07-182-21/+55
| | | | | | | | Change-Id: I3c39d49504a4651b92f41c07e4cef8887366dc2b Reviewed-on: https://gerrit.libreoffice.org/57626 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* tdf#118232 Allow load and insert of SVGs with no GeometryArmin Le Grand2018-07-111-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>
* Fix typosAndrea Gelmini2018-06-142-4/+4
| | | | | | | Change-Id: I69b4f139be269ff58acd9d74ce0c7897e84a9419 Reviewed-on: https://gerrit.libreoffice.org/55774 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
* Replace SVGFilter using SVGIOArmin Le Grand2018-06-132-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>
* loplugin:useuniqueptr in pathTextBreakupHelperNoel Grandin2018-05-281-8/+4
| | | | | | | Change-Id: Ie8c28403bd6280a733949493bfe693cbfee5e4f5 Reviewed-on: https://gerrit.libreoffice.org/54858 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* svgio: fix rendering when the width/height isn't present in SVGTomaž Vajngerl2018-05-134-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>
* new loplugin:unusedvariablemoreNoel Grandin2018-04-111-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>
* tdf#114738 Add support for transparency for EMF+ recordsBartosz Kosiorek2018-04-062-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>
* remove unused processfactory.hxx includesJochen Nitschke2018-04-011-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>
* use boost::optional in sc and svgioNoel Grandin2018-03-282-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>
* loplugin:redundantfcast look for redundant copies in return statementsNoel Grandin2018-03-121-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>
* drop sax::tools::*base64 methodsNoel Grandin2018-03-052-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>
* loplugin:useuniqueptr in SvgNodeNoel Grandin2018-03-055-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>
* loplugin:useuniqueptr in SvgPolyNodeNoel Grandin2018-03-052-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>
* loplugin:useuniqueptr in SvgPatternNodeNoel Grandin2018-03-052-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>
* loplugin:useuniqueptr in SvgPathNodeNoel Grandin2018-03-052-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>
* Fix typosAndrea Gelmini2018-01-251-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>
* ofz#5565 Indirect-leakCaolán McNamara2018-01-221-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>
* ofz#5431 Direct-leakCaolán McNamara2018-01-171-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>
* More loplugin:cstylecast: svgioStephan Bergmann2018-01-122-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
* loplugin:passstuffbyref improved return in sd,variousNoel Grandin2018-01-022-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>
* loplugin:unnecessaryparen improve return checkNoel Grandin2017-12-291-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>
* Fix typosAndrea Gelmini2017-12-201-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>
* inline use-once typedefsNoel Grandin2017-12-193-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>
* loplugin:unusedenumconstantsNoel Grandin2017-12-191-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>
* Fix typosAndrea Gelmini2017-12-161-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>
* loplugin:salcall fix functionsNoel Grandin2017-12-113-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>
* loplugin:includeform: svgioStephan Bergmann2017-10-2330-58/+58
| | | | Change-Id: I5832529b0200295cc54a85dff42bf5692bd59ab5
* overload std::hash for OUString and OStringNoel Grandin2017-10-233-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>
* add << operator for css::uno::ExceptionNoel Grandin2017-10-041-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>
* Rename the basegfx::tools namespace to basegfx::utilsTor Lillqvist2017-09-2614-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>
* Fresh run of bin/update_pch.shMike Kaganski2017-09-221-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>