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

Side by Side Diff: fpdfsdk/javascript/Field.cpp

Issue 1841643002: Code change to avoid signed/unsigned mismatch warnings (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase 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/fpdfview_embeddertest.cpp ('k') | fpdfsdk/javascript/PublicMethods.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 "fpdfsdk/javascript/Field.h" 7 #include "fpdfsdk/javascript/Field.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after
1007 GetFormFields(pDocument, swFieldName); 1007 GetFormFields(pDocument, swFieldName);
1008 1008
1009 for (CPDF_FormField* pFormField : FieldArray) { 1009 for (CPDF_FormField* pFormField : FieldArray) {
1010 int nFieldType = pFormField->GetFieldType(); 1010 int nFieldType = pFormField->GetFieldType();
1011 if (nFieldType == FIELDTYPE_COMBOBOX || nFieldType == FIELDTYPE_LISTBOX) { 1011 if (nFieldType == FIELDTYPE_COMBOBOX || nFieldType == FIELDTYPE_LISTBOX) {
1012 uint32_t dwFieldFlags = pFormField->GetFieldFlags(); 1012 uint32_t dwFieldFlags = pFormField->GetFieldFlags();
1013 pFormField->ClearSelection(TRUE); 1013 pFormField->ClearSelection(TRUE);
1014 for (size_t i = 0; i < array.size(); ++i) { 1014 for (size_t i = 0; i < array.size(); ++i) {
1015 if (i != 0 && !(dwFieldFlags & (1 << 21))) 1015 if (i != 0 && !(dwFieldFlags & (1 << 21)))
1016 break; 1016 break;
1017 if (array[i] < pFormField->CountOptions() && 1017 if (array[i] < static_cast<uint32_t>(pFormField->CountOptions()) &&
1018 !pFormField->IsItemSelected(array[i])) { 1018 !pFormField->IsItemSelected(array[i])) {
1019 pFormField->SetItemSelection(array[i], TRUE); 1019 pFormField->SetItemSelection(array[i], TRUE);
1020 } 1020 }
1021 } 1021 }
1022 UpdateFormField(pDocument, pFormField, TRUE, TRUE, TRUE); 1022 UpdateFormField(pDocument, pFormField, TRUE, TRUE, TRUE);
1023 } 1023 }
1024 } 1024 }
1025 } 1025 }
1026 1026
1027 FX_BOOL Field::defaultStyle(IJS_Context* cc, 1027 FX_BOOL Field::defaultStyle(IJS_Context* cc,
(...skipping 2524 matching lines...) Expand 10 before | Expand all | Expand 10 after
3552 } 3552 }
3553 } 3553 }
3554 3554
3555 void Field::AddField(CPDFSDK_Document* pDocument, 3555 void Field::AddField(CPDFSDK_Document* pDocument,
3556 int nPageIndex, 3556 int nPageIndex,
3557 int nFieldType, 3557 int nFieldType,
3558 const CFX_WideString& sName, 3558 const CFX_WideString& sName,
3559 const CFX_FloatRect& rcCoords) { 3559 const CFX_FloatRect& rcCoords) {
3560 // Not supported. 3560 // Not supported.
3561 } 3561 }
OLDNEW
« no previous file with comments | « fpdfsdk/fpdfview_embeddertest.cpp ('k') | fpdfsdk/javascript/PublicMethods.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698