[Libreoffice-commits] core.git: sw/source

Khaled Hosny khaledhosny at eglug.org
Tue May 2 07:41:28 UTC 2017


 sw/source/core/text/porfld.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit a45494dfb3176af82cec0592c8d75685e7beecca
Author: Khaled Hosny <khaledhosny at eglug.org>
Date:   Fri Apr 28 09:26:05 2017 +0200

    Don’t mark any field without strong LTR text CTL
    
    Regression from e3b7ef45d4364fda15691b5748a9a88bc908afc6 which removed
    the condition this block was implying, so putting it back here.
    
    This should fix Jenkins_Callgrind tinderbox, we probably should have
    some unit tests based on the file from [1] and [2], but I don’t know
    how…
    
    1. https://bz.apache.org/ooo/show_bug.cgi?id=89825
    2. sw/qa/extras/ww8export/data/tdf91083.odt
    
    Change-Id: I88ad2564908b3a269e95d1969366c8506801818b
    Reviewed-on: https://gerrit.libreoffice.org/37050
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 955aaa52f2f5..9ec460439543 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -241,7 +241,8 @@ void SwFieldPortion::CheckScript( const SwTextSizeInfo &rInf )
 
             // #i89825# change the script type also to CTL
             // if there is no strong LTR char in the LTR run (numbers)
-            if ( nCurrDir != UBIDI_RTL )
+            if (nCurrDir != UBIDI_RTL &&
+                (UBIDI_LTR != nFieldDir || i18n::ScriptType::COMPLEX == nScript))
             {
                 nCurrDir = UBIDI_RTL;
                 for( sal_Int32 nCharIdx = 0; nCharIdx < nEnd; ++nCharIdx )


More information about the Libreoffice-commits mailing list