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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
318 return ((CFWL_Edit*)m_pNormalWidget)->Copy(wsCopy); | 318 return ((CFWL_Edit*)m_pNormalWidget)->Copy(wsCopy); |
319 } | 319 } |
320 FX_BOOL CXFA_FFTextEdit::Cut(CFX_WideString& wsCut) { | 320 FX_BOOL CXFA_FFTextEdit::Cut(CFX_WideString& wsCut) { |
321 return ((CFWL_Edit*)m_pNormalWidget)->Cut(wsCut); | 321 return ((CFWL_Edit*)m_pNormalWidget)->Cut(wsCut); |
322 } | 322 } |
323 FX_BOOL CXFA_FFTextEdit::Paste(const CFX_WideString& wsPaste) { | 323 FX_BOOL CXFA_FFTextEdit::Paste(const CFX_WideString& wsPaste) { |
324 return ((CFWL_Edit*)m_pNormalWidget)->Paste(wsPaste); | 324 return ((CFWL_Edit*)m_pNormalWidget)->Paste(wsPaste); |
325 } | 325 } |
326 FX_BOOL CXFA_FFTextEdit::SelectAll() { | 326 FX_BOOL CXFA_FFTextEdit::SelectAll() { |
327 int32_t nCount = ((CFWL_Edit*)m_pNormalWidget)->GetTextLength(); | 327 int32_t nCount = ((CFWL_Edit*)m_pNormalWidget)->GetTextLength(); |
328 return ((CFWL_Edit*)m_pNormalWidget)->AddSelRange(0, nCount); | 328 return ((CFWL_Edit*)m_pNormalWidget)->AddSelRange(0, nCount) >= 0; |
Tom Sepez
2016/10/27 21:04:49
uses -1 as an error code at https://cs.chromium.or
| |
329 } | 329 } |
330 FX_BOOL CXFA_FFTextEdit::Delete() { | 330 FX_BOOL CXFA_FFTextEdit::Delete() { |
331 return ((CFWL_Edit*)m_pNormalWidget)->Delete(); | 331 return ((CFWL_Edit*)m_pNormalWidget)->Delete(); |
332 } | 332 } |
333 FX_BOOL CXFA_FFTextEdit::DeSelect() { | 333 FX_BOOL CXFA_FFTextEdit::DeSelect() { |
334 return ((CFWL_Edit*)m_pNormalWidget)->ClearSelections() == | 334 return ((CFWL_Edit*)m_pNormalWidget)->ClearSelections() == |
335 FWL_Error::Succeeded; | 335 FWL_Error::Succeeded; |
336 } | 336 } |
337 FX_BOOL CXFA_FFTextEdit::GetSuggestWords( | 337 FX_BOOL CXFA_FFTextEdit::GetSuggestWords( |
338 CFX_PointF pointf, | 338 CFX_PointF pointf, |
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
782 | 782 |
783 void CXFA_FFDateTimeEdit::OnProcessEvent(CFWL_Event* pEvent) { | 783 void CXFA_FFDateTimeEdit::OnProcessEvent(CFWL_Event* pEvent) { |
784 if (pEvent->GetClassID() == CFWL_EventType::SelectChanged) { | 784 if (pEvent->GetClassID() == CFWL_EventType::SelectChanged) { |
785 CFWL_Event_DtpSelectChanged* event = (CFWL_Event_DtpSelectChanged*)pEvent; | 785 CFWL_Event_DtpSelectChanged* event = (CFWL_Event_DtpSelectChanged*)pEvent; |
786 OnSelectChanged(m_pNormalWidget->GetWidget(), event->iYear, event->iMonth, | 786 OnSelectChanged(m_pNormalWidget->GetWidget(), event->iYear, event->iMonth, |
787 event->iDay); | 787 event->iDay); |
788 return; | 788 return; |
789 } | 789 } |
790 CXFA_FFTextEdit::OnProcessEvent(pEvent); | 790 CXFA_FFTextEdit::OnProcessEvent(pEvent); |
791 } | 791 } |
OLD | NEW |