Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Pierre-André Jacquod wrote:
back again after a while.

Hi Pierre-André, welcome back! :)

It happens that basegfx::GetLineArrow(...) (also defined within
msdffimp.cxx, line 1102) does not create a valid polygon when
eLineEnd has the value mso_lineNoEnd...
In the switch(eLineEnd), this goes to
 default: break;
without creating any polygon, letting the return value undefined.

So I propose to skip the creation these incorrect polygons if
eLineEnd has the value mso_lineNoEnd. But since I do not understand
well the import / translation from msformat, I may also have missed
a big point. Hence thanks for reviewing this patch, before I push
it.

Ah, great analysis - true, generating items for stuff that is not
there does not look too sensible. Canonical place that interprets
this for rendering is

 svx/source/sdr/primitive2d/sdrattributecreator.cxx:298

, which is already gated by the StartWidth item - so I'd think we
need to set at least that one, in any case.

Digging a bit deeper, though, e.g.

 sd/source/core/drawdoc4.cxx:175

sets a curious aNullPolyPolygon, so with a bit of bad luck, code
will rely on XLineStartItem/XLineEndItem being set to empty at other
places (counted some 90-odd places where XLineStartItem is used).

So what I suggest is a more defensive fix (or some larger review
across the code is in order): make GetLineArrow() return the
B2DPolyPolygon right away, and have *that one* be empty (i.e. not a
non-empty B2DPolyPolygon with an empty B2DPolygon, as it is now).

That matches the defaults the Impress core sets, so we should be
rather safe. ;)

Cheers,

-- Thorsten

Attachment: pgpy5J5zgsv78.pgp
Description: PGP signature


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.