diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2015-10-26 13:02:07 -0400 |
---|---|---|
committer | Dan Sinclair <dsinclair@chromium.org> | 2015-10-26 13:02:07 -0400 |
commit | 7e155865c90cc1115cc7193b7646a341d8f9093e (patch) | |
tree | 44e4351192f0af909671df95a1aac16a1609f750 /core/src/fpdfdoc/doc_form.cpp | |
parent | 9024e026dae1af064b8467bb0f62278417fb82d1 (diff) | |
download | pdfium-7e155865c90cc1115cc7193b7646a341d8f9093e.tar.xz |
Revert "Add type cast definitions for CPDF_Reference."
This is causing pixel test failures on the bots.
FAILURE: bug_543018_2.in
FAILURE: bug_543018_1.in
FAILURE: bug_524043_1.in
This reverts commit 9024e026dae1af064b8467bb0f62278417fb82d1.
Add type cast definitions for CPDF_Reference.
This Cl adds ToReference, CPDF_Object::AsReference and CPDF_Object::IsReference
and updates the src to use them as needed.
BUG=pdfium:201
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1420973002 .
Review URL: https://codereview.chromium.org/1414393006 .
Diffstat (limited to 'core/src/fpdfdoc/doc_form.cpp')
-rw-r--r-- | core/src/fpdfdoc/doc_form.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/src/fpdfdoc/doc_form.cpp b/core/src/fpdfdoc/doc_form.cpp index 3192445d90..8078608883 100644 --- a/core/src/fpdfdoc/doc_form.cpp +++ b/core/src/fpdfdoc/doc_form.cpp @@ -1086,12 +1086,13 @@ CPDF_FormField* CPDF_InterForm::AddTerminalField(CPDF_Dictionary* pFieldDict) { } pField = new CPDF_FormField(this, pParent); CPDF_Object* pTObj = pDict->GetElement("T"); - if (ToReference(pTObj)) { + if (pTObj && pTObj->GetType() == PDFOBJ_REFERENCE) { CPDF_Object* pClone = pTObj->Clone(TRUE); - if (pClone) + if (pClone) { pDict->SetAt("T", pClone); - else + } else { pDict->SetAtName("T", ""); + } } m_pFieldTree->SetField(csWName, pField); } |