summaryrefslogtreecommitdiff
path: root/sw/source/core/text/itradj.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/text/itradj.cxx')
-rw-r--r--sw/source/core/text/itradj.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/sw/source/core/text/itradj.cxx b/sw/source/core/text/itradj.cxx
index f82a3f6d1df2..29ee5e81a438 100644
--- a/sw/source/core/text/itradj.cxx
+++ b/sw/source/core/text/itradj.cxx
@@ -112,6 +112,9 @@ void SwTextAdjuster::FormatBlock( )
static bool lcl_CheckKashidaPositions( SwScriptInfo& rSI, SwTextSizeInfo& rInf, SwTextIter& rItr,
sal_Int32& rKashidas, sal_Int32& nGluePortion )
{
+ if ( rInf.GetOut()->GetMinKashida() <= 0 )
+ return false;
+
// i60594 validate Kashida justification
sal_Int32 nIdx = rItr.GetStart();
sal_Int32 nEnd = rItr.GetEnd();
@@ -148,12 +151,6 @@ static bool lcl_CheckKashidaPositions( SwScriptInfo& rSI, SwTextSizeInfo& rInf,
sal_Int32 nKashidasInAttr = rSI.KashidaJustify ( nullptr, nullptr, nIdx, nNext - nIdx );
if (nKashidasInAttr > 0)
{
- // Kashida glyph looks suspicious, skip Kashida justification
- if ( rInf.GetOut()->GetMinKashida() <= 0 )
- {
- return false;
- }
-
sal_Int32 nKashidasDropped = 0;
if ( !SwScriptInfo::IsArabicText( rInf.GetText(), nIdx, nNext - nIdx ) )
{
@@ -211,7 +208,7 @@ static bool lcl_CheckKashidaWidth ( SwScriptInfo& rSI, SwTextSizeInfo& rInf, SwT
sal_Int32 nKashidasInAttr = rSI.KashidaJustify ( nullptr, nullptr, nIdx, nNext - nIdx );
long nFontMinKashida = rInf.GetOut()->GetMinKashida();
- if ( nFontMinKashida && nKashidasInAttr > 0 && SwScriptInfo::IsArabicText( rInf.GetText(), nIdx, nNext - nIdx ) )
+ if ( nKashidasInAttr > 0 && SwScriptInfo::IsArabicText( rInf.GetText(), nIdx, nNext - nIdx ) )
{
sal_Int32 nKashidasDropped = 0;
while ( rKashidas && nGluePortion && nKashidasInAttr > 0 &&