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

Issue 1709393002: Remove PageObject's m_Type and add As<Type> functions (Closed)

Created:
4 years, 10 months ago by Wei Li
Modified:
4 years, 10 months ago
Reviewers:
Lei Zhang
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Remove PageObject's m_Type and add As<Type> functions For CPDF_PageObject and its subclasses, remove m_Type and use GetType() instead. Also, add As<Type> functions to avoid casting all over the places. BUG=pdfium:397 R=thestig@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/7cf13c9c8b9b69b01e5debb5e8dc8b265983dfa8

Patch Set 1 : #

Total comments: 6

Patch Set 2 : address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+144 lines, -116 lines) Patch
M core/include/fpdfapi/fpdf_pageobj.h View 8 chunks +50 lines, -12 lines 0 comments Download
M core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M core/src/fpdfapi/fpdf_page/fpdf_page.cpp View 5 chunks +6 lines, -8 lines 0 comments Download
M core/src/fpdfapi/fpdf_page/fpdf_page_image.cpp View 1 chunk +1 line, -2 lines 0 comments Download
M core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp View 1 chunk +1 line, -1 line 0 comments Download
M core/src/fpdfapi/fpdf_render/fpdf_render.cpp View 1 14 chunks +33 lines, -38 lines 0 comments Download
M core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp View 1 5 chunks +11 lines, -11 lines 0 comments Download
M core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp View 1 chunk +3 lines, -4 lines 0 comments Download
M core/src/fpdfapi/fpdf_render/render_int.h View 1 4 chunks +12 lines, -10 lines 0 comments Download
M core/src/fpdftext/fpdf_text_int.cpp View 4 chunks +11 lines, -14 lines 0 comments Download
M fpdfsdk/src/fpdf_transformpage.cpp View 1 chunk +1 line, -1 line 0 comments Download
M fpdfsdk/src/fpdfeditpage.cpp View 1 3 chunks +8 lines, -8 lines 0 comments Download
M fpdfsdk/src/javascript/Document.cpp View 2 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 13 (7 generated)
Wei Li
PTAL, thanks
4 years, 10 months ago (2016-02-19 03:38:24 UTC) #4
Lei Zhang
lgtm https://codereview.chromium.org/1709393002/diff/20001/core/src/fpdfapi/fpdf_render/fpdf_render.cpp File core/src/fpdfapi/fpdf_render/fpdf_render.cpp (right): https://codereview.chromium.org/1709393002/diff/20001/core/src/fpdfapi/fpdf_render/fpdf_render.cpp#newcode325 core/src/fpdfapi/fpdf_render/fpdf_render.cpp:325: if (type != CPDF_PageObject::IMAGE) { Maybe just remove ...
4 years, 10 months ago (2016-02-19 04:22:31 UTC) #5
Lei Zhang
BTW, I changed the CL description. If one writes BUG=397, the Chromium code review tool ...
4 years, 10 months ago (2016-02-19 04:25:14 UTC) #7
Wei Li
thanks! I also propagated the constness along the functions while making the change. https://codereview.chromium.org/1709393002/diff/20001/core/src/fpdfapi/fpdf_render/fpdf_render.cpp File ...
4 years, 10 months ago (2016-02-19 19:32:19 UTC) #8
Lei Zhang
++lgtm
4 years, 10 months ago (2016-02-19 19:37:49 UTC) #9
Wei Li
4 years, 10 months ago (2016-02-19 19:53:08 UTC) #12
Message was sent while issue was closed.
Committed patchset #2 (id:40001) manually as
7cf13c9c8b9b69b01e5debb5e8dc8b265983dfa8 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698