sw/source/core/text/porfld.cxx | 2 ++ sw/source/core/text/porlay.cxx | 10 ++++++++++ 2 files changed, 12 insertions(+)
New commits: commit 1b9d9a8bb640b7883c143cb39e3024be86528977 Author: Miklos Vajna <[email protected]> Date: Tue May 2 09:21:51 2017 +0200 Revert "tdf#107204: Make sure we always do Unicode Bidi" This reverts commit e3b7ef45d4364fda15691b5748a9a88bc908afc6, 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 diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx index 955aaa52f2f5..3821625a238e 100644 --- a/sw/source/core/text/porfld.cxx +++ b/sw/source/core/text/porfld.cxx @@ -228,6 +228,8 @@ void SwFieldPortion::CheckScript( const SwTextSizeInfo &rInf ) rSI.GetDefaultDir() : rSI.DirType( IsFollow() ? rInf.GetIdx() - 1 : rInf.GetIdx() ); + bool bPerformUBA = UBIDI_LTR != nFieldDir || i18n::ScriptType::COMPLEX == nScript; + if (bPerformUBA) { UErrorCode nError = U_ZERO_ERROR; UBiDi* pBidi = ubidi_openSized( aText.getLength(), 0, &nError ); diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx index 97c11ba5ecb7..2b3fcecc436d 100644 --- a/sw/source/core/text/porlay.cxx +++ b/sw/source/core/text/porlay.cxx @@ -1184,6 +1184,16 @@ void SwScriptInfo::InitScriptInfo( const SwTextNode& rNode, bool bRTL ) aDirectionChanges.clear(); // 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 ); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
