NS_IMETHODIMP nsAutoCompleteController::HandleEndComposition() { NS_ENSURE_TRUE(mIsIMEComposing, NS_OK); mIsIMEComposing = false; bool forceOpenPopup = mPopupClosedByCompositionStart; mPopupClosedByCompositionStart = false; if (!mInput) return NS_OK; nsAutoString value; mInput->GetTextValue(value); SetSearchString(EmptyString()); if (!value.IsEmpty()) { // Show the popup with a filtered result set HandleText(); } else if (forceOpenPopup) { bool cancel; HandleKeyNavigation(nsIDOMKeyEvent::DOM_VK_DOWN, &cancel); } // On here, |value| and |mSearchString| are same. Therefore, next HandleText should be // ignored. Because there are no reason to research. mIgnoreHandleText = true; return NS_OK; }
// Constructor. Set's search string and case mode. BoyerMoore::BoyerMoore( LPCSTR pszSearchString, BOOL bCaseOn /* = FALSE */ ) { _ASSERT_VALID( pszSearchString ); // Setup data. m_strSearchString = pszSearchString; m_bCaseOn = bCaseOn; SetSearchString(); }
const BoyerMoore& BoyerMoore::operator=( LPCSTR pszSearchString ) { _ASSERT_VALID( pszSearchString ); // Setup data. m_strSearchString = pszSearchString; SetSearchString(); return *this; }
void BoyerMoore::SetIncludeHidden( BOOL bIncludeHidden ) { m_bIncludeHidden = bIncludeHidden; SetSearchString(); }
void BoyerMoore::SetMatchWholeWord( BOOL bMatchWholeWord ) { m_bMatchWholeWord = bMatchWholeWord; SetSearchString(); }
void BoyerMoore::SetCaseMode( BOOL bCase ) { m_bCaseOn = bCase; SetSearchString(); }
void BoyerMoore::SetSearchString( LPCSTR pszSearchString ) { _ASSERT_VALID( pszSearchString ); m_strSearchString = pszSearchString; SetSearchString(); }