sw/source/core/text/itrform2.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 8783f5959c83a4de3b857af3e63d5f3e5d3afdf2
Author:     Khaled Hosny <kha...@libreoffice.org>
AuthorDate: Mon May 29 15:31:44 2023 +0300
Commit:     خالد حسني <kha...@libreoffice.org>
CommitDate: Mon May 29 17:52:54 2023 +0200

    tdf#89288: Insert space between CJK and non-CJK text only
    
    When “Apply spacing between Asian and non-Asian text” option is set
    (which is the default), Writer inserts text between any two script
    changes which is not desired.
    
    Change-Id: I9abb672b761a5f25f714cf60cf06c7dab5441af3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152369
    Tested-by: Jenkins
    Reviewed-by: خالد حسني <kha...@libreoffice.org>

diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 1eae79dc4125..8563c6c22d7d 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -534,6 +534,8 @@ void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf 
)
                 nLstHeight /= 5;
                 // does the kerning portion still fit into the line?
                 if( bAllowBefore && ( nLstActual != nNxtActual ) &&
+                    // tdf#89288 we want to insert space between CJK and 
non-CJK text only.
+                    ( nLstActual == SwFontScript::CJK || nNxtActual == 
SwFontScript::CJK ) &&
                     nLstHeight && rInf.X() + nLstHeight <= rInf.Width() &&
                     ! pPor->InTabGrp() )
                 {

Reply via email to