Bug 126353 - Character style borders appear on formatting changes, and not only when next style is encountered
Summary: Character style borders appear on formatting changes, and not only when next ...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.3.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.4.0 target:6.3.5
Keywords: bibisected, bisected, needUITest, regression
: 116361 (view as bug list)
Depends on:
Blocks: Writer-Styles-Character
  Show dependency treegraph
 
Reported: 2019-07-11 19:58 UTC by leo.dalecki
Modified: 2019-12-18 10:51 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot showing the behavior of character style borders in LibreOffice 5.2 (borders are in red). (3.19 KB, image/png)
2019-07-11 20:12 UTC, leo.dalecki
Details
Screenshot showing the behavior of character style borders in LibreOffice 6 (borders are in red). (3.23 KB, image/png)
2019-07-11 20:13 UTC, leo.dalecki
Details

Note You need to log in before you can comment on or make changes to this bug.
Description leo.dalecki 2019-07-11 19:58:31 UTC
Description:
I was working on a Linux command line cheat sheet, and I had to switch my OS from Debian to Linux Mint. So In the process, I went from LibreOffice 5.2 to 6.

I created a character style for commands under LibreOffice 5.2, and it worked fine. I used character style borders to add a bit of padding. When the style was applied to text, the borders only appeared at the start and at the end of it.

Since I upgraded to LibreOffice 6, the borders started appearing in the middle of the styled text, completely destroying the page layout, as the padding ended up taking too much space.

The border seem to appear when there is a formatting change. For example, if I underline a word in the middle of the styled text, the border will appear right before it.

I couldn't find a way to fix it. The only way I could get it to work again was to roll back to LibreOffice 5.2.

Steps to Reproduce:
1. Create a character style with borders on both side in LibreOffice 5.2;
2. Apply the style to some text;
3. Underline one of the words in the styled text;
4. Save your work and upgrade to LibreOffice 6;
5. Open the previously saved file, a border should appear right before the underlined word.

Actual Results:
A border appears right before the underlined word.

Expected Results:
The borders should only appear at the start and at the end of the styled text, regardless of formatting changes in the middle of it.


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
Comment 1 leo.dalecki 2019-07-11 20:12:08 UTC
Created attachment 152729 [details]
Screenshot showing the behavior of character style borders in LibreOffice 5.2 (borders are in red).
Comment 2 leo.dalecki 2019-07-11 20:13:40 UTC
Created attachment 152730 [details]
Screenshot showing the behavior of character style borders in LibreOffice 6 (borders are in red).
Comment 3 Dieter 2019-07-30 03:50:19 UTC
I confirm this behaviour with

Version: 6.2.5.2 (x64)
Build-ID: 1ec314fa52f458adc18c4f025c545a4e8b22c159
CPU-Threads: 4; BS: Windows 10.0; UI-Render: GL; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: threaded

Steps to reproduce in LO 6.2.5.2

1. Create a character style with borders on both side
2. Apply the style to some text;
3. Underline one of the words in the styled text;

Result: New borders are added

I also could reproduce this with
Version: 5.4.7.2 (x64)
Build-ID: c838ef25c16710f8838b1faec480ebba495259d0
CPU-Threads: 4; BS: Windows 6.19; UI-Render: GL; 
Gebietsschema: de-DE (de_DE); Calc: group
Comment 4 Justin L 2019-08-05 11:25:48 UTC
*** Bug 116361 has been marked as a duplicate of this bug. ***
Comment 5 Justin L 2019-08-05 11:31:21 UTC
(In reply to Justin L from comment #4)
> *** Bug 116361 has been marked as a duplicate of this bug. ***
The duplicate bug report supplies test document attachment 140697 [details]

It also shows that this began in LO 5.3 with http://cgit.freedesktop.org/libreoffice/core/commit/?id=d5fab973d0af95c433c5f6a9492014f7db642489

Note that pretty much any character property will add A SINGLE borderline at the first instance of a character run change.  I reproduced with bold, italic, fontsize, fontcolor etc.  It seems to be a visual thing only, because round-tripping the file doesn't look bad in the pre-bug version.
Comment 6 Justin L 2019-08-05 13:27:40 UTC
The key to reproducing this bug is that the border needs to start at the beginning of the paragraph. It doesn't depend on using a style or shortcuts or anything like that.

proposed fix at https://gerrit.libreoffice.org/76983 tdf#126353, but it really needs to be checked by Mark to make sure that doesn't break his intentions.
Comment 7 Commit Notification 2019-08-20 12:17:22 UTC
Mark Hung committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/56e95f8e20b20680d025f3ecbeb4cc5306085b1e%5E%21

tdf#126353 merge character borders on layout portions.

It will be available in 6.4.0.

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.
Comment 8 Xisco Faulí 2019-12-03 11:01:37 UTC
A polite ping to Mark Hung:
Is this bug fixed? if so, could you please close it as RESOLVED FIXED ? Otherwise, Could you please explain what's missing?
Thanks
Comment 9 Dieter 2019-12-15 12:20:52 UTC
Verified with

Version: 6.5.0.0.alpha0+ (x64)
Build ID: e26d89371f0e4f41476c9a99be01d98dedb76776
CPU threads: 4; OS: Windows 10.0 Build 18362; UI render: default; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-GB
Calc: threaded

Mark, thanks for fixing it!
Comment 10 Commit Notification 2019-12-18 10:51:10 UTC
Mark Hung committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/commit/1e811754d230dd59ec54d0653284ca4737edb8b9

tdf#126353 merge character borders on layout portions.

It will be available in 6.3.5.

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.