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)
(earliest affected) release
Hardware: Other All
: medium minor
Assignee: Not Assigned
Depends on:
Blocks: RTL-CTL TableofContents-Indexes
  Show dependency treegraph
Reported: 2013-04-23 15:56 UTC by Erwan
Modified: 2021-09-18 03:27 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:
Regression By:

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
pdf export of odf file (made with ghostscript) (77.38 KB, application/pdf)
2013-04-23 15:57 UTC, Erwan

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:
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:

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:

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
Comment 9 QA Administrators 2019-09-18 02:53:57 UTC Comment hidden (obsolete)
Comment 10 QA Administrators 2021-09-18 03:27:06 UTC
Dear Erwan,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)

If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword

Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team