Kaydet (Commit) 2c0a33f5 authored tarafından Caolán McNamara's avatar Caolán McNamara

forcepoint#49 survive more kashidas than expected

Change-Id: I66aa5389b3d80d1fe2f6898e8920eb37ca064381
Reviewed-on: https://gerrit.libreoffice.org/56468Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 23c41663
...@@ -132,9 +132,10 @@ static bool lcl_CheckKashidaPositions( SwScriptInfo& rSI, SwTextSizeInfo& rInf, ...@@ -132,9 +132,10 @@ static bool lcl_CheckKashidaPositions( SwScriptInfo& rSI, SwTextSizeInfo& rInf,
// kashida positions found in SwScriptInfo are not necessarily valid in every font // 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 // 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> aKashidaPos;
std::vector<TextFrameIndex> aKashidaPosDropped(rKashidas);
rSI.GetKashidaPositions(nIdx, rItr.GetLength(), 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; sal_Int32 nKashidaIdx = 0;
while ( rKashidas && nIdx < nEnd ) while ( rKashidas && nIdx < nEnd )
{ {
......
...@@ -1994,7 +1994,7 @@ void SwScriptInfo::GetKashidaPositions( ...@@ -1994,7 +1994,7 @@ void SwScriptInfo::GetKashidaPositions(
{ {
if ( nEnd <= GetKashida( nCntKashEnd ) ) if ( nEnd <= GetKashida( nCntKashEnd ) )
break; break;
rKashidaPosition[nCntKashEnd - nCntKash] = GetKashida(nCntKashEnd); rKashidaPosition.push_back(GetKashida(nCntKashEnd));
nCntKashEnd++; nCntKashEnd++;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment