[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - sw/source
Caolán McNamara
caolanm at redhat.com
Wed Sep 2 09:05:18 PDT 2015
sw/source/filter/ww8/ww8par2.cxx | 9 +++++++++
1 file changed, 9 insertions(+)
New commits:
commit 7785e87aa9fc706b1474e6a480affca067542f5d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Sep 2 15:13:33 2015 +0100
detect if new offsets are the same as the previous ones and avoid loop
Change-Id: I4c53d4bce9a69d79e34bdd634c296d9b495e1904
(cherry picked from commit 137cf76573c89ea1b0b1f716a50731419a187473)
Reviewed-on: https://gerrit.libreoffice.org/18275
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index f214746..64df102 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -414,6 +414,8 @@ bool SwWW8ImplReader::SearchRowEnd(WW8PLCFx_Cp_FKP* pPap, WW8_CP &rStartCp,
WW8PLCFxDesc aRes;
aRes.pMemPos = 0;
aRes.nEndPos = rStartCp;
+ bool bReadRes(false);
+ WW8PLCFxDesc aPrevRes;
while (pPap->HasFkp() && rStartCp != WW8_CP_MAX)
{
@@ -446,6 +448,13 @@ bool SwWW8ImplReader::SearchRowEnd(WW8PLCFx_Cp_FKP* pPap, WW8_CP &rStartCp,
}
pPap->GetSprms(&aRes);
pPap->SetDirty(false);
+ if (bReadRes && aRes.nEndPos == aPrevRes.nEndPos && aRes.nStartPos == aPrevRes.nStartPos)
+ {
+ SAL_WARN("sw.ww8", "SearchRowEnd, loop in paragraph property chain");
+ break;
+ }
+ bReadRes = true;
+ aPrevRes = aRes;
//Update our aRes to get the new starting point of the next properties
rStartCp = aRes.nEndPos;
}
More information about the Libreoffice-commits
mailing list