summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2017-03-06 00:13:15 +0100
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-03-06 05:58:36 +0000
commite07dc67dedcb8450bc9d6076f5ef5322c316d20a (patch)
tree4549585a6e3ca7274b50d082dc798cb9d53f12fa /sw
parent7548289d6342bc26563360b9d8c0b37c7b03b38b (diff)
remove unnecessary casts
Change-Id: Ied96b8eea548771a71e69684ced1f1f3699ca237 Reviewed-on: https://gerrit.libreoffice.org/34910 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/docnode/node.cxx7
-rw-r--r--sw/source/core/layout/atrfrm.cxx4
2 files changed, 5 insertions, 6 deletions
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index 758a7c4b52e1..74a169813b03 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 3c513ec74f23..496dda2511c4 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 ));
}