summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-09-02 20:44:06 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-09-02 21:10:03 +0100
commited7d22049596ac91ad75bfad1a5675c13714e203 (patch)
treeb3fff0868b2b89c3a48ad7cb5b33b0083e091db4
parent-Wundefined-bool-conversion (diff)
downloadcore-ed7d22049596ac91ad75bfad1a5675c13714e203.tar.gz
core-ed7d22049596ac91ad75bfad1a5675c13714e203.zip
doc para property ranges cannot be 0 length
Change-Id: If946204873343d8bbc0c1d391ca2c65d8b2f8561
-rw-r--r--sw/qa/core/data/ww8/pass/hang-8.docbin0 -> 68096 bytes
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx13
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
new file mode 100644
index 000000000000..4f0e30ecc463
--- /dev/null
+++ b/sw/qa/core/data/ww8/pass/hang-8.doc
Binary files differ
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index ed6431a23ccd..27822fa435a3 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -4351,6 +4351,19 @@ bool WW8PLCFx_AtnBook::getIsEnd() const
// if we don't expect trouble thereby.
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;