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

Side by Side Diff: fpdfsdk/fpdfformfill.cpp

Issue 1885973002: Remove implicit cast from CFX_ByteString to (const char*). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Typo Created 4 years, 8 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/fpdf_sysfontinfo.cpp ('k') | fpdfsdk/fpdfppo.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 "public/fpdf_formfill.h" 7 #include "public/fpdf_formfill.h"
8 8
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 590
591 std::vector<CFX_ByteString>* sSuggestWords = FromFPDFStringHandle(sHandle); 591 std::vector<CFX_ByteString>* sSuggestWords = FromFPDFStringHandle(sHandle);
592 uint32_t len = (*sSuggestWords)[index].GetLength(); 592 uint32_t len = (*sSuggestWords)[index].GetLength();
593 if (!bsText) { 593 if (!bsText) {
594 *size = len; 594 *size = len;
595 return TRUE; 595 return TRUE;
596 } 596 }
597 597
598 uint32_t real_size = len < *size ? len : *size; 598 uint32_t real_size = len < *size ? len : *size;
599 if (real_size > 0) 599 if (real_size > 0)
600 FXSYS_memcpy((void*)bsText, (const FX_CHAR*)(*sSuggestWords)[index], 600 FXSYS_memcpy((void*)bsText, (*sSuggestWords)[index].c_str(), real_size);
601 real_size);
602 *size = real_size; 601 *size = real_size;
603 return TRUE; 602 return TRUE;
604 } 603 }
605 604
606 DLLEXPORT void STDCALL 605 DLLEXPORT void STDCALL
607 FPDF_StringHandleRelease(FPDF_STRINGHANDLE stringHandle) { 606 FPDF_StringHandleRelease(FPDF_STRINGHANDLE stringHandle) {
608 delete FromFPDFStringHandle(stringHandle); 607 delete FromFPDFStringHandle(stringHandle);
609 } 608 }
610 609
611 DLLEXPORT FPDF_BOOL STDCALL 610 DLLEXPORT FPDF_BOOL STDCALL
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 pActionHandler->DoAction_Page(action, CPDF_AAction::OpenPage, pSDKDoc); 718 pActionHandler->DoAction_Page(action, CPDF_AAction::OpenPage, pSDKDoc);
720 } 719 }
721 } else { 720 } else {
722 if (aa.ActionExist(CPDF_AAction::ClosePage)) { 721 if (aa.ActionExist(CPDF_AAction::ClosePage)) {
723 CPDF_Action action = aa.GetAction(CPDF_AAction::ClosePage); 722 CPDF_Action action = aa.GetAction(CPDF_AAction::ClosePage);
724 pActionHandler->DoAction_Page(action, CPDF_AAction::ClosePage, pSDKDoc); 723 pActionHandler->DoAction_Page(action, CPDF_AAction::ClosePage, pSDKDoc);
725 } 724 }
726 } 725 }
727 } 726 }
728 } 727 }
OLDNEW
« no previous file with comments | « fpdfsdk/fpdf_sysfontinfo.cpp ('k') | fpdfsdk/fpdfppo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698