[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - sw/qa sw/source
Caolán McNamara
caolanm at redhat.com
Thu Sep 3 07:08:41 PDT 2015
sw/qa/core/data/ww8/pass/hang-8.doc |binary
sw/source/filter/ww8/ww8scan.cxx | 13 +++++++++++++
2 files changed, 13 insertions(+)
New commits:
commit 412d3916254396120e6abac7ff0385c675c7d448
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Sep 2 20:44:06 2015 +0100
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 at collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
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 0000000..4f0e30e
Binary files /dev/null and b/sw/qa/core/data/ww8/pass/hang-8.doc differ
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 47cdde9..867a0e7 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;
More information about the Libreoffice-commits
mailing list