Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi Pantelis,

On Sat, 2013-04-13 at 21:01 +0300, Pantelis Koukousoulas wrote:
As you know, in Windows libreoffice detects the current input language
and can change the current document language accordingly (assuming
the user wants this). This works great for language pairs like english/greek
that use different alphabets / layouts.

        Right :-)

It would be nice to have this functionality in Linux as well. I don't believe
it will solve all spellchecking issues (e.g., it will still be
desirable to be able to do trigram-based language detection per word as well),
but it would be a step in the right direction.

        Sounds like a great innovation.

So, I think this comes down to having a way to be notified about a change
in the keyboard layout and to get the current layout for each backend
so that GetInputLanguage() in the SalFrame backends of Linux will
return something better than  LANGUAGE_DONTKNOW. It seems to
me that nowadays we could do this using dbus.

For KDE:
in vcl/unx/kde4/KDESalFrame.cxx:
  -> It should listen for "currentLayoutChanged()" signal and use
...
For GNOME:
in vcl/unx/gtk/window/gtkframe.cxx:
   -> The list of available layouts can be found in
        org.gnome.desktop.input-sources sources.

        It sounds reasonable to me.

   -> So, it should be possible to subscribe to the changed
       event for this key.

        I like the approach of asking once, and then having a local state
synchronised with a signal.

Does this sound like a reasonable plan, is there something
I have misunderstood in how input language detection works
in libreoffice?

        It's likely that there is no expert here that knows more than you from
your great code reading & research - so I'd just go for it !

        The only trick here is which dbus API to use for maximum cross-platform
goodness; I think the answer is either dbus-glib or raw dbus - GDBus is
not usable for dependency reasons: we have to build / run on very old
systems :-)

        Otherwise - I'd say go for it ! and it's a shame (of course) that there
is (apparently) no cross-desktop standard for that stuff.

        Thanks !

                Michael.

-- 
michael.meeks@suse.com  <><, Pseudo Engineer, itinerant idiot


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.