[Libreoffice-bugs] [Bug 141880] New: Negative top and bottom wrap margins are wrongly rendered

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sat Apr 24 18:15:15 UTC 2021


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

            Bug ID: 141880
           Summary: Negative top and bottom wrap margins are wrongly
                    rendered
           Product: LibreOffice
           Version: 7.2.0.0.alpha0+ Master
          Hardware: x86-64 (AMD64)
                OS: Windows (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: rb.henschel at t-online.de

Created attachment 171387
  --> https://bugs.documentfoundation.org/attachment.cgi?id=171387&action=edit
Document with negative wrap margin values

ODF allows negative margins. For left and right margins, negative values are
implemented in LibreOffice. For top and bottom margins, negative values are
wrongly implemented. Bottom margin uses 0 instead and top margin uses a totally
wrong value.

The attached file has "margin = -1cm" on all four sides.

Negative values are useful for importing shapes in docx-documents. Word uses
the unrotated shape as wrap rectangle in wrap mode "Square" (="parallel" in UI
in LO). If a shape is rotated, additional space is needed to extent the wrap
rectangle to the size and position of the bounding box of the rotated shape.
Word puts this additional space into the element 'effectExtent' of the anchor
element.

LibreOffice uses the bounding box of the rotated shape as wrap rectangle. So if
a docx-document contains a shape, where the 'effectExtent' is set to zero, then
LibreOffice would need to set the margin to negative values to get the same
rendering.

Word extents the wrap rectangle for glow and shadow effects as well.

Fortunately there is not UI in Word to directly set 'effectExtent' values. But
nevertheless negative values are allowed in ODF and LibreOffice should render
them correctly.

-- 
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/20210424/9207d2eb/attachment.htm>


More information about the Libreoffice-bugs mailing list