summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdf_flatten.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2015-10-26 15:58:42 -0400
committerDan Sinclair <dsinclair@chromium.org>2015-10-26 15:58:42 -0400
commit6ee3484bcb413f4cce303e237fe15e2bdaf51ade (patch)
tree89207598714eda2da04af966a013c905a1c63dcf /fpdfsdk/src/fpdf_flatten.cpp
parent7e155865c90cc1115cc7193b7646a341d8f9093e (diff)
downloadpdfium-6ee3484bcb413f4cce303e237fe15e2bdaf51ade.tar.xz
Revert "Revert "Add type cast definitions for CPDF_Reference.""
This reverts commit 7e155865c90cc1115cc7193b7646a341d8f9093e. 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 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1418923005 .
Diffstat (limited to 'fpdfsdk/src/fpdf_flatten.cpp')
-rw-r--r--fpdfsdk/src/fpdf_flatten.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/fpdfsdk/src/fpdf_flatten.cpp b/fpdfsdk/src/fpdf_flatten.cpp
index 39441c4aef..75db8f806d 100644
--- a/fpdfsdk/src/fpdf_flatten.cpp
+++ b/fpdfsdk/src/fpdf_flatten.cpp
@@ -444,12 +444,10 @@ DLLEXPORT int STDCALL FPDFPage_Flatten(FPDF_PAGE page, int nFlag) {
CFX_ByteString sKey;
CPDF_Object* pFirstObj = pAPDic->GetNextElement(pos, sKey);
if (pFirstObj) {
- if (pFirstObj->GetType() == PDFOBJ_REFERENCE)
+ if (pFirstObj->IsReference())
pFirstObj = pFirstObj->GetDirect();
-
if (!pFirstObj->IsStream())
continue;
-
pAPStream = pFirstObj->AsStream();
}
}