Created attachment 171387 [details] 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.
(In reply to Regina Henschel from comment #0) > Created attachment 171387 [details] > Document with negative wrap margin values > > 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. If I open attached document and page style dialog, LO shows 1cm for every magin. So how can I reproduce the behaviour you describe? => NEEDINFO
Created attachment 171825 [details] Screenshot compare Writer with TextMaker It is not about page margins, but about the wrap margins of the shape. The text consists of single characters with spaces. That makes the area of the rectangle given by the wrap settings visible. TextMaker interprets the negative margins correctly. The area for the shape becomes smaller than the bounding box of the shape, so that the text is partly behind the shape. Word does not import the shape at all, so is not useful for comparison.
Regina, thanks for the hint and the screenshot. But I still don't know how to reproduce 1. Open file 2. Select shape => Wrap => Edit 3. ??? There are settings for spacing: Settings for top and bottom are the same than in your description, but left and right are 0cm and I can't change them to -1cm. I also can't find a setting that is named "Margin". Could you please add some steps to reproduce? Thank you. => NEEDINFO
You only need to open the document to reproduce the error. If it does not look a rendered by TextMaker in the screenshot, then it is wrong. "Spacing" in the UI is the same as "fo:margin-top" (and similar) in file. The attribute is in the graphic style of the shape in file. The UI in LO is currently restricted to non-negative values. You need to edit the file to get negative values. Changing the UI makes only sense after the margin is correctly implemented.
(In reply to Regina Henschel from comment #4) > You only need to open the document to reproduce the error. If it does not > look a rendered by TextMaker in the screenshot, then it is wrong. O. K. , I can confirm, that it doesn't look like TextMaker in the screenshot. Spacing is 0 cm for left, right and bottom. Spacing for top is 99,99 cm. And I also confirm, that it is not possible to insert a negative value.
(In reply to Regina Henschel from comment #0) > wrongly implemented. Bottom margin uses 0 instead and top margin uses a > totally wrong value. While this was already bad (worse, as no shape was shown) in 3.3.0, the bogus value in the top margin started with the following commit. Previously it was the same as the bottom margin. https://cgit.freedesktop.org/libreoffice/core/commit/?id=ebceee31d92f04b58e795d02a26f62b717c47737 author Miklos Vajna <vmiklos@collabora.com> 2021-03-01 10:37:49 +0100 committer Miklos Vajna <vmiklos@collabora.com> 2021-03-01 20:56:03 +0100 tdf#140342 sw layout: remove explicit gutter handling when positioning borders
Dear Regina Henschel, To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
Negative top and bottom margins are still wrong in Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: cf8f7b91f41821b79495c0388359c4cb1156ea67 CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: default; VCL: win Locale: de-DE (en_US); UI: en-US Calc: CL threaded