Bug 143793 - ODT: Wrap for shape in header was disabled (USE_FORMER_TEXT_WRAPPING), but now should probably be re-enabled
Summary: ODT: Wrap for shape in header was disabled (USE_FORMER_TEXT_WRAPPING), but no...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 114632 (view as bug list)
Depends on: 104254
Blocks: Anchor-and-Text-Wrap DOCX-compatibilityMode-15
  Show dependency treegraph
 
Reported: 2021-08-09 18:25 UTC by Regina Henschel
Modified: 2023-05-31 11:26 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
Shape in header with wrap text right (14.68 KB, application/vnd.oasis.opendocument.text)
2021-08-09 18:25 UTC, Regina Henschel
Details
UseFormerTextWrapping.odt: currently off (modern default). Tests 3 scenarios. LO currently displays like DOCX14/DOC would. (116.04 KB, application/vnd.oasis.opendocument.text)
2021-08-10 12:49 UTC, Justin L
Details
patch_143793.diff: depends on tdf#104254 patch (3.43 KB, patch)
2021-11-24 10:23 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2021-08-09 18:25:06 UTC
Created attachment 174161 [details]
Shape in header with wrap text right

Open attached file in daily build from 3.Aug. and in daily build from 5.Aug.

The shape in the header has set a wrap "Text right". That is correctly rendered in the older build. In the newer build the property is still set, but it is not rendered.

Good in Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: ad1b12686da88bea57582df10fa85268ada209b8
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL

Wrong in Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 41f1d389d4b513a7f616542d00fd58268ab5ea07
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL

I have tested both with a fresh installed version without any own settings.
Comment 1 Nina_Shtygailo 2021-08-10 06:38:00 UTC
To repeat the error, you need to write reproduction steps.
Comment 2 NISZ LibreOffice Team 2021-08-10 07:59:04 UTC
This is a consequence of bug 104254 being temporarily fixed which was then reverted due to side effects.

The desired behavior can be enabled by Options - Writer - Compatibility - Use OpenOffice.org 1.1 text wrapping around objects.

I'd like to suggest to use this bug to change the default value of this option to True, so that Writer would by default behave similar to current (2013+) Word.

bug 104254 could be used to keep this option enabled for CompatibilityMode >= 15 docx and disabled for CompatibilityMode <= 14 docx (DOC, RTF... as needed).

I'm not sure whether ODF has anything to say about wrapping objects in the header.
Comment 3 Justin L 2021-08-10 08:22:25 UTC
(In reply to NISZ LibreOffice Team from comment #2)
> The desired behavior can be enabled by Options - Writer - Compatibility -
> Use OpenOffice.org 1.1 text wrapping around objects.
> I'd like to suggest to use this bug to change the default value of this
> option to True, so that Writer would by default behave similar to current
> (2013+) Word.

I agree in principle with this idea. (This affects more than just header/footers, so it would need to be verified that DOCX 15 handles all these situations in the same way).

This decision should probably go through the ESC (once the fix has been produced and tested). It means that Writer will now default to creating non-interoperable documents for those who save in DOC/RTF format, or those whose co-workers use Word < 2013. (I can't imagine that they would not agree to focus on DOCX 15.)

> I'm not sure whether ODF has anything to say about wrapping objects in the
> header.
That is a good question. It OUGHT to have been put into the specs around OOo 2 era when the original decision was made to be interoperable with MS on this particular point. (But hopefully it wasn't so that this move to "sanity" can be more easily accomplished.)

Not a regression, so removing that keyword.
Comment 4 Regina Henschel 2021-08-10 12:02:24 UTC
My opinion on this: Adapting the wrap behavior to older versions of LibreOffice or to foreign applications should not be made by a compatibility setting, but by changing the wrap settings of the object in the import filter.
If I as user enable "wrap text right" in a new document, then I expect that it is rendered that way. If I want to make my document look like in older foreign applications, then I use a different wrap mode.
Comment 5 Justin L 2021-08-10 12:13:47 UTC
(In reply to Regina Henschel from comment #4)
> If I as user enable "wrap text right" in a new document, then I expect that
> it is rendered that way.

This hasn't happened since OOo 2. (But I agree with your expectation.)  The only reason this doesn't happen is because USE_FORMER_TEXT_WRAPPING is set to false.

> My opinion on this: Adapting the wrap behaviour to older versions of
> LibreOffice or to foreign applications should not be made by a compatibility
> setting, but by changing the wrap settings of the object in the import
> filter.

This isn't adapting LO to older versions of office.  It is simply reversing the OOo 2 change that munged up the whole thing.
Comment 6 Justin L 2021-08-10 12:49:14 UTC
Created attachment 174179 [details]
UseFormerTextWrapping.odt: currently off (modern default). Tests 3 scenarios. LO currently displays like DOCX14/DOC would.

(In reply to Justin L from comment #3)
> I agree in principle with this idea. 
Unfortunately we can not just use "true" for USE_FORMER_TEXT_WRAPPING, since it also ignores body text wrapping around a header image.

> (This affects more than just header/footers, so it would need to be verified 
> that DOCX 15 handles all these situations in the same way).
It affects both headers and footnotes. Confirmed that DOCX 15 wraps for both headers and footnotes (and body text).
Comment 7 Commit Notification 2021-08-31 15:48:52 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#143793 preemptive unit test for USE_FORMER_TEXT_WRAPPING

It will be available in 7.3.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.
Comment 8 Justin L 2021-11-09 17:29:45 UTC
A potential proposal for LO 7.4 is https://gerrit.libreoffice.org/c/core/+/124932
(which depends on bug 104254's patch).
Comment 9 Justin L 2021-11-24 10:23:12 UTC
Created attachment 176462 [details]
patch_143793.diff: depends on tdf#104254 patch
Comment 10 Justin L 2021-12-15 05:27:09 UTC
(In reply to Justin L from comment #8)
> https://gerrit.libreoffice.org/c/core/+/124932
The problem with ANY fix is that this will mean different layout logic is applied in headers/footers and footnotes/endnotes, and both of these easily lead to layout loops that will freeze LO.

Sure, those are existing bugs that will simply be exposed, but that means that someone also needs to fix them in a timely fashion.
Comment 11 Justin L 2023-03-27 19:08:30 UTC
*** Bug 114632 has been marked as a duplicate of this bug. ***