lotuswordpro/source/filter/lwpdoc.cxx |   31 +++++++++++++++----------------
 lotuswordpro/source/filter/lwpdoc.hxx |    2 +-
 2 files changed, 16 insertions(+), 17 deletions(-)

New commits:
commit afe0b204d164f039b226f226263ff2b99337ac0e
Author: Caolán McNamara <caol...@redhat.com>
Date:   Mon Feb 12 09:12:59 2018 +0000

    replace m_pFoundry with m_xOwnedFoundry
    
    Change-Id: I360d16ff3a61f85b9936582ea30e512e5a011c64
    Reviewed-on: https://gerrit.libreoffice.org/49594
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/lotuswordpro/source/filter/lwpdoc.cxx 
b/lotuswordpro/source/filter/lwpdoc.cxx
index cd86f4bf6819..6bb3c94aedb5 100644
--- a/lotuswordpro/source/filter/lwpdoc.cxx
+++ b/lotuswordpro/source/filter/lwpdoc.cxx
@@ -114,7 +114,6 @@ void LwpDocument::Read()
     }
 
     m_xOwnedFoundry.reset(new LwpFoundry(m_pObjStrm.get(), this));
-    m_pFoundry = m_xOwnedFoundry.get();
 
     m_DivOpts.ReadIndexed(m_pObjStrm.get());
 
@@ -229,8 +228,8 @@ void LwpDocument::RegisterStyle()
 void LwpDocument::RegisterTextStyles()
 {
     //Register all text styles: para styles, character styles
-    LwpDLVListHeadHolder* pParaStyleHolder = m_pFoundry
-        ? 
dynamic_cast<LwpDLVListHeadHolder*>(m_pFoundry->GetTextStyleHead().obj().get())
+    LwpDLVListHeadHolder* pParaStyleHolder = m_xOwnedFoundry
+        ? 
dynamic_cast<LwpDLVListHeadHolder*>(m_xOwnedFoundry->GetTextStyleHead().obj().get())
         : nullptr;
     if(pParaStyleHolder)
     {
@@ -239,7 +238,7 @@ void LwpDocument::RegisterTextStyles()
         {
             if (pParaStyle->GetFoundry())
                 throw std::runtime_error("loop in register text style");
-            pParaStyle->SetFoundry(m_pFoundry);
+            pParaStyle->SetFoundry(m_xOwnedFoundry.get());
             pParaStyle->RegisterStyle();
             pParaStyle = 
dynamic_cast<LwpParaStyle*>(pParaStyle->GetNext().obj().get());
         }
@@ -252,10 +251,10 @@ void LwpDocument::RegisterTextStyles()
  */
 void LwpDocument::RegisterLayoutStyles()
 {
-    if (m_pFoundry)
+    if (m_xOwnedFoundry)
     {
         //Register all layout styles, before register all styles in para
-        m_pFoundry->RegisterAllLayouts();
+        m_xOwnedFoundry->RegisterAllLayouts();
     }
 
     //set initial pagelayout in story for parsing pagelayout
@@ -282,8 +281,8 @@ void LwpDocument::RegisterLayoutStyles()
 void LwpDocument::RegisterStylesInPara()
 {
     //Register all automatic styles in para
-    rtl::Reference<LwpHeadContent> xContent(m_pFoundry
-        ? dynamic_cast<LwpHeadContent*> 
(m_pFoundry->GetContentManager().GetContentList().obj().get())
+    rtl::Reference<LwpHeadContent> xContent(m_xOwnedFoundry
+        ? dynamic_cast<LwpHeadContent*> 
(m_xOwnedFoundry->GetContentManager().GetContentList().obj().get())
         : nullptr);
     if (xContent.is())
     {
@@ -293,7 +292,7 @@ void LwpDocument::RegisterStylesInPara()
         {
             aSeen.insert(xStory.get());
             //Register the child para
-            xStory->SetFoundry(m_pFoundry);
+            xStory->SetFoundry(m_xOwnedFoundry.get());
             xStory->DoRegisterStyle();
             
xStory.set(dynamic_cast<LwpStory*>(xStory->GetNext().obj(VO_STORY).get()));
             if (aSeen.find(xStory.get()) != aSeen.end())
@@ -306,11 +305,11 @@ void LwpDocument::RegisterStylesInPara()
  */
 void LwpDocument::RegisterBulletStyles()
 {
-    if (!m_pFoundry)
+    if (!m_xOwnedFoundry)
         return;
     //Register bullet styles
     LwpDLVListHeadHolder* pBulletHead = dynamic_cast<LwpDLVListHeadHolder*>
-        (m_pFoundry->GetBulletManagerID().obj(VO_HEADHOLDER).get());
+        (m_xOwnedFoundry->GetBulletManagerID().obj(VO_HEADHOLDER).get());
     if (!pBulletHead)
         return;
     LwpSilverBullet* pBullet = dynamic_cast<LwpSilverBullet*>
@@ -319,7 +318,7 @@ void LwpDocument::RegisterBulletStyles()
     while (pBullet)
     {
         aSeen.insert(pBullet);
-        pBullet->SetFoundry(m_pFoundry);
+        pBullet->SetFoundry(m_xOwnedFoundry.get());
         pBullet->RegisterStyle();
         pBullet = dynamic_cast<LwpSilverBullet*> 
(pBullet->GetNext().obj().get());
         if (aSeen.find(pBullet) != aSeen.end())
@@ -331,13 +330,13 @@ void LwpDocument::RegisterBulletStyles()
  */
 void LwpDocument::RegisterGraphicsStyles()
 {
-    if (!m_pFoundry)
+    if (!m_xOwnedFoundry)
         return;
     //Register all graphics styles, the first object should register the next;
-    rtl::Reference<LwpObject> pGraphic = 
m_pFoundry->GetGraphicListHead().obj(VO_GRAPHIC);
+    rtl::Reference<LwpObject> pGraphic = 
m_xOwnedFoundry->GetGraphicListHead().obj(VO_GRAPHIC);
     if (!pGraphic.is())
         return;
-    pGraphic->SetFoundry(m_pFoundry);
+    pGraphic->SetFoundry(m_xOwnedFoundry.get());
     pGraphic->DoRegisterStyle();
 }
 /**
@@ -425,7 +424,7 @@ void LwpDocument::ParseDocContent(IXFStream* pOutputStream)
         //master document not supported now.
         return;
     }
-    pLayoutObj->SetFoundry(m_pFoundry);
+    pLayoutObj->SetFoundry(m_xOwnedFoundry.get());
     pLayoutObj->DoParse(pOutputStream);
 }
 
diff --git a/lotuswordpro/source/filter/lwpdoc.hxx 
b/lotuswordpro/source/filter/lwpdoc.hxx
index a2537a5abe2f..198dfdc28290 100644
--- a/lotuswordpro/source/filter/lwpdoc.hxx
+++ b/lotuswordpro/source/filter/lwpdoc.hxx
@@ -191,7 +191,7 @@ inline LwpObjectID& LwpDocument::GetSocket()
 }
 inline LwpFoundry* LwpDocument::GetFoundry()
 {
-    return m_pFoundry;
+    return m_xOwnedFoundry.get();
 }
 inline LwpObjectID& LwpDocument::GetDivInfoID()
 {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to