summaryrefslogtreecommitdiff
path: root/svgio
AgeCommit message (Collapse)Author
2024-03-12related: tdf#159947: only parse in/result if the element supports themXisco Fauli
There are some filters ( e.g. feMerge ) that do not support in or result attributes Change-Id: I4072dc481557557733e55cc5fcbd80cb11a7ddb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164718 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-03-07Simplify some basegfx::fTools::*orEqual callsNoel Grandin
Comparing with zero is simple - the implementation of basegfx::fTools::moreOrEqual calls rtl_math_approxEqual eventually, which special-zases zero. Change-Id: I62f10f63f103d91a201dfeb20e5b3f9010f377c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164526 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-01tdf#159968: Support overflow:visible in marker elementXisco Fauli
Change-Id: I4ea648cf94a4bb321a78843a9898769a69c5630d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164224 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-03-01svgio: simplify a bitXisco Fauli
By default, preserveAspectRatio is already xMidYMid meet Change-Id: I37d85979728e9382c9b21b3219f3ad79eeec536c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164188 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-02-29tdf#159947: Add support for in and result filter attributesXisco Fauli
Change-Id: I8bc7e319a64c528893de8454c64545146ad4e9d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164108 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-02-07tdf#159601: svgio: do not use std::move hereXisco Fauli
Thanks to Caolán for spotting it in https://gerrit.libreoffice.org/c/core/+/163015/comments/0fda53b2_f6d5a0cd Change-Id: Ifad349a2731009b520d4992a12d4702e3be6ba6f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163083 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-07these casts are no longer necessaryNoel Grandin
Change-Id: Ife51f47d95e286e0fec165882377c31b1a664241 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163058 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-07simplify some Primitive2DContainer constructionNoel Grandin
Change-Id: Iced31da6891a5d218d63e9b59d48fb2645f39203 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163071 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-07simplify some Primitive2DContainer accessesNoel Grandin
Change-Id: I217489db2f66049dfb0908f2f2a07a2f585302ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163070 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-07can std::move these Primitive2DContainer valuesNoel Grandin
Change-Id: Id40fdc3915107575eec734de704a52c5fb3715f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163069 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-06tdf#159594: reuse target for symbols' childrenXisco Fauli
Regression from e7186b49a9a0b24ddc3b1c5384b5d9facb03518c "tdf#158445: support viewBox in symbol elements" Change-Id: Ie2198c47149def17fa3cb612046b61bf32e873bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163046 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-02-05tdf#159566: match 'central' dominant-baseline to 'middle'Xisco Fauli
Inkscape also does it the same way Change-Id: I3e1cea091e7314886bbc9135c55698892239bec7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163006 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-02-05tdf#108037 Reduce time and memory consumed exporting to PDFNoel Grandin
by avoiding making multiple copies of the Primitive2D container that we pass to TransformPrimitive2D. Instead, make TransformPrimitive2D store its children using a GroupPrimitive2D, which means we can share the GroupPrimitive2D among all the TransformPrimitive2D instances we create. Change-Id: I8a4398f9db6a6ab013ee24ad53836975fba6f3df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162951 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-01-26tdf#158445: support viewBox in symbol elementsXisco Fauli
Change-Id: Ie45b1e1dd4a4dcfc3cf3ce3d30f8dd9e040e37fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162605 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-12-24cid#1545470 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1545468 COPY_INSTEAD_OF_MOVE cid#1545446 COPY_INSTEAD_OF_MOVE cid#1545435 COPY_INSTEAD_OF_MOVE cid#1545419 COPY_INSTEAD_OF_MOVE cid#1545415 COPY_INSTEAD_OF_MOVE cid#1545410 COPY_INSTEAD_OF_MOVE cid#1545390 COPY_INSTEAD_OF_MOVE cid#1545384 COPY_INSTEAD_OF_MOVE cid#1545374 COPY_INSTEAD_OF_MOVE cid#1545371 COPY_INSTEAD_OF_MOVE cid#1545368 COPY_INSTEAD_OF_MOVE cid#1545366 COPY_INSTEAD_OF_MOVE cid#1545335 COPY_INSTEAD_OF_MOVE cid#1545331 COPY_INSTEAD_OF_MOVE cid#1545327 COPY_INSTEAD_OF_MOVE cid#1545308 COPY_INSTEAD_OF_MOVE cid#1545280 COPY_INSTEAD_OF_MOVE cid#1545199 COPY_INSTEAD_OF_MOVE Change-Id: If05a13125b05ccd93d34d0eced566e7b3b58aaef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161256 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-19cid#1545222 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1545241 COPY_INSTEAD_OF_MOVE cid#1545303 COPY_INSTEAD_OF_MOVE cid#1545315 COPY_INSTEAD_OF_MOVE cid#1545319 COPY_INSTEAD_OF_MOVE cid#1545322 COPY_INSTEAD_OF_MOVE Change-Id: I284ba6e395f72abd7939667a8367ac99ab64194d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160955 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-16cid#1545970 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1545957 COPY_INSTEAD_OF_MOVE cid#1545944 COPY_INSTEAD_OF_MOVE cid#1545939 COPY_INSTEAD_OF_MOVE cid#1545931 COPY_INSTEAD_OF_MOVE cid#1545926 COPY_INSTEAD_OF_MOVE cid#1545909 COPY_INSTEAD_OF_MOVE cid#1545899 COPY_INSTEAD_OF_MOVE cid#1545896 COPY_INSTEAD_OF_MOVE cid#1545894 COPY_INSTEAD_OF_MOVE cid#1545858 COPY_INSTEAD_OF_MOVE cid#1545823 COPY_INSTEAD_OF_MOVE cid#1545820 COPY_INSTEAD_OF_MOVE cid#1545819 COPY_INSTEAD_OF_MOVE cid#1545772 COPY_INSTEAD_OF_MOVE cid#1545749 COPY_INSTEAD_OF_MOVE cid#1545743 COPY_INSTEAD_OF_MOVE cid#1545739 COPY_INSTEAD_OF_MOVE cid#1545635 COPY_INSTEAD_OF_MOVE cid#1545603 COPY_INSTEAD_OF_MOVE cid#1545602 COPY_INSTEAD_OF_MOVE cid#1545592 COPY_INSTEAD_OF_MOVE cid#1545544 COPY_INSTEAD_OF_MOVE cid#1545532 COPY_INSTEAD_OF_MOVE cid#1545520 COPY_INSTEAD_OF_MOVE cid#1545512 COPY_INSTEAD_OF_MOVE cid#1545490 COPY_INSTEAD_OF_MOVE cid#1545483 COPY_INSTEAD_OF_MOVE cid#1545467 COPY_INSTEAD_OF_MOVE cid#1545461 COPY_INSTEAD_OF_MOVE cid#1545458 COPY_INSTEAD_OF_MOVE cid#1545428 COPY_INSTEAD_OF_MOVE cid#1545394 COPY_INSTEAD_OF_MOVE cid#1545385 COPY_INSTEAD_OF_MOVE cid#1545383 COPY_INSTEAD_OF_MOVE cid#1545366 COPY_INSTEAD_OF_MOVE cid#1545357 COPY_INSTEAD_OF_MOVE Change-Id: I76224326977b4067b94ca3176cad1ca6de17930a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160847 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-16cid#1546456 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1546450 COPY_INSTEAD_OF_MOVE cid#1546430 COPY_INSTEAD_OF_MOVE cid#1546401 COPY_INSTEAD_OF_MOVE cid#1546313 COPY_INSTEAD_OF_MOVE cid#1546302 COPY_INSTEAD_OF_MOVE cid#1546301 COPY_INSTEAD_OF_MOVE cid#1546299 COPY_INSTEAD_OF_MOVE cid#1546280 COPY_INSTEAD_OF_MOVE cid#1546233 COPY_INSTEAD_OF_MOVE cid#1546217 COPY_INSTEAD_OF_MOVE cid#1546215 COPY_INSTEAD_OF_MOVE cid#1546204 COPY_INSTEAD_OF_MOVE Change-Id: Iaab419509ad4a0bea9cae3665723af0e99c60ee4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160849 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-11-19Extended loplugin:ostr: svgioStephan Bergmann
Change-Id: I5a93e5f0a3cfc0fd85ac53ba2f58131561508386 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159675 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-02Related: tdf#157939 put CppunitTest_svgio under non_application_font_use:abortCaolán McNamara
Change-Id: Ib48e8045ad739b6f6fe98ab00cd609b54d4c3113 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158843 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-10-27Drop rTokenName argument from SvgNode::parseAttributeMike Kaganski
It was never used. Change-Id: I8bc7d625977a6cdc8fe6863037e72577dbfc46c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158493 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-10-27Commit 04c78e1a46a423071d7ea68724525ec7ef92e0e8 follow-upMike Kaganski
Drops duplicating map, and uses std::find_if with case-insensitive comparison. Likely to have some performance impact, but avoids the maintenance penalty of two maps. Change-Id: I7144556488aa134d9b9214b00ba9d7c4e0fb68a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154159 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-10-23Extended loplugin:ostr: Rewrite some O[U]StringLiteral -> O[U]StringStephan Bergmann
...in include files. This is a mix of automatic rewriting in include files and manual fixups (mostly addressing loplugin:redundantfcast) in source files that include those. Change-Id: I1f3cc1e67b9cabd2e9d61a4d9e9a01e587ea35cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158337 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-09-26tdf#97710: do not create nonzero conform for polylineXisco Fauli
Change-Id: Ib9d4e957b83ad84b79ae4ade5c6be3ab3d9d8028 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157286 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-09-09XSvgParser does not need to implement XAggreggationNoel Grandin
Checked on jenkins using 'make check' and +void SAL_CALL setDelegator(css::uno::Reference<css::uno::XInterface> const &) final { assert(false); } Change-Id: Id392a4fc3ddf34ce1fa2b66eb1e509e05184e50c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156721 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-07svgio: update commentXisco Fauli
After 4f656a057e2a92e2107f7820fc563498c801d7d3 "svgio: handle addGap internally inside SvgCharacterNode" Change-Id: Ib3ddbaed7a07c1b3b9f21eafd0715622751829ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156648 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-09-06tdf#157113: Add gap even if baseline is differentXisco Fauli
This was a workaround for https://bz.apache.org/ooo/show_bug.cgi?id=122524 but it's no longer needed since 5079e7937ef471a44dcf119dc6ae0a334d9c6adc "tdf#156251: Add gap between text elements when needed" Change-Id: I83af59a515d56af6b0e3cf3e351d3df52510a17d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156613 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-09-05tdf#156569: '%' can be in the middle of the stringXisco Fauli
Change-Id: I5d6ab57c17ab2cbce4d3df629a91a006fad2198d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156564 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-08-22tdf#129356: handle css combinator when the element name is combined...Xisco Fauli
... with the ID or the class While at it, simplify the code a bit Change-Id: I9e36f334b884d31229568835a346d4427a47c760 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155945 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-08-21tdf#156834: Add basic support for dominant-baseline attributeXisco Fauli
Change-Id: I005d6ca6bc340d73cae639ccd09321a0a00bc4b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155892 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-08-21tdf#156837: check baseline-shift from parent tooXisco Fauli
Change-Id: I6e62d794dd4410447db3bee26c1e18fe9dad6a9c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155895 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-08-18tdf#142424: Revert "related tdf#156579: just break for switch element"Xisco Fauli
This reverts commit e222f60ac2a71032dbdf62d7c7e28978b5a0b19c. To make the switch element behave like a group as least, so the transform attribute is parsed Change-Id: Id8c21ac6da217d8f7bc350ff41022335bf1e0f1f Change-Id: If1e53f9baad8995f26f9b885cfef6265040736bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155758 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-08-16svgio: fix typo in codeXisco Fauli
Change-Id: Ice8e830cebf307b6a4deb9dbbd26e65b34420a31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155734 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-08-15tdf#156777: check for css style in textpathXisco Fauli
Change-Id: I63a274dd9fba37852412a194a490cb2b7634f1cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155726 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-08-15tdf#86938: fix calculation of baseline-shiftXisco Fauli
Change-Id: I8c30c29052f2ea1fe6e49360b972af868851131b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155671 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-08-15tdf#93583: use getTextWidth to calculate line's widthXisco Fauli
Since every character in the line might use different styles Change-Id: I2ce079d4308f4acde42a8366838749a7c20331b4 Change-Id: I01f51f157caa667cebc8860ae37d4458fac2d511 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155666 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-08-12tdf#156616: check if character's parent has x or yXisco Fauli
if so, only concatenate the characters that are in the same line so the alignment will be calculated based on the line's width Change-Id: I704370c0a470f8b4cff97c51ad9863158118ee8a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155636 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-08-11cid#1539807 Uninitialized pointer fieldCaolán McNamara
Change-Id: I500c5d9f15c6a57622a28ea7cbf3b5f90761b5c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155582 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-08-10related: tdf#151103: simplify codeXisco Fauli
Keep the text line in the SvgTextNode and not in each SvgCharacterNode Change-Id: Ia33e46cc974a39a915e7b933337b4c529e6eeca5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155558 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-08-10svgio: move SvgTextPosition to its own fileXisco Fauli
In order to avoid a circular dependency in a follow-up commit Change-Id: Ib7b16e73282dfa6f3ca87aab1044cb92df72b6bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155555 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-08-10svgio: handle addGap internally inside SvgCharacterNodeXisco Fauli
Also add the gap at the beginning of the current node, not at the end of the previous one Change-Id: I6583059b4a7418010ac2af459e00fb0d02d39605 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155552 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-08-10svgio: avoid dynamic_castXisco Fauli
Change-Id: I9a2e2c4341476a59ffb001c42e7812cb8249c856 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155548 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-08-09svgio: get rid of SvgTextPositionsXisco Fauli
and make SvgText inherit from SvgTspan Change-Id: Ief25e52ba2a493936f82f1674f73168ed5647278 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155521 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-08-09svgio: remove recurrent checksXisco Fauli
Change-Id: I26c37e6b58e7c54e2bdc2c77543896daceb638d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155520 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-08-08crashtesting: null-deref on kde114933-2.svgCaolán McNamara
Change-Id: If344bd676eb0eefd2d1bb4728bd0ca1e602c076e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155432 Tested-by: Jenkins Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-08-03svgio: Simplify codeXisco Fauli
Change-Id: Ibd28973fee006f3853fde64c519dd0cd8c1573ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155322 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-08-03Revert "fdo#50114 ingore flowRoot element during svg import"Xisco Fauli
This commit reverts 5bd241b99b76ae7f4b3c1d4f2bcbaf7c487bb339 which is no longer needed after 13a41e7a12598c7896d6dc8d34aba6af5b80b83c "tdf#150124: do nothing when parent is of unkown type" and might cause unexpected results as seen with https://bugs.documentfoundation.org/attachment.cgi?id=124782 from https://bugs.documentfoundation.org/show_bug.cgi?id=99628 Change-Id: I8bb700f5c5553700f91b937330bc3730e8ea84c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155320 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-08-03related tdf#156579: just break for switch elementXisco Fauli
Change-Id: I4a31431325c44440f773f6f345d2a0a057d1fa37 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155317 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-08-03tdf#151103: Use the whole text line to calculate the align positionXisco Fauli
Change-Id: I7ecd41c422afbf028101924972c47a510834ba5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155314 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-08-02tdf#95400: svgio: Add unittestXisco Fauli
Change-Id: I88d56bafce22231ca05864ee9dbeb8c31b4dcb50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155265 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>