| 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 "../../include/fpdfdoc/fpdf_doc.h" | 7 #include "../../include/fpdfdoc/fpdf_doc.h" |
| 8 CPDF_FormControl::CPDF_FormControl(CPDF_FormField* pField, | 8 CPDF_FormControl::CPDF_FormControl(CPDF_FormField* pField, |
| 9 CPDF_Dictionary* pWidgetDict) { | 9 CPDF_Dictionary* pWidgetDict) { |
| 10 m_pField = pField; | 10 m_pField = pField; |
| 11 m_pWidgetDict = pWidgetDict; | 11 m_pWidgetDict = pWidgetDict; |
| 12 m_pForm = m_pField->m_pForm; | 12 m_pForm = m_pField->m_pForm; |
| 13 } | 13 } |
| 14 CFX_FloatRect CPDF_FormControl::GetRect() { | 14 CFX_FloatRect CPDF_FormControl::GetRect() const { |
| 15 return m_pWidgetDict->GetRect("Rect"); | 15 return m_pWidgetDict->GetRect("Rect"); |
| 16 } | 16 } |
| 17 CFX_ByteString CPDF_FormControl::GetOnStateName() { | 17 CFX_ByteString CPDF_FormControl::GetOnStateName() { |
| 18 ASSERT(GetType() == CPDF_FormField::CheckBox || | 18 ASSERT(GetType() == CPDF_FormField::CheckBox || |
| 19 GetType() == CPDF_FormField::RadioButton); | 19 GetType() == CPDF_FormField::RadioButton); |
| 20 CFX_ByteString csOn; | 20 CFX_ByteString csOn; |
| 21 CPDF_Dictionary* pAP = m_pWidgetDict->GetDict("AP"); | 21 CPDF_Dictionary* pAP = m_pWidgetDict->GetDict("AP"); |
| 22 if (pAP == NULL) { | 22 if (pAP == NULL) { |
| 23 return csOn; | 23 return csOn; |
| 24 } | 24 } |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 return NULL; | 439 return NULL; |
| 440 } | 440 } |
| 441 return m_pDict->GetDict(FX_BSTRC("IF")); | 441 return m_pDict->GetDict(FX_BSTRC("IF")); |
| 442 } | 442 } |
| 443 int CPDF_ApSettings::GetTextPosition() { | 443 int CPDF_ApSettings::GetTextPosition() { |
| 444 if (m_pDict == NULL) { | 444 if (m_pDict == NULL) { |
| 445 return TEXTPOS_CAPTION; | 445 return TEXTPOS_CAPTION; |
| 446 } | 446 } |
| 447 return m_pDict->GetInteger(FX_BSTRC("TP"), TEXTPOS_CAPTION); | 447 return m_pDict->GetInteger(FX_BSTRC("TP"), TEXTPOS_CAPTION); |
| 448 } | 448 } |
| OLD | NEW |