On Fri, 06 Jan 2012 10:15:15 +0100, Jan Holesovsky <ke...@suse.cz> wrote:


The code you want to play with is editeng/source/misc/svxacorr.cxx .


unfortunately, I'm just an user without coding skills...
so I can't do the job... I hope that some developer could have the
interest and time to try working this out.

your informations are very precious and may help

You probably want to tweak SvxAutoCorrect::SearchWordsInList() so that
it fallbacks to 'en' in case the word is not found in 'en_US', or
something like that; but you will have to tweak some code around that
probably too, in order to load the shared acor_XY.dat in addition to
acor_XY_AB.dat, etc.


well, I think we should try to understand and then emulate the
behaviour of the "all languages" acor.dat file which does something similar..

this dat file contains an autocorrect database which is
applied to every language... each entry of the acor.dat works
from Arabian to Zulu language

while the other .dat files are restricted to a single language.

i.e.  acor-en_US.dat --> american english
      acor-en_GB.dat --> UK english

the goal would be to create an "acor-en_ALL.dat"
whose entries would be applied only in english text, regardless of the
subvariant (US, GB, AUS etc. etc.)

the same would apply to all variants od Deutsch, Italian, French,
Spanish, Portoguese etc. etc.


I don't think it is hard; but some constructs used in that piece of code
are not too obvious, my favorite is this condition:

    else if( ( FStatHelper::IsDocument( sUserDirFile ) ||
                FStatHelper::IsDocument( sShareDirFile =
GetAutoCorrFileName( eLang, sal_False, sal_False ) ) ) ||
        ( sShareDirFile = sUserDirFile, bNewFile ))

Regards,
Kendy



as I said the OOo devs that were involved in the autocorrect thing
were "os" and "tl"

I don't know if there's anybody round here who worked with them or knows them
















_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to