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 "../../include/formfiller/FFL_TextField.h" | 7 #include "../../include/formfiller/FFL_TextField.h" |
8 #include "../../include/formfiller/FFL_CBA_Fontmap.h" | 8 #include "../../include/formfiller/FFL_CBA_Fontmap.h" |
9 | 9 |
10 /* ------------------------------- CFFL_TextField | 10 /* ------------------------------- CFFL_TextField |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 | 289 |
290 pEdit->SetReadyToInput(); | 290 pEdit->SetReadyToInput(); |
291 CFX_WideString wsText = pEdit->GetText(); | 291 CFX_WideString wsText = pEdit->GetText(); |
292 int nCharacters = wsText.GetLength(); | 292 int nCharacters = wsText.GetLength(); |
293 CFX_ByteString bsUTFText = wsText.UTF16LE_Encode(); | 293 CFX_ByteString bsUTFText = wsText.UTF16LE_Encode(); |
294 unsigned short* pBuffer = (unsigned short*)bsUTFText.c_str(); | 294 unsigned short* pBuffer = (unsigned short*)bsUTFText.c_str(); |
295 m_pApp->FFI_OnSetFieldInputFocus(m_pWidget->GetFormField(), pBuffer, | 295 m_pApp->FFI_OnSetFieldInputFocus(m_pWidget->GetFormField(), pBuffer, |
296 nCharacters, TRUE); | 296 nCharacters, TRUE); |
297 | 297 |
298 pEdit->SetEditNotify(this); | 298 pEdit->SetEditNotify(this); |
299 // pUndo->BeginEdit(pDocument); | |
300 } | 299 } |
301 } | 300 } |
302 | 301 |
303 void CFFL_TextField::OnKillFocus(CPWL_Wnd* pWnd) {} | 302 void CFFL_TextField::OnKillFocus(CPWL_Wnd* pWnd) {} |
304 | 303 |
305 FX_BOOL CFFL_TextField::CanCopy(CPDFSDK_Document* pDocument) { | |
306 return FALSE; | |
307 } | |
308 | |
309 FX_BOOL CFFL_TextField::CanCut(CPDFSDK_Document* pDocument) { | |
310 return FALSE; | |
311 } | |
312 | |
313 FX_BOOL CFFL_TextField::CanPaste(CPDFSDK_Document* pDocument) { | |
314 return FALSE; | |
315 } | |
316 | |
317 void CFFL_TextField::OnAddUndo(CPWL_Edit* pEdit) {} | 304 void CFFL_TextField::OnAddUndo(CPWL_Edit* pEdit) {} |
OLD | NEW |