diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-09-02 20:44:06 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-09-03 14:08:20 +0000 |
commit | 412d3916254396120e6abac7ff0385c675c7d448 (patch) | |
tree | 2b790373cd134bf6c1be356e620847df5c96227a | |
parent | 0cd13904fa2c4619d21343637020f857b6c0760a (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>
-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; |