Issue 68048 - IM: some IM engines, e.g. for sinhala and thai need to be able to get the surrounding text
Summary: IM: some IM engines, e.g. for sinhala and thai need to be able to get the sur...
Status: CLOSED FIXED
Alias: None
Product: gsl
Classification: Code
Component: code (show other issues)
Version: OOo 2.0.3
Hardware: All Linux, all
: P3 Trivial (vote)
Target Milestone: OOo 2.4
Assignee: philipp.lohmann
QA Contact: issues@gsl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-01 16:37 UTC by caolanm
Modified: 2007-12-17 14:06 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
fun patch that does the right thing, but in a strange way (3.53 KB, patch)
2006-08-01 16:38 UTC, caolanm
no flags Details | Diff
updated patch (3.64 KB, patch)
2007-08-23 14:31 UTC, caolanm
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description caolanm 2006-08-01 16:37:38 UTC
e.g. with scim and scim-sinhala under gnome...

ctrl+space to active and type kRoo, this is a particularly nasty sequence, and
the IM will eventually call our 
GtkSalFrame::IMHandler::signalIMRetrieveSurrounding in an effort to know what to
do, we don't implement this, so it plays it safe. But e.g. gedit can give the
desired feedback and the correct sequence.

Attached is a (hilarious) patch which uses the ATK interface to get the desired
surrounding text and make get the right output. Hopefully there is a less silly
way to do this, though it does work :-)

(fonts for sinhala referenced at issue 68047)
Comment 1 caolanm 2006-08-01 16:38:24 UTC
Created attachment 38185 [details]
fun patch that does the right thing, but in a strange way
Comment 2 philipp.lohmann 2006-08-01 16:47:18 UTC
Funny is the right word. Also if i'm not mistaken this relies on the atk bridge
and this will only work with accessibility enabled.

However we have currently no real interface for this, that makes it an
enhancement from my POV.
Comment 3 caolanm 2006-08-01 16:54:39 UTC
Actually, with the gtk atk-bridge code in place a11y doesn't actually need to be
enabled for this to function
Comment 4 philipp.lohmann 2006-08-01 17:06:45 UTC
So you think we can use this until we have a better way ? Such "funny" code has
a tendency to live much longer than expected, but if it works ... at least it
won't get called in  anything but these very special input method cases.
Comment 5 caolanm 2006-08-01 17:46:48 UTC
Well, someone else should also verify that it works :-) 

But in the absence of any other good ideas it might be something for e.g. 2.0.5,
or whatever is the timeframe for the "icuupgrade" workspace which I think is
basically a requirement for "upstream" OOo's icu to have enough support for
sinhala anyway to work in displaying these characters.
Comment 6 caolanm 2007-08-23 14:31:18 UTC
So what'd you think about 2.4 for this ? I'll attach the latest version, I think
it's unchanged, but just to get a clean apply
Comment 7 caolanm 2007-08-23 14:31:55 UTC
Created attachment 47751 [details]
updated patch
Comment 8 philipp.lohmann 2007-08-27 09:12:17 UTC
tentative target
Comment 9 philipp.lohmann 2007-11-29 09:03:57 UTC
committed the patch in CWS vcl84
Comment 10 philipp.lohmann 2007-12-03 14:31:11 UTC
please verify in CWS vcl84
Comment 11 philipp.lohmann 2007-12-06 13:09:42 UTC
reassign to me
Comment 12 philipp.lohmann 2007-12-06 13:10:16 UTC
verified
Comment 13 philipp.lohmann 2007-12-06 13:11:23 UTC
cmc: could you have a look at this on your systenm too, please ?
Comment 14 caolanm 2007-12-06 13:24:28 UTC
groovy for me
Comment 15 philipp.lohmann 2007-12-06 14:26:33 UTC
On request from es I'll rephrase the description:

Some input methods are not satisfied with their preedit buffer, they need to
change previously committed text surrounding the cursor (e.g. gtk's sinhala
input method). To do this they need application support in form of certain
functions that need to be implemented by vcl. Up to now the functions did
nothing hence these features did not work. The patch provided by cmc changes
these functions to do something useful hence activating a missing feature in our
gtk binding.

This can be witnessed by using the scim-sinhala input method, activating it with
ctrl+space and typing kRoo which will trigger this feature.
Comment 16 philipp.lohmann 2007-12-17 14:06:20 UTC
seen in m240, closing