path: root/sw/source/core/text/portxt.cxx
diff options
authorKhaled Hosny <>2019-03-21 15:00:22 +0200
committerXisco FaulĂ­ <>2019-03-22 10:02:28 +0100
commitbe189bfc1709dce48111eed49d847c05ef82164e (patch)
treea6709a495b96f39ce36c25e4f0563b4c40af6f92 /sw/source/core/text/portxt.cxx
parentdf3fed52760a72b2a729f7b685adaa2da86d7f76 (diff)
tdf#124109: Revert "Only do kashida insertion with fonts that have non-zero width kashidas"
This reverts commit c45b23377bb2fe44c26f1287ff38495344e4ca50. This commit breaks Kashida justification when a document is first opened (the kashida justification will be disabled and spaces will be used untill the text is changed). Probably it is checking for width of Kashida glyph too early. Also I'm not sure what the reverted commit was trying to fix since we already do kashida justification in fonts that has non-zero width Kashida and it has been the case for a long time. This does not fix the original issue in the document attched with the bug report, but if fixes kashida not being applied when opening the document. Change-Id: Ic95859bca94fa792793e3223d2adb465bc6d880f Reviewed-on: Tested-by: Jenkins Reviewed-by: Xisco FaulĂ­ <> (cherry picked from commit 0a8e9cc5c1782f1cd50ef338ec2aa4f6776a4c0e) Reviewed-on: Reviewed-by: Khaled Hosny <>
Diffstat (limited to 'sw/source/core/text/portxt.cxx')
1 files changed, 1 insertions, 2 deletions
diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx
index 69593f8d157c..f520130458e2 100644
--- a/sw/source/core/text/portxt.cxx
+++ b/sw/source/core/text/portxt.cxx
@@ -115,8 +115,7 @@ static TextFrameIndex lcl_AddSpace(const SwTextSizeInfo &rInf,
// Kashida Justification: Insert Kashidas
if ( nEnd > nPos && pSI && COMPLEX == nScript )
- if ( SwScriptInfo::IsArabicText( *pStr, nPos, nEnd - nPos ) && rInf.GetOut()->GetMinKashida()
- && pSI->CountKashida() )
+ if ( SwScriptInfo::IsArabicText( *pStr, nPos, nEnd - nPos ) && pSI->CountKashida() )
const sal_Int32 nKashRes = pSI->KashidaJustify( nullptr, nullptr, nPos, nEnd - nPos );
// i60591: need to check result of KashidaJustify