Kaydet (Commit) d55c97a5 authored tarafından Caolán McNamara's avatar Caolán McNamara Kaydeden (comit) Miklos Vajna

detect if new offsets are the same as the previous ones and avoid loop

Change-Id: I4c53d4bce9a69d79e34bdd634c296d9b495e1904
(cherry picked from commit 137cf765)
Reviewed-on: https://gerrit.libreoffice.org/18273Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst d8212cc7
...@@ -413,6 +413,8 @@ bool SwWW8ImplReader::SearchRowEnd(WW8PLCFx_Cp_FKP* pPap, WW8_CP &rStartCp, ...@@ -413,6 +413,8 @@ bool SwWW8ImplReader::SearchRowEnd(WW8PLCFx_Cp_FKP* pPap, WW8_CP &rStartCp,
WW8PLCFxDesc aRes; WW8PLCFxDesc aRes;
aRes.pMemPos = 0; aRes.pMemPos = 0;
aRes.nEndPos = rStartCp; aRes.nEndPos = rStartCp;
bool bReadRes(false);
WW8PLCFxDesc aPrevRes;
while (pPap->HasFkp() && rStartCp != WW8_CP_MAX) while (pPap->HasFkp() && rStartCp != WW8_CP_MAX)
{ {
...@@ -445,6 +447,13 @@ bool SwWW8ImplReader::SearchRowEnd(WW8PLCFx_Cp_FKP* pPap, WW8_CP &rStartCp, ...@@ -445,6 +447,13 @@ bool SwWW8ImplReader::SearchRowEnd(WW8PLCFx_Cp_FKP* pPap, WW8_CP &rStartCp,
} }
pPap->GetSprms(&aRes); pPap->GetSprms(&aRes);
pPap->SetDirty(false); 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 //Update our aRes to get the new starting point of the next properties
rStartCp = aRes.nEndPos; rStartCp = aRes.nEndPos;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment