Bug 121161 - kde5: KDE5 VCL plugin does not accept (CJK) inputs through input method
Summary: kde5: KDE5 VCL plugin does not accept (CJK) inputs through input method
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.2.0.0.alpha1+
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.3.0 target:6.2.0.2
Keywords:
: 120332 122252 (view as bug list)
Depends on:
Blocks: CJK KDE, KF5
  Show dependency treegraph
 
Reported: 2018-11-04 15:24 UTC by Fuminobu TAKEYAMA
Modified: 2019-03-12 14:52 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
wrong candidate position & cursor does not move while pre-edit is shown (666.49 KB, image/png)
2018-12-26 14:49 UTC, Fuminobu TAKEYAMA
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fuminobu TAKEYAMA 2018-11-04 15:24:19 UTC
Description:
It seems that the new KDE5 VCL plugin does not handle events from an input method, an application mainly used for inputting CJK characters. So now we cannot input CJK characters from keyboard into LibreOffice applications on KDE 5.

GTK 3 VCL plugin is working fine with the same AppImage image.

I guess the VCL plugin does not handle Qt5 input method events:
http://doc.qt.io/qt-5/qinputmethodevent.html

Steps to Reproduce:
1. start ibus-mozc with QT_IM_MODULE=ibus
2. start libreoffice with OOO_FORCE_DESKTOP=qt5 and QT_IM_MODULE
3. open witer and enable IBus
4. create a new document with writer
5. switch the input mode of ibus-mozc to Hiragana
6. type "aaa"

Actual Results:
"aaa" is inserted into the document

Expected Results:
"あああ" is inserted into the document


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Xisco Faulí 2018-12-03 16:03:01 UTC
*** Bug 120332 has been marked as a duplicate of this bug. ***
Comment 2 Franklin Weng 2018-12-06 12:41:42 UTC
Confirmed in

版本:6.3.0.0.alpha0+
組建 ID:e4c2d0bb57ab8ea8f5c400d103d01376b8140f22
CPU 執行緒:4; OS:Linux 4.15; UI 算繪:預設; VCL: kde5; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2018-11-30_21:37:10
語言地區:zh-TW (zh_TW.UTF-8); UI-Language: zh-TW
Calc: threaded

My input method engine is gcin, but it seems not to react to any input method engine.
Comment 3 Franklin Weng 2018-12-06 12:44:05 UTC
Also in

版本:6.2.0.0.beta1+
組建 ID:6ab7bfbca4148416233dbf8b9bfc79f3a1dfa821
CPU 執行緒:4; OS:Linux 4.15; UI 算繪:預設; VCL: kde5; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:libreoffice-6-2, Time: 2018-11-27_19:54:44
語言地區:zh-TW (zh_TW.UTF-8); UI-Language: zh-TW
Calc: threaded


But not in

版本:6.1.3.2
組建 ID:86daf60bf00efa86ad547e59e09d6bb77c699acb
CPU 執行緒:4; OS:Linux 4.15; UI 算繪:預設; VCL: kde4; 
語言地區:zh-TW (zh_TW.UTF-8); Calc: group threaded

Confirmed that KDE5 VCL does not handle well.
Comment 4 Commit Notification 2018-12-21 18:48:44 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/c7ee454a35c392dfd03c9ccf8fd953ec9c98e484%5E%21

tdf#121161 Qt5 initial IM support

It will be available in 6.3.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 5 Commit Notification 2018-12-23 09:32:04 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/7da0f71cf15af0cfa74d0eaa0011a6b1db1a4abd%5E%21

tdf#121161 Qt5 initial IM support

It will be available in 6.2.0.2.

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 6 Fuminobu TAKEYAMA 2018-12-26 14:49:50 UTC
Created attachment 147839 [details]
wrong candidate position & cursor does not move while pre-edit is shown

Great progress! Thank you.

However there are still things to be implemented.

- The position of candidate window of input method is not correct. LibreOffice need to send position of cursor to the input method.
- The cursor does not move while pre-edit is shown. On the screen shot attached, the cursor should be at the end of line.
Comment 7 Jan-Marek Glogowski 2018-12-27 18:42:36 UTC
*** Bug 122252 has been marked as a duplicate of this bug. ***
Comment 8 Jan-Marek Glogowski 2018-12-27 19:15:41 UTC
(In reply to Fuminobu TAKEYAMA from comment #6)
> Created attachment 147839 [details]
> wrong candidate position & cursor does not move while pre-edit is shown
> 
> Great progress! Thank you.
> 
> However there are still things to be implemented.
> 
> - The position of candidate window of input method is not correct.
> LibreOffice need to send position of cursor to the input method.

I'm testing with KDE5 and that works correctly here. When I type, the IM input box is shown below the cursor. Compared to your IM input box my candidates are shown left to right. No idea if this is configurable or depends on some setting.

> - The cursor does not move while pre-edit is shown. On the screen shot
> attached, the cursor should be at the end of line.

I'm just trying to copy the behavior of the gtk3 backend. For me gtk3 and gtk always keep the cursor at the start until you commit / select the candidate. gen doesn't show a pre-edit here at all. FWIW for Qt5 the cursor position would be easy enough to change, but I would like to get a general understanding, how this is supposed to work.

Can you check if SAL_USE_VCLPLUGIN=gtk3 soffice shows a different behavior for you?

(And always check "About Libreoffice" for the real VCL plugin in use.)

---

Now my setup is using fcitx. My input method is Shuangpin, where Google tells me it's an input method for Chinese, which I don't know at all. I've just typed anything on my German keyboard and checked that gtk3 is basically showing the same behavior.

Anyway, IM input works as far as I can tell, which this bug report is about.

Please open new bug for those two new problems, otherwise this will eventually become a never ending story where everyone adds their related bugs. Feel free to add this bug to the "See also" list and add the KDE and CJK to the "blocks" list.

And thanks for testing.
Comment 9 Jan-Marek Glogowski 2018-12-27 19:22:20 UTC
(In reply to Jan-Marek Glogowski from comment #8)
> Please open new bug for those two new problems, otherwise this will
> eventually become a never ending story where everyone adds their related
> bugs. Feel free to add this bug to the "See also" list and add the KDE and
> CJK to the "blocks" list.

bug is missing an s. One bug per problem, please.

Maybe the patch description should have been "Qt5 minimal IM support" :-)