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
pgpm40m47PVIV.pgp
Description: PGP signature
_______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice