summaryrefslogtreecommitdiff
path: root/svgio
AgeCommit message (Collapse)Author
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>
2023-08-02tdf#156577: do no use parent position if x array is emptyXisco Fauli
Change-Id: Id29e5a440dbc3719c53bcc9226336a3c99d469e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155216 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-08-02tdf#156579: treat switch element as a groupXisco Fauli
Regression from commit 13a41e7a12598c7896d6dc8d34aba6af5b80b83c Author: Xisco Fauli <xiscofauli@libreoffice.org> Date: Mon Jul 3 14:11:43 2023 +0200 tdf#150124: do nothing when parent is of unkown type because 'switch' is not a known token. For now it, treat it as a group No need to have a unittest for this Change-Id: I4cae92a010e45cd729db475a7abccab19a5d5403 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155250 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-08-01tdf#156283: take remaing dx value into consideration tooXisco Fauli
Change-Id: I27c6f12edacd68c7f956b67dcf9ef0cc5045e3d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155169 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-07-23Make CppunitTest_svgio CPPUNIT_TEST_NAME=testCssClassRedefinition more robustKhaled Hosny
The commit: commit 9e83d35c4a22bcb465f0736dda9b752b29f83959 Date: Thu Jun 23 21:52:52 2022 +0200 Make CppunitTest_svgio CPPUNIT_TEST_NAME=Test::testCssClassRedefinition robust Changed the font from generic Sans to Open Symbol to avoid failure when a different font is used, but it didn’t change the text string to a one supported by Open Symbol, so font fallback would still make the test fail. Change the text string to “012” which is supported by Open Symbol. Change-Id: I6e6ba22614ef1bafe5aece05c42d57d71923380c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154492 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-07-14tdf#156271: add dx shift on top of x positionXisco Fauli
Change-Id: I61263a7fec2ec8236221a10f8cb730899c878f5f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154403 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-07-14svgio: remove redundant checkXisco Fauli
Change-Id: Ie507fb1bf06f75e2fd673864a9ee9046aeb19377 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154401 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-07-13tdf#156269: dx and dy do not depend on x and yXisco Fauli
Change-Id: I99be5aa45b333ec3825373c3a10be0e24d23cb29 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154380 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-07-12tdf#156251: Add gap between text elements when neededXisco Fauli
Partially revert a42f5faac7c6d4590e632cf40e3ba9eb618e6f56 "tdf#103888: Do not add a gap at the end of each text portion" and adapt code to keep tdf#103888 fixed Change-Id: I4b3f1ff7d87b1945233d9b05824d58af1e001d65 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154364 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-07-12svgio: re-implement to use virtual functionXisco Fauli
kudos to Mike Kaganski for the hint Change-Id: Iea58a31ffa481c4d9579a31f045f2a73d30ad883 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154344 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-07-12tdf#156236: For the rx or ry properties, "0" is validXisco Fauli
Change-Id: I32c865e409a339c444440e00ee0f624c45380773 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154307 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-07-11svgio: use frozen::make_unordered_map so no need to specify the countXisco Fauli
Change-Id: Id8400cba4c00439b4f4b888782d68531f7a64617 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154293 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-07-10svgio: remove recurrent checkXisco Fauli
Change-Id: I1b346007f5ae5e95b559cae1a9e8fdd3f4d93502 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154271 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-07-10tdf#149673: only check opacity from parent...Xisco Fauli
... if it has a local css style Because it's the first in the style stack Partially reverts 3e0e67a152e9631574e28dacb6e06a96f03ebca2 "tdf#155932: tdf#97717: only apply opacity when primitive" Change-Id: I6a6bf08a519c84ac58c6111fd7da308cbf8a3021 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154270 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-07-10tdf#156201: just check one level up in the style stackXisco Fauli
Otherwise, the parent might also have a local css style Change-Id: Ib6d1340045f22861aee3e526d22d014eeb2f5d38 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154248 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-07-10tdf#99562: Do not ignore last column from matrixXisco Fauli
Change-Id: I1dff65963e2c414d1771a1592159930150c513e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154241 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-07-06tdf#156167: create separate map for case insensitive stringsXisco Fauli
Add static_assert to make sure both maps have the same size Regression from: svgio: use "frozen" for mapping between token strings and enums Change-Id: I2061606146cfcb34169dccf69b6f720727839d04 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153174 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Change-Id: Ic54dfe45eaff5ef75bcd4ebab715f278540da913 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154055 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-07-06svgio: use frozen moreXisco Fauli
Change-Id: I64c5d12321a10cc1f63d7892c83ff7bd3a232a26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154072 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-07-05svgio: simplify codeXisco Fauli
Change-Id: Ieaf0430cd0e84d861f108ec33bf98ff2870ba2df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154067 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-07-05tdf#156168: do nothing when there is no concatenationXisco Fauli
Regression from: tdf#156034: check for css style further up in the hierarchy Change-Id: I92c6673f1249cc4a273c490cdc0496474ce1f0c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153498 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Change-Id: Ie699f40ea813d2ba5dc031008d56e2fce73a5715 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154056 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-07-05ofz#60384 Direct-leakCaolán McNamara
since: commit 13a41e7a12598c7896d6dc8d34aba6af5b80b83c Date: Mon Jul 3 14:11:43 2023 +0200 tdf#150124: do nothing when parent is of unkown type Change-Id: I58edf5f63d97e8afb1cd58c7e23452a9ea6a87eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154023 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-07-03crashtesting: crash on import of moz610347-2.svgCaolán McNamara
Change-Id: I0793d00216586bf68b4b74305bba2f352eb320bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153888 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-07-03tdf#150124: do nothing when parent is of unkown typeXisco Fauli
Change-Id: I745b2a81200b0d8138b5f1b844849f20571d9546 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153878 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-06-30tdf#118087: set matrix as default value for typeXisco Fauli
From https://www.w3.org/TR/SVG11/filters.html#feColorMatrixElement "If attribute ‘type’ is not specified, then the effect is as if a value of matrix were specified." Change-Id: I8ddaa9129661d9a9f51c474461cf788d8d524a1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153804 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-06-29tdf#156066: Add support for feImage filterXisco Fauli
Change-Id: I76cf8932ae352c271283483c9c734408a35b6074 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153770 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-06-29svgio: simplify codeXisco Fauli
Change-Id: I18c4179c36c052cc0ed5b416125e72d542cb7407 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153749 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-06-29various XLink fields are deadNoel Grandin
after commit 195364a57a5e3090648cb327607bc52da2be583c Date: Thu Jun 8 13:49:11 2023 +0200 tdf#155733: no need to store these values Change-Id: I4a998add0079cbbcf9eaba38a43fc5411647dd64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153745 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-29tdf#156066: Add support for feDropShadow filterXisco Fauli
Change-Id: I0b2772a7211efb91821853e3369cfc3a5ef6a932 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153727 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-06-28tdf#156066: Add support for feFlood filterXisco Fauli
Change-Id: I4d01d40edd6fb91555fd734fc8378df1cbd5743a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153684 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-06-27tdf#156068: Add support for feOffset filterXisco Fauli
Change-Id: I1b3dea0ee4f9eb2ee7498962b04baaf5ba68855c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153629 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-06-26Revert "tdf#132246, tdf#155735: Add support for SourceAlpha"Xisco Fauli
This reverts commit 75399b8aad6c0f0998b9d0a6eddb2e29f8bc114c. it was incomplete. While at it, do not parse 'in' attribute for now, so only in="SourceGraphic" is used. Implementing the 'in' attribute is not trivial Change-Id: I66c721c1144638f5e3759e0aa3a1c2c062499a90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153627 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-06-26tdf#156038, tdf#78232: support css child combinatorXisco Fauli
Change-Id: I874c368f66db97017357030867f1255551996228 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153626 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-06-26svgio: simplify codeXisco Fauli
Change-Id: Ie363236a4b2e2d74d583b9f842b48743eefa9d24 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153625 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-06-25tdf#156034: improve test a bitXisco Fauli
Change-Id: I164103c92cfb53c4f1ce48dd1ca39dbd9a1efb1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153566 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-06-25tdf#155735: cid#1532475 Out-of-bounds accessXisco Fauli
Change-Id: Ifb3153cc492d042098398695642cd2530bc3b4b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153564 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-06-24cid#1532478 silence Unchecked return valueCaolán McNamara
Change-Id: I62caefd23f542d5c00ea86d84d199ce8ac09833b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153553 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-06-24tdf#132246, tdf#155735: Add support for SourceAlphaXisco Fauli
Change-Id: I8feae2447b17e15113ca45fe46c0d68cb6b6ab71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153550 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-06-23tdf#156034: check for css style further up in the hierarchyXisco Fauli
Change-Id: I92c6673f1249cc4a273c490cdc0496474ce1f0c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153498 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-06-22tdf#156018: check if there is a css style with element inside elementXisco Fauli
Change-Id: I54fa5bea42560eec5ae51dd7ba07de11f418c75c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153466 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-06-22tdf#155735: Add support for matrix typeXisco Fauli
Change-Id: Icc172c5f47731ddcf0beca64c72c2022313e74a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153177 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-06-22tdf#155735: Add support for hueRotate typeXisco Fauli
Change-Id: I9c7ada2908c0739708fbc9e28ac58430350da7a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153112 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-06-21Fix typoAndrea Gelmini
Change-Id: Id2a9f8eeb5032ef65c5457cd747915914bc32d64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153317 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-06-20tdf#155814: only check parent style when it has a local css styleXisco Fauli
This also fixes the problem for filters and mask, since they are call from add_postProcess Adapt some tests to the new xml output. Visually nothing has changed Change-Id: I65d2491409019f4cd0b1113a9a7931fc602c57b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153355 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>