summaryrefslogtreecommitdiff
path: root/sw/source/core/text
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2011-11-28 11:51:42 +0100
committerThorsten Behrens <tbehrens@suse.com>2011-11-28 11:54:17 +0100
commitd13e9baca52a9e8f07312ee03915bcdeac1ab4cd (patch)
treec402193fdbfd8e4098c864bc9eb2b4c043feb453 /sw/source/core/text
parentdabe836c6ed66c5740582c17dbc39b2196608e6d (diff)
Fix Kashida justification when there is no Kashida glyph
Diffstat (limited to 'sw/source/core/text')
-rw-r--r--sw/source/core/text/itradj.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sw/source/core/text/itradj.cxx b/sw/source/core/text/itradj.cxx
index 925bee668ba0..92eb70b653f2 100644
--- a/sw/source/core/text/itradj.cxx
+++ b/sw/source/core/text/itradj.cxx
@@ -164,6 +164,10 @@ bool lcl_CheckKashidaPositions( SwScriptInfo& rSI, SwTxtSizeInfo& rInf, SwTxtIte
xub_StrLen nKashidasInAttr = rSI.KashidaJustify ( 0, 0, nIdx, nNext - nIdx );
if ( nKashidasInAttr )
{
+ // Kashida glyph looks suspicious, skip Kashida justification
+ if ( rInf.GetOut()->GetMinKashida() <= 0 )
+ return false;
+
xub_StrLen nKashidasDropped = 0;
if ( !SwScriptInfo::IsArabicText( rInf.GetTxt(), nIdx, nNext - nIdx ) )
{