diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/text/porfld.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx index d28992fbd079..1ede147f5ef7 100644 --- a/sw/source/core/text/porfld.cxx +++ b/sw/source/core/text/porfld.cxx @@ -242,7 +242,9 @@ void SwFldPortion::CheckScript( const SwTxtSizeInfo &rInf ) const sal_uInt8 nFldDir = ( IsNumberPortion() || IsFtnNumPortion() ) ? rSI.GetDefaultDir() : rSI.DirType( IsFollow() ? rInf.GetIdx() - 1 : rInf.GetIdx() ); - if ( UBIDI_RTL == nFldDir ) + + bool bPerformUBA = UBIDI_LTR != nFldDir ? true : i18n::ScriptType::COMPLEX == nScript; + if (bPerformUBA) { UErrorCode nError = U_ZERO_ERROR; UBiDi* pBidi = ubidi_openSized( aTxt.Len(), 0, &nError ); @@ -272,8 +274,16 @@ void SwFldPortion::CheckScript( const SwTxtSizeInfo &rInf ) } } - if ( nCurrDir == UBIDI_RTL ) + if (nCurrDir == UBIDI_RTL) + { nTmp = SW_CTL; + //If we decided that this range was RTL after all and the + //previous range was complex but clipped to the start of this + //range, then extend it to be complex over the additional RTL + //range + if (nScript == i18n::ScriptType::COMPLEX) + nNextScriptChg = nNextDirChg; + } } // #i98418# |