| 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/FormFiller.h" | 7 #include "../../include/formfiller/FormFiller.h" |
| 8 #include "../../include/formfiller/FFL_FormFiller.h" | 8 #include "../../include/formfiller/FFL_FormFiller.h" |
| 9 #include "../../include/formfiller/FFL_IFormFiller.h" | 9 #include "../../include/formfiller/FFL_IFormFiller.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 } | 371 } |
| 372 } | 372 } |
| 373 | 373 |
| 374 void CFFL_ComboBox::OnKillFocus(CPWL_Wnd* pWnd) | 374 void CFFL_ComboBox::OnKillFocus(CPWL_Wnd* pWnd) |
| 375 { | 375 { |
| 376 ASSERT(m_pApp != NULL); | 376 ASSERT(m_pApp != NULL); |
| 377 } | 377 } |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 if (CPDF_FormField * pFormField = m_pWidget->GetFormField()) | 433 if (CPDF_FormField * pFormField = m_pWidget->GetFormField()) |
| 434 { | 434 { |
| 435 swRet = pFormField->GetOptionValue(nExport); | 435 swRet = pFormField->GetOptionValue(nExport); |
| 436 if (swRet.IsEmpty()) | 436 if (swRet.IsEmpty()) |
| 437 swRet = pFormField->GetOptionLabel(nExport); | 437 swRet = pFormField->GetOptionLabel(nExport); |
| 438 } | 438 } |
| 439 } | 439 } |
| 440 | 440 |
| 441 return swRet; | 441 return swRet; |
| 442 } | 442 } |
| OLD | NEW |