Commit Graph
104 Commits
Author SHA1 Message Date
Miklos Vajna 33da090998 CppunitTest_svgio: use CPPUNIT_TEST_FIXTURE()
This suite is large enough so that avoiding the
declaration/registration/definition of each test manually saves a lot of
space.

Change-Id: I08359c52cfbbd2ff17ec61722479cda26f308590
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143800
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-12-08 07:06:31 +00:00
Miklos Vajna d34036e60c SVG import: add support for semi-transparent text
<tspan fill-opacity="..."> from SVG was ignored so far, only taking RGB
colors from the 'fill' attribute, but ignoring transparency.

The problem is that an SVG file is imported by mapping it to
drawinglayer primitives, but TextSimplePortionPrimitive2D takes a
basegfx::BColor as the font color, which doesn't handle transparency.

Fix the problem by rendering SVG similar to how commit
81b0d5393c (svx: add rendering for
semi-transparent shape text, 2019-11-20) did it for shape text: wrap the
text primitive in a UnifiedTransparencePrimitive2D when opacity is not
1.

Note that the drawinglayer primitive works with transparency and SVG
works with opacity, which is the opposite of each other, but both are
0..1 ranges.

Change-Id: If5c48613b70eac662b54b8c9da835cd0a966ba89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143429
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2022-11-29 11:32:14 +01:00
Xisco Fauli 5e6b02055a tdf#151118: don't trim leading/trailing spaces in 'preserve' case
Thanks again to Mike Kaganski for spotting

Change-Id: Ifd8dcf15d7714ebc4f19083fefe0d78d27d46b4c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140483
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-09-23 14:20:12 +02:00
Xisco Fauli bdebe856d1 tdf#151118: svg: don't replace newline with space when xml:space="default"
Partially revert ddf695db44
"tdf#151118: svg: fix handling of xml:space="preserve""

See discussion in https://gerrit.libreoffice.org/c/core/+/140404

Thanks to Mike Kaganski for spotting it

Change-Id: Ifdd26b8de2f5cc392127f215e148599ae63036dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140444
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-09-23 12:24:01 +02:00
Xisco Fauli ddf695db44 tdf#151118: svg: fix handling of xml:space="preserve"
This allows the code to be simplified a bit

Change-Id: If42dd9d3ebd7860ece9ff78cb090ff1b07e1b432
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140404
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-09-22 13:43:59 +02:00
Xisco Fauli a42f5faac7 tdf#103888: Do not add a gap at the end of each text portion
I can't think of any situation where it's needed

Change-Id: I1c2c6ec3d22eb9263f3c3c20793d9fe3926b8d78
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140351
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-09-21 21:04:40 +02:00
cutamar 45394fcf7e tdf#141908 Replace usage of sal_Int32 with Color in unit tests
Change-Id: Ifb5ff2e6d5ed28bcb9e190d7f2deaaa970693cbc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138938
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-08-30 22:33:06 +02:00
Xisco Fauli cad5220c70 tdf#150323: also add markers if there is a css style parent
Change-Id: Ia900726ee31b7b19e98122d40b33581c9a60dcc7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138090
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-08-11 13:03:06 +02:00
Xisco Fauli 4f61276dae svgio: Add support for clip-rule="evenodd"
Change-Id: I028aa88bdd72b4f87526a3d1edabd612d7686571
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137577
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-07-29 08:21:59 +02:00
Xisco Fauli 9507e96153 svgio: qa: add unittest for fill-rule
Change-Id: I76c0594d634c4154bd2b63027e93934b521998d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137573
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-07-29 02:32:03 +02:00
Xisco Fauli 47c4285371 related: tdf#97539: SVGIO: iterate over parent's clippaths
This commit reintroduces fb33451a27
"tdf#97539: SVGIO: iterate over parent's clippaths" which I
reverted it in 82c0a363ab
"tdf#97539; if parent is css style, look one level up" because
I thought it was no longer necessary, but I was wrong.
Also add a unittest

Change-Id: Ib66ca0afd63e8e52be6677b6965179e092a61aa8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137195
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-07-18 21:59:57 +02:00
Xisco Fauli 67c422585d tdf#126330: use correct type for symbol node
Change-Id: Ibd4b7e021dac28469cb3ea2d30e79de8f24c88be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137201
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-07-18 21:59:29 +02:00
Xisco Fauli 82c0a363ab tdf#97539; if parent is css style, look one level up
if the style attributes are set like

  <rect x="10" y="10" width="100" height="100" fill="#00D000"
          clip-path="url(#myClip)"/>

it works, however, if it uses a css style like

  <rect x="10" y="10" width="100" height="100" style="fill:#00D000"
          clip-path="url(#myClip)"/>

it fails to get the clipPath from the parent, because the css style
is the direct parent, thus, check one level up

Change-Id: Iff6df95c9fa9da4c2f1a986cca0ad82ab1494353
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137094
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-07-15 19:10:12 +02:00
Xisco Fauli 8580cbdc19 svgio: qa: Add test for shape with ref to clipPath
Change-Id: Ifefb27db8415eb55b22f1537e1790fcd9feb3ee4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137092
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-07-15 02:30:18 +02:00
Xisco Fauli 5169378d2a svgio: use href along with xlink:href
xlink:href has been deprecated.
See https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/xlink:href

Change-Id: I622cd975c0bcc1a819831d7b9c867312ff59affa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137035
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-07-13 20:04:57 +02:00
Xisco Fauli c1c8ce3b0f svgio: Rename variable and add unittest
The meaning of the name got obsolete after
cded65d05a
< tdf#149893: Color names are ASCII case-insensitive >

Also add a unittest for 9b0069c283
"SVG: Using the marker property from a style sheet is equivalent
to using all three (start, mid, end).·" when this code was added

Change-Id: I87e0866cbd56bbc770920b0778ce681ac9d255b0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136910
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-07-08 19:58:51 +02:00
Xisco Fauli a3e9fede7e related: tdf#149893: trim the color name
Change-Id: I50689993cbe979557a10d2d16eb2112471bef77d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136895
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-07-08 13:54:09 +02:00
Xisco Fauli 6dd0074e5e tdf#149913: add support for auto-start-reverse
See https://svgwg.org/svg2-draft/painting.html#OrientAttribute

Change-Id: Iedcca7bc79a54333c0f80927364caec82ce61167
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136894
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-07-08 13:33:45 +02:00
Xisco Fauli f6a4537e3d svgio: fix copy-paste name
Change-Id: Ic29fc98f70dd14b07190fd559c54c13be5777975
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136883
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-07-07 18:00:51 +02:00
Xisco Fauli cded65d05a tdf#149893: Color names are ASCII case-insensitive
See https://www.w3.org/TR/css-color-3/#html4

Change-Id: Ifdf887bad08ab606abef78fa8335bc49507f4a43
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136879
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2022-07-07 13:47:51 +02:00
Xisco Fauli d291957dce tdf#149880: handle url when it's inside the quotation marks
Change-Id: I053323f9b48c8856d520095da0a4768ac03b0176
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136847
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-07-06 20:34:03 +02:00
Stephan Bergmann 9e83d35c4a Make CppunitTest_svgio CPPUNIT_TEST_NAME=Test::testCssClassRedefinition robust
That recently introduced test systematically failed on my Fedora 36 machine with

> /home/sbergman/lo2/core/test/source/xmltesttools.cxx:89:(anonymous namespace)::Test::testCssClassRedefinition
> equality assertion failed
> - Expected: 1
> - Actual  : 0
> - In <>, XPath '/primitive2D/transform/textsimpleportion[1]' number of nodes is incorrect

because the dumped data was

> <?xml version="1.0" encoding="UTF-8"?>
> <primitive2D>
>  <transform xy11="26" xy12="0" xy13="0" xy21="0" xy22="26" xy23="0" xy31="0" xy32="0" xy33="1">
>   <mask>
>    <polypolygon height="100" width="50" minx="0" miny="0" maxx="50" maxy="100" path="m0 0h50v100h-50z">
>     <polygon>
>      <point x="0" y="0"/>
>      <point x="50" y="0"/>
>      <point x="50" y="100"/>
>      <point x="0" y="100"/>
>     </polygon>
>    </polypolygon>
>    <textsimpleportion width="16" height="16" x="20" y="20" text="test" fontcolor="#ff0000" familyname="Sans"/>
>   </mask>
>  </transform>
> </primitive2D>

rather than the expected

> <?xml version="1.0" encoding="UTF-8"?>
> <primitive2D>
>  <transform xy11="26" xy12="0" xy13="0" xy21="0" xy22="26" xy23="0" xy31="0" xy32="0" xy33="1">
>   <textsimpleportion width="16" height="16" x="20" y="20" text="test" fontcolor="#ff0000" familyname="Sans"/>
>   <hiddengeometry>
>    <polygonhairline color="#000000">
>     <polygon>0,0 50,0 50,100 0,100</polygon>
>    </polygonhairline>
>   </hiddengeometry>
>  </transform>
> </primitive2D>

because in SvgSvgNode::decomposeSvgNode (svgio/source/svgreader/svgsvgnode.cxx)
aSvgCanvasRange = 50x100@(0,0) vs. aContentRange = 31x11@(20,9) did not match
the

>                         if(aSvgCanvasRange.isInside(aContentRange))

branch ("no clip needed, but an invisible HiddenGeometryPrimitive2D...") but
rather the

>                         else if(aSvgCanvasRange.overlaps(aContentRange))

branch ("Clip is necessary") introducing the additional <mask> element.  The
size of aContentRange (and thus whether it is contained in or merely overlaps
aSvgCanvasRange) is apparently affected by what actual font gets substituted for
"Sans" in any given environment.

The only font that is guaranteed to always be available and is not subject to
--with-fonts (which isn't already demanded via gb_CppunitTest_use_more_fonts in
svgio/CppunitTest_svgio.mk) appears to be "Open Symbol" (cf.
extras/Package_fonts.mk), so use that (even if it doesn't have glyphs for the
given text, but which should be irrelevant for this test).

Change-Id: If6f6fdc481b313aa08803b4b3f406e01ff0be1ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136350
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-23 23:03:21 +02:00
offtkp eedc5b1c57 tdf#149449 Add unit test for CSS class redefinition inside SVGs
Tests what happens when a CSS class is redefined with new attributes
and with already defined attributes

Change-Id: I5996fa4dce6c98c1792001a11387bf570d159a8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136151
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-06-22 14:14:50 +02:00
Bartosz Kosiorek 7b12c65984 tdf#131506 tdf#143031 EMF+ Fix displaying PathGradient fill
With previous implementation, the EMF+ import is calculating
gradient positions wrongly. It is causing warning:

  SvgGradientHelper got invalid SvgGradientEntries outside [0.0 .. 1.0]

and the gradient was not displayed at all.
This patch fixes that and gradient is displayed correctly

Change-Id: I6229c516165436d0c7ae187d9eb69b5494da396f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135607
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2022-06-14 10:30:32 +02:00
Gabor Kelemen 96e3a64125 Recheck modules sv* with IWYU
See tdf#42949 for motivation

Change-Id: I25779cbfb1aa93c31d6e12ac95e136b3bdbbc058
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130403
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-03-03 09:50:43 +01:00
Jan-Marek Glogowski 5fe0881334 Fix Test::testTdf97663
Unfortuately the build and merge of

commit 4e2e57b530
("tdf#97663 SVGIO: Fix line spacing for <tspan>")

overlapped with the merge of

commit e3bd776e02
("Split BasePrimitive2D UNO interface into separate object")

Change-Id: Iaa7c4ffda7d863a2571c7f8320889b668f82a844
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127394
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-24 04:57:06 +01:00
Hossein 4e2e57b530 tdf#97663 SVGIO: Fix line spacing for <tspan>
tdf#97663 is a regression caused by the commit
701324a1e1. The previous patch caused
LO to forget the size of the font which was needed to calculate line
height based on em units.

em, px, pt, cm, in...
https://www.w3.org/Style/Examples/007/units.en.html

Accompanied with this fix is a unit test provided to avoid this
issue in the future.

The fix can be tested with:

    make CPPUNIT_TEST_NAME="testTdf97663" -sr \
        CppunitTest_svgio

The em_units.svg is opened with Firefox, Chrome and Inkscape and the
rendering in LibreOffice is compatible with the rendering in these
applications.

Change-Id: Idaecd9fb18101f7925fe2a917f7fc3fe7257ebc5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127130
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-12-24 02:00:18 +01:00
Noel Grandin e3bd776e02 Split BasePrimitive2D UNO interface into separate object
Rather than make all the BasePrimitive2D classes bear the cost of being an UNO
object, we just wrap the top level BasePrimitive2D in this class when we need
to pass them over UNO.

This reduces the locking overhead when doing normal drawinglayer operations,
and reduces the size of drawinglayer objects and the cost of initialising
them, which shaves 5% off the load/display time of a large barchart.

Add new drawinglayer::convertPrimitive2DContainerToBitmapEx utility
method to avoid needing to convert to Sequence<XPrimitive2D>

Change-Id: I553eaa4c16ba016b098cb21f6c55f5008f0d9b53
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126487
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-23 11:45:33 +01:00
Bartosz Kosiorek 9e8c35cc3f EMF+ tdf#142975 Add brush support to DrawString record
Change-Id: Icfcb4199dcd755fb20e14a8166571b6d6e763f2e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117671
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2021-06-23 18:24:38 +02:00
Tomaž Vajngerl afad6ba0f8 svgio: add test for SvgNumber::solve
Change-Id: I38aa58f9be104754d32ca985022947c3c7225f0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114963
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-05-01 13:45:43 +02:00
Tomaž Vajngerl e61cbca254 svgio: add test for svgtools starting with SvgNumber
Change-Id: I1f903a947fb1c338cf62980256c5369fefb7740e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114956
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-05-01 09:29:18 +02:00
Stephan Bergmann 042033f1e6 loplugin:stringviewparam: operator +
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-29 16:42:33 +01:00
Tomaž Vajngerl 4b0daa9ce7 move Primitive2dXmlDump from drawinglayer::tools to drawinglayer NS
drawinglayer::tools causes conflicts with ::tools namespace, so
better to move Primitive2dXmlDump out from this namespace as for
inspecting purposes it ccan be injected into existing code which
could break make it conflict and break compilation.

Change-Id: I5f9e594b2b8b1dd24067fa5f5ca3cfc4eefb85cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98627
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-07-13 19:31:18 +02:00
Noel Grandin ec6eaa58ad fix memory leak of xmlDoc objects
in unit tests

Change-Id: Id16731bbbe2f1b0e3642722d77aba04fc98db4cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93508
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-07 09:52:27 +02:00
Tomaž Vajngerl cd47cf36eb drawinglayer: extract classes from baseprimitive2d.hxx to own files
This extracts Primitive2DContainer class to its own file, common
typedefs for PrimitiveReference, Primitive2DSequence to own file
CommonTypes.hxx, some commonly used and independent functions to
Tools.hxx.

But for not BufferedDecompositionPrimitive2D class is left as
it is.

Change-Id: Ia55bafd32fb95eba945d091e2c2ae89b160140d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86086
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-01-04 11:21:03 +01:00
Gabor Kelemen aa7a23f4f7 tdf#42949 Fix IWYU warnings in svgio/
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I66cde1ea02569cd8244b23be16a5550cac8adf12
Reviewed-on: https://gerrit.libreoffice.org/85237
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-12-20 10:31:39 +01:00
Xisco Fauli 3fbccd6820 SVGIO: add unittest for fill:none
Change-Id: I218a0d24222ae3d91c4e6dbd7a619f36823752ee
Reviewed-on: https://gerrit.libreoffice.org/79370
Tested-by: Jenkins
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-09-23 08:10:24 +02:00
Xisco Fauli 586de7ac43 tdf#123926: SVGIO: Check parent's fill when...
... the element is a clippath and fill=none

fill="none" is created as SvgPaint(aColor, true, false, false)
in svgtools.cxx meaning bSet = true, bCurrent = False and
bOn = False, so it never checks its parent if it's a clippath

Change-Id: Ia8c556674809b2b86280219e4084550e366bbff8
Reviewed-on: https://gerrit.libreoffice.org/79201
Tested-by: Jenkins
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-09-19 21:57:24 +02:00
Xisco Fauli 428b67cd0d tdf#104339: SVGIO: Add unittest
Change-Id: I6ecb366a889fe64bc90db0e041b4ddd4bc3dfc3f
Reviewed-on: https://gerrit.libreoffice.org/79129
Tested-by: Jenkins
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-09-19 18:08:05 +02:00
Xisco Fauli ab14799565 tdf#94765: SVGIO: Look for gradient/pattern ids once the file...
... is completely parsed

it might happen the element's id the url points to hasn't been parsed yet

Change-Id: Ia92c9188de5d23f2f992846aa91f3f936aeefacb
Reviewed-on: https://gerrit.libreoffice.org/79118
Tested-by: Jenkins
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-09-19 13:51:57 +02:00
Xisco Fauli 4007ced54d tdf#99115: add Css selector '*' style only if the element...
... is on top of the hierarchy

Otherwise, we add it for every element on the hierarchy

Adapt unittest from https://bugs.documentfoundation.org/show_bug.cgi?id=100198
Provided by Sam Yygier

Change-Id: I72c7ae08f3ce0194eff86697b202d5553810abeb
Reviewed-on: https://gerrit.libreoffice.org/78997
Tested-by: Jenkins
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-09-16 15:38:36 +02:00
Noel Grandin c504780e78 loplugin:sequenceloop in starmath..svl
Change-Id: I473a8eec9cbf6d44b55ffd6f2233bf39cf6217da
Reviewed-on: https://gerrit.libreoffice.org/77528
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-15 20:23:04 +02:00
Arkadiy Illarionov 6ffdc88e79 Simplify Sequence iterations in shell..svgio
Use range-based loops, STL and comphelper functions

Change-Id: I612d36abcc09a91c60f7212de6747a1a1bdcfc69
Reviewed-on: https://gerrit.libreoffice.org/76056
Tested-by: Jenkins
Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
2019-07-22 18:42:35 +02:00
Tomaž Vajngerl fcb00ac8eb support opacity for widget definition draw SVGs
This opacity influences the whole shape (stroke and fill).

Change-Id: I82e10e07dbf2f321805b55a5f4831a513e52dab8
Reviewed-on: https://gerrit.libreoffice.org/70292
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-04-05 14:56:53 +02:00
Andrea Gelmini 97e6d4aaef Removed duplicated includes
Change-Id: I4b701814e40f1ca3ced81c619696d7c3e18dc765
Reviewed-on: https://gerrit.libreoffice.org/68894
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-03-08 08:37:04 +01:00
Tomaž Vajngerl 208a689695 Update SvgRead test - add new parameters and path parsing
Change-Id: Ic19bd2167cc359eef02648fa0ebd1d858fdeaec5
Reviewed-on: https://gerrit.libreoffice.org/68827
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-07 08:34:22 +01:00
Tomaž Vajngerl d112761291 use gfx namespace for DrawCommands
Change-Id: Ib2d97c4fee4e1bb433beeba4fb507fdc7d542af9
Reviewed-on: https://gerrit.libreoffice.org/68775
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-06 16:36:25 +01:00
Tomaž Vajngerl 7894fd2b44 svgio visitor, add draw commands and create the from svg
Adds a visitor for svgio for visiting svg nodes and create something
useful from them.

Basic draw commands - a tree of draw commands (with sub-pixel
precision support) just to store a simple definition for drawing.

Adds a svg draw visitor and create draw commands from the svg
structure and expose the commands through UNO API.

Change-Id: I073e891a2cffdd76d4e3b838590e3a19c998e9bf
Reviewed-on: https://gerrit.libreoffice.org/68770
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-06 16:33:06 +01:00
Tomaž Vajngerl 24f7dd6251 move and extend primitive2dxmldump to drawinglayer
Also needs extending the XmlWriter to output double numbers as
the attribute content.

Change-Id: Ie749ea990d856c8c90092ed8153c24efda99c444
Reviewed-on: https://gerrit.libreoffice.org/67573
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-02-09 11:58:06 +01:00
Bartosz Kosiorek 1873ba08d8 tdf#113624 EMF+ Fix shift of DrawString without StringFormat
While we are drawing DrawString record, in most cases optional
StringFormat information is available.
If StringFromat information is available then we should use default
values.
For LeadingMargin for String the default value is 1/6 inch.

Change-Id: I4a0a68df5ebe74e810f8b5864232b477b3aac255
Reviewed-on: https://gerrit.libreoffice.org/62927
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2018-11-08 20:59:41 +01:00