Author: orw
Date: Tue Jun 11 10:02:35 2013
New Revision: 1491721
URL: http://svn.apache.org/r1491721
Log:
method <MultiSalLayout::AdjustLayout(..)> - limit next codepoint index to the
minindex..endindex bounds
Patch by: hdu
Modified:
openoffice/trunk/main/vcl/source/gdi/sallayout.cxx
Modified: openoffice/trunk/main/vcl/source/gdi/sallayout.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/source/gdi/sallayout.cxx?rev=1491721&r1=1491720&r2=1491721&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/source/gdi/sallayout.cxx (original)
+++ openoffice/trunk/main/vcl/source/gdi/sallayout.cxx Tue Jun 11 10:02:35 2013
@@ -1863,15 +1863,23 @@ void MultiSalLayout::AdjustLayout( ImplL
}
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