Bug 136834 - FILEOPEN DOCX Page break after empty paragraph creates one more empty paragraph
Summary: FILEOPEN DOCX Page break after empty paragraph creates one more empty paragraph
Status: RESOLVED NOTABUG
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: filter:docx
Depends on:
Blocks: DOCX-Paragraph
  Show dependency treegraph
 
Reported: 2020-09-17 07:16 UTC by NISZ LibreOffice Team
Modified: 2020-09-17 08:14 UTC (History)
1 user (show)

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


Attachments
Example file from Word (11.17 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-09-17 07:16 UTC, NISZ LibreOffice Team
Details
Screenshot of the original document side by side in Word and Writer (45.98 KB, image/png)
2020-09-17 07:17 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2020-09-17 07:16:45 UTC
Created attachment 165600 [details]
Example file from Word

Attached Word-made document is containing a paragraph of text, an empty paragraph, a page break and one more paragraph.
When opened in Writer there are two empty paragraphs before the page break.

Steps to reproduce:
    1. Open attached document

Actual results:
Two empty paragraphs before the page break.
If the page break is not after an empty paragraph, the number of paragraphs is the same.

Expected results:
One empty paragraph like in Word.

LibreOffice details:
Version: 7.1.0.0.alpha0+ (x86)
Build ID: abcc4eb907661e07ad850ccce7eb06f129da4286
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL

Also in:
Verzió: 6.0.0.3
Build az.: 64a0f66915f38c6217de274f0aa8e15618924765
CPU szálak: 4; OS: Windows 6.3; Felületmegjelenítés: alapértelmezett; 
Területi beállítások: hu-HU (hu_HU); Calc: CL

Version: 5.0.0.5
Build ID: 1b1a90865e348b492231e1c451437d7a15bb262b
Locale: hu-HU (hu_HU)

Verzió: 4.0.0.3 (Build az.: 7545bee9c2a0782548772a21bc84a9dcc583b89)

LibreOffice 3.5.0rc3 
Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735
Comment 1 NISZ LibreOffice Team 2020-09-17 07:17:09 UTC
Created attachment 165601 [details]
Screenshot of the original document side by side in Word and Writer
Comment 2 Mike Kaganski 2020-09-17 08:11:16 UTC
This is not a bug.

word/document.xml contains four <p> elements. The third one contains a <r> with <w:br w:type="page"/>. You may actually insert a text in the line before the "....Page Break...." marker in Word, so for all practical purposes, this is a normal paragraph followed by a page break. Also, you may insert text *after* these words, and technically they would be part of the same paragraph (which would have <r> with preceding text, <r> with page break, and <r> with following text).

Writer keeps the semantic of the proper paragraph on the page where Word puts the break on. The break naturally becomes the attribute of the following paragraph, as the document model requires. Trying to do it otherwise would break cases where some fields or tables are followed by page breaks, where in Word, one can use up arrow key to get from the following page to the paragraph with the break, but with the implied change in Writer, you would only be able to up-arrow into the preceding object.
Comment 3 Mike Kaganski 2020-09-17 08:14:30 UTC
(In reply to Mike Kaganski from comment #2)
> You may actually insert a text in the line before the "....Page Break...." marker in Word,

... which should read "you may actually insert text in the same line where the "....Page Break...." marker is, to the left of the marker".