| 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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 eParam.m_eType = XFA_EVENT_Change; | 296 eParam.m_eType = XFA_EVENT_Change; |
| 297 eParam.m_wsChange = wsChanged; | 297 eParam.m_wsChange = wsChanged; |
| 298 eParam.m_pTarget = m_pDataAcc; | 298 eParam.m_pTarget = m_pDataAcc; |
| 299 eParam.m_wsPrevText = wsPrevText; | 299 eParam.m_wsPrevText = wsPrevText; |
| 300 CFWL_Edit* pEdit = ((CFWL_Edit*)m_pNormalWidget); | 300 CFWL_Edit* pEdit = ((CFWL_Edit*)m_pNormalWidget); |
| 301 if (m_pDataAcc->GetUIType() == XFA_Element::DateTimeEdit) { | 301 if (m_pDataAcc->GetUIType() == XFA_Element::DateTimeEdit) { |
| 302 CFWL_DateTimePicker* pDateTime = (CFWL_DateTimePicker*)pEdit; | 302 CFWL_DateTimePicker* pDateTime = (CFWL_DateTimePicker*)pEdit; |
| 303 eParam.m_wsNewText = pDateTime->GetEditText(); | 303 eParam.m_wsNewText = pDateTime->GetEditText(); |
| 304 int32_t iSels = pDateTime->CountSelRanges(); | 304 int32_t iSels = pDateTime->CountSelRanges(); |
| 305 if (iSels) { | 305 if (iSels) { |
| 306 eParam.m_iSelEnd = pDateTime->GetSelRange(0, eParam.m_iSelStart); | 306 eParam.m_iSelEnd = pDateTime->GetSelRange(0, &eParam.m_iSelStart); |
| 307 } | 307 } |
| 308 } else { | 308 } else { |
| 309 eParam.m_wsNewText = pEdit->GetText(); | 309 eParam.m_wsNewText = pEdit->GetText(); |
| 310 int32_t iSels = pEdit->CountSelRanges(); | 310 int32_t iSels = pEdit->CountSelRanges(); |
| 311 if (iSels) { | 311 if (iSels) { |
| 312 eParam.m_iSelEnd = pEdit->GetSelRange(0, eParam.m_iSelStart); | 312 eParam.m_iSelEnd = pEdit->GetSelRange(0, &eParam.m_iSelStart); |
| 313 } | 313 } |
| 314 } | 314 } |
| 315 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Change, &eParam); | 315 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Change, &eParam); |
| 316 } | 316 } |
| 317 void CXFA_FFTextEdit::OnTextFull(CFWL_Widget* pWidget) { | 317 void CXFA_FFTextEdit::OnTextFull(CFWL_Widget* pWidget) { |
| 318 CXFA_EventParam eParam; | 318 CXFA_EventParam eParam; |
| 319 eParam.m_eType = XFA_EVENT_Full; | 319 eParam.m_eType = XFA_EVENT_Full; |
| 320 eParam.m_pTarget = m_pDataAcc; | 320 eParam.m_pTarget = m_pDataAcc; |
| 321 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Full, &eParam); | 321 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Full, &eParam); |
| 322 } | 322 } |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 678 } | 678 } |
| 679 | 679 |
| 680 void CXFA_FFDateTimeEdit::OnProcessEvent(CFWL_Event* pEvent) { | 680 void CXFA_FFDateTimeEdit::OnProcessEvent(CFWL_Event* pEvent) { |
| 681 if (pEvent->GetType() == CFWL_Event::Type::SelectChanged) { | 681 if (pEvent->GetType() == CFWL_Event::Type::SelectChanged) { |
| 682 CFWL_EvtSelectChanged* event = static_cast<CFWL_EvtSelectChanged*>(pEvent); | 682 CFWL_EvtSelectChanged* event = static_cast<CFWL_EvtSelectChanged*>(pEvent); |
| 683 OnSelectChanged(m_pNormalWidget, event->iYear, event->iMonth, event->iDay); | 683 OnSelectChanged(m_pNormalWidget, event->iYear, event->iMonth, event->iDay); |
| 684 return; | 684 return; |
| 685 } | 685 } |
| 686 CXFA_FFTextEdit::OnProcessEvent(pEvent); | 686 CXFA_FFTextEdit::OnProcessEvent(pEvent); |
| 687 } | 687 } |
| OLD | NEW |