[Libreoffice] Need help with the Bug 33092 – Autocomplete display double character for this word [CTL / Thai]

Caolán McNamara caolanm at redhat.com
Fri Jun 3 09:04:20 PDT 2011


On Tue, 2011-05-31 at 20:07 +0700, Samphan Raruenrom wrote:

So, I think you're on the right track with your experimental fix. I've
attached a patch to the bug based off that, give it a go and see if it
makes a difference.

What's worth knowing is that on Windows the Input Methods provide the
language of the keyboard they're emulating, while under Linux they
don't. So what I think happens is that 
a) the text manually typed goes into some (effectively windows-only)
magic to see if the IM language is different to the default language and
if it is not, then it doesn't force a language attribute on it, in order
to reduce the amount of properties in a doc.
b) the autocorrect text, as your experiment indicates, takes the
(effectively-only-set-under-windows) IM language attribute and enforces
it to be set over the autocorrect accepted text.

So I suspect we end up with two runs of text, the first with nothing
special set on it, which is Thai by nature of being a CTL run with the
default CTL language of the document as Thai, while the second run is an
explicit Thai run. And the boundaries of the runs are unfortunate[*]

I imagine that once Thai is forced on for the inserted-from-autocorrect
text it remains open for the rest of the document, hence it only happens
the first time.

Which suggests that going back to the first word and selecting the whole
double-run word and forcing it to be all e.g. Arabic, and then change it
it back to Thai would make it render correctly again by turning it back
into a single run again.

C.

[*] this is probably the *real*, but harder to fix, bug that writer
isn't treating the whole block as a single run in the first place.



More information about the LibreOffice mailing list