[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - lotuswordpro/source

Caolán McNamara caolanm at redhat.com
Sun Dec 13 08:31:48 PST 2015


 lotuswordpro/source/filter/lwpstory.cxx |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 894ac79aa3557dacee0286d79bbfb00b8f4d0be2
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Dec 13 16:30:42 2015 +0000

    use more references to fix life cycles
    
    Change-Id: I50fd30114b45d1225adb7bfd5d77cb89a229aac8
    (cherry picked from commit a258c3a6503b4fd76ad2b0f705fdd7f472f58c4b)

diff --git a/lotuswordpro/source/filter/lwpstory.cxx b/lotuswordpro/source/filter/lwpstory.cxx
index 53d76a9..ed52730 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()));
     }
 }
 


More information about the Libreoffice-commits mailing list