Bug 138139 - FILEOPEN DOCX Empty paragraph with only page break has its border from style drawn
Summary: FILEOPEN DOCX Empty paragraph with only page break has its border from style ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: low minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:docx
Depends on:
Blocks: DOCX-Paragraph Writer-Page-Break
  Show dependency treegraph
 
Reported: 2020-11-11 15:19 UTC by NISZ LibreOffice Team
Modified: 2023-07-10 13:00 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Word (23.85 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-11-11 15:19 UTC, NISZ LibreOffice Team
Details
Screenshot of the original document side by side in Word and Writer (63.81 KB, image/png)
2020-11-11 15:20 UTC, NISZ LibreOffice Team
Details
emptypara-skippedNumbering.docx: even numbering is not shown (30.75 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-05-13 00:35 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2020-11-11 15:19:43 UTC
Created attachment 167206 [details]
Example file from Word

Attached user made file contains two paragraphs formatted as Heading 2, which happens to has a border under the paragraph.
When the Heading 2 is applied to an empty paragraph that only has a page break in it, Word does not draw the border, while Writer does, making a page wide line appear out of thin air.

Steps to reproduce:
    1. Open attached file

Actual results:
Extra horizontal line below the text.

Expected results:
No extra line. 
Also: Word draws the line once a visible character is entered in that line left of the ---Page Break--- mark so maybe this behavior is to be imitated.

LibreOffice details:
Version: 7.1.0.0.alpha1+ (x64)
Build ID: 00e5c63c35307faacf76a5e2ca7953c4208244ed
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:
Version: 6.0.0.3
Build ID: 64a0f66915f38c6217de274f0aa8e15618924765
CPU threads: 4; OS: Windows 6.3; UI render: default; 
Locale: en-US (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-11-11 15:20:02 UTC
Created attachment 167207 [details]
Screenshot of the original document side by side in Word and Writer
Comment 2 Buovjaga 2020-11-16 10:34:41 UTC
Confirmed with document

Arch Linux 64-bit
Version: 7.1.0.0.alpha1+
Build ID: bd3aeaefff5e7bdef10c4702d1f388083557614e
CPU threads: 8; OS: Linux 5.9; UI render: default; VCL: kf5
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 15 November 2020
Comment 3 Justin L 2022-06-24 19:27:56 UTC Comment hidden (no-value)
Comment 4 Justin L 2023-05-13 00:35:20 UTC
Created attachment 187236 [details]
emptypara-skippedNumbering.docx: even numbering is not shown

repro 7.6+
compatibilityMode 15, but does the same thing in Word 2010.

And look at this: the "invisible" heading line even ignores numbering while still being affected by it. (At least in Word 2010 this has headings 1. and 3.)
Comment 5 Justin L 2023-05-15 15:23:07 UTC
The conversation and fixes for bug 153964 are probably critical here, specifically https://gerrit.libreoffice.org/c/core/+/148452.
    -a comment in gerrit indicates I intentionally ignored borders.
Comment 6 Justin L 2023-05-15 15:51:25 UTC
For something minor and extremely odd like this, it is probably better to fix the document than the code.