diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-08-20 20:55:25 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-08-21 08:04:43 +0100 |
commit | 684a210dd44ba5bb239eb07842ced767059a3fb8 (patch) | |
tree | 3062aa30642e5c4f851b697004da70e89d33771e /sw | |
parent | 18e4f434d0cdb3c81cb90c7dd24ca3fefcca8d00 (diff) |
clip text to skip to max text available
Change-Id: I5c5c033954d5b6f869a05f19f312f9330df74efb
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/core/data/ww8/pass/hang-5.doc | bin | 0 -> 47616 bytes | |||
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 3 |
2 files changed, 2 insertions, 1 deletions
diff --git a/sw/qa/core/data/ww8/pass/hang-5.doc b/sw/qa/core/data/ww8/pass/hang-5.doc Binary files differnew file mode 100644 index 000000000000..c9d56711abd4 --- /dev/null +++ b/sw/qa/core/data/ww8/pass/hang-5.doc diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 21791a99457f..0d0fb1e54b86 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -3783,8 +3783,9 @@ long SwWW8ImplReader::ReadTextAttr(WW8_CP& rTextPos, long nTextEnd, bool& rbStar (aRes.nSprmId == eFLD) || (aRes.nSprmId == eAND) ) { + WW8_CP nMaxLegalSkip = nTextEnd - rTextPos; // Skip Field/Footnote-/End-Note here - rTextPos += nSkipChars; + rTextPos += std::min<WW8_CP>(nSkipChars, nMaxLegalSkip); nSkipPos = rTextPos-1; } } |