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

Side by Side Diff: fpdfsdk/src/formfiller/FFL_TextField.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 | « fpdfsdk/src/formfiller/FFL_ComboBox.cpp ('k') | fpdfsdk/src/fpdf_flatten.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.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
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
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
OLDNEW
« no previous file with comments | « fpdfsdk/src/formfiller/FFL_ComboBox.cpp ('k') | fpdfsdk/src/fpdf_flatten.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698