From 4920ee168fd210483c7f404cc2b41a00a265139f Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Sun, 6 Nov 2016 22:06:44 +0200 Subject: [PATCH] Insert Kasida before final Heh not Hah MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This code seems to follow the algorithm described in: https://www.microsoft.com/middleeast/msdn/JustifyingText-CSS.aspx But there seem to be a confusion due to the transliteration used there, Haa can be the standard Arabic name for U+0647 ARABIC LETTER HEH or U+062D ARABIC LETTER HAH. The code is using the later, but I’m pretty sure it is the former given that the other character in this priority is Teh Marbuta, which is a Heh-like character. Also before final Hah is a bad place for kashida. Change-Id: I9ad3fc432ac58f0e45c562a6b44ac5cbe751c3bf --- sw/source/core/text/porlay.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx index 7850763b095c..30b3cbc5cf0a 100644 --- a/sw/source/core/text/porlay.cxx +++ b/sw/source/core/text/porlay.cxx @@ -66,7 +66,7 @@ using namespace i18n::ScriptType; #define isDalChar(c) IS_JOINING_GROUP((c), DAL) #define isFehChar(c) IS_JOINING_GROUP((c), FEH) #define isGafChar(c) IS_JOINING_GROUP((c), GAF) -#define isHahChar(c) IS_JOINING_GROUP((c), HAH) +#define isHehChar(c) IS_JOINING_GROUP((c), HEH) #define isKafChar(c) IS_JOINING_GROUP((c), KAF) #define isLamChar(c) IS_JOINING_GROUP((c), LAM) #define isQafChar(c) IS_JOINING_GROUP((c), QAF) @@ -971,12 +971,12 @@ void SwScriptInfo::InitScriptInfo( const SwTextNode& rNode, bool bRTL ) } // 3. Priority: - // before final form of Teh Marbuta, Hah, Dal + // before final form of Teh Marbuta, Heh, Dal if ( nPriorityLevel >= 2 && nIdx > 0 ) { if ( isTehMarbutaChar ( cCh ) || // Teh Marbuta (right joining) isDalChar ( cCh ) || // Dal (right joining) final form may appear in the middle of word - ( isHahChar ( cCh ) && nIdx == nWordLen - 1)) // Hah (dual joining) only at end of word + ( isHehChar ( cCh ) && nIdx == nWordLen - 1)) // Heh (dual joining) only at end of word { SAL_WARN_IF( 0 == cPrevCh, "sw.core", "No previous character" );