Follow the uses of GetWin16SystemLanguage in the source to find the right places to implement and use this. (http://opengrok.libreoffice.org/search?q=getwin16systemlanguage&project=core) Something like a bool SvtSystemLanguageOptions::isCTLKeyboardLayoutInstalled() and bool SvtSystemLanguageOptions::isCJKKeyboardLayoutInstalled() implemented by using the MS GetKeyboardLayoutList to get a list of installed keyboards ids, which should be usable with MsLangId::getScriptType to categorize into our ideas of CJK and CTL would likely do the trick
I'm working on this, please let me know if you plan to do so.
Created attachment 79460 [details] Partial patch
This looks great to me, are you still working on this or are you stuck ? IMO it just needs an ifdef WNT around the body (and a break after the isInstalled = true; because we only need to know if one is installed) and then just to use this as an extra || condition in the places that look for some evidence that CJK and CTL would be a good idea to default enable on, e.g. turn http://opengrok.libreoffice.org/xref/core/svl/source/config/cjkoptions.cxx#201 into something like... 204 sal_uInt16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage(LANGUAGE_SYSTEM); 205 if ( !bCJKFont && ( aSystemLocaleSettings.isCJKKeyboardLayoutInstalled() || ( nScriptType & SCRIPTTYPE_ASIAN ) || 206 ((eSystemLanguage != LANGUAGE_SYSTEM) && ( nWinScript & SCRIPTTYPE_ASIAN )))) 207 { 208 SetAll(sal_True); 209 }
Sorry, I can't work on this anymore.
No problem, thanks for the windows specific bit. I can knock the rest of it together myself I think.
Marc Garcia committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=a865cec5d3af824e3d4f6c1d6401ecb743e4f09b Related: fdo#54493 determine if a CJK/CTL keyboard is installed The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Caolan McNamara committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=d75dd80abb28cdb126a12840597d0384dd43897e Resolves: fdo#54493 autoenable CJK/CTL ui based on installed keyboards The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Migrating Whiteboard tags to Keywords: (EasyHack, DifficultyBeginner, SkillCpp ) [NinjaEdit]