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.h" | 7 //#include "../include/FormFiller.h" |
8 //#include "../include/FFL_FormFiller.h" | 8 //#include "../include/FFL_FormFiller.h" |
9 #include "../../include/formfiller/FFL_TextField.h" | 9 #include "../../include/formfiller/FFL_TextField.h" |
10 #include "../../include/formfiller/FFL_CBA_Fontmap.h" | 10 #include "../../include/formfiller/FFL_CBA_Fontmap.h" |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 if (pWnd->GetClassName() == PWL_CLASSNAME_EDIT) | 357 if (pWnd->GetClassName() == PWL_CLASSNAME_EDIT) |
358 { | 358 { |
359 CPWL_Edit* pEdit = (CPWL_Edit*)pWnd; | 359 CPWL_Edit* pEdit = (CPWL_Edit*)pWnd; |
360 pEdit->SetCharSet(134); | 360 pEdit->SetCharSet(134); |
361 pEdit->SetCodePage(936); | 361 pEdit->SetCodePage(936); |
362 | 362 |
363 pEdit->SetReadyToInput(); | 363 pEdit->SetReadyToInput(); |
364 CFX_WideString wsText = pEdit->GetText(); | 364 CFX_WideString wsText = pEdit->GetText(); |
365 int nCharacters = wsText.GetLength(); | 365 int nCharacters = wsText.GetLength(); |
366 CFX_ByteString bsUTFText = wsText.UTF16LE_Encode(); | 366 CFX_ByteString bsUTFText = wsText.UTF16LE_Encode(); |
367 » » unsigned short* pBuffer = (unsigned short*)(FX_LPCSTR)bsUTFText; | 367 » » unsigned short* pBuffer = (unsigned short*)bsUTFText.c_str(); |
368 m_pApp->FFI_OnSetFieldInputFocus(m_pWidget->GetFormField(), pBuf
fer, nCharacters, TRUE); | 368 m_pApp->FFI_OnSetFieldInputFocus(m_pWidget->GetFormField(), pBuf
fer, nCharacters, TRUE); |
369 | 369 |
370 pEdit->SetEditNotify(this); | 370 pEdit->SetEditNotify(this); |
371 //pUndo->BeginEdit(pDocument); | 371 //pUndo->BeginEdit(pDocument); |
372 } | 372 } |
373 } | 373 } |
374 | 374 |
375 void CFFL_TextField::OnKillFocus(CPWL_Wnd* pWnd) | 375 void CFFL_TextField::OnKillFocus(CPWL_Wnd* pWnd) |
376 { | 376 { |
377 | 377 |
(...skipping 25 matching lines...) Expand all Loading... |
403 | 403 |
404 void CFFL_TextField::DoPaste(CPDFSDK_Document* pDocument) | 404 void CFFL_TextField::DoPaste(CPDFSDK_Document* pDocument) |
405 { | 405 { |
406 | 406 |
407 } | 407 } |
408 | 408 |
409 void CFFL_TextField::OnAddUndo(CPWL_Edit* pEdit) | 409 void CFFL_TextField::OnAddUndo(CPWL_Edit* pEdit) |
410 { | 410 { |
411 } | 411 } |
412 | 412 |
OLD | NEW |