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

Issue 1402413004: Add type cast definitions for CPDF_Stream. (Closed)

Created:
5 years, 2 months ago by dsinclair
Modified:
4 years, 11 months ago
Reviewers:
Tom Sepez, Lei Zhang, Nico
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_Stream. This Cl adds ToStream, CPDF_Object::AsStream and CPDF_Object::IsStream and updates the src to use them as needed. BUG=pdfium:201 R=tsepez@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/338805f1366dcdf9a5b48cf591541cf98d7490f1

Patch Set 1 #

Total comments: 19

Patch Set 2 : #

Total comments: 2

Patch Set 3 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+312 lines, -362 lines) Patch
M core/include/fpdfapi/fpdf_objects.h View 3 chunks +11 lines, -0 lines 0 comments Download
M core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp View 2 chunks +8 lines, -7 lines 0 comments Download
M core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp View 1 6 chunks +28 lines, -37 lines 2 comments Download
M core/src/fpdfapi/fpdf_font/fpdf_font.cpp View 5 chunks +16 lines, -16 lines 0 comments Download
M core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp View 2 chunks +3 lines, -4 lines 0 comments Download
M core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp View 2 chunks +4 lines, -4 lines 0 comments Download
M core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp View 1 chunk +1 line, -1 line 0 comments Download
M core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp View 4 chunks +14 lines, -19 lines 0 comments Download
M core/src/fpdfapi/fpdf_page/fpdf_page_image.cpp View 1 chunk +5 lines, -6 lines 0 comments Download
M core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp View 3 chunks +5 lines, -6 lines 0 comments Download
M core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp View 2 chunks +4 lines, -5 lines 0 comments Download
M core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp View 3 chunks +13 lines, -14 lines 0 comments Download
M core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp View 1 chunk +3 lines, -2 lines 0 comments Download
M core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp View 1 11 chunks +32 lines, -39 lines 0 comments Download
M core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp View 5 chunks +35 lines, -48 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_image.cpp View 1 chunk +2 lines, -3 lines 0 comments Download
M core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp View 1 2 4 chunks +14 lines, -22 lines 0 comments Download
M core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp View 1 9 chunks +76 lines, -85 lines 0 comments Download
M core/src/fpdfapi/fpdf_render/render_int.h View 1 1 chunk +1 line, -1 line 0 comments Download
M core/src/fpdfdoc/doc_annot.cpp View 2 chunks +14 lines, -17 lines 0 comments Download
M core/src/fpdfdoc/doc_basic.cpp View 1 chunk +5 lines, -7 lines 0 comments Download
M core/src/fpdfdoc/doc_tagged.cpp View 2 chunks +4 lines, -5 lines 0 comments Download
M fpdfsdk/src/fpdf_flatten.cpp View 2 chunks +3 lines, -4 lines 0 comments Download
M fpdfsdk/src/fpdf_transformpage.cpp View 3 chunks +8 lines, -7 lines 0 comments Download
M fpdfsdk/src/fpdfppo.cpp View 1 chunk +1 line, -1 line 0 comments Download
M fpdfsdk/src/fsdk_baseform.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 11 (2 generated)
dsinclair
PTAL. This one has a bunch of const_cast<CPDF_Stream*>'s in there. We will need to go ...
5 years, 2 months ago (2015-10-22 15:44:29 UTC) #2
Tom Sepez
https://codereview.chromium.org/1402413004/diff/1/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp File core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp (right): https://codereview.chromium.org/1402413004/diff/1/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp#newcode946 core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp:946: return !pDict || pDict->GetString(FX_BSTRC("Type")) != FX_BSTRC("XRef"); nit: this is ...
5 years, 2 months ago (2015-10-22 17:16:45 UTC) #3
dsinclair
https://codereview.chromium.org/1402413004/diff/1/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp File core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp (right): https://codereview.chromium.org/1402413004/diff/1/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp#newcode946 core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp:946: return !pDict || pDict->GetString(FX_BSTRC("Type")) != FX_BSTRC("XRef"); On 2015/10/22 17:16:45, ...
5 years, 2 months ago (2015-10-22 17:42:56 UTC) #4
Tom Sepez
lgtm https://codereview.chromium.org/1402413004/diff/1/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp File core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp (right): https://codereview.chromium.org/1402413004/diff/1/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp#newcode849 core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp:849: int ret = m_pMask->StartLoadDIBSource(m_pDocument, ToStream(m_pMaskStream), On 2015/10/22 17:42:56, ...
5 years, 2 months ago (2015-10-22 19:11:55 UTC) #5
dsinclair
https://codereview.chromium.org/1402413004/diff/20001/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp File core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp (right): https://codereview.chromium.org/1402413004/diff/20001/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp#newcode791 core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp:791: m_pMaskStream = ToStream(m_pDict->GetStream(FX_BSTRC("SMask"))); On 2015/10/22 19:11:55, Tom Sepez wrote: ...
5 years, 2 months ago (2015-10-22 19:33:38 UTC) #6
dsinclair
Committed patchset #3 (id:40001) manually as 338805f1366dcdf9a5b48cf591541cf98d7490f1 (presubmit successful).
5 years, 2 months ago (2015-10-22 19:34:19 UTC) #7
Nico
https://codereview.chromium.org/1402413004/diff/40001/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp File core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp (right): https://codereview.chromium.org/1402413004/diff/40001/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp#newcode945 core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp:945: if (pObj->IsStream()) Did you intentionally remove this brace? Before, ...
4 years, 11 months ago (2016-01-11 23:55:51 UTC) #9
Tom Sepez
https://codereview.chromium.org/1402413004/diff/40001/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp File core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp (right): https://codereview.chromium.org/1402413004/diff/40001/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp#newcode945 core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp:945: if (pObj->IsStream()) On 2016/01/11 23:55:51, Nico wrote: > Did ...
4 years, 11 months ago (2016-01-12 00:00:45 UTC) #10
Lei Zhang
4 years, 11 months ago (2016-01-12 00:12:28 UTC) #11
Message was sent while issue was closed.
On 2016/01/12 00:00:45, Tom Sepez wrote:
> Yes, mistake, yes corrected in https://codereview.chromium.org/1544963002

I'm going to file a Chromium bug to get this fix merged to M48. M47 is
unaffected, and M49 will just pick up a DEPS roll with the fix.

Powered by Google App Engine
This is Rietveld 408576698