summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-08-04 08:58:59 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-08-04 09:16:04 +0100
commit35f4248206e844cabd83757ec57ddde1c2ef66b4 (patch)
tree036e8f1330a93e12dd5e49a61f2fa5ef2d7efa74
parent2702796806cae2b28ae78e78d29c3559bf97607e (diff)
SwLinePortion::GetCursorOfst is const and its ret is ignored here
so nOfst is unnecessary Change-Id: I27f73057b55ebdf30eb69a19ee1b0647ba25583e
-rw-r--r--sw/source/core/text/itrcrsr.cxx3
-rw-r--r--sw/source/core/text/porfly.cxx10
-rw-r--r--sw/source/core/text/porfly.hxx3
3 files changed, 7 insertions, 9 deletions
diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx
index e087d7784fc8..3e871f1be718 100644
--- a/sw/source/core/text/itrcrsr.cxx
+++ b/sw/source/core/text/itrcrsr.cxx
@@ -1713,8 +1713,7 @@ sal_Int32 SwTextCursor::GetCursorOfst( SwPosition *pPos, const Point &rPoint,
if( bChgNodeInner && pTmp->Frame().IsInside( aTmpPoint ) &&
!( pTmp->IsProtected() ) )
{
- static_cast<SwFlyCntPortion*>(pPor)->
- GetFlyCursorOfst( nX, aTmpPoint, *pPos, pCMS );
+ static_cast<SwFlyCntPortion*>(pPor)->GetFlyCursorOfst(aTmpPoint, *pPos, pCMS);
// After a change of the frame, our font must be still
// available for/in the OutputDevice.
// For comparison: Paint and new SwFlyCntPortion !
diff --git a/sw/source/core/text/porfly.cxx b/sw/source/core/text/porfly.cxx
index 079d9af4f1d9..40663a2b4aa8 100644
--- a/sw/source/core/text/porfly.cxx
+++ b/sw/source/core/text/porfly.cxx
@@ -414,16 +414,16 @@ void SwFlyCntPortion::SetBase( const SwTextFrame& rFrame, const Point &rBase,
}
}
-void SwFlyCntPortion::GetFlyCursorOfst( const sal_uInt16 nOfst,
- const Point &rPoint, SwPosition &rPos, SwCursorMoveState* pCMS ) const
+void SwFlyCntPortion::GetFlyCursorOfst(const Point &rPoint, SwPosition &rPos, SwCursorMoveState* pCMS) const
{
// As the FlyCnt are not attached to the side, their GetCursorOfst() will
// not be called.
// In order to reduce management overhead for the layout page, the paragraph
// calls the FlyFrame's GetCursorOfst() only when needed
- Point aPoint( rPoint );
- if( bDraw || !( GetFlyFrame()->GetCursorOfst(&rPos, aPoint, pCMS) ) )
- SwLinePortion::GetCursorOfst(nOfst);
+ if (bDraw)
+ return;
+ Point aPoint(rPoint);
+ GetFlyFrame()->GetCursorOfst(&rPos, aPoint, pCMS);
}
sal_Int32 SwFlyCntPortion::GetCursorOfst( const sal_uInt16 nOfst ) const
diff --git a/sw/source/core/text/porfly.hxx b/sw/source/core/text/porfly.hxx
index 3aaf6ad8c25d..9204edbcf4d3 100644
--- a/sw/source/core/text/porfly.hxx
+++ b/sw/source/core/text/porfly.hxx
@@ -79,8 +79,7 @@ public:
long nLnAscent, long nLnDescent,
long nFlyAscent, long nFlyDescent,
AsCharFlags nFlags );
- void GetFlyCursorOfst( const sal_uInt16 nOfst, const Point &rPoint,
- SwPosition& rPos, SwCursorMoveState* pCMS ) const;
+ void GetFlyCursorOfst(const Point &rPoint, SwPosition& rPos, SwCursorMoveState* pCMS) const;
virtual bool Format( SwTextFormatInfo &rInf ) override;
virtual void Paint( const SwTextPaintInfo &rInf ) const override;
OUTPUT_OPERATOR_OVERRIDE