summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-05-26 16:12:55 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-05-26 17:00:58 +0100
commit2e30212c1bb107e1ddd96977ebea38716939a57a (patch)
tree71e82623b7ead5d51daa2ef23ec1274883b8817c /sw
parent178c5d8cfdd77f695bb3dd5ebe44e9ea2a370d68 (diff)
coverity#704936 Unchecked dynamic_cast
Change-Id: I92e1f95aef32a9d0431ce3fbca0a7ab6ce5cadd0
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/text/txtfly.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index fb122fd4b570..856729fead92 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -512,19 +512,19 @@ bool SwTxtFly::DrawTextOpaque( SwDrawTextInfo &rInf )
mpCurrAnchoredObj != pTmpAnchoredObj )
{
// #i68520#
- const SwFlyFrm* pFly = dynamic_cast<const SwFlyFrm*>(pTmpAnchoredObj);
- if( aRegion.GetOrigin().IsOver( pFly->Frm() ) )
+ const SwFlyFrm& rFly = dynamic_cast<const SwFlyFrm&>(*pTmpAnchoredObj);
+ if( aRegion.GetOrigin().IsOver( rFly.Frm() ) )
{
- const SwFrmFmt *pFmt = pFly->GetFmt();
+ const SwFrmFmt *pFmt = rFly.GetFmt();
const SwFmtSurround &rSur = pFmt->GetSurround();
const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
// Only the ones who are opaque and more to the top
- if( !( pFly->IsBackgroundTransparent()
- || pFly->IsShadowTransparent() ) &&
+ if( !( rFly.IsBackgroundTransparent()
+ || rFly.IsShadowTransparent() ) &&
SURROUND_THROUGHT == rSur.GetSurround() &&
( !rSur.IsAnchorOnly() ||
// #i68520#
- GetMaster() == pFly->GetAnchorFrm() ||
+ GetMaster() == rFly.GetAnchorFrm() ||
((FLY_AT_PARA != rAnchor.GetAnchorId()) &&
(FLY_AT_CHAR != rAnchor.GetAnchorId())
)
@@ -536,14 +536,14 @@ bool SwTxtFly::DrawTextOpaque( SwDrawTextInfo &rInf )
{
// Except for the content is transparent
const SwNoTxtFrm *pNoTxt =
- pFly->Lower() && pFly->Lower()->IsNoTxtFrm()
- ? (SwNoTxtFrm*)pFly->Lower()
+ rFly.Lower() && rFly.Lower()->IsNoTxtFrm()
+ ? (SwNoTxtFrm*)rFly.Lower()
: 0;
if ( !pNoTxt ||
(!pNoTxt->IsTransparent() && !rSur.IsContour()) )
{
bOpaque = true;
- aRegion -= pFly->Frm();
+ aRegion -= rFly.Frm();
}
}
}