MCPcopy Create free account
hub / github.com/AbiWord/abiword / dequeueBlockForBackgroundCheck

Method dequeueBlockForBackgroundCheck

src/text/fmt/xp/fl_DocLayout.cpp:3532–3563  ·  view source on GitHub ↗

! Remove block from background checking queue \param pBlock Block to remove When the last block is removed from the queue, the background timer is stopped. The function does not return before the background spell-checking timer has stopped. */

Source from the content-addressed store, hash-verified

3530 spell-checking timer has stopped.
3531*/
3532bool
3533FL_DocLayout::dequeueBlockForBackgroundCheck(fl_BlockLayout *pBlock)
3534{
3535 bool bRes = false;
3536
3537 // Remove block from queue if it's found there
3538 bRes = pBlock->isQueued();
3539 if (bRes) {
3540 pBlock->dequeueFromSpellCheck();
3541 }
3542 if(pBlock == m_PendingBlockForGrammar)
3543 {
3544 xxx_UT_DEBUGMSG(("Dequeue block %x in dequeue \n",pBlock));
3545 m_PendingBlockForGrammar = NULL;
3546 }
3547 // When queue is empty, kill timer
3548 if (spellQueueHead() == NULL)
3549 {
3550 m_bStopSpellChecking = true;
3551 if(m_pBackgroundCheckTimer)
3552 {
3553 m_pBackgroundCheckTimer->stop();
3554 // Wait for checking to complete before returning.
3555 while(m_bImSpellCheckingNow == true)
3556 {
3557 // TODO shouldn't we have a little sleep here?
3558 }
3559 }
3560 }
3561
3562 return bRes;
3563}
3564
3565/*!
3566 Mark a region of a block to be spell checked

Callers 5

~fl_BlockLayoutMethod · 0.80
splitMethod · 0.80
joinMethod · 0.80
collapseBlockMethod · 0.80

Calls 3

spellQueueHeadFunction · 0.85
dequeueFromSpellCheckMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected