diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2015-10-21 11:07:42 -0400 |
---|---|---|
committer | Dan Sinclair <dsinclair@chromium.org> | 2015-10-21 11:07:42 -0400 |
commit | 43ce9035a026c7b4f15aa938dc39444d9253ea9f (patch) | |
tree | 8f18c1508dfd0db47d9dec1dbc708fd018349b3f /core/src/fpdfapi/fpdf_edit | |
parent | 1edb860fd465879311ec85c5c6385067b7985013 (diff) | |
download | pdfium-43ce9035a026c7b4f15aa938dc39444d9253ea9f.tar.xz |
Merge to XFA: Add type cast definitions for CPDF_Number.
This Cl adds ToNumber, CPDF_Object::AsNumber and CPDF_Object::IsNumber and
updates the src to use them as needed.
BUG=pdfium:201
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1410673005 .
(cherry picked from commit 83bf02dfb860a66d756434d194118dae572d04d3)
Review URL: https://codereview.chromium.org/1422583002 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_edit')
-rw-r--r-- | core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp index 054cf10c22..3d669a0410 100644 --- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp +++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp @@ -937,9 +937,10 @@ int32_t CPDF_Creator::WriteIndirectObjectToStream(const CPDF_Object* pObj) { m_pParser->m_ObjVersion[objnum] > 0) { return 1; } - if (pObj->GetType() == PDFOBJ_NUMBER) { + + if (pObj->IsNumber()) return 1; - } + CPDF_Dictionary* pDict = pObj->GetDict(); if (pObj->GetType() == PDFOBJ_STREAM) { if (pDict && pDict->GetString(FX_BSTRC("Type")) == FX_BSTRC("XRef")) { |