[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/source

Oliver-Rainer Wittmann orw at apache.org
Tue Jun 11 03:07:13 PDT 2013


 vcl/source/gdi/sallayout.cxx |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 6115cd0bf8ef8d7e063615636175e148c8d57da1
Author: Oliver-Rainer Wittmann <orw at apache.org>
Date:   Tue Jun 11 10:02:35 2013 +0000

    method <MultiSalLayout::AdjustLayout(..)> - limit next codepoint index to the minindex..endindex bounds
    
    Patch by: hdu

diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index c800403..b858517 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -1863,15 +1863,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


More information about the Libreoffice-commits mailing list