Handle all-space corner case

Change-Id: I07981a63a30ac3d610be03e736188a6539884f01
This commit is contained in:
Stephan Bergmann 2014-05-09 09:17:25 +02:00
parent d5874376a7
commit 51030a1a5e

View file

@ -175,7 +175,8 @@ void CTLayout::AdjustLayout( ImplLayoutArgs& rArgs )
if(rArgs.mpDXArray)
{
int nFullPixelWidth = nPixelWidth;
nPixelWidth = rArgs.mpDXArray[ mnCharCount - mnTrailingSpaceCount - 1];
nPixelWidth = mnTrailingSpaceCount == mnCharCount
? 0 : rArgs.mpDXArray[ mnCharCount - mnTrailingSpaceCount - 1];
mfTrailingSpaceWidth = nFullPixelWidth - nPixelWidth;
}
else