Commit Graph

200 Commits

Author SHA1 Message Date
5903235d57 tdf#104339 Partially revert d5649ae7b76278cb3155f951d6327157c7c92b65
Change-Id: I5160c6efe7cf58351955d9d1d3066e3b33bdfe20
Reviewed-on: https://gerrit.libreoffice.org/32082
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2016-12-19 00:10:09 +00:00
bfde4866e0 convert DecodeMechanism to scoped enum
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
2016-12-05 12:49:02 +02:00
b610d25131 loplugin:unnecessaryoverride (dtors) in svgio
Change-Id: Icff1b3d5072c9a854de7ae12141131b0a9650b91
2016-12-02 11:15:42 +01:00
3a54589302 convert Primitive2DContainer to std::deque
since we only care about appending to this container, and then
traversing it (normally once). So reduce the re-allocations that
std::vector requires

Change-Id: I206a7b82d9eefc1fa3762c4a03e7b5e21136951f
Reviewed-on: https://gerrit.libreoffice.org/30706
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-09 08:54:01 +00:00
9bdec0831a loplugin:oncevar in sd..svgio
Change-Id: I58565460fcc3279c9771c6e1272d0af540b2c87c
Reviewed-on: https://gerrit.libreoffice.org/30459
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-01 13:25:08 +00:00
c19d2b276b loplugin:expandablemethods in stoc..svl
Change-Id: I7dd701ef07a14f70589b87154bfeeda7530b628f
Reviewed-on: https://gerrit.libreoffice.org/30316
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-27 10:16:08 +00:00
58072c5a7f loplugin:expandablemethodds in svgio
Change-Id: Iac2aa6dae56d96819589d198be5875ecfe14f26f
Reviewed-on: https://gerrit.libreoffice.org/30056
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-20 06:14:11 +00:00
91dd2db17b loplugin:override: No more need for the "MSVC dtor override" workaround
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark
overriding destructors as 'virtual'" appears to no longer be a problem with
MSVC 2013.

(The little change in the rewriting code of compilerplugins/clang/override.cxx
was necessary to prevent an endless loop when adding "override" to

  OOO_DLLPUBLIC_CHARTTOOLS    virtual ~CloseableLifeTimeManager();

in chart2/source/inc/LifeTime.hxx, getting stuck in the leading
OOO_DLLPUBLIC_CHARTTOOLS macro.  Can't remember what that
isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.)

Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-09-13 13:19:22 +02:00
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
33b38082ca put StreamMode masks in scope of enum class
Change-Id: I77682f7e289a59b986bb84edf014029a20266470
Reviewed-on: https://gerrit.libreoffice.org/28420
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-27 12:06:15 +00:00
27319418ed loplugin:countusersofdefaultparams in store..svtools
Change-Id: I15b4400bddc5a4d0e3de5dfffe18b7e493f97df6
Reviewed-on: https://gerrit.libreoffice.org/27580
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-29 07:07:13 +00:00
b7a18f18ef tdf#101070: svg/insert, avoid infinite recursive loop when referencing oneself
See bt https://bugs.documentfoundation.org/attachment.cgi?id=126377

Change-Id: I3c6546a5449fc42613e30a7f45f31862752b7187
Reviewed-on: https://gerrit.libreoffice.org/27468
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-07-24 14:20:15 +00:00
ecb34112cc SVGIO: use clamp on strokeOpacity in case it's negative
testcase: painting-stroke-08-t.svg

Change-Id: Ia09a4581e5189cbb88aca4391474ada89e7af042
testcase: painting-stroke-08-t.svg
Reviewed-on: https://gerrit.libreoffice.org/27326
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-07-20 08:53:39 +00:00
5046ebd813 tdf#82214 optimize PatternFillPrimitive and SVG
Use buffering in the drawinglayer, and don't do slow stuff in the
windows gdi renderer.

Conflicts:
	svgio/source/svgreader/svgstyleattributes.cxx

Change-Id: Id955ee6a3b03e568c2678f02d77af35d2e5ba1d4
2016-07-07 22:32:39 +02:00
428e23f4f7 Fix some spelling errors in comments and strings
Change-Id: Iecd6b5e13d6be14651f77d8e37f01117ba15a11e
Reviewed-on: https://gerrit.libreoffice.org/26883
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
2016-07-04 06:11:36 +00:00
68ccab350c tdf#99994 Avoid invalid access by reusing getFontFamily() result
getFontFamily() can give a different result on the second call so in
order to protect against access to an invalid element of the vector
the result must be reused.

Change-Id: Iec7d58537263cb5c8a7c2ea95761dd929d659e01
Reviewed-on: https://gerrit.libreoffice.org/25704
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-06-01 08:27:52 +00:00
5d613f9205 SVGIO: Add support for "inherit" in font-family
Change-Id: I180ab3b119af124d2d1113df055986168d39d30d
Reviewed-on: https://gerrit.libreoffice.org/25694
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-05-31 07:39:05 +00:00
e0849330bc Get rid of unnecessary directory levels $D/inc/$D
Change-Id: Ibf313b8948a493043006ebf3a8281487c1f67b48
Reviewed-on: https://gerrit.libreoffice.org/25532
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2016-05-27 17:10:45 +00:00
850a8d27ca Convert GRAPHIC to scoped enum
Change-Id: I1fd09a729cbda00f99841532e0dd3fa66bce7bea
Reviewed-on: https://gerrit.libreoffice.org/25534
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-27 12:59:23 +00:00
2af018e4dd Fix typos
Change-Id: I860cc4aa04b4e5cd1437b2f24176ee2ccdec3266
Reviewed-on: https://gerrit.libreoffice.org/25420
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-25 09:50:55 +00:00
7e55fbab63 Convert SpreadMethod to scoped enum
Change-Id: I2a04247bd58ed6f2af8da7e109b31ff83d6d5e49
Reviewed-on: https://gerrit.libreoffice.org/25298
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-22 17:54:17 +00:00
ad5323b2aa Add SAL_FALLTHROUGH, where apparently appropriate
Change-Id: Iba1556d1918a336e376c0fda5e7e14b3e890d267
2016-05-10 17:06:12 +02:00
50ac0f503b convert FONT_EMPHASIS_MARK to scoped enum
Change-Id: I137c78b337e57d3442db08334128e79d186b278f
Reviewed-on: https://gerrit.libreoffice.org/24753
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-09 09:41:34 +00:00
f3d9aab841 teach passstuffbyref plugin to check for..
unnecessarily passing primitives by const ref.

Suggested by Tor Lillqvist

Change-Id: I445e220542969ca3e252581e5953fb01cb2b2be6
Reviewed-on: https://gerrit.libreoffice.org/24672
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-06 06:48:38 +00:00
32cec4ca8b tdf#48066 render stroke-miterlimit correctly in SVG import
The property stroke-miterlimit is transported to the renderers
via a new member mfMiterMinimumAngle in class LineAttribute
Several drawPolyLine methods are adapted. This patch does not
include changes in MetaAction. Presentation mode, printing, and
PDF-export is still wrong.

Corrected LineJoinMiter to LineJoinBevel in canvas, that s closer
to NONE. Removed DrawPolyLine method without MiterMinimumAngle
and adapted calls accordingly.

Change-Id: I6bcd24add5d85c4d9a39e3788e0682091c5fc9c4
Reviewed-on: https://gerrit.libreoffice.org/23946
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2016-04-26 16:42:27 +00:00
5abc669599 new plugin stylepolice
check for local variables which follow our member field naming
convention, which is highly confusing

Change-Id: Idacedf7145d09843e96a584237b385f7662eea10
2016-04-21 08:32:47 +02:00
97abbec956 tdf#94306 replace boost::noncopyable in stoc to xmlsec..
Replace with C++11 delete copy-constructur
and copy-assignment.
Remove boost/noncopyable.hpp includes.
Add missing default ctors.

With this commit there should be no users
of boost::noncopyable left.

Change-Id: I6b1e47824912a6a80cc3f00f34938ebc048d8975
Reviewed-on: https://gerrit.libreoffice.org/24051
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-04-13 11:19:04 +00:00
1250acb00f SVG: actually this code is unnecessary after...
... f5d4a688346a939a58b1df69d771dede177b3370

Change-Id: I2911763c38a6be275bcd7ae0c9a51cd7a2e9fe4a
Reviewed-on: https://gerrit.libreoffice.org/24012
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-04-12 17:31:04 +00:00
afe7392f88 SVG: Clean up this code a litle bit
Change-Id: Ib941321d43a9a04d57f3c7c4a55528927fed5036
Reviewed-on: https://gerrit.libreoffice.org/24009
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-04-12 12:13:25 +00:00
c20cc7e79b tdf#97499 Fixed containers parameters clearing #4
Change-Id: I7c96181399f4d7e62d4aceca404b22d68f903513
Reviewed-on: https://gerrit.libreoffice.org/23754
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-04 05:49:06 +00:00
9b0069c283 SVG: Using the marker property from a style sheet is equivalent...
... to using all three (start, mid, end).
However, shorthand properties cannot be used as presentation
attributes.

Change-Id: Ie3842b8fa87f562f038600f8f012d8434363b3cd
Reviewed-on: https://gerrit.libreoffice.org/23749
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-04-03 01:12:50 +00:00
2c29716d34 tdf#97657: SVGIO: Don't iterate over parent's clip-paths...
... when it's a clip-path content

Change-Id: I222b429a61409d9670b9d60357895542a15afc15
Reviewed-on: https://gerrit.libreoffice.org/23624
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-03-30 08:43:08 +00:00
3041df16f8 SVGIO: Don't inherit style attributes from parent if the...
... shapes define their own attributes.

Partially revert commit c2d130425cc876cceb96cc7e47636426a9e48fa8

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
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
f5d4a68834 tdf#98599 SVG: consider attributes of 'defs' element
The element 'defs' is not rendered, but children of it may
inherit the attributes. Therefore these has to be considered.

Change-Id: Ic6c21645439731db63f22adf5a5a4e2af2b74b71
Reviewed-on: https://gerrit.libreoffice.org/23309
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-03-17 07:43:05 +00:00
1868a62a32 tdf#47446: SVGIO: Take markers' parents into account too
Change-Id: I41b7228ab5980581ab5e1c8c4d4d466da6045086
Reviewed-on: https://gerrit.libreoffice.org/23124
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-03-11 10:03:00 +00:00
fb33451a27 tdf#97539: SVGIO: iterate over parent's clippaths
Change-Id: Iadb335bf5b328fa3fd9683da5433c299e62afa8e
Reviewed-on: https://gerrit.libreoffice.org/23106
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-10 08:06:34 +00:00
644ace4143 tdf#47446: SVGIO: Set marker's fill attribute to black...
... if it's not set

Change-Id: Iefec59f885c3708defec2b636836617bf97387fc
Reviewed-on: https://gerrit.libreoffice.org/23046
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-03-09 11:42:23 +00:00
ecc7f698b5 SVGIO: Fix problem when style's parent contains a mask element
Change-Id: I26aab6c0f959f6cc78d040f59f1acf0c7e29931b
Reviewed-on: https://gerrit.libreoffice.org/23045
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-09 08:51:27 +00:00
c0bd26d73d Updated to solve problem with gerrit patch 22363
Regina posted comment on 22363, that this change was needed.

Change-Id: I9021d40ee7c1ca7ca74d67c61fe58ce976da38c0
2016-03-08 07:52:55 +01:00
d5649ae7b7 SVGIO: tdf#97539: clip-path elements might contain...
reference to other clip-paths

Change-Id: I3722b31cefa4df6225e369b3d1db9f46be5933ff
Reviewed-on: https://gerrit.libreoffice.org/22956
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-03-07 08:48:50 +00:00
57de81580d tdf#98113: SVGIO: Add SvgANode class to handle transport ...
... attribute in anchor elements.

I used Svggnode class a a reference for this.

Change-Id: Id2a58bd913f9984dc91163ca0f333c016aa981f1
Reviewed-on: https://gerrit.libreoffice.org/22822
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-03-03 08:50:40 +00:00
1685ff1478 loplugin:unuseddefaultparam in svgio
Change-Id: I47fe88cd8c943acb9162cdfca53fb5fdbaacec04
2016-03-01 12:48:50 +02:00
74040d4479 tdf#98119 Allow markers on zero-length lines
Inkscape, Seamonkey, Chrome and Batik show markers on zero-
length lines, LibreOffice should do that too. The patch
removes the restriction start<>end.

Change-Id: I984baf755df7b2689e00d2a23b40e3f059c0add0
Reviewed-on: https://gerrit.libreoffice.org/22740
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2016-02-28 10:34:05 +00:00
85fcf15ff4 Revert "SVGIO: tdf#97539: clip-path elements might contain..."
This reverts commit 7b7ffedfa6357b902a5e354d986dac39a3b2f462.

Change-Id: I018830e17cb83c5fe3574b76939673877ac2004d
Reviewed-on: https://gerrit.libreoffice.org/22726
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-02-27 09:24:12 +00:00
b914d4a70f Partially revert b6a62f07557fe4ae0931e0f3e0f306d2f69b116b
it has been fixed by 423b79e7366203db3f57dea75b8cb9eb852b5614
in a better way

Change-Id: Ia3192071f00522ac111d3e95e4dc05dc57a6267e
Reviewed-on: https://gerrit.libreoffice.org/22677
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-02-25 08:42:37 +00:00
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
778e9a65bf new loplugin: find write-only fields
Change-Id: I0f83939babacf92485420ee63f290a297d7cb717
Reviewed-on: https://gerrit.libreoffice.org/22498
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-19 11:23:57 +00:00
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
423b79e736 tdf#97752 SVGIO ignore not matching parent paints
fill attributes can have ONE of 3 kinds of paints:
* pain colour fills
* gradient fills
* pattern fills
if element has a fill we should not get fills of an other
kind from parent

Change-Id: I376a8fea4a7185b037a069a28191b7f37f6788bd
Signed-off-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Reviewed-on: https://gerrit.libreoffice.org/22273
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-02-18 15:21:53 +00:00