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 ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.0.0.alpha0+
Hardware: x86-64 (AMD64) Windows (All)
: high major
Assignee: Miklos Vajna
URL:
Whiteboard: target:7.2.0
Keywords:
Depends on:
Blocks: Gutter-Margins
  Show dependency treegraph
 
Reported: 2021-03-30 13:28 UTC by Regina Henschel
Modified: 2021-04-01 17:23 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
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
Details
LibreOffice 7.1 vs LibreOffice 7.2 (327.11 KB, image/png)
2021-03-31 13:22 UTC, Xisco Faulí
Details

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":

https://git.libreoffice.org/core/commit/f3cf833f7079ce8d2f53681cae1b430a875cc320

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:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.