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: خالد حسني <khaled@aliftype.com>
This commit is contained in:
Khaled Hosny
2023-03-16 14:20:45 +02:00
committed by خالد حسني
parent cea9c205ce
commit a8725c24fa
2 changed files with 2 additions and 2 deletions

View File

@@ -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;
}

View File

@@ -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;
}