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

Issue 1417893003: Add type cast definitions for CPDF_Array. (Closed)

Created:
5 years, 2 months ago by dsinclair
Modified:
5 years, 2 months ago
Reviewers:
Lei Zhang, Tom Sepez
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Add type cast definitions for CPDF_Array. This Cl adds ToArray, CPDF_Object::AsArray and CPDF_Object::IsArray and updates the src to use them as needed. BUG=pdfium:201 R=thestig@chromium.org, tsepez@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/c2bfc000e502c42c9a3017038fd9104c7997d126

Patch Set 1 #

Total comments: 22

Patch Set 2 : #

Total comments: 4

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+337 lines, -417 lines) Patch
M core/include/fpdfapi/fpdf_objects.h View 2 chunks +11 lines, -0 lines 0 comments Download
M core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp View 2 chunks +4 lines, -6 lines 0 comments Download
M core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp View 1 chunk +5 lines, -6 lines 0 comments Download
M core/src/fpdfapi/fpdf_page/fpdf_page.cpp View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp View 2 chunks +14 lines, -19 lines 0 comments Download
M core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp View 1 chunk +2 lines, -4 lines 0 comments Download
M core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp View 4 chunks +15 lines, -17 lines 0 comments Download
M core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp View 3 chunks +13 lines, -15 lines 0 comments Download
M core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp View 1 2 1 chunk +4 lines, -7 lines 0 comments Download
M core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp View 1 chunk +10 lines, -14 lines 0 comments Download
M core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp View 1 chunk +1 line, -1 line 0 comments Download
M core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp View 11 chunks +27 lines, -28 lines 0 comments Download
M core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp View 6 chunks +12 lines, -13 lines 0 comments Download
M core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp View 1 chunk +1 line, -1 line 0 comments Download
M core/src/fpdfapi/fpdf_render/fpdf_render.cpp View 1 chunk +1 line, -2 lines 0 comments Download
M core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp View 1 chunk +1 line, -2 lines 0 comments Download
M core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp View 3 chunks +3 lines, -6 lines 0 comments Download
M core/src/fpdfdoc/doc_action.cpp View 6 chunks +14 lines, -21 lines 0 comments Download
M core/src/fpdfdoc/doc_ap.cpp View 1 chunk +4 lines, -5 lines 0 comments Download
M core/src/fpdfdoc/doc_basic.cpp View 5 chunks +24 lines, -30 lines 0 comments Download
M core/src/fpdfdoc/doc_bookmark.cpp View 1 chunk +4 lines, -6 lines 0 comments Download
M core/src/fpdfdoc/doc_formcontrol.cpp View 1 2 2 chunks +5 lines, -7 lines 0 comments Download
M core/src/fpdfdoc/doc_formfield.cpp View 1 7 chunks +27 lines, -43 lines 0 comments Download
M core/src/fpdfdoc/doc_link.cpp View 1 chunk +2 lines, -3 lines 0 comments Download
M core/src/fpdfdoc/doc_ocg.cpp View 1 2 5 chunks +32 lines, -47 lines 0 comments Download
M core/src/fpdfdoc/doc_tagged.cpp View 1 2 7 chunks +57 lines, -73 lines 0 comments Download
M fpdfsdk/src/fpdf_flatten.cpp View 1 chunk +1 line, -1 line 0 comments Download
M fpdfsdk/src/fpdf_transformpage.cpp View 4 chunks +21 lines, -19 lines 0 comments Download
M fpdfsdk/src/fpdfdoc.cpp View 1 chunk +1 line, -1 line 0 comments Download
M fpdfsdk/src/fpdfppo.cpp View 1 chunk +1 line, -1 line 0 comments Download
M fpdfsdk/src/fpdfview.cpp View 1 chunk +5 lines, -4 lines 0 comments Download
M fpdfsdk/src/fsdk_actionhandler.cpp View 1 2 3 chunks +7 lines, -7 lines 0 comments Download
M fpdfsdk/src/fsdk_mgr.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 9 (1 generated)
dsinclair
PTAL.
5 years, 2 months ago (2015-10-21 20:40:28 UTC) #2
Tom Sepez
https://codereview.chromium.org/1417893003/diff/1/core/src/fpdfapi/fpdf_page/fpdf_page.cpp File core/src/fpdfapi/fpdf_page/fpdf_page.cpp (right): https://codereview.chromium.org/1417893003/diff/1/core/src/fpdfapi/fpdf_page/fpdf_page.cpp#newcode817 core/src/fpdfapi/fpdf_page/fpdf_page.cpp:817: CPDF_Array *pMediaBox, *pCropBox; nit: Move these down to where ...
5 years, 2 months ago (2015-10-21 21:07:01 UTC) #3
dsinclair
https://codereview.chromium.org/1417893003/diff/1/core/src/fpdfapi/fpdf_page/fpdf_page.cpp File core/src/fpdfapi/fpdf_page/fpdf_page.cpp (right): https://codereview.chromium.org/1417893003/diff/1/core/src/fpdfapi/fpdf_page/fpdf_page.cpp#newcode817 core/src/fpdfapi/fpdf_page/fpdf_page.cpp:817: CPDF_Array *pMediaBox, *pCropBox; On 2015/10/21 21:07:01, Tom Sepez wrote: ...
5 years, 2 months ago (2015-10-21 21:15:14 UTC) #4
Tom Sepez
LGTM after fixing comment. https://codereview.chromium.org/1417893003/diff/20001/core/src/fpdfapi/fpdf_page/fpdf_page.cpp File core/src/fpdfapi/fpdf_page/fpdf_page.cpp (right): https://codereview.chromium.org/1417893003/diff/20001/core/src/fpdfapi/fpdf_page/fpdf_page.cpp#newcode818 core/src/fpdfapi/fpdf_page/fpdf_page.cpp:818: pMediaBox = ToArray(GetPageAttr(FX_BSTRC("MediaBox"))); Combine with ...
5 years, 2 months ago (2015-10-21 21:20:48 UTC) #5
Lei Zhang
Still looking... https://codereview.chromium.org/1417893003/diff/1/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp File core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp (right): https://codereview.chromium.org/1417893003/diff/1/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp#newcode122 core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp:122: m_nFuncs = pArray->GetCount(); m_nFuncs = std::min(pArray->GetCount(), 4) ...
5 years, 2 months ago (2015-10-21 21:44:09 UTC) #6
Lei Zhang
lgtm https://codereview.chromium.org/1417893003/diff/1/core/src/fpdfdoc/doc_formcontrol.cpp File core/src/fpdfdoc/doc_formcontrol.cpp (right): https://codereview.chromium.org/1417893003/diff/1/core/src/fpdfdoc/doc_formcontrol.cpp#newcode88 core/src/fpdfdoc/doc_formcontrol.cpp:88: CPDF_Object* pOpt = FPDF_GetFieldAttr(m_pField->m_pDict, "Opt"); or just if ...
5 years, 2 months ago (2015-10-21 22:10:12 UTC) #7
dsinclair
https://codereview.chromium.org/1417893003/diff/1/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp File core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp (right): https://codereview.chromium.org/1417893003/diff/1/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp#newcode122 core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp:122: m_nFuncs = pArray->GetCount(); On 2015/10/21 21:44:09, Lei Zhang wrote: ...
5 years, 2 months ago (2015-10-22 13:31:13 UTC) #8
dsinclair
5 years, 2 months ago (2015-10-22 13:31:49 UTC) #9
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
c2bfc000e502c42c9a3017038fd9104c7997d126 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698