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

Side by Side Diff: core/fpdfdoc/doc_form.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 | « core/fpdfdoc/doc_basic.cpp ('k') | core/fpdfdoc/doc_utils.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 <vector> 7 #include <vector>
8 8
9 #include "core/fpdfapi/fpdf_font/include/cpdf_fontencoding.h" 9 #include "core/fpdfapi/fpdf_font/include/cpdf_fontencoding.h"
10 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" 10 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h"
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 CFX_WideString& csNewFieldName) { 626 CFX_WideString& csNewFieldName) {
627 if (!pControl || csNewFieldName.IsEmpty()) { 627 if (!pControl || csNewFieldName.IsEmpty()) {
628 return FALSE; 628 return FALSE;
629 } 629 }
630 CPDF_FormField* pField = ((CPDF_FormControl*)pControl)->GetField(); 630 CPDF_FormField* pField = ((CPDF_FormControl*)pControl)->GetField();
631 return ValidateFieldName(csNewFieldName, pField->GetFieldType(), pField, 631 return ValidateFieldName(csNewFieldName, pField->GetFieldType(), pField,
632 pControl); 632 pControl);
633 } 633 }
634 int CPDF_InterForm::CompareFieldName(const CFX_ByteString& name1, 634 int CPDF_InterForm::CompareFieldName(const CFX_ByteString& name1,
635 const CFX_ByteString& name2) { 635 const CFX_ByteString& name2) {
636 const FX_CHAR* ptr1 = name1;
637 const FX_CHAR* ptr2 = name2;
638 if (name1.GetLength() == name2.GetLength()) { 636 if (name1.GetLength() == name2.GetLength()) {
639 return name1 == name2 ? 1 : 0; 637 return name1 == name2 ? 1 : 0;
640 } 638 }
639 const FX_CHAR* ptr1 = name1.c_str();
640 const FX_CHAR* ptr2 = name2.c_str();
641 int i = 0; 641 int i = 0;
642 while (ptr1[i] == ptr2[i]) { 642 while (ptr1[i] == ptr2[i]) {
643 i++; 643 i++;
644 } 644 }
645 if (i == name1.GetLength()) { 645 if (i == name1.GetLength()) {
646 return 2; 646 return 2;
647 } 647 }
648 if (i == name2.GetLength()) { 648 if (i == name2.GetLength()) {
649 return 3; 649 return 3;
650 } 650 }
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
1201 FDF_ImportField(pField, L"", bNotify); 1201 FDF_ImportField(pField, L"", bNotify);
1202 } 1202 }
1203 if (bNotify && m_pFormNotify) { 1203 if (bNotify && m_pFormNotify) {
1204 m_pFormNotify->AfterFormImportData(this); 1204 m_pFormNotify->AfterFormImportData(this);
1205 } 1205 }
1206 return TRUE; 1206 return TRUE;
1207 } 1207 }
1208 void CPDF_InterForm::SetFormNotify(const CPDF_FormNotify* pNotify) { 1208 void CPDF_InterForm::SetFormNotify(const CPDF_FormNotify* pNotify) {
1209 m_pFormNotify = (CPDF_FormNotify*)pNotify; 1209 m_pFormNotify = (CPDF_FormNotify*)pNotify;
1210 } 1210 }
OLDNEW
« no previous file with comments | « core/fpdfdoc/doc_basic.cpp ('k') | core/fpdfdoc/doc_utils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698