[Libreoffice-commits] core.git: 2 commits - sfx2/source sw/source
Caolán McNamara
caolanm at redhat.com
Mon May 26 09:01:26 PDT 2014
sfx2/source/dialog/taskpane.cxx | 2 +-
sw/source/core/text/txtfly.cxx | 18 +++++++++---------
2 files changed, 10 insertions(+), 10 deletions(-)
New commits:
commit 2e30212c1bb107e1ddd96977ebea38716939a57a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon May 26 16:12:55 2014 +0100
coverity#704936 Unchecked dynamic_cast
Change-Id: I92e1f95aef32a9d0431ce3fbca0a7ab6ce5cadd0
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index fb122fd..856729f 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();
}
}
}
commit 178c5d8cfdd77f695bb3dd5ebe44e9ea2a370d68
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon May 26 16:09:23 2014 +0100
coverity#704795 Unchecked dynamic_cast
Change-Id: I8526944acfb319f3e8e1e1927e94ea44eb59f5d6
diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx
index 7ea3475..67ca560 100644
--- a/sfx2/source/dialog/taskpane.cxx
+++ b/sfx2/source/dialog/taskpane.cxx
@@ -245,7 +245,7 @@ namespace sfx2
pWindow->SetHelpId( HID_TASKPANE_WINDOW );
pWindow->SetOutputSizePixel( Size( 300, 450 ) );
- dynamic_cast< SfxDockingWindow* >( pWindow )->Initialize( i_pInfo );
+ dynamic_cast<SfxDockingWindow&>(*pWindow).Initialize(i_pInfo);
SetHideNotDelete( true );
pWindow->Show();
More information about the Libreoffice-commits
mailing list