vcl/source/gdi/sallayout.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit 92eed31707e655e484e263fee2b0c0ae93d73748 Author: Caolán McNamara <caol...@redhat.com> Date: Fri Oct 2 11:25:29 2015 +0100 Resolves: tdf#92993 access violation on particular .docx on glyph layout Change-Id: I69dfd6747e37ddb1727dd41b99d1b70eaed83425 (cherry picked from commit ae850353151cd6a79f7b4a012d0a411013c841a4) Reviewed-on: https://gerrit.libreoffice.org/19095 Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk> Tested-by: Miklos Vajna <vmik...@collabora.co.uk> diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx index 69d162f..4bd388d 100644 --- a/vcl/source/gdi/sallayout.cxx +++ b/vcl/source/gdi/sallayout.cxx @@ -1720,8 +1720,9 @@ void MultiSalLayout::AdjustLayout( ImplLayoutArgs& rArgs ) maFallbackRuns[n].ResetPos(); // get the next codepoint index that needs fallback int nActiveCharPos = nCharPos[0]; + int nActiveCharIndex = nActiveCharPos - mnMinCharPos; // get the end index of the active run - int nLastRunEndChar = (vRtl[nActiveCharPos - mnMinCharPos])? + int nLastRunEndChar = (nActiveCharIndex >= 0 && vRtl[nActiveCharIndex]) ? rArgs.mnEndCharPos : rArgs.mnMinCharPos - 1; int nRunVisibleEndChar = nCharPos[0]; // merge the fallback levels @@ -1870,7 +1871,8 @@ void MultiSalLayout::AdjustLayout( ImplLayoutArgs& rArgs ) if( !bLTR ) nOldRunAdv = -nOldRunAdv; #endif - if (vRtl[nActiveCharPos - mnMinCharPos]) + nActiveCharIndex = nActiveCharPos - mnMinCharPos; + if (nActiveCharIndex >= 0 && vRtl[nActiveCharIndex]) { if (nRunVisibleEndChar > mnMinCharPos && nRunVisibleEndChar <= mnEndCharPos) nRunAdvance -= aMultiArgs.mpDXArray[nRunVisibleEndChar - 1 - mnMinCharPos];
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits