Bug 126657 - Linking text switches Hindi numerals to Arabic numerals if set to respect context
Summary: Linking text switches Hindi numerals to Arabic numerals if set to respect con...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: ⁨خالد حسني⁩
URL:
Whiteboard: target:7.5.0 target:7.4.3 inReleaseNo...
Keywords: text:rtl
Depends on:
Blocks: Writer-Styles RTL-Arabic-and-Farsi
  Show dependency treegraph
 
Reported: 2019-08-01 10:10 UTC by Usama
Modified: 2022-12-13 14:39 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
gif screen recording (207.62 KB, image/gif)
2019-08-01 10:11 UTC, Usama
Details
Document exhibiting the bug (12.92 KB, application/vnd.oasis.opendocument.text)
2019-08-01 15:01 UTC, Eyal Rozenberg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Usama 2019-08-01 10:10:25 UTC
Description:
Linking text switches Hindi numerals to Arabic numerals if numerals were set to context

Text to test with:

مرحبا 100 كيف الحال 100 نعم



Steps to Reproduce:
1.In Language settings >> Complex Text Layout: Numerals: context
2.Type Arabic text with Hindi numbers
3.Link the text to a URL

Actual Results:
Text switched from Hindi numerals to Arabic numerals

Expected Results:
Numerals shouldn't be changed regardless if it was a link or not


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Usama 2019-08-01 10:11:46 UTC
Created attachment 153089 [details]
gif screen recording
Comment 2 Eyal Rozenberg 2019-08-01 15:01:12 UTC
Created attachment 153094 [details]
Document exhibiting the bug

Sample document for observing the bug; the document itself is not corrupted - just its rendering. Also, the document has reproduction instructions integrated, and less text necessary for the problem itself.

The reproduction instructions (expanded from the originak)L

Set the numbering style be Context-dependent: In the menus:
    1. In the menus, select Tools | Options 
    2. In the options dialog, navigate to the Language Settings | Complex Text Layout tree item
    3. In the settings pane, find the text box General Options | Numerals 
    4. Select the "Context" option.

the text I used is just:

مرحبا 100

and that's enough to trigger the bug.
Comment 3 Eyal Rozenberg 2019-08-01 15:02:46 UTC
Seeing this with

Version: 6.3.0.1
Build ID: 1:6.3.0~rc1-2
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3; 
Locale: he-IL (en_IL); UI-Language: en-US
Calc: threaded

Note that for text to be considered as Arabic, you many need to so mark it as such using the Font Dialog.
Comment 4 QA Administrators 2021-08-01 03:54:28 UTC Comment hidden (noise, obsolete)
Comment 5 ⁨خالد حسني⁩ 2022-10-02 10:23:32 UTC
For some reason the link text gets no language set on it, but if you select it and set the language to Arabic it gets the expected digit substitution.
Comment 6 Commit Notification 2022-10-04 10:05:12 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2cca160f8bfc4597cf0ad3aaaf0017a5210ea0ec

tdf#126657, tdf#145104: Don’t set language to none on defined styles

It will be available in 7.5.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 7 ⁨خالد حسني⁩ 2022-10-04 10:07:41 UTC
This should be fixed now, but for new documents only. For old documents you need to edit the Internet Link character styles and set the language which was set to none before this fix.
Comment 8 Commit Notification 2022-10-05 07:13:27 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/7199097b1602f057129a12b3771220c1bc23fd1e

tdf#126657, tdf#145104: Don’t set language to none on defined styles

It will be available in 7.4.3.

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 9 Stéphane Guillou (stragu) 2022-12-06 10:11:43 UTC
Verified as fixed *in a new document* with:

Version: 7.5.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 6d6a2343b1d45695f3ea02818d317a022a7b259f
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Thanks, Khaled! :)