Commit Graph
61 Commits
Author SHA1 Message Date
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
Tomaž Vajngerl 7e6dac4edc svgio: fix rendering when the width/height isn't present in SVG
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>
2018-05-13 15:28:27 +02:00
Jochen Nitschke 9401c7c28a remove unused processfactory.hxx includes
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>
2018-04-01 12:11:26 +02:00
Stephan Bergmann dd68ebadd0 More loplugin:cstylecast: svgio
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
2018-01-12 20:15:02 +01:00
Stephan Bergmann 66604baf08 Consistently use OUString in test::Directories
Change-Id: Ia5fd8af34ee9d2f37e4450ab241f6bb9a06445b2
Reviewed-on: https://gerrit.libreoffice.org/41466
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-08-24 09:28:32 +02:00
Noel Grandin ff1f6a5fc2 remove UL/L suffixes from integer constants in initialiser/call expressions
Change-Id: Iae081567c4fa5b88edbd12cf2fbafd2b8f31b300
Reviewed-on: https://gerrit.libreoffice.org/41214
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-17 08:14:31 +02:00
Noel Grandin 65c69af584 loplugin:constparams in svgio
Change-Id: I35dd8b1373ce3c46a10b1da1ddc6dc3722ffa760
Reviewed-on: https://gerrit.libreoffice.org/40245
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-21 08:37:21 +02:00
Noel Grandin 62223f9a8a loplugin:unnecessaryoverride
Change-Id: I08c55a3023ec2e8990098eeb60e91cd18556e7ae
Reviewed-on: https://gerrit.libreoffice.org/29656
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-13 06:47:44 +00:00
Michael Stahl b647996a9b replace sal_Size with std::size_t (or sal_uInt64 for SvStream pos)
... except in include/rtl, include/sal, include/uno, where sal_Size is
retained for compatibility, and where callers of rtl functions pass in
pointers that are incompatible on MSVC.

Change-Id: I8344453780689f5120ba0870e44965b6d292450c
2016-09-15 12:01:11 +02:00
Xisco Fauli 75003438e4 tdf#101237 SVGIO: Use black as default when parents' fill...
...attributes are empty or none and there's a reference
to a clip-path present.

Change-Id: I4dc4e3bcaac43a007fbdb8a1d006cbd39c737396
Reviewed-on: https://gerrit.libreoffice.org/28500
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-08-30 20:41:07 +00:00
Noel Grandin 6e72f0251b new loplugin unnecessary override
Change-Id: I88d3e33823d68745b98625050a8a274f9ef04bcb
Reviewed-on: https://gerrit.libreoffice.org/27135
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-07-15 14:05:41 +00:00
Michael Stahl 62d270116b tools: rename SvStream::Read/Write to ReadBytes/WriteBytes
Change-Id: Ib788a30d413436aa03f813aa2fddcbc4d6cd2f9a
Reviewed-on: https://gerrit.libreoffice.org/25972
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-06-06 18:09:11 +00:00
Xisco Fauli 9bf1dac4be tdf#99994: Add unittest
Change-Id: I1a58dc21fdcdf8e7688508105fbd6438c7f4bda0
Reviewed-on: https://gerrit.libreoffice.org/25690
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-06-01 12:05:38 +00:00
Xisco Fauli 292e25e66d SVGIO: Modify a unittest to check "inherit" in font-family
Change-Id: I4a339b419a5abd1ad02f7aef2abd016a1c2260b8
Reviewed-on: https://gerrit.libreoffice.org/25695
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-05-31 09:44:41 +00:00
Xisco Fauli 53f9762889 SVGIO: Add support for font-family in unittests and unify...
.. textsimpleportion's assert

Change-Id: I97d4c76dcfaa6d3ebebfe3eebfabc8ee7799589d
Reviewed-on: https://gerrit.libreoffice.org/25691
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-05-31 07:41:56 +00:00
Xisco Fauli 3daee9953d SVG: Add unittest for ecc7f698b5
Change-Id: Icbfd60bd15196649011919e8dea064276e1964b0
Reviewed-on: https://gerrit.libreoffice.org/24097
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-04-15 08:05:10 +00:00
Xisco Fauli de32fe5029 SVG: Add unittest for tdf#47446 and tdf#98599
Change-Id: I86bec5694eb0c85596d2573111ddb355bd3ae09e
Reviewed-on: https://gerrit.libreoffice.org/24011
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-04-12 22:00:53 +00:00
Xisco Fauli f18d1d7be8 SVG: Check that masking-path-07-b.svg doesn't hang
Change-Id: If8b9a0dd955611f8ebb2859fa9b10a61bfb2230b
Reviewed-on: https://gerrit.libreoffice.org/24010
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-04-12 20:29:36 +00:00
Xisco Fauli 93cf43de1b SVG: Add unittest for #i125329#
Change-Id: I2d6fbd81c8d95283cf8937739e338ddac14d8df0
Reviewed-on: https://gerrit.libreoffice.org/24008
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-04-12 17:23:00 +00:00
Wastack cb495d7106 tdf#97966 Drop 'static' keywords
Including no keywords from extern "C" blocks

Change-Id: I364aa7d67c2bf867588798e07df95c3f3f2bd7f3
Reviewed-on: https://gerrit.libreoffice.org/23676
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-04-01 06:46:17 +00:00
Xisco Fauli 3041df16f8 SVGIO: Don't inherit style attributes from parent if the...
... shapes define their own attributes.

Partially revert commit c2d130425c

Change-Id: Iee98003f4ff63575a28818b091ab77431337192f
Reviewed-on: https://gerrit.libreoffice.org/23571
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-03-29 08:00:47 +00:00
Xisco Fauli c2d130425c SVGIO: Shapes within a clippath element might inherit...
... fill, stroke, stroke-width and others attributes from
parent element, like use element

Change-Id: I911bc50409428e81135b81e6dfc82acd1c21d113
Reviewed-on: https://gerrit.libreoffice.org/23527
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-03-26 16:20:47 +00:00
Stephan Bergmann 60b1c95cc4 Extract Directories from BootstrapFixtureBase
(as some tests derive from the latter only for the Directories part, not for the
setUp/tearDown overrides: those tests will be cleaned up next)

Change-Id: Ib6b78eea868b8bc21d4cc6e8fd9e1d025deca05f
Reviewed-on: https://gerrit.libreoffice.org/23078
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-03-10 08:04:40 +00:00
Xisco Faulí af46264bcc Revert "tdf#97538: SVGIO: Add unittest"
It fails in Tinderbox Linux-rpm_deb-x86@71-TDF
This reverts commit 3c465c259c.

Change-Id: I20fc69dd785354cc6567b73251ee9161a811bdf0
Reviewed-on: https://gerrit.libreoffice.org/22987
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-03-07 18:06:53 +00:00
Xisco Fauli 3c465c259c tdf#97538: SVGIO: Add unittest
Change-Id: I5bf523ac532ad19a005d99e19deb1e0ec9ce96e4
Reviewed-on: https://gerrit.libreoffice.org/22955
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-03-07 08:47:40 +00:00
Xisco Fauli 5f0c3172b3 SVGIO: Check minX, minY, maxX and maxY in polypolygon
Change-Id: I768bef34ad0ba7708134e73981dabf0d47c2f259
Reviewed-on: https://gerrit.libreoffice.org/22952
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-03-06 15:16:22 +00:00
Xisco Fauli 31e037c348 SVGIO: Check height and width of polypolygoncolor
Change-Id: Ibc5844d4e4a89fae7bbc8d2b854384d0c433500f
Reviewed-on: https://gerrit.libreoffice.org/22883
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-03-03 23:35:11 +00:00
Xisco Fauli 6afec8e461 tdf#97936: SVGIO: Add unittest
Change-Id: I7adb55dc408811f03365578f815bf1b7fbe7f2fd
Reviewed-on: https://gerrit.libreoffice.org/22679
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-02-25 08:43:01 +00:00
Regina Henschel a2d8a9873d tdf#97538 no cropping if width, height and viewBox missing
Now the whole image is inserted, so that it can be cropped in the
application. The patch repairs in addition a wrong ratio in the
case height is missing but viewBox is given, and fixes some
comments. Change in SvgImportTest.cxx by Xisco Fauli.

Change-Id: I8c0fbf8b78cf7ab5bc97d04783b49892da3d2849
Reviewed-on: https://gerrit.libreoffice.org/22363
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
2016-02-21 18:19:24 +00:00
Xisco Fauli 324014c997 SVGIO: Fix problem when relative font-size depends on its...
... parent's font-size

Change-Id: I13943923c401a5a06b3aa51181fd75292534e888
Reviewed-on: https://gerrit.libreoffice.org/22452
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-19 06:28:11 +00:00
Xisco Fauli 85c789be1f SVGIO: tdf#97941: Don't double tspan fontsize
Same as in 701324a1e1

Change-Id: I531bef4821008ef71951506c133f999b9ab4f4ff
Reviewed-on: https://gerrit.libreoffice.org/22450
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-02-18 08:39:10 +00:00
Xisco Fauli 3c8b880c5e SVGIO: tdf#97659: Add support for RGBA
Change-Id: Icbf3796cdc95f91d298a5ca52d44931b3985eac6
Reviewed-on: https://gerrit.libreoffice.org/22303
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-13 13:38:39 +00:00
Xisco Fauli 0ab6332f97 SVGIO: tdf#97543: Add import test
Change-Id: Ia89f43ed1da9ead254f191bcbcc4ac338a9dda7a
Reviewed-on: https://gerrit.libreoffice.org/22302
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-02-11 23:32:02 +00:00
Xisco Fauli b6a62f0755 tdf#97542: SVGIO: First check the current fill attribute
Differenciate when gradient is defined in the text element or in its parents

Add unit tests

Change-Id: I85b09f72fbb1a3c8d2fa7350b4396b5bf924277f
Reviewed-on: https://gerrit.libreoffice.org/22131
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-02-11 17:17:06 +00:00
Xisco Fauli 05554bc478 SVGIO: tdf#79163: Add import test
Change-Id: I891425f331e9be21c160eb0b11f05dba280bef23
Reviewed-on: https://gerrit.libreoffice.org/22196
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
2016-02-09 17:23:00 +00:00
Xisco Fauli 8fbbb923ea SVGIO: tdf#85770: Add import test
Change-Id: Ifffe1d461ae6fa30a9cc61df2ece5716078031ab
Reviewed-on: https://gerrit.libreoffice.org/22190
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
2016-02-09 14:27:01 +00:00
Xisco Fauli 1dad3e2a12 SVGIO: tdf#45771: Add import test
Change-Id: Ib1b66a3d91374bcf458bb368483f33cd4b8e0f0d
Reviewed-on: https://gerrit.libreoffice.org/22189
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
2016-02-09 12:02:16 +00:00
Xisco Fauli 17f01039fc SVGIO: Add import test for 7c151f3914
Change-Id: I4ab4463dfa2422fd0d8fa1fd65d7765f716c9bc3
Reviewed-on: https://gerrit.libreoffice.org/22188
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-02-09 08:48:49 +00:00
Xisco Fauli 805b328858 SVGIO: Add import test for Fontsize keywords
Change-Id: I042a1deeec1c07f73f09ddd2fb71b9d2eba6b8c6
Reviewed-on: https://gerrit.libreoffice.org/22187
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-02-09 07:10:41 +00:00
Noel Grandin b14224fe97 loplugin:unusedmethods
using an idea from dtardon:

<dtardon> noelgrandin, hi. could you try to run the unusedmethods clang
plugin with "make build-nocheck"? that would catch functions that are
only used in tests. e.g., i just removed the whole o3tl::range class,
which has not been used in many years, but htere was a test for it...
<noelgrandin> dtardon, interesting idea! Sure, I can do that.

Change-Id: I5653953a426a2186a1e43017212d87ffce520387
Reviewed-on: https://gerrit.libreoffice.org/22041
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-08 06:08:14 +00:00
Noel Grandin 58d8d8ac67 tdf#69977: uno::Sequence is expensive
when used as a mutable data-structure. Plain std::vector halves the time
taken to display the chart dialog

Create a class to represent the std::vector we are going to be passing
around, and move some of the utility methods into it to make the code
prettier.
Also create an optimised append(&&) method for the common case of
appending small temporaries.

Change-Id: I7f5b43fb4a8a84e40e6a52fcb7e9f974091b4485
2015-12-11 10:11:23 +02:00
Xisco Fauli 5654e8f2cf SVG: add import test for tdf#87309
Change-Id: I0f899fbab73ae43e09ca2afc18d956f42ec8b0a7
Reviewed-on: https://gerrit.libreoffice.org/19537
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2015-11-02 14:30:19 +00:00
Tomaž Vajngerl 6ea647924d make test more readable - use Primitive2DSequence
Change-Id: I8e49fce5a4d8f5b46b9bd1dd3f71a8c7dc90c20d
2015-10-14 22:39:44 +02:00
Stephan Bergmann b36963c0a6 Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY code
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12 17:52:29 +02:00