Download it now!
Bug 63802 - libreoffice writer's surrounding text support (STS) for Input Methods is not working
Summary: libreoffice writer's surrounding text support (STS) for Input Methods is not ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: Other Linux (All)
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:4.1.0 target:4.0.4
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-22 13:25 UTC by Harshula Jayasuriya
Modified: 2013-04-26 13:52 UTC (History)
7 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 Harshula Jayasuriya 2013-04-22 13:25:42 UTC
Description:

It appears Libre Office Writer's surrounding text support (STS) is not working. For some scripts/IMs it is required that STS is available. If one compares Libre Office Writer with gedit while using an IM that requires STS, the problem should be apparent.

Packages (Debian Testing):
* libreoffice-writer 4.0.0-1
* ibus 1.4.1-9
* ibus-m17n 1.3.4-1
* libm17n-0 1.6.4-1
* m17n-contrib 1.1.14-1
* gedit 3.6.2-1

Steps to Reproduce:
0) Start Libre Office Writer
1) Activate IBus
2) Select si-phonetic-dynamic IM
3) type 'k' then 'o'.

Expected output: කො

Actual output: කඔ
Comment 1 Sayak Sarkar 2013-04-22 15:19:17 UTC
Backspace fails to get executed on Libre Office for the bn-Disha IM. However, it works fine on gedit. Suspected reason being Libre Office Writer's surrounding text support (STS) is not working.

Packages:

* libreoffice-writer 4.0.0-1
* ibus 1.4.1-9
* ibus-m17n 1.3.4-1
* libm17n-0 1.6.4-1
* m17n-contrib 1.1.14-1

Steps to reproduce same issue on Fedora 18:-
0) Start Libre Office Writer
1) Activate IBus.
2) Select bn-disha IM.
3) Type any character sequence: such as 'k' followed by 'a'.
4) Type backspace.

Expected output: ক

Actual output: কা
Comment 2 Caolán McNamara 2013-04-25 12:49:21 UTC
It appears to be the case something like that if retrieve-surrounding returns false, then the IM never tries again to get context. And we turn false if there's no context, i.e. in an empty paragraph. I get better results returning true when we *can* provide context, but there just happens not be any.
Comment 3 Commit Notification 2013-04-25 13:18:40 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b1fc17ea25a6c6b0e451d6a1fd420a32ec0369e6

Resolves: fdo#63802 return true if we have known empty context



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 4 Harshula Jayasuriya 2013-04-25 14:01:15 UTC
Hi Caolán,

re: "Still looks to me that there's a bug in the si-phonetic-dynamic im (or something in the stack) that assumes that returning false once means it will always return false and give up for ever"

I suspect returning false signals to the IMF/IM that STS is not available and triggers fallback to pre-edit in some instances (e.g. si-wijesekera). This is to workaround, as gracefully as possible, the fact that not all applications/toolkits have STS. Daiki (CC'd) will be better able to elaborate.

Also, thanks for fixing this so quickly! Hopefully the distros backport this one for their next releases. ;-)

cya,
#
Comment 5 Caolán McNamara 2013-04-25 14:15:25 UTC
now I get the same behaviour as gedit, still a problem with loosing focus and regaining it (switch away and back to libreoffice), but I have a workaround for that too
Comment 6 Commit Notification 2013-04-25 14:18:11 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=21fb092398fb21256b0e546e7f38c5e6de4654f2

Related: fdo#63802



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2013-04-26 13:52:28 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6264733282ff93d8bbb561f67b880424f31a1f7d&h=libreoffice-4-0

Resolves: fdo#63802 return true if we have known empty context


It will be available in LibreOffice 4.0.4.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.