summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/lwpstory.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/lotuswordpro/source/filter/lwpstory.cxx b/lotuswordpro/source/filter/lwpstory.cxx
index 88e8e7b50b7c..1d81a9334f5c 100644
--- a/lotuswordpro/source/filter/lwpstory.cxx
+++ b/lotuswordpro/source/filter/lwpstory.cxx
@@ -137,13 +137,15 @@ void LwpStory::XFConvert(XFContentContainer* pCont)
void LwpStory::RegisterStyle()
{
rtl::Reference<LwpPara> xPara(dynamic_cast<LwpPara*>(GetFirstPara().obj().get()));
+ std::set<LwpPara*> aSeen;
while (xPara.is())
{
- if (xPara->GetFoundry())
- throw std::runtime_error("loop in register style");
+ aSeen.insert(xPara.get());
xPara->SetFoundry(m_pFoundry);
xPara->DoRegisterStyle();
xPara.set(dynamic_cast<LwpPara*>(xPara->GetNext().obj().get()));
+ if (aSeen.find(xPara.get()) != aSeen.end())
+ throw std::runtime_error("loop in register style");
}
}