Bug 141466 - Asian phonetic guide for Japanese does not work properly if I change the default "base text".
Summary: Asian phonetic guide for Japanese does not work properly if I change the defa...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.2.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Jonathan Clark
URL:
Whiteboard: target:25.2.0 target:24.8.1
Keywords:
Depends on:
Blocks: Ruby CJK
  Show dependency treegraph
 
Reported: 2021-04-02 22:09 UTC by typingcat
Modified: 2024-08-20 08:48 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
bt with debug symbols (4.19 KB, text/plain)
2021-04-29 09:57 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description typingcat 2021-04-02 22:09:09 UTC
Description:
If I change the base text manually and apply the Ruby text, the text becomes weird.

Steps to Reproduce:
1. Type "学校に行きます。".
2. Select all and choose Asian Phonetic Guide like 1.png.
3. Change the default base text from "行き" to "行" like 2.png.
4. Add Ruby text "い" and press Apply.

Actual Results:
"学校に行きます。" is intact and "い" is displayed above "行".

Expected Results:
The text becomes "学校に行。。" like 3.png


Reproducible: Always


User Profile Reset: Yes



Additional Info:
If I change the base text to "行" and "きます" like 4.png, the text becomes "学校に。すます。" like 5.png.
Comment 1 typingcat 2021-04-02 22:11:54 UTC
I had taken 5 screenshot PNG's, and I was going to attach them, but it seems that I cannot attach multiple files at once. So, I just uploaded the images to Imgur: https://imgur.com/a/Mk23IDk

The name is 1.png to 5.png from top to bottom.
Comment 2 Dieter 2021-04-20 06:52:01 UTC
(In reply to typingcat from comment #1)
> I had taken 5 screenshot PNG's, and I was going to attach them, but it seems
> that I cannot attach multiple files at once.

That's correct. You can either attach each image separate or put them into a zip-file.
Comment 3 himajin100000 2021-04-21 17:02:21 UTC
Reproduced 

both on

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 42e0ea0a6e4f48967d58fa95081c8ba5a6b08bc6
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: default; VCL: win
Locale: ja-JP (ja_JP); UI: en-US
Calc: CL

and

Version: 7.1.3.1 (x64) / LibreOffice Community
Build ID: fa76d07d7006a0e2866c3247cef2d5eb55ae8369
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL
Comment 4 Julien Nabet 2021-04-29 08:57:29 UTC
On pc Debian x86-64 with master sources updated today + kf5 rendering (because of the crash with gtk3 rendering, see tdf#141967), here what I did:
1. Type "学校に行きます。".
=> OK
2. Select all and choose Asian Phonetic Guide like 1.png.
=> KO
I got in Base text:
学校
に
行
き
...

So I don't got "行き" but "行" then "き"
Anyway, I added hiragana to have:
学校 かつこう
に
行   い
き
and skipped 3.
4. I already had "い" so press "Apply",

I got furigana かつこう at the top of 学校
and い at the top of 行

Did I miss something?
Comment 5 himajin100000 2021-04-29 08:59:28 UTC
should not skip step 3.
Comment 6 Julien Nabet 2021-04-29 09:10:57 UTC
(In reply to himajin100000 from comment #5)
> should not skip step 3.

Skip 3="Change the default base text from "行き" to "行" like 2.png."

But I already got "行" on it own after second step, so what should I do?
Comment 7 himajin100000 2021-04-29 09:24:28 UTC
I guess...

1. BreakIterator may be different among UI languages.
2. the string itself would not be of much importance, but the fact that the base text was changed is important. When the phonetic guide is finally applied, the text in the document will be changed to what I did not expect from the dialog.
Comment 8 Julien Nabet 2021-04-29 09:45:15 UTC
(In reply to himajin100000 from comment #7)
> I guess...
> 
> 1. BreakIterator may be different among UI languages.
> 2. the string itself would not be of much importance, but the fact that the
> base text was changed is important. When the phonetic guide is finally
> applied, the text in the document will be changed to what I did not expect
> from the dialog.

Indeed, I changed the locale setting in LO from French to Japanese, now I got "行き" at the beginning.

So I got now:
1. Type "学校に行きます。".
=> OK
2. Select all and choose Asian Phonetic Guide like 1.png.
=> OK
I got in Base text:
学校
に
行き
...
3. I removed "き" in base text "行き" and put "かつこう" for "学校"
4. I put "い" for "行" then pressed "Apply"

I got now in dialog box:
学校 かつこう
に
。。
I don't reproduce exactly the same thing but the dialog box has indeed lost info after 学校に
Comment 9 Julien Nabet 2021-04-29 09:57:41 UTC
Created attachment 171501 [details]
bt with debug symbols

I just noticed this log during process:
warn:legacy.osl:36637:36637:sw/source/core/text/itrform2.cxx:369: pLast supposed to equal pCurr

I attached a bt corresponding to this part if it can help.
Comment 10 Shinji Enoki 2021-09-12 18:00:00 UTC
Reproduced in the following environment:

Version: 7.2.0.4 / LibreOffice Community
Build ID: 9a9c6381e3f7a62afc1329bd359cc48accb6435b
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: ja-JP (ja_JP.UTF-8); UI: ja-JP
Calc: threaded

Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: 84e1c79dd7394168459a3bbdea8bd94d765708e0
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: ja-JP (ja_JP.UTF-8); UI: ja-JP
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-09-10_21:28:22
Calc: threaded
Comment 11 Commit Notification 2024-08-16 03:03:12 UTC
Jonathan Clark committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/63fbb71f362b16eaa7b7d8617ae3b7e482b41492

tdf#141466 sw: Fix incorrect output after editing Ruby base text

It will be available in 25.2.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 12 Commit Notification 2024-08-20 08:48:11 UTC
Jonathan Clark committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/bd32bf20deda61093362216a9b6c68afbe172783

tdf#141466 sw: Fix incorrect output after editing Ruby base text

It will be available in 24.8.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.