Kaydet (Commit) 1b9d9a8b authored tarafından Miklos Vajna's avatar Miklos Vajna

Revert "tdf#107204: Make sure we always do Unicode Bidi"

This reverts commit e3b7ef45, as it
breaks the testTableKeep part of CppunitTest_sw_ww8export on the
Jenkins_Callgrind tinderbox (and also for me locally) and there is no
fix in progress to address that.

See the bug for a comparision of the old/new layout for the problematic
testcase.

Khaled says it's OK to push this revert till it's clear how to fix the
bug without side-effects.

Change-Id: I669de98ffa8b519024e332ae468808d7e7243df2
üst 0dbf528c
...@@ -228,6 +228,8 @@ void SwFieldPortion::CheckScript( const SwTextSizeInfo &rInf ) ...@@ -228,6 +228,8 @@ void SwFieldPortion::CheckScript( const SwTextSizeInfo &rInf )
rSI.GetDefaultDir() : rSI.GetDefaultDir() :
rSI.DirType( IsFollow() ? rInf.GetIdx() - 1 : rInf.GetIdx() ); rSI.DirType( IsFollow() ? rInf.GetIdx() - 1 : rInf.GetIdx() );
bool bPerformUBA = UBIDI_LTR != nFieldDir || i18n::ScriptType::COMPLEX == nScript;
if (bPerformUBA)
{ {
UErrorCode nError = U_ZERO_ERROR; UErrorCode nError = U_ZERO_ERROR;
UBiDi* pBidi = ubidi_openSized( aText.getLength(), 0, &nError ); UBiDi* pBidi = ubidi_openSized( aText.getLength(), 0, &nError );
......
...@@ -1184,6 +1184,16 @@ void SwScriptInfo::InitScriptInfo( const SwTextNode& rNode, bool bRTL ) ...@@ -1184,6 +1184,16 @@ void SwScriptInfo::InitScriptInfo( const SwTextNode& rNode, bool bRTL )
aDirectionChanges.clear(); aDirectionChanges.clear();
// Perform Unicode Bidi Algorithm for text direction information // Perform Unicode Bidi Algorithm for text direction information
bool bPerformUBA = UBIDI_LTR != nDefaultDir;
nCnt = 0;
while( !bPerformUBA && nCnt < CountScriptChg() )
{
if ( i18n::ScriptType::COMPLEX == GetScriptType( nCnt++ ) )
bPerformUBA = true;
}
// do not call the unicode bidi algorithm if not required
if ( bPerformUBA )
{ {
UpdateBidiInfo( rText ); UpdateBidiInfo( rText );
......
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