sw/source/core/text/frminf.cxx | 2 +- sw/source/core/text/itrcrsr.cxx | 12 ++++-------- sw/source/core/text/itrtxt.hxx | 2 +- 3 files changed, 6 insertions(+), 10 deletions(-)
New commits: commit 5a3ed3219d6d3bfc751b8f74e024887d85ac061d Author: Stephan Bergmann <sberg...@redhat.com> Date: Mon Feb 17 12:55:27 2014 +0100 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 diff --git a/sw/source/core/text/frminf.cxx b/sw/source/core/text/frminf.cxx index c3eda66..fd16509 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 aa03472..e4a469d 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 f56d10e..4942055 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 ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits