[Libreoffice-bugs] [Bug 123569] FILESAVE DOCX: Rotated image is saved with wrong size/position
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Mon Jun 28 22:21:43 UTC 2021
https://bugs.documentfoundation.org/show_bug.cgi?id=123569
Regina Henschel <rb.henschel at t-online.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rb.henschel at t-online.de
--- Comment #8 from Regina Henschel <rb.henschel at t-online.de> ---
Created attachment 173258
--> https://bugs.documentfoundation.org/attachment.cgi?id=173258&action=edit
proposed patch
@Aron Budea: I think, it is not a size but a position problem.
When it comes to DocxSdrExport::startDMLAnchorInline(), the parameter rSize has
the unrotated size of the image, as it is needed in Word. But in contrast to
other objects, line#683
awt::Point aPos(pFrameFormat->GetHoriOrient().GetPos(),
pFrameFormat->GetVertOrient().GetPos());
gives the position of the unrotated image. So it is not needed to create the
unrotated position back from the rotated position, which is done in
lclMovePositionWithRotation().
I put my proposed patch as attachment here, because I will not have time enough
in the next days to work out a proper patch (testing with other objects than
Writer-images and testing the other documents in the bug reports and creating
unit tests). It might be that instead of adding the case in
lcl_IsRotateAngleValid() it is necessary to add the exclusion directly in
if (pObj && lcl_IsRotateAngleValid(*pObj))
in line#688.
--
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/20210628/f0fca874/attachment.htm>
More information about the Libreoffice-bugs
mailing list