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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
380 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Change, &eParam); | 380 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Change, &eParam); |
381 } | 381 } |
382 void CXFA_FFTextEdit::OnTextFull(IFWL_Widget* pWidget) { | 382 void CXFA_FFTextEdit::OnTextFull(IFWL_Widget* pWidget) { |
383 CXFA_EventParam eParam; | 383 CXFA_EventParam eParam; |
384 eParam.m_eType = XFA_EVENT_Full; | 384 eParam.m_eType = XFA_EVENT_Full; |
385 eParam.m_pTarget = m_pDataAcc; | 385 eParam.m_pTarget = m_pDataAcc; |
386 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Full, &eParam); | 386 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Full, &eParam); |
387 } | 387 } |
388 | 388 |
389 FX_BOOL CXFA_FFTextEdit::CheckWord(const CFX_ByteStringC& sWord) { | 389 FX_BOOL CXFA_FFTextEdit::CheckWord(const CFX_ByteStringC& sWord) { |
390 if (sWord.IsEmpty() || m_pDataAcc->GetUIType() != XFA_Element::TextEdit) { | 390 if (sWord.IsEmpty() || m_pDataAcc->GetUIType() != XFA_Element::TextEdit) |
391 return TRUE; | 391 return TRUE; |
392 } | 392 return FALSE; |
393 return GetDoc()->GetDocProvider()->CheckWord(GetDoc(), sWord); | |
Wei Li
2016/09/13 17:45:52
I am a bit concerned with changes like this. The u
dsinclair
2016/09/13 17:51:19
I guess the question is, do we know if we'll ever
Wei Li
2016/09/13 18:09:07
I am ok with removing unimplemented code. Should w
dsinclair
2016/09/13 18:12:12
Yea, they should be removed completely. If they're
| |
394 } | 393 } |
394 | |
395 FX_BOOL CXFA_FFTextEdit::GetSuggestWords( | 395 FX_BOOL CXFA_FFTextEdit::GetSuggestWords( |
396 const CFX_ByteStringC& sWord, | 396 const CFX_ByteStringC& sWord, |
397 std::vector<CFX_ByteString>& sSuggest) { | 397 std::vector<CFX_ByteString>& sSuggest) { |
398 if (m_pDataAcc->GetUIType() != XFA_Element::TextEdit) { | 398 if (m_pDataAcc->GetUIType() != XFA_Element::TextEdit) |
399 return FALSE; | 399 return FALSE; |
400 } | 400 return FALSE; |
401 return GetDoc()->GetDocProvider()->GetSuggestWords(GetDoc(), sWord, sSuggest); | |
402 } | 401 } |
403 | 402 |
404 void CXFA_FFTextEdit::OnProcessMessage(CFWL_Message* pMessage) { | 403 void CXFA_FFTextEdit::OnProcessMessage(CFWL_Message* pMessage) { |
405 m_pOldDelegate->OnProcessMessage(pMessage); | 404 m_pOldDelegate->OnProcessMessage(pMessage); |
406 } | 405 } |
407 | 406 |
408 void CXFA_FFTextEdit::OnProcessEvent(CFWL_Event* pEvent) { | 407 void CXFA_FFTextEdit::OnProcessEvent(CFWL_Event* pEvent) { |
409 CXFA_FFField::OnProcessEvent(pEvent); | 408 CXFA_FFField::OnProcessEvent(pEvent); |
410 switch (pEvent->GetClassID()) { | 409 switch (pEvent->GetClassID()) { |
411 case CFWL_EventType::TextChanged: { | 410 case CFWL_EventType::TextChanged: { |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
792 | 791 |
793 void CXFA_FFDateTimeEdit::OnProcessEvent(CFWL_Event* pEvent) { | 792 void CXFA_FFDateTimeEdit::OnProcessEvent(CFWL_Event* pEvent) { |
794 if (pEvent->GetClassID() == CFWL_EventType::SelectChanged) { | 793 if (pEvent->GetClassID() == CFWL_EventType::SelectChanged) { |
795 CFWL_Event_DtpSelectChanged* event = (CFWL_Event_DtpSelectChanged*)pEvent; | 794 CFWL_Event_DtpSelectChanged* event = (CFWL_Event_DtpSelectChanged*)pEvent; |
796 OnSelectChanged(m_pNormalWidget->GetWidget(), event->iYear, event->iMonth, | 795 OnSelectChanged(m_pNormalWidget->GetWidget(), event->iYear, event->iMonth, |
797 event->iDay); | 796 event->iDay); |
798 return; | 797 return; |
799 } | 798 } |
800 CXFA_FFTextEdit::OnProcessEvent(pEvent); | 799 CXFA_FFTextEdit::OnProcessEvent(pEvent); |
801 } | 800 } |
OLD | NEW |