| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #include "xfa/fxfa/app/xfa_fftextedit.h" | 7 #include "xfa/fxfa/app/xfa_fftextedit.h" |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 OnTextChanged(m_pNormalWidget->GetWidget(), wsChange, event->wsPrevText); | 413 OnTextChanged(m_pNormalWidget->GetWidget(), wsChange, event->wsPrevText); |
| 414 break; | 414 break; |
| 415 } | 415 } |
| 416 case FWL_EVTHASH_EDT_TextFull: { | 416 case FWL_EVTHASH_EDT_TextFull: { |
| 417 OnTextFull(m_pNormalWidget->GetWidget()); | 417 OnTextFull(m_pNormalWidget->GetWidget()); |
| 418 break; | 418 break; |
| 419 } | 419 } |
| 420 case FWL_EVTHASH_EDT_CheckWord: { | 420 case FWL_EVTHASH_EDT_CheckWord: { |
| 421 CFX_WideString wstr(L"FWL_EVENT_DTP_SelectChanged"); | 421 CFX_WideString wstr(L"FWL_EVENT_DTP_SelectChanged"); |
| 422 CFWL_EvtEdtCheckWord* event = (CFWL_EvtEdtCheckWord*)pEvent; | 422 CFWL_EvtEdtCheckWord* event = (CFWL_EvtEdtCheckWord*)pEvent; |
| 423 event->bCheckWord = CheckWord(event->bsWord); | 423 event->bCheckWord = CheckWord(event->bsWord.AsByteStringC()); |
| 424 break; | 424 break; |
| 425 } | 425 } |
| 426 case FWL_EVTHASH_EDT_GetSuggestWords: { | 426 case FWL_EVTHASH_EDT_GetSuggestWords: { |
| 427 CFWL_EvtEdtGetSuggestWords* event = (CFWL_EvtEdtGetSuggestWords*)pEvent; | 427 CFWL_EvtEdtGetSuggestWords* event = (CFWL_EvtEdtGetSuggestWords*)pEvent; |
| 428 event->bSuggestWords = | 428 event->bSuggestWords = GetSuggestWords(event->bsWord.AsByteStringC(), |
| 429 GetSuggestWords(event->bsWord, event->bsArraySuggestWords); | 429 event->bsArraySuggestWords); |
| 430 break; | 430 break; |
| 431 } | 431 } |
| 432 default: {} | 432 default: {} |
| 433 } | 433 } |
| 434 return m_pOldDelegate->OnProcessEvent(pEvent); | 434 return m_pOldDelegate->OnProcessEvent(pEvent); |
| 435 } | 435 } |
| 436 FWL_ERR CXFA_FFTextEdit::OnDrawWidget(CFX_Graphics* pGraphics, | 436 FWL_ERR CXFA_FFTextEdit::OnDrawWidget(CFX_Graphics* pGraphics, |
| 437 const CFX_Matrix* pMatrix) { | 437 const CFX_Matrix* pMatrix) { |
| 438 return m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix); | 438 return m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix); |
| 439 } | 439 } |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 789 uint32_t dwEventID = pEvent->GetClassID(); | 789 uint32_t dwEventID = pEvent->GetClassID(); |
| 790 if (dwEventID == FWL_EVTHASH_DTP_SelectChanged) { | 790 if (dwEventID == FWL_EVTHASH_DTP_SelectChanged) { |
| 791 CFWL_Event_DtpSelectChanged* event = (CFWL_Event_DtpSelectChanged*)pEvent; | 791 CFWL_Event_DtpSelectChanged* event = (CFWL_Event_DtpSelectChanged*)pEvent; |
| 792 OnSelectChanged(m_pNormalWidget->GetWidget(), event->iYear, event->iMonth, | 792 OnSelectChanged(m_pNormalWidget->GetWidget(), event->iYear, event->iMonth, |
| 793 event->iDay); | 793 event->iDay); |
| 794 return TRUE; | 794 return TRUE; |
| 795 } else { | 795 } else { |
| 796 return CXFA_FFTextEdit::OnProcessEvent(pEvent); | 796 return CXFA_FFTextEdit::OnProcessEvent(pEvent); |
| 797 } | 797 } |
| 798 } | 798 } |
| OLD | NEW |