summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-02-17 12:55:27 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-02-17 12:58:22 +0100
commit5a3ed3219d6d3bfc751b8f74e024887d85ac061d (patch)
treecfecd6981731ead5315c9ffa3fe86f6819559d98
parentea47fed15792c1b046c0872d334d24b146ddf083 (diff)
SwTxtCursor::GetCrsrOfst nChgNode arg is only ever false/true
(resp. sal_False/True). This was MSHORT, with the accompanying sal_Bool bChgNode = 1 < nChgNode; check ever since 84a3db80b4fd66c6854b3135b5f69b61fd828e62 "initial import," but there appear to be no calls that would pass in a value > 1, at least not on recent master. Change-Id: If87cb08ecfa665bbd54929d98d0c8de8286ae9ec
-rw-r--r--sw/source/core/text/frminf.cxx2
-rw-r--r--sw/source/core/text/itrcrsr.cxx12
-rw-r--r--sw/source/core/text/itrtxt.hxx2
3 files changed, 6 insertions, 10 deletions
diff --git a/sw/source/core/text/frminf.cxx b/sw/source/core/text/frminf.cxx
index c3eda66e9104..fd165094fe05 100644
--- a/sw/source/core/text/frminf.cxx
+++ b/sw/source/core/text/frminf.cxx
@@ -332,7 +332,7 @@ sal_Int32 SwTxtFrmInfo::GetBigIndent( sal_Int32& rFndPos,
return 0;
const Point aPoint( nNextIndent, aLine.Y() );
- rFndPos = aLine.GetCrsrOfst( 0, aPoint, sal_False );
+ rFndPos = aLine.GetCrsrOfst( 0, aPoint, false );
if( 1 >= rFndPos )
return 0;
diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx
index aa034720ac1f..e4a469d49588 100644
--- a/sw/source/core/text/itrcrsr.cxx
+++ b/sw/source/core/text/itrcrsr.cxx
@@ -1292,7 +1292,7 @@ bool SwTxtCursor::GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
* Return: Offset in String
*************************************************************************/
sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
- const MSHORT nChgNode, SwCrsrMoveState* pCMS ) const
+ bool nChgNode, SwCrsrMoveState* pCMS ) const
{
// If necessary, as catch up, do the adjustment
GetAdjusted();
@@ -1736,13 +1736,9 @@ sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
// we many not return with COMPLETE_STRING as value!
// (BugId: 9692 + Change in feshview)
SwFlyInCntFrm *pTmp = ( (SwFlyCntPortion*)pPor )->GetFlyFrm();
- sal_Bool bChgNode = 1 < nChgNode;
- if( !bChgNode )
- {
- SwFrm* pLower = pTmp->GetLower();
- if( pLower && (pLower->IsTxtFrm() || pLower->IsLayoutFrm()) )
- bChgNode = sal_True;
- }
+ SwFrm* pLower = pTmp->GetLower();
+ bool bChgNode = pLower
+ && (pLower->IsTxtFrm() || pLower->IsLayoutFrm());
Point aTmpPoint( rPoint );
if ( pFrm->IsRightToLeft() )
diff --git a/sw/source/core/text/itrtxt.hxx b/sw/source/core/text/itrtxt.hxx
index f56d10e9a8f1..4942055a6811 100644
--- a/sw/source/core/text/itrtxt.hxx
+++ b/sw/source/core/text/itrtxt.hxx
@@ -301,7 +301,7 @@ public:
bool GetEndCharRect(SwRect *, const sal_Int32, SwCrsrMoveState* = 0,
const long nMax = 0 );
sal_Int32 GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
- const MSHORT nChgNode, SwCrsrMoveState* = 0 ) const;
+ bool nChgNode, SwCrsrMoveState* = 0 ) const;
// Respects ambiguities: For the implementation see below
const SwLineLayout *CharCrsrToLine( const sal_Int32 nPos );