Bug 144362 - FILESAVE DOC: 2 columns section merge with next section
Summary: FILESAVE DOC: 2 columns section merge with next section
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:7.6.0
Keywords: filter:doc
Depends on:
Blocks: DOC-Page
  Show dependency treegraph
 
Reported: 2021-09-07 17:41 UTC by Angel
Modified: 2023-05-15 23:02 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file for teh bug (184.50 KB, application/msword)
2021-09-07 17:42 UTC, Angel
Details
Final file without the last section (184.50 KB, application/msword)
2021-09-07 17:43 UTC, Angel
Details
144362_pgBreakAfterColumns.odt: two sections, separated by page break (15.03 KB, application/vnd.oasis.opendocument.text)
2023-05-13 17:48 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Angel 2021-09-07 17:41:22 UTC
Description:
I create a new 2 columns section. Move some text there and save the file. When I re open the file the second section has merged with the new 2Cols one and all the text is toghetern in the 2 sections col

Steps to Reproduce:
1.Open the file "Prueba 2 columnas"
2.In pag 2 there is a sign "insert a section here"
3.Insert there a new section. Format it as two columns
4.Cut the text below this new section until the page titled "El Calafate" and paste it in the 2Col section
5 Remove any new line to adjust the presentation
6 Now you have some text in two columns. After it a section change with the title "El Calafate" and the table
7 Save it and close it
8. Reopen the file. 
9 Now you have lost the section of "El Calafate" and all the data was moved to the 2 Col sections ( File Prueba 2 columnas final.dos)

Actual Results:
One section is lost and the text is merged with the new one

Expected Results:
The same doc tahn before save it


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.2.0.4 (x64) / LibreOffice Community
Build ID: 9a9c6381e3f7a62afc1329bd359cc48accb6435b
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: es-AR (es_AR); UI: es-ES
Calc: threaded
Comment 1 Angel 2021-09-07 17:42:36 UTC
Created attachment 174864 [details]
Example file for teh bug
Comment 2 Angel 2021-09-07 17:43:10 UTC
Created attachment 174865 [details]
Final file without the last section
Comment 3 yellowplane 2021-09-16 17:00:14 UTC
I can reproduce in

Version: 7.3.0.0.alpha0+ (x86) / LibreOffice Community
Build ID: d5e55d204b71710eb5eb5d2c683dd6698626df3c
CPU threads: 8; OS: Windows 10.0 Build 19042; UI render: Skia/Vulkan; VCL: win
Locale: en-GB (en_US); UI: en-US
Calc: threaded
Comment 4 Justin L 2021-09-17 11:07:34 UTC
repro 7.3+.
Used bibisect-linux-43all to confirm the same is true already in LO 3.5, so likely inherited from OOo.
Used Word 2003 to confirm this is a FILESAVE issue - since Word also imports the last page in column mode.

None of this is really surprising, since LO and Word handle sections completely differently.

Saving as DOCX format emphasizes the difference (probably because DOCX handles continuous sections differently from DOC to allow flexibility in desired results).

There are several ways to do this differently that I noticed. One is to not insert a section, but just simply insert the desired columns directly.

The other way is to change the regular page break to a "section page break" by also setting the page style to "Default Page Style".

I suppose there could be some logic on export to emulate this a bit better, but this is a very tricky area. Setting to NEW since all the similar bug reports I can remember are related to import instead of export.
Comment 5 Justin L 2023-05-13 17:48:38 UTC
Created attachment 187249 [details]
144362_pgBreakAfterColumns.odt: two sections, separated by page break

repro 7.6+

This is an easy minimal reproducer: simply open and save as DOC/DOCX.
Comment 6 Justin L 2023-05-14 02:32:17 UTC
The 7.4.2 fix for bug 149313 triggers this export bug on ooxmlexport9's tdf97648_relativeWidth.docx.

Proposed fix at https://gerrit.libreoffice.org/c/core/+/151731
Comment 7 Commit Notification 2023-05-15 23:00:30 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/67d4fe32713070be5688eef2da9377a91e2f6b81

tdf#144362 doc/x export: different columns mean new section

It will be available in 7.6.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.