tdf#149449 Don't ignore CSS class redefinition inside SVGs
commitc9f71c923f82cf430c3b67ee7af8ff9c681e7c0b
authorofftkp <parisoplop@gmail.com>
Sun, 19 Jun 2022 20:52:58 +0000 (19 23:52 +0300)
committerXisco Fauli <xiscofauli@libreoffice.org>
Tue, 12 Jul 2022 11:51:11 +0000 (12 13:51 +0200)
tree0f62f384d2a65ce0188a3ca34a37d72cadcf3daf
parent17806035b80a30a91bcb8b8bc86075e08f9aed9a
tdf#149449 Don't ignore CSS class redefinition inside SVGs

Previously if a css class was redefined like so:

.cls2,.cls3{fill:#fff;}.cls-2{opacity:0.1;}

the second definition of .cls-2 would get ignored and opacity would
remain 1.

This patch keeps track of the names of each previously defined class and
makes sure to append the future redefinition instead of ignoring it.

Change-Id: I20b55aea247d11774cd743505a90f1466f622b1e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136109
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit 99f8e8aa0ccb741c2b5ede6cab75798c1793d899)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136244
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
(cherry picked from commit 34e08a82a317e06d2526f5a16a522323c3902bd7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136981
svgio/inc/svgstylenode.hxx
svgio/source/svgreader/svgstylenode.cxx