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 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 if (!psub) | 506 if (!psub) |
507 return FALSE; | 507 return FALSE; |
508 | 508 |
509 int nFieldType = GetFieldType(); | 509 int nFieldType = GetFieldType(); |
510 switch (nFieldType) { | 510 switch (nFieldType) { |
511 case FIELDTYPE_PUSHBUTTON: | 511 case FIELDTYPE_PUSHBUTTON: |
512 case FIELDTYPE_COMBOBOX: | 512 case FIELDTYPE_COMBOBOX: |
513 case FIELDTYPE_LISTBOX: | 513 case FIELDTYPE_LISTBOX: |
514 case FIELDTYPE_TEXTFIELD: | 514 case FIELDTYPE_TEXTFIELD: |
515 case FIELDTYPE_SIGNATURE: | 515 case FIELDTYPE_SIGNATURE: |
516 return psub->GetType() == PDFOBJ_STREAM; | 516 return psub->IsStream(); |
517 case FIELDTYPE_CHECKBOX: | 517 case FIELDTYPE_CHECKBOX: |
518 case FIELDTYPE_RADIOBUTTON: | 518 case FIELDTYPE_RADIOBUTTON: |
519 if (CPDF_Dictionary* pSubDict = psub->AsDictionary()) { | 519 if (CPDF_Dictionary* pSubDict = psub->AsDictionary()) { |
520 return pSubDict->GetStream(GetAppState()) != NULL; | 520 return pSubDict->GetStream(GetAppState()) != NULL; |
521 } | 521 } |
522 return FALSE; | 522 return FALSE; |
523 } | 523 } |
524 return TRUE; | 524 return TRUE; |
525 } | 525 } |
526 | 526 |
(...skipping 2769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3296 ASSERT(pAnnot != NULL); | 3296 ASSERT(pAnnot != NULL); |
3297 | 3297 |
3298 CPDF_Annot* pPDFAnnot = pAnnot->GetPDFAnnot(); | 3298 CPDF_Annot* pPDFAnnot = pAnnot->GetPDFAnnot(); |
3299 ASSERT(pPDFAnnot != NULL); | 3299 ASSERT(pPDFAnnot != NULL); |
3300 | 3300 |
3301 CPDF_Rect rcAnnot; | 3301 CPDF_Rect rcAnnot; |
3302 pPDFAnnot->GetRect(rcAnnot); | 3302 pPDFAnnot->GetRect(rcAnnot); |
3303 | 3303 |
3304 return rcAnnot; | 3304 return rcAnnot; |
3305 } | 3305 } |
OLD | NEW |