Bug 121109 - FILESAVE: Page break is added after removed paragraph
Summary: FILESAVE: Page break is added after removed paragraph
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.2.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on: 121597
Blocks:
  Show dependency treegraph
 
Reported: 2018-11-01 22:45 UTC by Xisco Faulí
Modified: 2019-05-23 08:39 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
sample file (35.00 KB, application/msword)
2018-11-01 22:45 UTC, Xisco Faulí
Details
very simple test file for the hidden page break of the DOC(X) import (4.23 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-11-23 10:05 UTC, László Németh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2018-11-01 22:45:42 UTC
Created attachment 146237 [details]
sample file

Steps to reproduce:
1. Open attached document
2. Save it as DOCX or RTF
3. Open the new file

-> There's a page break after the first deleted paragraph.

Reproduced in

Version: 6.2.0.0.alpha0+
Build ID: 5fb66ae5595b7435e8954df31473fad15a74b8c2
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: en-US (ca_ES.UTF-8); Calc: threaded

[Bug found by office-interoperability-tools]
Comment 1 Xisco Faulí 2018-11-01 22:46:37 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=1bbbe57dfc0b43d6b5444798d77dcdf5e4e76e49

author	László Németh <nemeth@numbertext.org>	2018-08-28 21:13:09 +0200
committer	László Németh <nemeth@numbertext.org>	2018-09-05 07:48:59 +0200
commit 1bbbe57dfc0b43d6b5444798d77dcdf5e4e76e49 (patch)
tree 52b256c96845b7082d916c255cbaa77594da4aa2
parent 22639148ae5400bac98f32a75d7431b857c80195 (diff)
tdf#119571 change tracking: show layout changes at paragraph join

Bisected with: bibisect-linux64-6.2

Adding Cc: to László Németh
Comment 2 Xisco Faulí 2018-11-01 23:07:40 UTC
Same problem reproduced with attachment 75459 [details] from bug 61410 if it's saved to .ODT
Comment 3 László Németh 2018-11-23 10:04:20 UTC
The fix for Bug 121597 solved the problem for the actual text content, ie. there is no page break in the "hide tracked changes" mode (because LibreOffice doesn't add false empty paragraphs to the exported document).

The root cause of the remaining problem is the extra hidden page break in the first (in this case, deleted) paragraph added by the DOC/DOCX import of LibreOffice. I don't know, why LibreOffice (and OpenOffice.org) do this, but Word doesn't do such a thing, see with the attached document (a simple file with two paragraphs, copying those paragraphs create a page break only in LibreOffice).
Maybe this behavior is only for simplifying the concatenation of the imported documents (1. open the DOC file in LO, 2. Copy to the clipboard by Ctrl-a Ctrl-c 3. insert with Ctrl-v in an existing ODT: "thanks" to the hidden page break setting, no need extra page break in the document to insert the original DOC in a new page in ODT).

Xisco, I suggest to close this issue, if it is enough to fix the page break of  actual text content (fixed by the fix for tdf#121597), and open (if it doesn't exist) a new one for this first paragraph imported with page break. I will also add some screen shots to tdf#119571 to show the style copying of the joined paragraphs in Word and LibreOffice before and after my fix (related to this issue).
Comment 4 László Németh 2018-11-23 10:05:48 UTC
Created attachment 146956 [details]
very simple test file for the hidden page break of the DOC(X) import
Comment 5 QA Administrators 2019-05-23 02:50:36 UTC Comment hidden (obsolete)
Comment 6 László Németh 2019-05-23 07:28:08 UTC
Fixed by the commit 23c159d948af360baecfe243e1321987760916d7
"tdf#125310 change tracking: don't copy page break at paragraph deletion, because it's more annoying, than helpful."

@Xisco: Sorry, I missed, that second commit filed under Bug 125310 has already had this report...
Comment 7 Xisco Faulí 2019-05-23 08:06:56 UTC
Verified in

Version: 6.3.0.0.alpha1+
Build ID: e7fb44b8c86b4dce1d4c6f15752cc3bf62b14888
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@László Németh, thanks for fixing this issue!

The second patch has been backported to 6-2 as well
Comment 8 Gabor Kelemen (allotropia) 2019-05-23 08:39:23 UTC
(In reply to László Németh from comment #4)
> Created attachment 146956 [details]
> very simple test file for the hidden page break of the DOC(X) import

For the record: this is bug #118711