Kaydet (Commit) 6cd04e9e authored tarafından Mark Hung's avatar Mark Hung Kaydeden (comit) Norbert Thiebaud

Fix tdf#64975: FORMATTING: autoIndent for Chinese should be two

characters. Now it detects CJK language and ident accordingly:
2 chars for Chinese and 1 chars for the others (Japanese and Korean).

Change-Id: Ib722e90ecae615faa7887ce1c874aacbb93f8a5e
Reviewed-on: https://gerrit.libreoffice.org/17614Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNorbert Thiebaud <nthiebaud@gmail.com>
üst 26d8d33f
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
#include "crstate.hxx" #include "crstate.hxx"
#include <pormulti.hxx> #include <pormulti.hxx>
#include <numrule.hxx> #include <numrule.hxx>
#include <com/sun/star/i18n/ScriptType.hpp>
// Not reentrant !!! // Not reentrant !!!
// is set in GetCharRect and is interpreted in UnitUp/Down. // is set in GetCharRect and is interpreted in UnitUp/Down.
...@@ -247,6 +248,10 @@ void SwTextMargin::CtorInitTextMargin( SwTextFrm *pNewFrm, SwTextSizeInfo *pNewI ...@@ -247,6 +248,10 @@ void SwTextMargin::CtorInitTextMargin( SwTextFrm *pNewFrm, SwTextSizeInfo *pNewI
rSpace.IsAutoFirst() ) rSpace.IsAutoFirst() )
{ {
nFirstLineOfs = GetFnt()->GetSize( GetFnt()->GetActual() ).Height(); nFirstLineOfs = GetFnt()->GetSize( GetFnt()->GetActual() ).Height();
LanguageType aLang = pNode->GetLang( 0, 1, css::i18n::ScriptType::ASIAN);
if (aLang != LANGUAGE_KOREAN && aLang != LANGUAGE_JAPANESE)
nFirstLineOfs<<=1;
const SvxLineSpacingItem *pSpace = aLineInf.GetLineSpacing(); const SvxLineSpacingItem *pSpace = aLineInf.GetLineSpacing();
if( pSpace ) if( pSpace )
{ {
......
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