Kaydet (Commit) 23b92427 authored tarafından Khaled Hosny's avatar Khaled Hosny

Enable “complex text layout” by default

All this does is enable some UI elements, like setting paragraph
direction or selecting “CTL” fonts. Some of these UI elements are required
for editing RTL documents and it makes no sense to hide them by default
and then rely on some heuristic to guess if the user might need them
(which fails half of the time).

Hopefully this will also help not overlooking these elements in the new
UI experiments (like how the sidebar missed the paragraph direction
settings for few releases making it rather useless for RTL documents).

I suppose we should do the same for “Asian” support, but I don’t know
much about how this is used so will not touch it for now.

And the heuristic can go since this is now is enabled by default. If
someone wants to disable this, we shouldn’t second guess him.

Change-Id: Idae72d91d422ac8d18875d87dc66ab4921956fe6
Reviewed-on: https://gerrit.libreoffice.org/32356Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarKhaled Hosny <khaledhosny@eglug.org>
üst 753d55f8
......@@ -111,7 +111,7 @@ SvtCTLOptions_Impl::SvtCTLOptions_Impl() :
utl::ConfigItem("Office.Common/I18N/CTL"),
m_bIsLoaded ( false ),
m_bCTLFontEnabled ( false ),
m_bCTLFontEnabled ( true ),
m_bCTLSequenceChecking ( false ),
m_bCTLRestricted ( false ),
m_bCTLTypeAndReplace ( false ),
......@@ -279,43 +279,6 @@ void SvtCTLOptions_Impl::Load()
}
}
if (!m_bCTLFontEnabled)
{
SvtScriptType nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage(LANGUAGE_SYSTEM);
//system locale is CTL
bool bAutoEnableCTL = bool(nScriptType & SvtScriptType::COMPLEX);
LanguageType eSystemLanguage = LANGUAGE_SYSTEM;
if (!bAutoEnableCTL)
{
SvtSystemLanguageOptions aSystemLocaleSettings;
//windows secondary system locale is CTL
eSystemLanguage = aSystemLocaleSettings.GetWin16SystemLanguage();
if (eSystemLanguage != LANGUAGE_SYSTEM)
{
SvtScriptType nWinScript = SvtLanguageOptions::GetScriptTypeOfLanguage( eSystemLanguage );
bAutoEnableCTL = bool(nWinScript & SvtScriptType::COMPLEX);
}
//CTL keyboard is installed
if (!bAutoEnableCTL)
bAutoEnableCTL = aSystemLocaleSettings.isCTLKeyboardLayoutInstalled();
}
if (bAutoEnableCTL)
{
m_bCTLFontEnabled = true;
sal_uInt16 nLanguage = SvtSysLocale().GetLanguageTag().getLanguageType();
//enable sequence checking for the appropriate languages
m_bCTLSequenceChecking = m_bCTLRestricted = m_bCTLTypeAndReplace =
(MsLangId::needsSequenceChecking( nLanguage) ||
MsLangId::needsSequenceChecking( eSystemLanguage));
Commit();
}
}
m_bIsLoaded = true;
}
void SvtCTLOptions_Impl::SetCTLFontEnabled( bool _bEnabled )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment