Bug 141345 - new feature gutter-margin in LO7.2 produces unnecessary incompatibility with LO7.1
Summary: new feature gutter-margin in LO7.2 produces unnecessary incompatibility with ...
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
Hardware: x86-64 (AMD64) Windows (All)
: high major
Assignee: Miklos Vajna
Whiteboard: target:7.2.0
Depends on:
Blocks: Gutter-Margins
  Show dependency treegraph
Reported: 2021-03-30 13:28 UTC by Regina Henschel
Modified: 2021-06-23 12:35 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:
Regression By:

File with gutter produced by current LO 7.2 (19.48 KB, application/vnd.oasis.opendocument.text)
2021-03-30 13:28 UTC, Regina Henschel
LibreOffice 7.1 vs LibreOffice 7.2 (327.11 KB, image/png)
2021-03-31 13:22 UTC, Xisco Faulí

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2021-03-30 13:28:14 UTC
Created attachment 170833 [details]
File with gutter produced by current LO 7.2

Currently the information "gutter" is written to file so that it produces an additional space. Implementations, that do not know the feature "gutter" get a different layout of the document. This affect especially LO7.1 and of cause other implementations like AOO or Word.

I have presented the current way to the ODF TC and there were resistance to specify it this way. I agree with the concerns and suggest to write it to the ODF file so, that the effective margin is written to the file and in addition a "gutter-position" attribute that contains the amount of space, which the consumer can treat as gutter-margin. That way the layout is stable throughout different versions of LibreOffice.

Open attached file in LO7.1 and in LO7.2 to see the layout problem.

Minutes of the TC meeting are at https://lists.oasis-open.org/archives/office/202103/msg00048.html
Comment 1 Julien Nabet 2021-03-30 15:52:18 UTC
Miklos: considering https://cgit.freedesktop.org/libreoffice/core/log/?qt=grep&q=gutter, thought you might be interested in this one.
If I'm wrong, don't hesitate to uncc yourself.

(personnally, I know nothing about this so no need to cc myself here)
Comment 2 Xisco Faulí 2021-03-31 13:22:15 UTC
Created attachment 170856 [details]
LibreOffice 7.1 vs LibreOffice 7.2
Comment 3 Miklos Vajna 2021-03-31 13:27:49 UTC
(In reply to Xisco Faulí from comment #2)
> Created attachment 170856 [details]
> LibreOffice 7.1 vs LibreOffice 7.2

Sure, it's expected that a new feature in 7.2 doesn't work in 7.1 :-) That's the case for any new feature. A close example is e.g. contextual spacing, obviously if you use that new feature, then old versions won't be able to render it. We're backwards compatible, not forward-compatible.

The bugreport is about if we can introduce workarounds to have a markup that looks better on 7.1, without modifying 7.1. I understand the benefit of that, although doesn't like to introduce hacks for something new. I'll think about how to implement this, this would mean that loext:margin-gutter has to be taken into account when importing fo:margin-top, fo:margin-left and fo:margin-right. Sounds like a huge amount of work, but perhaps later I or somebody else will came up with a creative idea how to do this.
Comment 4 Miklos Vajna 2021-04-01 12:09:25 UTC
It seems XMLPropertyStateBuffer::ContextFilter() on the export side and PageMasterImportPropertyMapper::finished() on the import side may do the trick, that could be a reasonable cost/benefit ratio.
Comment 5 Commit Notification 2021-04-01 17:00:30 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":


tdf#141345 sw page gutter margin: reimplement ODF filter

It will be available in 7.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:

Affected users are encouraged to test the fix and report feedback.
Comment 6 Regina Henschel 2021-06-23 12:35:11 UTC
The new feature "gutter" is now accepted by ODF TC for ODF 1.4. The final proposal based on this fix is attached to https://issues.oasis-open.org/browse/OFFICE-4105.