[Libreoffice-bugs] [Bug 122717] FILEOPEN Horizontal line in DOCX has wrong size/position

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sat Mar 20 13:03:44 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=122717

--- Comment #8 from Dave Gilbert <freedesktop at treblig.org> ---
(In reply to Regina Henschel from comment #3)
> I have used the attachment of the duplicate bug 127364 for some
> investigations:
> 
> The problem is related to the length of the line. For example 18cm shows the
> error, but 17.9cm and 18.1 cm are OK.
> 
> During opening, the method SdrPathObj::NbcSetSnapRect() [svdopath.cxx#2379]
> is called. With the 18cm line length the rectangle aOld is LT[4530,53] and
> RB[4530,10257], and rRect is LT[4530,53] and RB[4531,10258]. So that later
> nDivY != nMulY and therefor not forced to 1.
> The following call of SdrPathObj::NbcResize then calculates for fResizeY a
> value different from 1.0. That results in a call of SdrTextObj::NbsResize
> [svdptxtr.cxx#106] and then a call of Poly2Rect from svdtrans.cxx#486 in
> turn. And there the bad rotation happens.
> 
> Whereas in case of 18.1cm the rectangle aOld is LT[4530,53] and
> RB[453010314], and rRect is LT[4530,53] and RB[4513,10314]. So in this case
> nDivY == nMultY and therefor forced to 1. The following call of
> SdrPathObj::NbcResize then calculates both fResizeX and fResizeY as 1.0 and
> aborts. The method has an hint to bug 106792 in its comment, why the abort
> is necessary.
> 
> (For further investigation it is too late in the night for me.)

In my case I didn't think it was the length, but the width; if the line is a
line which never had any arrows it was fine for me; but if the line has (or
previously had) start/end arrows then the width is none-0 and gets passed
NbcResize's check.
That check replaced a different hack that was taken out by Armin's patch -
which added 1 to a width somewhere to stop this happening.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210320/b28aeb79/attachment.htm>


More information about the Libreoffice-bugs mailing list