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

Side by Side Diff: fpdfsdk/src/fsdk_baseform.cpp

Issue 1410343003: [Merge to XFA] Revert "Revert "Add type cast definitions for CPDF_Dictionary."" (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Rebase to origin/xfa Created 5 years, 2 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/fpdfview.cpp ('k') | fpdfsdk/src/fsdk_mgr.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 "../../third_party/base/nonstd_unique_ptr.h" 7 #include "../../third_party/base/nonstd_unique_ptr.h"
8 #include "../include/fsdk_define.h" 8 #include "../include/fsdk_define.h"
9 #include "../include/fpdfxfa/fpdfxfa_doc.h" 9 #include "../include/fpdfxfa/fpdfxfa_doc.h"
10 #include "../include/fpdfxfa/fpdfxfa_util.h" 10 #include "../include/fpdfxfa/fpdfxfa_util.h"
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 int nFieldType = GetFieldType(); 531 int nFieldType = GetFieldType();
532 switch (nFieldType) { 532 switch (nFieldType) {
533 case FIELDTYPE_PUSHBUTTON: 533 case FIELDTYPE_PUSHBUTTON:
534 case FIELDTYPE_COMBOBOX: 534 case FIELDTYPE_COMBOBOX:
535 case FIELDTYPE_LISTBOX: 535 case FIELDTYPE_LISTBOX:
536 case FIELDTYPE_TEXTFIELD: 536 case FIELDTYPE_TEXTFIELD:
537 case FIELDTYPE_SIGNATURE: 537 case FIELDTYPE_SIGNATURE:
538 return psub->GetType() == PDFOBJ_STREAM; 538 return psub->GetType() == PDFOBJ_STREAM;
539 case FIELDTYPE_CHECKBOX: 539 case FIELDTYPE_CHECKBOX:
540 case FIELDTYPE_RADIOBUTTON: 540 case FIELDTYPE_RADIOBUTTON:
541 if (psub->GetType() == PDFOBJ_DICTIONARY) { 541 if (CPDF_Dictionary* pSubDict = psub->AsDictionary()) {
542 CPDF_Dictionary* pSubDict = (CPDF_Dictionary*)psub;
543 return pSubDict->GetStream(GetAppState()) != NULL; 542 return pSubDict->GetStream(GetAppState()) != NULL;
544 } 543 }
545 return FALSE; 544 return FALSE;
546 } 545 }
547 return TRUE; 546 return TRUE;
548 } 547 }
549 548
550 int CPDFSDK_Widget::GetFieldType() const { 549 int CPDFSDK_Widget::GetFieldType() const {
551 CPDF_FormField* pField = GetFormField(); 550 CPDF_FormField* pField = GetFormField();
552 ASSERT(pField != NULL); 551 ASSERT(pField != NULL);
(...skipping 2802 matching lines...) Expand 10 before | Expand all | Expand 10 after
3355 ASSERT(pAnnot != NULL); 3354 ASSERT(pAnnot != NULL);
3356 3355
3357 CPDF_Annot* pPDFAnnot = pAnnot->GetPDFAnnot(); 3356 CPDF_Annot* pPDFAnnot = pAnnot->GetPDFAnnot();
3358 ASSERT(pPDFAnnot != NULL); 3357 ASSERT(pPDFAnnot != NULL);
3359 3358
3360 CPDF_Rect rcAnnot; 3359 CPDF_Rect rcAnnot;
3361 pPDFAnnot->GetRect(rcAnnot); 3360 pPDFAnnot->GetRect(rcAnnot);
3362 3361
3363 return rcAnnot; 3362 return rcAnnot;
3364 } 3363 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/fpdfview.cpp ('k') | fpdfsdk/src/fsdk_mgr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698