diff options
-rw-r--r-- | lotuswordpro/source/filter/lwpdoc.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lotuswordpro/source/filter/lwpdoc.cxx b/lotuswordpro/source/filter/lwpdoc.cxx index 7a0165191daf..9c91ea3bca50 100644 --- a/lotuswordpro/source/filter/lwpdoc.cxx +++ b/lotuswordpro/source/filter/lwpdoc.cxx @@ -290,12 +290,16 @@ void LwpDocument::RegisterStylesInPara() if (xContent.is()) { rtl::Reference<LwpStory> xStory(dynamic_cast<LwpStory*>(xContent->GetChildHead().obj(VO_STORY).get())); + std::set<LwpStory*> aSeen; while (xStory.is()) { + aSeen.insert(xStory.get()); //Register the child para xStory->SetFoundry(m_pFoundry); xStory->DoRegisterStyle(); xStory.set(dynamic_cast<LwpStory*>(xStory->GetNext().obj(VO_STORY).get())); + if (aSeen.find(xStory.get()) != aSeen.end()) + throw std::runtime_error("loop in conversion"); } } } |