summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/lwpstory.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/lotuswordpro/source/filter/lwpstory.cxx b/lotuswordpro/source/filter/lwpstory.cxx
index 53d76a94a8e3..ed5273030693 100644
--- a/lotuswordpro/source/filter/lwpstory.cxx
+++ b/lotuswordpro/source/filter/lwpstory.cxx
@@ -130,12 +130,12 @@ void LwpStory::XFConvert(XFContentContainer* pCont)
void LwpStory::RegisterStyle()
{
- LwpPara* pPara = dynamic_cast<LwpPara*>( GetFirstPara().obj().get() );
- while(pPara)
+ rtl::Reference<LwpPara> xPara(dynamic_cast<LwpPara*>(GetFirstPara().obj().get()));
+ while (xPara.is())
{
- pPara->SetFoundry(m_pFoundry);
- pPara->DoRegisterStyle();
- pPara = dynamic_cast<LwpPara*>(pPara->GetNext().obj().get());
+ xPara->SetFoundry(m_pFoundry);
+ xPara->DoRegisterStyle();
+ xPara.set(dynamic_cast<LwpPara*>(xPara->GetNext().obj().get()));
}
}