[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - sw/qa sw/source

Caolán McNamara caolanm at redhat.com
Fri Aug 21 07:22:17 PDT 2015


 sw/qa/core/data/ww8/pass/hang-5.doc |binary
 sw/source/filter/ww8/ww8par.cxx     |    3 ++-
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 1e6ef11080a6126e8a5d7623e4f06a3e436b9bc5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 20 20:55:25 2015 +0100

    clip text to skip to max text available
    
    Change-Id: I5c5c033954d5b6f869a05f19f312f9330df74efb
    (cherry picked from commit 684a210dd44ba5bb239eb07842ced767059a3fb8)
    Reviewed-on: https://gerrit.libreoffice.org/17885
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at 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 7c4ef80..6b288f7 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -3784,8 +3784,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;
                 }
             }


More information about the Libreoffice-commits mailing list