Kaydet (Commit) deaa86b2 authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: fdo#56554 hyphen in RTL date field split RTL processing

If we split a range into complex and non-complex, and then decide
that the non-complex range is RTL after all, then extend the
original complex range to cover the additional RTL sequence.

Which keeps the full chunk together to be processed correctly

Change-Id: I66a5d585cb22fdb5b6c1de2a8665a9c2c9134f88
üst 99338b4b
......@@ -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#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment