[Libreoffice-commits] .: sw/source
Caolán McNamara
caolan at kemper.freedesktop.org
Thu Dec 16 13:30:44 PST 2010
sw/source/filter/ww8/ww8par.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit ac94ca8cd8efda7ba462eaad58d502981cc1b118
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Dec 16 21:30:35 2010 +0000
what is it with the pointer fetishism, just use references
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 2a10954..7b7a20d 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1897,7 +1897,7 @@ void SwWW8ImplReader::Read_HdFt(bool bIsTitle, int nSect,
bool bFooter
= (nI & ( WW8_FOOTER_EVEN | WW8_FOOTER_ODD | WW8_FOOTER_FIRST )) ? true: false;
- SwFrmFmt* pFmt = bUseLeft ? &pPD->GetLeft() : &pPD->GetMaster();
+ SwFrmFmt& rFmt = bUseLeft ? pPD->GetLeft() : pPD->GetMaster();
SwFrmFmt* pHdFtFmt;
if (bFooter)
@@ -1908,7 +1908,7 @@ void SwWW8ImplReader::Read_HdFt(bool bIsTitle, int nSect,
pPD->GetMaster().SetFmtAttr(SwFmtFooter(true));
if (bUseLeft)
pPD->GetLeft().SetFmtAttr(SwFmtFooter(true));
- pHdFtFmt = (SwFrmFmt*)pFmt->GetFooter().GetFooterFmt();
+ pHdFtFmt = const_cast<SwFrmFmt*>(rFmt.GetFooter().GetFooterFmt());
}
else
{
@@ -1918,7 +1918,7 @@ void SwWW8ImplReader::Read_HdFt(bool bIsTitle, int nSect,
pPD->GetMaster().SetFmtAttr(SwFmtHeader(true));
if (bUseLeft)
pPD->GetLeft().SetFmtAttr(SwFmtHeader(true));
- pHdFtFmt = (SwFrmFmt*)pFmt->GetHeader().GetHeaderFmt();
+ pHdFtFmt = const_cast<SwFrmFmt*>(rFmt.GetHeader().GetHeaderFmt());
}
if (bOk)
More information about the Libreoffice-commits
mailing list