Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(432)

Side by Side Diff: fpdfsdk/src/formfiller/FFL_ComboBox.cpp

Issue 809993004: Get rid of FX_LPCSTR cast. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Indent Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/src/fxge/win32/fx_win32_dib.cpp ('k') | fpdfsdk/src/formfiller/FFL_TextField.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « core/src/fxge/win32/fx_win32_dib.cpp ('k') | fpdfsdk/src/formfiller/FFL_TextField.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698