vcl/source/gdi/sallayout.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
New commits: commit 30a98a585102793b4bc77c4ba4706f8199cfe85e Author: Oliver-Rainer Wittmann <o...@apache.org> Date: Tue Jun 11 10:02:35 2013 +0000 limit next codepoint index to the minindex..endindex bounds Patch by: hdu (cherry picked from commit 6115cd0bf8ef8d7e063615636175e148c8d57da1) Change-Id: I62265b3021f86bee1f78a79a2c668c1ce09c5521 diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx index bd7a326..4be0ce7 100644 --- a/vcl/source/gdi/sallayout.cxx +++ b/vcl/source/gdi/sallayout.cxx @@ -1731,15 +1731,23 @@ void MultiSalLayout::AdjustLayout( ImplLayoutArgs& rArgs ) } mnLevel = nLevel; - // merge the fallback levels + // prepare merge the fallback levels long nXPos = 0; double fUnitMul = 1.0; for( n = 0; n < nLevel; ++n ) maFallbackRuns[n].ResetPos(); + // get the next codepoint index that needs fallback + // and limit it to the minindex..endindex bounds int nActiveCharPos = nCharPos[0]; + if( nActiveCharPos < mnMinCharPos) + nActiveCharPos = mnMinCharPos; + else if( nActiveCharPos >= rArgs.mnEndCharPos ) + nActiveCharPos = rArgs.mnEndCharPos - 1; + // get the end index of the active run int nLastRunEndChar = (vRtl[nActiveCharPos - mnMinCharPos])? rArgs.mnEndCharPos : rArgs.mnMinCharPos - 1; int nRunVisibleEndChar = nCharPos[0]; + // merge the fallback levels while( nValid[0] && (nLevel > 0)) { // find best fallback level _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits