| OLD | NEW | 
|---|
| 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  Loading... | 
| 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  Loading... | 
| 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 } | 
| OLD | NEW | 
|---|