[Libreoffice-commits] core.git: cui/uiconfig sw/source
Khaled Hosny
khaledhosny at eglug.org
Sat Mar 24 20:30:08 UTC 2018
cui/uiconfig/ui/asiantypography.ui | 2 +-
sw/source/core/text/itrform2.cxx | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
New commits:
commit 7024f73e088b741a3024f6934d04620d7ed73de4
Author: Khaled Hosny <khaledhosny at eglug.org>
Date: Tue Mar 13 13:08:14 2018 +0200
tdf#97622: Apply Asian spacing only to Asian text
The option “Apply spacing between Asian, Latin and complex text” (which
is on by default) should only apply the extra spacing if one side of the
text is Asian since that is the requirement of CJK typography, but
Writer seems to apply it to any script change (e.g. between CTL and
Western).
This matches the behaviour in edit engine wich was changed back in 2002
in commit e314e1b8aa3f1d98f2b33ce3f546d07eafa0f799.
Change-Id: Ia9f7167251bce7166c4087b347788a7b89e8b347
Reviewed-on: https://gerrit.libreoffice.org/51208
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny at eglug.org>
diff --git a/cui/uiconfig/ui/asiantypography.ui b/cui/uiconfig/ui/asiantypography.ui
index 55e41bec2eb6..fad6ecf9c977 100644
--- a/cui/uiconfig/ui/asiantypography.ui
+++ b/cui/uiconfig/ui/asiantypography.ui
@@ -54,7 +54,7 @@
</child>
<child>
<object class="GtkCheckButton" id="checkApplySpacing">
- <property name="label" translatable="yes" context="asiantypography|checkApplySpacing">Apply spacing between Asian, Latin and complex text</property>
+ <property name="label" translatable="yes" context="asiantypography|checkApplySpacing">Apply spacing between Asian and non-Asian text</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index fd91902a920c..7fc2ae4005df 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -606,7 +606,9 @@ void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf )
// to 20% of the fontheight.
sal_Int32 nTmp = rInf.GetIdx() + pPor->GetLen();
if( nTmp == m_pScriptInfo->NextScriptChg( nTmp - 1 ) &&
- nTmp != rInf.GetText().getLength() )
+ nTmp != rInf.GetText().getLength() &&
+ (m_pScriptInfo->ScriptType(nTmp - 1) == css::i18n::ScriptType::ASIAN ||
+ m_pScriptInfo->ScriptType(nTmp) == css::i18n::ScriptType::ASIAN) )
{
const sal_uInt16 nDist = static_cast<sal_uInt16>(rInf.GetFont()->GetHeight()/5);
More information about the Libreoffice-commits
mailing list