summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2016-12-22 23:12:14 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2016-12-25 08:55:07 +0000
commit23b92427e3c77fa8d04679ddcaf2dbd3e3580c5d (patch)
tree2ecd1ee02caeb71e0525f672756ed42f41219f78 /svl
parent753d55f816161d1016fd3e4b7e65bd4b10a2a9a8 (diff)
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/32356 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
Diffstat (limited to 'svl')
-rw-r--r--svl/source/config/ctloptions.cxx39
1 files changed, 1 insertions, 38 deletions
diff --git a/svl/source/config/ctloptions.cxx b/svl/source/config/ctloptions.cxx
index cc4604004f3b..3160af3651c1 100644
--- a/svl/source/config/ctloptions.cxx
+++ b/svl/source/config/ctloptions.cxx
@@ -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 )