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


Hey everyone,

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.

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.

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
      getCurrentLayout() of org.kde.keyboard / org.kde.keyboardLayouts

For GNOME:
in vcl/unx/gtk/window/gtkframe.cxx:
   -> The list of available layouts can be found in
        org.gnome.desktop.input-sources sources.
   -> The index of the current layout can be read in
        org.gnome.desktop.input-sources current.
   -> So, it should be possible to subscribe to the changed
       event for this key.

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

Thanks in advance for any suggestions

Regards,
Pantelis

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.