[Libreoffice-commits] core.git: sw/source
Caolán McNamara
caolanm at redhat.com
Tue Jun 26 20:10:44 UTC 2018
sw/source/core/text/itradj.cxx | 5 +++--
sw/source/core/text/porlay.cxx | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
New commits:
commit 2c0a33f5003cc9791a79d54ff279eb734d2d065c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 26 12:59:24 2018 +0100
forcepoint#49 survive more kashidas than expected
Change-Id: I66aa5389b3d80d1fe2f6898e8920eb37ca064381
Reviewed-on: https://gerrit.libreoffice.org/56468
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/core/text/itradj.cxx b/sw/source/core/text/itradj.cxx
index 3e39f9fffd67..8383292105bc 100644
--- a/sw/source/core/text/itradj.cxx
+++ b/sw/source/core/text/itradj.cxx
@@ -132,9 +132,10 @@ static bool lcl_CheckKashidaPositions( SwScriptInfo& rSI, SwTextSizeInfo& rInf,
// kashida positions found in SwScriptInfo are not necessarily valid in every font
// if two characters are replaced by a ligature glyph, there will be no place for a kashida
- std::vector<TextFrameIndex> aKashidaPos(rKashidas);
- std::vector<TextFrameIndex> aKashidaPosDropped(rKashidas);
+ std::vector<TextFrameIndex> aKashidaPos;
rSI.GetKashidaPositions(nIdx, rItr.GetLength(), aKashidaPos);
+ assert(aKashidaPos.size() >= static_cast<size_t>(rKashidas));
+ std::vector<TextFrameIndex> aKashidaPosDropped(aKashidaPos.size());
sal_Int32 nKashidaIdx = 0;
while ( rKashidas && nIdx < nEnd )
{
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 689de7b4d907..108458804aa8 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -1994,7 +1994,7 @@ void SwScriptInfo::GetKashidaPositions(
{
if ( nEnd <= GetKashida( nCntKashEnd ) )
break;
- rKashidaPosition[nCntKashEnd - nCntKash] = GetKashida(nCntKashEnd);
+ rKashidaPosition.push_back(GetKashida(nCntKashEnd));
nCntKashEnd++;
}
}
More information about the Libreoffice-commits
mailing list