[Libreoffice-commits] core.git: sw/source
Jochen Nitschke
j.nitschke+logerrit at ok.de
Mon Mar 6 05:59:14 UTC 2017
sw/source/core/docnode/node.cxx | 7 +++----
sw/source/core/layout/atrfrm.cxx | 4 ++--
2 files changed, 5 insertions(+), 6 deletions(-)
New commits:
commit e07dc67dedcb8450bc9d6076f5ef5322c316d20a
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date: Mon Mar 6 00:13:15 2017 +0100
remove unnecessary casts
Change-Id: Ied96b8eea548771a71e69684ced1f1f3699ca237
Reviewed-on: https://gerrit.libreoffice.org/34910
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index 758a7c4..74a1698 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -1114,14 +1114,14 @@ bool SwContentNode::InvalidateNumRule()
SwContentFrame *SwContentNode::getLayoutFrame( const SwRootFrame* _pRoot,
const Point* pPoint, const SwPosition *pPos, const bool bCalcFrame ) const
{
- return static_cast<SwContentFrame*>( ::GetFrameOfModify( _pRoot, *const_cast<SwModify*>(static_cast<SwModify const *>(this)), FRM_CNTNT,
+ return static_cast<SwContentFrame*>( ::GetFrameOfModify( _pRoot, *this, FRM_CNTNT,
pPoint, pPos, bCalcFrame ));
}
SwRect SwContentNode::FindLayoutRect( const bool bPrtArea, const Point* pPoint ) const
{
SwRect aRet;
- SwContentFrame* pFrame = static_cast<SwContentFrame*>( ::GetFrameOfModify( nullptr, *const_cast<SwModify*>(static_cast<SwModify const *>(this)),
+ SwContentFrame* pFrame = static_cast<SwContentFrame*>( ::GetFrameOfModify( nullptr, *this,
FRM_CNTNT, pPoint ) );
if( pFrame )
aRet = bPrtArea ? pFrame->Prt() : pFrame->Frame();
@@ -1131,8 +1131,7 @@ SwRect SwContentNode::FindLayoutRect( const bool bPrtArea, const Point* pPoint )
SwRect SwContentNode::FindPageFrameRect() const
{
SwRect aRet;
- SwFrame* pFrame = ::GetFrameOfModify( nullptr, *const_cast<SwModify*>(static_cast<SwModify const *>(this)),
- FRM_CNTNT );
+ SwFrame* pFrame = ::GetFrameOfModify( nullptr, *this, FRM_CNTNT );
if( pFrame && nullptr != ( pFrame = pFrame->FindPageFrame() ))
aRet = pFrame->Frame();
return aRet;
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 3c513ec7..496dda2 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -2691,7 +2691,7 @@ SwRect SwFrameFormat::FindLayoutRect( const bool bPrtArea, const Point* pPoint )
else
{
const SwFrameType nFrameType = RES_FLYFRMFMT == Which() ? SwFrameType::Fly : FRM_ALL;
- pFrame = ::GetFrameOfModify( nullptr, *const_cast<SwModify*>(static_cast<SwModify const *>(this)), nFrameType, pPoint);
+ pFrame = ::GetFrameOfModify( nullptr, *this, nFrameType, pPoint);
}
if( pFrame )
@@ -3022,7 +3022,7 @@ void SwFlyFrameFormat::MakeFrames()
SwFlyFrame* SwFlyFrameFormat::GetFrame( const Point* pPoint ) const
{
- return static_cast<SwFlyFrame*>(::GetFrameOfModify( nullptr, *const_cast<SwModify*>(static_cast<SwModify const *>(this)), SwFrameType::Fly,
+ return static_cast<SwFlyFrame*>(::GetFrameOfModify( nullptr, *this, SwFrameType::Fly,
pPoint ));
}
More information about the Libreoffice-commits
mailing list