Bug 104378 - Chinese conversion problem
Summary: Chinese conversion problem
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Linguistic (show other bugs)
Version:
(earliest affected)
5.1.4.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard: target:7.1.0 target:7.0.4
Keywords:
Depends on:
Blocks: CJK
  Show dependency treegraph
 
Reported: 2016-12-03 15:58 UTC by loukinkeung
Modified: 2020-10-26 09:27 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description loukinkeung 2016-12-03 15:58:18 UTC
Select cell C6. Content in it: "遠程MySQL連接遠程MySQL連接遠程MySQL連接"  
when i use Tools>Language>Chinese Conversion...  
then select 'traditional to simplified'
It became "远程MySQL連接遠程MySQL連接遠程MySQL連接"  
you see, only the first "远程" is converted. All the rest are not converted.  

then converted the whole cell second time,
it became "远程MySQL连接远程MySQL連接遠程MySQL連接"
you see, the second portion converted, i.e. "远程MySQL连接远程"  

then converted the third and forth time, the whole string fully converted.  

It seems that the "MySQL", the ansi string, interferring the conversion.

Can it be reproduced in your side?

Best Regards
k.k.lou
Comment 1 Buovjaga 2016-12-10 16:18:06 UTC
Repro.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.4.0.0.alpha0+
Build ID: 1fce5b024e9f25c3fcef2537a22474ece0dc416f
CPU Threads: 8; OS Version: Linux 4.8; UI Render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on December 10th 2016
Comment 2 QA Administrators 2017-12-11 08:53:28 UTC Comment hidden (obsolete)
Comment 3 Julien Nabet 2018-06-06 19:44:32 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.
Comment 4 Julien Nabet 2018-06-06 21:04:23 UTC
Just part of bt for code pointer:
#0  0x00007ffff3489971 in ImpEditEngine::Convert(EditView*, o3tl::strong_int<unsigned short, LanguageTypeTag>, o3tl::strong_int<unsigned short, LanguageTypeTag>, vcl::Font const*, int, bool, bool) (this=0x55555cf55d10, pEditView=0x555557f0c140, nSrcLang=..., nDestLang=..., pDestFont=0x55555cf55ce8, nOptions=1, bIsInteractive=false, bMultipleDoc=true) at /home/julien/lo/libreoffice/editeng/source/editeng/impedit4.cxx:1554
#1  0x00007ffff33fe62a in EditView::StartTextConversion(o3tl::strong_int<unsigned short, LanguageTypeTag>, o3tl::strong_int<unsigned short, LanguageTypeTag>, vcl::Font const*, int, bool, bool) (this=0x555557f0c140, nSrcLang=..., nDestLang=..., pDestFont=0x55555cf55ce8, nOptions=1, bIsInteractive=false, bMultipleDoc=true)
    at /home/julien/lo/libreoffice/editeng/source/editeng/editview.cxx:819
#2  0x00007fffca4a54a5 in ScTextConversionEngine::ConvertAll(EditView&) (this=0x55555cf55c50, rEditView=...) at /home/julien/lo/libreoffice/sc/source/ui/view/spelleng.cxx:394
#3  0x00007fffca556237 in ScViewFunc::DoSheetConversion(ScConversionParam const&) (this=0x555557ec0f98, rConvParam=...)
    at /home/julien/lo/libreoffice/sc/source/ui/view/viewfun4.cxx:547
#4  0x00007fffca381a7e in ScCellShell::ExecuteEdit(SfxRequest&) (this=0x555557ed8e40, rReq=...) at /home/julien/lo/libreoffice/sc/source/ui/view/cellsh1.cxx:1792
Comment 5 QA Administrators 2019-06-07 02:53:06 UTC Comment hidden (obsolete)
Comment 6 Ming Hua 2019-06-07 04:33:11 UTC
Still reproducible with 6.1.6 on Windows 10.

Version: 6.1.6.3 (x64)
Build ID: 5896ab1714085361c45cf540f76f60673dd96a72
CPU threads: 2; OS: Windows 10.0; UI render: default; 
Locale: zh-CN (zh_CN); Calc: group threaded
Comment 7 Franklin Weng 2019-06-29 05:53:46 UTC
Also reproducible in

版本:6.2.4.2
組建 ID:2412653d852ce75f65fbfa83fb7e7b669a126d64
CPU 執行緒:4; OS:Linux 4.19; UI 算繪:預設; VCL: kde4; 
語言地區:zh-TW (zh_TW.UTF-8); UI語言:zh-TW
Calc: threaded
Comment 8 Franklin Weng 2019-06-29 09:09:33 UTC
Took a look at this issue.

1. If we execute conversion for several times, each time it would convert one piece between different English characters.  For example:

遠程MySQL連接遠程MySQL連接遠程MySQL連接

After first conversion:

远程MySQL連接遠程MySQL連接遠程MySQL連接

After second conversion:

远程MySQL连接远程MySQL連接遠程MySQL連接

and so on.

2. Since 6.3.0.0 the cursor will go to the end of that row after conversion. (I'll start another issue for this).

3. The current selection from pEditView (line 1522 at source/editeng/impedit4.cxx) always shows 0 for startPara, startPos, endPara and endPos.  Not sure if the pEditView sending into the ImpEditEngine::Convert is correct or not.
Comment 9 Commit Notification 2020-10-23 13:37:37 UTC
Mark Hung committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5b74b3322fd51cf075eb0c218b3adb786a28b4c9

tdf#104378: don't reset para attributes while

It will be available in 7.1.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 10 Commit Notification 2020-10-24 06:17:49 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

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

tdf#104378: sc: Add UItest

It will be available in 7.1.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 11 Commit Notification 2020-10-26 09:27:13 UTC
Mark Hung committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

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

tdf#104378: don't reset para attributes while

It will be available in 7.0.4.

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.