svx/source/dialog/fntctrl.cxx                    |    2 +-
 svx/source/styles/CommonStylePreviewRenderer.cxx |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit a8725c24fa4d89ec2efddf6f341d403abf79865a
Author:     Khaled Hosny <kha...@aliftype.com>
AuthorDate: Thu Mar 16 14:20:45 2023 +0200
Commit:     خالد حسني <kha...@aliftype.com>
CommitDate: Thu Mar 16 15:27:36 2023 +0000

    tdf#153704: Make sure the last script segment is also added
    
    Change-Id: Id6381d77cdf05c24a1b557206f530f4e004e8e52
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148986
    Tested-by: Jenkins
    Reviewed-by: خالد حسني <kha...@aliftype.com>

diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx
index 031eb7dabc91..ba372d92f0d3 100644
--- a/svx/source/dialog/fntctrl.cxx
+++ b/svx/source/dialog/fntctrl.cxx
@@ -252,7 +252,7 @@ void FontPrevWin_Impl::CheckScript()
         auto aNextScript = aEditEngine.GetScriptType({ 0, i, 0, i });
         if (aNextScript != aScript)
             maScriptChanges.emplace_back(aScript, i - 1);
-        else if (i == maScriptText.getLength())
+        if (i == maScriptText.getLength())
             maScriptChanges.emplace_back(aScript, i);
         aScript = aNextScript;
     }
diff --git a/svx/source/styles/CommonStylePreviewRenderer.cxx 
b/svx/source/styles/CommonStylePreviewRenderer.cxx
index 0ca34abe9a36..c23861e92a72 100644
--- a/svx/source/styles/CommonStylePreviewRenderer.cxx
+++ b/svx/source/styles/CommonStylePreviewRenderer.cxx
@@ -420,7 +420,7 @@ void CommonStylePreviewRenderer::CheckScript()
         auto aNextScript = aEditEngine.GetScriptType({ 0, i, 0, i });
         if (aNextScript != aScript)
             maScriptChanges.emplace_back(aScript, i - 1);
-        else if (i == maScriptText.getLength())
+        if (i == maScriptText.getLength())
             maScriptChanges.emplace_back(aScript, i);
         aScript = aNextScript;
     }

Reply via email to