Bug 129631

Summary: FILEOPEN: RTF: paragraph borders deduplicated away if color changes
Product: LibreOffice Reporter: Justin L <jluth>
Component: WriterAssignee: Justin L <jluth>
Status: RESOLVED DUPLICATE    
Severity: normal CC: jluth, kelemeng, vmiklos, xiscofauli
Priority: medium Keywords: bibisected, bisected, regression
Version: 5.4.0.3 release   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=104744
https://bugs.documentfoundation.org/show_bug.cgi?id=129605
https://bugs.documentfoundation.org/show_bug.cgi?id=129758
Whiteboard: target:7.5.0 target:7.4.1
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 113340    
Attachments: tdf129522_changedBordersC.rtf: border's lost due to direct formatting color change.
tdf129522_changedBordersC.pdf: as seen by MS Word 2003

Description Justin L 2019-12-26 16:34:42 UTC
Created attachment 156786 [details]
tdf129522_changedBordersC.rtf: border's lost due to direct formatting color change.

The second paragraph ought to have a green border around it.

This used to work until LO 5.3 commit a9e029ace41562e28e9242d63230ad1ca275f5d3  by Miklos Vajna on 2017-01-03 11:56:29 +0100
    tdf#104744 RTF import: fix unexpected zero para left margin wrt style dedup

I made this test document because I expected it to fail based on my code reading. The solution is probably the same as for bug 129605.
Comment 1 Justin L 2019-12-26 16:35:40 UTC
Created attachment 156787 [details]
tdf129522_changedBordersC.pdf: as seen by MS Word 2003
Comment 2 Xisco FaulĂ­ 2019-12-27 15:33:37 UTC
Reproduced in

Version: 6.5.0.0.alpha0+
Build ID: 1abfc8e2f677024ea058e96f3133e503ba89ea02
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

Adding Cc: to Miklos Vajna
Comment 3 Miklos Vajna 2020-01-02 09:29:32 UTC
OK to close this as a duplicate of bug 129605? The fix's commit message explicitly says that the commit fixes this bug as well.
Comment 4 Commit Notification 2022-08-11 17:08:19 UTC Comment hidden (obsolete)
Comment 5 Gabor Kelemen (allotropia) 2022-08-12 11:29:31 UTC
(In reply to Miklos Vajna from comment #3)
> OK to close this as a duplicate of bug 129605? The fix's commit message
> explicitly says that the commit fixes this bug as well.

Just verified that the green border in attachment 156786 [details] appears correctly since the commit 

https://git.libreoffice.org/core/commit/83832ea3890d9418f17b480ececa204ae54cee18

tdf#129605 rtfimport: deduplicating borders loses information

*** This bug has been marked as a duplicate of bug 129605 ***
Comment 6 Commit Notification 2022-08-12 21:31:54 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/221c5cfebf7c027ebb656860f2b12d60faa86b89

tdf#129631 writerfilter,sw: RTF import of invalid border...

It will be available in 7.4.1.

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.