sw/source/core/text/porfld.cxx | 2 -- sw/source/core/text/porlay.cxx | 10 ---------- 2 files changed, 12 deletions(-)
New commits: commit e3b7ef45d4364fda15691b5748a9a88bc908afc6 Author: Khaled Hosny <khaledho...@eglug.org> Date: Wed Apr 19 23:40:04 2017 +0200 tdf#107204: Make sure we always do Unicode Bidi Writer seems to have an âoptimizationâ that only applies bidi algorithm if the text direction is nor LTR and there is some characters that we classify as complex script. This is a very simplistic optimization as evidenced by the bug above. We certainly don't want to skip bidi the text differently based on the default direction (whatever that means), and not all RTL scripts are complex ones, even if they are we might be behind Unicode in our script classification. Just trust that bidi algorithm does the right thing and donât do premature optimization. If this turns out to be a real performance issue, we will need to find a better optimization. Change-Id: Ic0423b61d54de937bded95b369dab50e8fdca0df Reviewed-on: https://gerrit.libreoffice.org/36704 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Eike Rathke <er...@redhat.com> diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx index 3821625a238e..955aaa52f2f5 100644 --- a/sw/source/core/text/porfld.cxx +++ b/sw/source/core/text/porfld.cxx @@ -228,8 +228,6 @@ 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 2b3fcecc436d..97c11ba5ecb7 100644 --- a/sw/source/core/text/porlay.cxx +++ b/sw/source/core/text/porlay.cxx @@ -1184,16 +1184,6 @@ 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 libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits