Bug 63847 - Page number in TOC sometimes gets "CTL font" attribute in mixed LTR/RTL document
Summary: Page number in TOC sometimes gets "CTL font" attribute in mixed LTR/RTL document
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.2.2 release
Hardware: Other All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: RTL-CTL TableofContents-Indexes
  Show dependency treegraph
 
Reported: 2013-04-23 15:56 UTC by Erwan
Modified: 2018-09-17 17:18 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
test case for page number in TOC with "CTL text" attributes (57.62 KB, application/vnd.oasis.opendocument.text)
2013-04-23 15:56 UTC, Erwan
Details
pdf export of odf file (made with ghostscript) (77.38 KB, application/pdf)
2013-04-23 15:57 UTC, Erwan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Erwan 2013-04-23 15:56:15 UTC
Created attachment 78378 [details]
test case for page number in TOC with "CTL text" attributes

In a LTR document with a few RTL character, if the last character of a heading is a RTL character, then the page number in the table of contents will use the "CTL font" attributes of the "content style" insted of the "Western text font" attributes.
I usually write in French or English with a 12 pt font, adding a few Hebrew words in a 16 pt font, to make the Hebrew text easier to read. I set it by specifying different attributes for "Western text font" and "CTL font" in the style reference. When I switch from English to Hebrew keyboard layout, LibreOffice automatically switches font and style. That's great !
Now if the last character of a heading is in Hebrew, LibreOffice will consider that the page number in the Table of Contents is also in Hebrew, and will apply the "CTL font" attributes... I will get my hebrew font in 16 pt, instead of my western font in 12 pt.

An easy workaround is to add the invisible character "Left-to-Right mark" (from menu Insert/Formatting mark) as last character of the heading.
Comment 1 Erwan 2013-04-23 15:57:23 UTC
Created attachment 78379 [details]
pdf export of odf file (made with ghostscript)
Comment 2 Urmas 2013-04-24 15:44:51 UTC
Confirmed in 4.0.3.
Comment 3 QA Administrators 2015-04-19 03:22:38 UTC Comment hidden (obsolete)
Comment 4 Buovjaga 2015-06-18 15:08:03 UTC
Still confirmed.

Win 7 Pro 64-bit Version: 5.1.0.0.alpha1+
Build ID: 437210d58f32177ef1829d704f7f4d2f1bbfbfdd
TinderBox: Win-x86@39, Branch:master, Time: 2015-06-18_07:21:56
Locale: fi-FI (fi_FI)
Comment 5 QA Administrators 2016-09-20 10:10:56 UTC Comment hidden (obsolete)
Comment 6 Lior Kaplan 2017-10-12 10:51:22 UTC
Still happens in 5.4.1.
Comment 7 Omer Zak 2017-11-03 11:39:12 UTC
Still happens in:

Version: 5.4.2.2.0+
Build ID: 1:5.4.2-3~bpo9+1
CPU threads: 8; OS: Linux 4.9; UI render: default; VCL: gtk2; 
Locale: en-US (en_US.utf8); Calc: group

OS: Debian 64bit Stretch (Debian 9.2, with some backported packages)
Comment 8 Eyal Rozenberg 2018-09-17 17:18:41 UTC
Bug still manifests with:

Version: 6.1.1.2
Build ID: 5d19a1bfa650b796764388cd8b33a5af1f5baa1b
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk2; 
Locale: en-GB (en_GB.UTF-8); Calc: group threaded