diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-09-02 20:44:06 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-09-19 21:31:53 +0200 |
commit | 8ffe1a4fbaae299fe82744e544b9a0971f253abe (patch) | |
tree | f642889bf7b420ebc15762bf9c39eeaece8104d4 /sw | |
parent | 30b579eb0a5e27c0df42a8159565f6275555f9f9 (diff) |
doc para property ranges cannot be 0 length
Change-Id: If946204873343d8bbc0c1d391ca2c65d8b2f8561
(cherry picked from commit ed7d22049596ac91ad75bfad1a5675c13714e203)
Reviewed-on: https://gerrit.libreoffice.org/18299
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/core/data/ww8/pass/hang-8.doc | bin | 0 -> 68096 bytes | |||
-rw-r--r-- | sw/source/filter/ww8/ww8scan.cxx | 13 |
2 files changed, 13 insertions, 0 deletions
diff --git a/sw/qa/core/data/ww8/pass/hang-8.doc b/sw/qa/core/data/ww8/pass/hang-8.doc Binary files differnew file mode 100644 index 000000000000..4f0e30ecc463 --- /dev/null +++ b/sw/qa/core/data/ww8/pass/hang-8.doc diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index 47cdde944baa..867a0e70f9fa 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -4383,6 +4383,19 @@ bool WW8PLCFx_AtnBook::getIsEnd() const // dadurch kein AErger zu erwarten ist. void WW8PLCFMan::AdjustEnds( WW8PLCFxDesc& rDesc ) { + // might be necessary to do this for pChp and/or pSep as well, + // but its definitely the case for paragraphs that EndPos > StartPos + // for a well formed paragraph as those always have a paragraph + // <cr> in them + if (&rDesc == pPap && rDesc.bRealLineEnd) + { + if (rDesc.nStartPos == rDesc.nEndPos && rDesc.nEndPos != WW8_CP_MAX) + { + SAL_WARN("sw.ww8", "WW8PLCFxDesc End same as Start, abandoning to avoid looping"); + rDesc.nEndPos = WW8_CP_MAX; + } + } + //Store old end position for supercool new property finder that uses //cp instead of fc's as nature intended rDesc.nOrigEndPos = rDesc.nEndPos; |