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

Side by Side Diff: core/src/fpdfdoc/doc_formcontrol.cpp

Issue 1295893005: Merge to XFA: Add new public APIs to find the z-order for links and widgets. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: self review Created 5 years, 4 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 | « core/src/fpdfdoc/doc_form.cpp ('k') | core/src/fpdfdoc/doc_link.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 "../../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
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 }
OLDNEW
« no previous file with comments | « core/src/fpdfdoc/doc_form.cpp ('k') | core/src/fpdfdoc/doc_link.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698