summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-02-12 09:12:59 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-02-12 18:05:38 +0100
commitafe0b204d164f039b226f226263ff2b99337ac0e (patch)
tree773bfcf4954be14a37690c64bf201d29d51bbb6c /lotuswordpro
parent3a3c54659876aa07be1e38bce5d7f54d343f228a (diff)
replace m_pFoundry with m_xOwnedFoundry
Change-Id: I360d16ff3a61f85b9936582ea30e512e5a011c64 Reviewed-on: https://gerrit.libreoffice.org/49594 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/lwpdoc.cxx31
-rw-r--r--lotuswordpro/source/filter/lwpdoc.hxx2
2 files changed, 16 insertions, 17 deletions
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()
{