From 6cd04e9ea447a4828a6fc03d47a7d136f3914501 Mon Sep 17 00:00:00 2001 From: Mark Hung Date: Sun, 9 Aug 2015 22:55:06 +0800 Subject: 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/17614 Tested-by: Jenkins Reviewed-by: Norbert Thiebaud --- sw/source/core/text/itrcrsr.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx index 65a279d6d88e..746e5622db99 100644 --- a/sw/source/core/text/itrcrsr.cxx +++ b/sw/source/core/text/itrcrsr.cxx @@ -46,6 +46,7 @@ #include "crstate.hxx" #include #include +#include // Not reentrant !!! // is set in GetCharRect and is interpreted in UnitUp/Down. @@ -247,6 +248,10 @@ void SwTextMargin::CtorInitTextMargin( SwTextFrm *pNewFrm, SwTextSizeInfo *pNewI rSpace.IsAutoFirst() ) { 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(); if( pSpace ) { -- cgit v1.2.3