[Libreoffice-commits] core.git: svl/source

Khaled Hosny khaledhosny at eglug.org
Sun Dec 25 08:55:28 UTC 2016


 svl/source/config/ctloptions.cxx |   39 +--------------------------------------
 1 file changed, 1 insertion(+), 38 deletions(-)

New commits:
commit 23b92427e3c77fa8d04679ddcaf2dbd3e3580c5d
Author: Khaled Hosny <khaledhosny at eglug.org>
Date:   Thu Dec 22 23:12:14 2016 +0200

    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 at libreoffice.org>
    Reviewed-by: Khaled Hosny <khaledhosny at eglug.org>

diff --git a/svl/source/config/ctloptions.cxx b/svl/source/config/ctloptions.cxx
index cc46040..3160af3 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 )


More information about the Libreoffice-commits mailing list