summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2016-11-06 22:06:44 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2016-11-06 22:34:04 +0200
commit4920ee168fd210483c7f404cc2b41a00a265139f (patch)
tree9ebbb3c69eafec4537b679cb626cadcbf55cebf8 /sw
parentba28100d8103e08832cf646f674eaf6afd480512 (diff)
Insert Kasida before final Heh not Hah
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
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/text/porlay.cxx6
1 files 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" );