LibreOffice Module editeng (master) 1
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
WrongList Class Reference

Keeps track of misspelled ranges in paragraph. More...

#include <edtspell.hxx>

Public Types

typedef std::vector< editeng::MisspellRange >::iterator iterator
 
typedef std::vector< editeng::MisspellRange >::const_iterator const_iterator
 

Public Member Functions

 WrongList ()
 
const std::vector< editeng::MisspellRange > & GetRanges () const
 
void SetRanges (std::vector< editeng::MisspellRange > &&rRanges)
 
bool IsValid () const
 
void SetValid ()
 
void SetInvalidRange (size_t nStart, size_t nEnd)
 
void ResetInvalidRange (size_t nStart, size_t nEnd)
 
size_t GetInvalidStart () const
 
size_t GetInvalidEnd () const
 
void TextInserted (size_t nPos, size_t nLength, bool bPosIsSep)
 
void TextDeleted (size_t nPos, size_t nLength)
 
void InsertWrong (size_t nStart, size_t nEnd)
 
bool NextWrong (size_t &rnStart, size_t &rnEnd) const
 
bool HasWrong (size_t nStart, size_t nEnd) const
 
bool HasAnyWrong (size_t nStart, size_t nEnd) const
 
void ClearWrongs (size_t nStart, size_t nEnd, const ContentNode *pNode)
 
void MarkWrongsInvalid ()
 
WrongListClone () const
 
bool operator== (const WrongList &rCompare) const
 
bool empty () const
 
void push_back (const editeng::MisspellRange &rRange)
 
editeng::MisspellRangeback ()
 
const editeng::MisspellRangeback () const
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 

Private Member Functions

bool DbgIsBuggy () const
 

Private Attributes

std::vector< editeng::MisspellRangemaRanges
 
size_t mnInvalidStart
 
size_t mnInvalidEnd
 

Static Private Attributes

static constexpr size_t Valid = std::numeric_limits<size_t>::max()
 

Detailed Description

Keeps track of misspelled ranges in paragraph.

Definition at line 54 of file edtspell.hxx.

Member Typedef Documentation

◆ const_iterator

typedef std::vector<editeng::MisspellRange>::const_iterator WrongList::const_iterator

Definition at line 66 of file edtspell.hxx.

◆ iterator

typedef std::vector<editeng::MisspellRange>::iterator WrongList::iterator

Definition at line 65 of file edtspell.hxx.

Constructor & Destructor Documentation

◆ WrongList()

WrongList::WrongList ( )

Definition at line 151 of file edtspell.cxx.

Referenced by Clone().

Member Function Documentation

◆ back() [1/2]

editeng::MisspellRange & WrongList::back ( )

Definition at line 454 of file edtspell.cxx.

References maRanges.

◆ back() [2/2]

const editeng::MisspellRange & WrongList::back ( ) const

Definition at line 459 of file edtspell.cxx.

References maRanges.

◆ begin() [1/2]

WrongList::iterator WrongList::begin ( )

Definition at line 464 of file edtspell.cxx.

References maRanges.

◆ begin() [2/2]

WrongList::const_iterator WrongList::begin ( ) const

Definition at line 474 of file edtspell.cxx.

References maRanges.

◆ ClearWrongs()

void WrongList::ClearWrongs ( size_t  nStart,
size_t  nEnd,
const ContentNode pNode 
)

◆ Clone()

WrongList * WrongList::Clone ( ) const

◆ DbgIsBuggy()

bool WrongList::DbgIsBuggy ( ) const
private

Definition at line 484 of file edtspell.cxx.

References i, and maRanges.

Referenced by ClearWrongs(), InsertWrong(), TextDeleted(), and TextInserted().

◆ empty()

bool WrongList::empty ( ) const

◆ end() [1/2]

WrongList::iterator WrongList::end ( )

Definition at line 469 of file edtspell.cxx.

References maRanges.

◆ end() [2/2]

WrongList::const_iterator WrongList::end ( ) const

Definition at line 479 of file edtspell.cxx.

References maRanges.

◆ GetInvalidEnd()

size_t WrongList::GetInvalidEnd ( ) const
inline

Definition at line 79 of file edtspell.hxx.

References mnInvalidEnd.

Referenced by ImpEditEngine::DoOnlineSpelling(), and operator==().

◆ GetInvalidStart()

size_t WrongList::GetInvalidStart ( ) const
inline

Definition at line 78 of file edtspell.hxx.

References mnInvalidStart.

Referenced by ImpEditEngine::DoOnlineSpelling(), and operator==().

◆ GetRanges()

const std::vector< editeng::MisspellRange > & WrongList::GetRanges ( ) const
inline

Definition at line 70 of file edtspell.hxx.

References maRanges.

Referenced by ImpEditEngine::GetAllMisspellRanges().

◆ HasAnyWrong()

bool WrongList::HasAnyWrong ( size_t  nStart,
size_t  nEnd 
) const

Definition at line 350 of file edtspell.cxx.

References maRanges.

Referenced by ImpEditEngine::DoOnlineSpelling().

◆ HasWrong()

bool WrongList::HasWrong ( size_t  nStart,
size_t  nEnd 
) const

Definition at line 338 of file edtspell.cxx.

References maRanges.

Referenced by ImpEditEngine::DoOnlineSpelling(), and ImpEditView::IsWrongSpelledWord().

◆ InsertWrong()

void WrongList::InsertWrong ( size_t  nStart,
size_t  nEnd 
)

Definition at line 396 of file edtspell.cxx.

References DbgIsBuggy(), maRanges, nPos, and SAL_WARN_IF.

Referenced by ImpEditEngine::DoOnlineSpelling().

◆ IsValid()

bool WrongList::IsValid ( ) const

Definition at line 158 of file edtspell.cxx.

References mnInvalidStart, and Valid.

Referenced by ImpEditEngine::DoOnlineSpelling(), TextDeleted(), and TextInserted().

◆ MarkWrongsInvalid()

void WrongList::MarkWrongsInvalid ( )

Definition at line 420 of file edtspell.cxx.

References maRanges, and SetInvalidRange().

Referenced by ImpEditView::SpellIgnoreWord().

◆ NextWrong()

bool WrongList::NextWrong ( size_t &  rnStart,
size_t &  rnEnd 
) const

Definition at line 320 of file edtspell.cxx.

References maRanges.

Referenced by lcl_DrawRedLines(), and ImpEditEngine::Paint().

◆ operator==()

bool WrongList::operator== ( const WrongList rCompare) const

Definition at line 432 of file edtspell.cxx.

References a, GetInvalidEnd(), GetInvalidStart(), and maRanges.

◆ push_back()

void WrongList::push_back ( const editeng::MisspellRange rRange)

Definition at line 449 of file edtspell.cxx.

References maRanges.

Referenced by ImpEditEngine::ImpConnectParagraphs().

◆ ResetInvalidRange()

void WrongList::ResetInvalidRange ( size_t  nStart,
size_t  nEnd 
)

◆ SetInvalidRange()

void WrongList::SetInvalidRange ( size_t  nStart,
size_t  nEnd 
)

Definition at line 169 of file edtspell.cxx.

References mnInvalidEnd, mnInvalidStart, and Valid.

Referenced by ImpEditEngine::ImpConnectParagraphs(), and MarkWrongsInvalid().

◆ SetRanges()

void WrongList::SetRanges ( std::vector< editeng::MisspellRange > &&  rRanges)

Definition at line 153 of file edtspell.cxx.

References maRanges.

Referenced by ImpEditEngine::SetAllMisspellRanges().

◆ SetValid()

void WrongList::SetValid ( )

Definition at line 163 of file edtspell.cxx.

References mnInvalidEnd, mnInvalidStart, and Valid.

Referenced by ImpEditEngine::DoOnlineSpelling().

◆ TextDeleted()

void WrongList::TextDeleted ( size_t  nPos,
size_t  nLength 
)

Definition at line 252 of file edtspell.cxx.

References DbgIsBuggy(), i, IsValid(), maRanges, mnInvalidEnd, mnInvalidStart, nLength, nPos, and SAL_WARN_IF.

◆ TextInserted()

void WrongList::TextInserted ( size_t  nPos,
size_t  nLength,
bool  bPosIsSep 
)

Member Data Documentation

◆ maRanges

std::vector<editeng::MisspellRange> WrongList::maRanges
private

◆ mnInvalidEnd

size_t WrongList::mnInvalidEnd
private

◆ mnInvalidStart

size_t WrongList::mnInvalidStart
private

◆ Valid

constexpr size_t WrongList::Valid = std::numeric_limits<size_t>::max()
staticconstexprprivate

Definition at line 56 of file edtspell.hxx.

Referenced by IsValid(), SetInvalidRange(), and SetValid().


The documentation for this class was generated from the following files: