sw/qa/core/data/ww8/pass/hang-5.doc |binary sw/source/filter/ww8/ww8par.cxx | 5 +++-- 2 files changed, 3 insertions(+), 2 deletions(-)
New commits: commit c859dde22469c683337220765e764b5198d00158 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Aug 20 20:55:25 2015 +0100 clip text to skip to max text available (cherry picked from commit 684a210dd44ba5bb239eb07842ced767059a3fb8) Change-Id: I5c5c033954d5b6f869a05f19f312f9330df74efb Reviewed-on: https://gerrit.libreoffice.org/17886 Reviewed-by: David Tardon <dtar...@redhat.com> Tested-by: David Tardon <dtar...@redhat.com> diff --git a/sw/qa/core/data/ww8/pass/hang-5.doc b/sw/qa/core/data/ww8/pass/hang-5.doc new file mode 100644 index 0000000..c9d5671 Binary files /dev/null and b/sw/qa/core/data/ww8/pass/hang-5.doc differ diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index b7c8bbb..8f8c00b 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -3783,8 +3783,9 @@ long SwWW8ImplReader::ReadTextAttr(WW8_CP& rTxtPos, long nTextEnd, bool& rbStart (aRes.nSprmId == eFLD) || (aRes.nSprmId == eAND) ) { - // Skip Field/Ftn-/End-Note here - rTxtPos += nSkipChars; + WW8_CP nMaxLegalSkip = nTextEnd - rTxtPos; + // Skip Field/Footnote-/End-Note here + rTxtPos += std::min<WW8_CP>(nSkipChars, nMaxLegalSkip); nSkipPos = rTxtPos-1; } }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits