summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdfppo.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2015-10-26 16:54:39 -0400
committerDan Sinclair <dsinclair@chromium.org>2015-10-26 16:54:39 -0400
commitbf81c14cdb2b336a62f97119315f6bc43502e840 (patch)
treec9bc0f23a2cc60307b77a69851733ed85c87196f /fpdfsdk/src/fpdfppo.cpp
parent15ce59a0f34278b6b222675c77b25e3e0c50139f (diff)
downloadpdfium-bf81c14cdb2b336a62f97119315f6bc43502e840.tar.xz
Merge to XFA: 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 . (cherry picked from commit 6ee3484bcb413f4cce303e237fe15e2bdaf51ade) Review URL: https://codereview.chromium.org/1410073007 .
Diffstat (limited to 'fpdfsdk/src/fpdfppo.cpp')
-rw-r--r--fpdfsdk/src/fpdfppo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/fpdfsdk/src/fpdfppo.cpp b/fpdfsdk/src/fpdfppo.cpp
index 912c4b3b3f..cc0799ef13 100644
--- a/fpdfsdk/src/fpdfppo.cpp
+++ b/fpdfsdk/src/fpdfppo.cpp
@@ -216,11 +216,11 @@ FX_BOOL CPDF_PageOrganizer::UpdateReference(CPDF_Object* pObj,
CFX_MapPtrToPtr* pMapPtrToPtr) {
switch (pObj->GetType()) {
case PDFOBJ_REFERENCE: {
- CPDF_Reference* pReference = (CPDF_Reference*)pObj;
+ CPDF_Reference* pReference = pObj->AsReference();
int newobjnum = GetNewObjId(pDoc, pMapPtrToPtr, pReference);
if (newobjnum == 0)
return FALSE;
- pReference->SetRef(pDoc, newobjnum); //, 0);
+ pReference->SetRef(pDoc, newobjnum);
break;
}
case PDFOBJ_DICTIONARY: {