Kaydet (Commit) 09baf615 authored tarafından Matteo Casalin's avatar Matteo Casalin

sal_Bool to bool

Change-Id: I866ba6d09512411ee18dc83a2601a262d1649338
üst 8b3d4df3
...@@ -964,7 +964,7 @@ sal_Bool SwAccessibleParagraph::GetTextBoundary( ...@@ -964,7 +964,7 @@ sal_Bool SwAccessibleParagraph::GetTextBoundary(
nLast += pWrongList->Len( nWrongPos ); nLast += pWrongList->Len( nWrongPos );
} }
// //
sal_Bool bIn = pWrongList->InWrongWord(nBegin,nLen); // && !pTxtNode->IsSymbol(nBegin) ) const bool bIn = pWrongList->InWrongWord(nBegin, nLen); // && !pTxtNode->IsSymbol(nBegin) )
if(bIn) if(bIn)
{ {
rBound.startPos = max(nNext, rBound.startPos); rBound.startPos = max(nNext, rBound.startPos);
......
...@@ -212,18 +212,18 @@ public: ...@@ -212,18 +212,18 @@ public:
inline WrongListType GetWrongListType() const { return meType; } inline WrongListType GetWrongListType() const { return meType; }
inline sal_Int32 GetBeginInv() const { return nBeginInvalid; } inline sal_Int32 GetBeginInv() const { return nBeginInvalid; }
inline sal_Int32 GetEndInv() const { return nEndInvalid; } inline sal_Int32 GetEndInv() const { return nEndInvalid; }
inline sal_Bool InsideInvalid( sal_Int32 nChk ) const inline bool InsideInvalid( sal_Int32 nChk ) const
{ return nChk >= nBeginInvalid && nChk <= nEndInvalid; } { return nChk >= nBeginInvalid && nChk <= nEndInvalid; }
void SetInvalid( sal_Int32 nBegin, sal_Int32 nEnd ); void SetInvalid( sal_Int32 nBegin, sal_Int32 nEnd );
inline void Validate(){ nBeginInvalid = COMPLETE_STRING; } inline void Validate(){ nBeginInvalid = COMPLETE_STRING; }
void Invalidate( sal_Int32 nBegin, sal_Int32 nEnd ); void Invalidate( sal_Int32 nBegin, sal_Int32 nEnd );
sal_Bool InvalidateWrong(); bool InvalidateWrong();
sal_Bool Fresh( sal_Int32 &rStart, sal_Int32 &rEnd, sal_Int32 nPos, bool Fresh( sal_Int32 &rStart, sal_Int32 &rEnd, sal_Int32 nPos,
sal_Int32 nLen, sal_uInt16 nIndex, sal_Int32 nCursorPos ); sal_Int32 nLen, sal_uInt16 nIndex, sal_Int32 nCursorPos );
sal_uInt16 GetWrongPos( sal_Int32 nValue ) const; sal_uInt16 GetWrongPos( sal_Int32 nValue ) const;
sal_Bool Check( sal_Int32 &rChk, sal_Int32 &rLn ) const; bool Check( sal_Int32 &rChk, sal_Int32 &rLn ) const;
sal_Bool InWrongWord( sal_Int32 &rChk, sal_Int32 &rLn ) const; bool InWrongWord( sal_Int32 &rChk, sal_Int32 &rLn ) const;
sal_Int32 NextWrong( sal_Int32 nChk ) const; sal_Int32 NextWrong( sal_Int32 nChk ) const;
void Move( sal_Int32 nPos, sal_Int32 nDiff ); void Move( sal_Int32 nPos, sal_Int32 nDiff );
......
...@@ -97,7 +97,7 @@ void SwWrongList::ClearList() ...@@ -97,7 +97,7 @@ void SwWrongList::ClearList()
@return <true> if incorrectly selected, <false> otherwise @return <true> if incorrectly selected, <false> otherwise
*/ */
sal_Bool SwWrongList::InWrongWord( sal_Int32 &rChk, sal_Int32 &rLn ) const bool SwWrongList::InWrongWord( sal_Int32 &rChk, sal_Int32 &rLn ) const
{ {
MSHORT nPos = GetWrongPos( rChk ); MSHORT nPos = GetWrongPos( rChk );
sal_Int32 nWrPos; sal_Int32 nWrPos;
...@@ -105,11 +105,11 @@ sal_Bool SwWrongList::InWrongWord( sal_Int32 &rChk, sal_Int32 &rLn ) const ...@@ -105,11 +105,11 @@ sal_Bool SwWrongList::InWrongWord( sal_Int32 &rChk, sal_Int32 &rLn ) const
{ {
rLn = Len( nPos ); rLn = Len( nPos );
if( nWrPos + rLn <= rChk ) if( nWrPos + rLn <= rChk )
return sal_False; return false;
rChk = nWrPos; rChk = nWrPos;
return sal_True; return true;
} }
return sal_False; return false;
} }
/** Calculate first incorrectly selected area. /** Calculate first incorrectly selected area.
...@@ -119,13 +119,13 @@ sal_Bool SwWrongList::InWrongWord( sal_Int32 &rChk, sal_Int32 &rLn ) const ...@@ -119,13 +119,13 @@ sal_Bool SwWrongList::InWrongWord( sal_Int32 &rChk, sal_Int32 &rLn ) const
@return <true> if incorrectly selected area was found, <false> otherwise @return <true> if incorrectly selected area was found, <false> otherwise
*/ */
sal_Bool SwWrongList::Check( sal_Int32 &rChk, sal_Int32 &rLn ) const bool SwWrongList::Check( sal_Int32 &rChk, sal_Int32 &rLn ) const
{ {
MSHORT nPos = GetWrongPos( rChk ); MSHORT nPos = GetWrongPos( rChk );
rLn += rChk; rLn += rChk;
if( nPos == Count() ) if( nPos == Count() )
return sal_False; return false;
sal_Int32 nWrPos = Pos( nPos ); sal_Int32 nWrPos = Pos( nPos );
sal_Int32 nEnd = nWrPos + Len( nPos ); sal_Int32 nEnd = nWrPos + Len( nPos );
...@@ -133,7 +133,7 @@ sal_Bool SwWrongList::Check( sal_Int32 &rChk, sal_Int32 &rLn ) const ...@@ -133,7 +133,7 @@ sal_Bool SwWrongList::Check( sal_Int32 &rChk, sal_Int32 &rLn ) const
{ {
++nPos; ++nPos;
if( nPos == Count() ) if( nPos == Count() )
return sal_False; return false;
nWrPos = Pos( nPos ); nWrPos = Pos( nPos );
nEnd = nWrPos + Len( nPos ); nEnd = nWrPos + Len( nPos );
...@@ -147,7 +147,7 @@ sal_Bool SwWrongList::Check( sal_Int32 &rChk, sal_Int32 &rLn ) const ...@@ -147,7 +147,7 @@ sal_Bool SwWrongList::Check( sal_Int32 &rChk, sal_Int32 &rLn ) const
rLn -= rChk; rLn -= rChk;
return 0 != rLn; return 0 != rLn;
} }
return sal_False; return false;
} }
/** Find next incorrectly selected position. /** Find next incorrectly selected position.
...@@ -353,11 +353,11 @@ void SwWrongList::Move( sal_Int32 nPos, sal_Int32 nDiff ) ...@@ -353,11 +353,11 @@ void SwWrongList::Move( sal_Int32 nPos, sal_Int32 nDiff )
@return <true> if ??? @return <true> if ???
*/ */
sal_Bool SwWrongList::Fresh( sal_Int32 &rStart, sal_Int32 &rEnd, sal_Int32 nPos, bool SwWrongList::Fresh( sal_Int32 &rStart, sal_Int32 &rEnd, sal_Int32 nPos,
sal_Int32 nLen, MSHORT nIndex, sal_Int32 nCursorPos ) sal_Int32 nLen, MSHORT nIndex, sal_Int32 nCursorPos )
{ {
// length of word must be greater than 0 and cursor position must be outside the word // length of word must be greater than 0 and cursor position must be outside the word
sal_Bool bRet = nLen && ( nCursorPos > nPos + nLen || nCursorPos < nPos ); bool bRet = nLen && ( nCursorPos > nPos + nLen || nCursorPos < nPos );
sal_Int32 nWrPos = 0; sal_Int32 nWrPos = 0;
sal_Int32 nWrEnd = rEnd; sal_Int32 nWrEnd = rEnd;
...@@ -380,7 +380,7 @@ sal_Bool SwWrongList::Fresh( sal_Int32 &rStart, sal_Int32 &rEnd, sal_Int32 nPos, ...@@ -380,7 +380,7 @@ sal_Bool SwWrongList::Fresh( sal_Int32 &rStart, sal_Int32 &rEnd, sal_Int32 nPos,
if( nCnt < Count() && nWrPos == nPos && Len( nCnt ) == nLen ) if( nCnt < Count() && nWrPos == nPos && Len( nCnt ) == nLen )
{ {
++nCnt; ++nCnt;
bRet = sal_True; bRet = true;
} }
else else
{ {
...@@ -425,16 +425,16 @@ void SwWrongList::Invalidate( sal_Int32 nBegin, sal_Int32 nEnd ) ...@@ -425,16 +425,16 @@ void SwWrongList::Invalidate( sal_Int32 nBegin, sal_Int32 nEnd )
_Invalidate( nBegin, nEnd ); _Invalidate( nBegin, nEnd );
} }
sal_Bool SwWrongList::InvalidateWrong( ) bool SwWrongList::InvalidateWrong( )
{ {
if( Count() ) if( Count() )
{ {
const sal_Int32 nFirst = Pos( 0 ); const sal_Int32 nFirst = Pos( 0 );
const sal_Int32 nLast = Pos( Count() - 1 ) + Len( Count() - 1 ); const sal_Int32 nLast = Pos( Count() - 1 ) + Len( Count() - 1 );
Invalidate( nFirst, nLast ); Invalidate( nFirst, nLast );
return sal_True; return true;
} }
return sal_False; return false;
} }
SwWrongList* SwWrongList::SplitList( sal_Int32 nSplitPos ) SwWrongList* SwWrongList::SplitList( sal_Int32 nSplitPos )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment