Bug 129758 - FILEOPEN: RTF: paragraph borders inherited when style is overridden by undefined borders
Summary: FILEOPEN: RTF: paragraph borders inherited when style is overridden by undefi...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.6.0.4 release
Hardware: All All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: RTF-Paragraph Paragraph-Borders
  Show dependency treegraph
 
Reported: 2020-01-03 13:25 UTC by Justin L
Modified: 2022-08-12 11:23 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
tdf129631_lostBorders3.rtf: second paragraph should not have borders (Word 2003) (3.61 KB, application/rtf)
2020-01-03 13:25 UTC, Justin L
Details
comparison MSO 2010 and LibreOffice 6.5 Master (79.71 KB, image/png)
2020-01-10 11:23 UTC, Xisco Faulí
Details
The example file in current nightly and Word 2010 (210.23 KB, image/png)
2022-08-12 10:59 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Justin L 2020-01-03 13:25:54 UTC
Created attachment 156916 [details]
tdf129631_lostBorders3.rtf: second paragraph should not have borders (Word 2003)

It surprised me, but ONLY defining a border colour (as a direct property) is enough to to completely override everything about the style-defined borders. However, LO just completely ignores border properties (in putBorderProperty) if a NS_ooxml::LN_CT_PBdr_* is not defined.

Instead, it appears that a default none-border should be created when only a partial border definition is specified. (That should be fairly easy to do - it should do that almost automatically as long as a NS_ooxml::LN_CT_PBdr is created.)

Border support was first introduced around LO 3.6 (commit 343b52ee76f1a88a27007319af644dcce76536cc), and it was already incorrectly ignoring the none-border colour and simply inheriting everything from the paragraph style.
Comment 1 Xisco Faulí 2020-01-10 11:23:09 UTC
Reproduced in

Version: 6.5.0.0.alpha0+
Build ID: 838935758a5ec8e0e68f4df0cf5bfcf737e3f6f2
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: x11; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded
Comment 2 Xisco Faulí 2020-01-10 11:23:36 UTC
Created attachment 157057 [details]
comparison MSO 2010 and LibreOffice 6.5 Master
Comment 3 Gabor Kelemen (allotropia) 2022-08-12 10:59:30 UTC
Created attachment 181737 [details]
The example file in current nightly and Word 2010

Verified t be fixed in

Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: bfca51d9035000e518e4938ceb145cb92cc17b1f
CPU threads: 14; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: threaded

After 

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

tdf#129631 writerfilter,sw: RTF import of invalid border...
Comment 4 Gabor Kelemen (allotropia) 2022-08-12 11:02:56 UTC
Also seems to survive RT.