[Libreoffice-commits] core.git: lotuswordpro/source
Caolán McNamara
caolanm at redhat.com
Thu Mar 1 12:55:55 UTC 2018
lotuswordpro/source/filter/lwppara.cxx | 25 +++++--------------------
1 file changed, 5 insertions(+), 20 deletions(-)
New commits:
commit ac3f35a9572e12cb22b731683d02af6714174551
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Mar 1 10:12:12 2018 +0000
ofz: infinite loop
Change-Id: I15a0cbc5d4896e5390f5d422fb993325f22eedee
Reviewed-on: https://gerrit.libreoffice.org/50557
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/lotuswordpro/source/filter/lwppara.cxx b/lotuswordpro/source/filter/lwppara.cxx
index 54f1246749a6..d84fbb59d8b8 100644
--- a/lotuswordpro/source/filter/lwppara.cxx
+++ b/lotuswordpro/source/filter/lwppara.cxx
@@ -96,6 +96,7 @@
#include <lwpdropcapmgr.hxx>
#include "lwptable.hxx"
#include <memory>
+#include <set>
LwpPara::LwpPara(LwpObjectHeader const & objHdr, LwpSvStream* pStrm)
: LwpDLVList(objHdr, pStrm)
@@ -531,16 +532,10 @@ void LwpPara::RegisterStyle()
}
bool bHeading = pNumbering->IsHeading();
+ std::set<LwpPara*> aSeen;
while(true)
{
- /*// When we hit the hint paragraph, we can stop and check the hint.
- if (qNumberHint && (qPara == qNumberHint->GetPara()) &&
- qNumberHint->Lookup(qSilverBullet, Level, Position, &Offset))
- {
- Num += Offset;
- break;
- }*/
-
+ aSeen.insert(pPara);
LwpSilverBullet* pParaSilverBullet = pPara->GetSilverBullet();
pNumbering = pPara->GetParaNumbering();
@@ -580,18 +575,6 @@ void LwpPara::RegisterStyle()
}
}
}
-
- /*if (qSpecificStyle
- && qSpecificStyle == qPara->GetParaStyle(LTRUE))
- break;
-
- // See if we crossed a section boundary
- if (ResetSection)
- {
- CurrPos.SetPara(qPara);
- if (CurrPos <= SectionPos)
- break;
- }*/
}
// Don't bump the number if this bullet is skipped
@@ -642,6 +625,8 @@ void LwpPara::RegisterStyle()
}
}
pPara = pPrePara;
+ if (aSeen.find(pPara) != aSeen.end())
+ throw std::runtime_error("loop in conversion");
}
nNum = nNum ? nNum : 1;
More information about the Libreoffice-commits
mailing list