Bug 64075: code pointer needed
Regina Henschel
rb.henschel at t-online.de
Wed Jan 28 01:07:40 PST 2015
Hi Christina,
Christina Roßmanith schrieb:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> opening homenet.svg (attached to the bug) shows the circles without a
> filling but filled circles would be correct.
You see only unfilled circles, if you use "File > Open". If you use
"Insert > Image > From file", then the circles are filled as expected.
The reason is, that LibreOffice uses different algorithm for "File >
Open" and "Insert > Image". In Apache OpenOffice the same algorithm is
used, and therefore it does not have this bug. When you search in
Bugzilla, you will find more issues, where File > Open fails.
So the solution is to repair the special way of LibreOffice or to
replace it with the way AOO does it.
> The reason (I guess) is
> that each circle is represented as 4 bezier curves which make it a
> manually closed polygon but not a closed polygon.
The polygon in that file is not explicitly closed, but has only a start
point with identical coordinates as the end point. But in svg it is not
necessary to have a closed outline for to be filled, but each open curve
can be filled.
The current implementation is not able to have fillings of open paths.
Therefore the "Import > Image" algorithm goes the way to add an
additional drawing object with line "none", which is closed and carriers
the filling.
>
> So my question is: Where can I find the code responsible for filling
> polygons (and where probably polygons are being tested as being closed
> but not manually closed)?
I think, that is not the correct place to fix it. If you are going to
force the case of "start coordinates equal end coordinates" to be
"closed", then this should be down when analyzing the svg on import,
when you have svg namespace. When you force _each_ such polygon to be
closed, then it will break existing documents.
For polygons the state "closed" is set, when a Z command exists; that is
in the tool importFromSvgD.
Because in svg filling does not depend on being closed or not, a fill
attribute always generates a polygon. That is in class SvgStyleAttributes.
But I'm no expert, so cannot give you true code pointers.
Kind regards
Regina
More information about the LibreOffice
mailing list