diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-02-27 10:30:20 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-27 12:58:41 +0000 |
commit | 3c095024dc9e6a72759d44038dbc4a67fb4f4bc9 (patch) | |
tree | 202f2b5938f5fd105d03b5dd84402d7032ba1aa2 /sw | |
parent | d9404f150d9389eead85498a12e1f20dcccb6d5e (diff) |
coverity#1187662 Unchecked dynamic_cast
Change-Id: Iefe4021d6140614e73f2626f5da7a75a7beea979
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/text/txtfly.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx index ef3b9f773d2f..d8aa4193e8bb 100644 --- a/sw/source/core/text/txtfly.cxx +++ b/sw/source/core/text/txtfly.cxx @@ -597,8 +597,12 @@ void SwTxtFly::DrawFlyRect( OutputDevice* pOut, const SwRect &rRect, { // #i68520# const SwAnchoredObject* pAnchoredObjTmp = (*mpAnchoredObjList)[i]; - if( mpCurrAnchoredObj != pAnchoredObjTmp && - dynamic_cast<const SwFlyFrm*>(pAnchoredObjTmp) ) + if (mpCurrAnchoredObj == pAnchoredObjTmp) + continue; + + // #i68520# + const SwFlyFrm* pFly = dynamic_cast<const SwFlyFrm*>(pAnchoredObjTmp); + if (pFly) { // #i68520# const SwFmtSurround& rSur = pAnchoredObjTmp->GetFrmFmt().GetSurround(); @@ -606,8 +610,6 @@ void SwTxtFly::DrawFlyRect( OutputDevice* pOut, const SwRect &rRect, // OD 24.01.2003 #106593# - correct clipping of fly frame area. // Consider that fly frame background/shadow can be transparent // and <SwAlignRect(..)> fly frame area - // #i68520# - const SwFlyFrm* pFly = dynamic_cast<const SwFlyFrm*>(pAnchoredObjTmp); // #i47804# - consider transparent graphics // and OLE objects. bool bClipFlyArea = |