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

Issue 2295953002: Use enum class for subtypes of CPDF_Annot. (Closed)

Created:
4 years, 3 months ago by jaepark
Modified:
4 years, 3 months ago
Reviewers:
Lei Zhang, dsinclair
CC:
pdfium-reviews_googlegroups.com
Target Ref:
refs/heads/master
Project:
pdfium
Visibility:
Public.

Description

Use enum class for subtypes of CPDF_Annot. Comparing CFX_ByteString for annotation subtypes is inefficient and error-prone. This CL uses enum class to compare annotation subtypes. Also, remove unused IPDFSDK_AnnotHandler::GetType() and FSDK_XFAWIDGET_TYPENAME. Committed: https://pdfium.googlesource.com/pdfium/+/956553e715787cfc4dd8423d5e9a04a0131878c3

Patch Set 1 #

Total comments: 2

Patch Set 2 : Use enum class for subtypes of CPDF_Annot. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+235 lines, -99 lines) Patch
M core/fpdfdoc/cpdf_annot.cpp View 5 chunks +134 lines, -14 lines 0 comments Download
M core/fpdfdoc/cpdf_annotlist.cpp View 1 chunk +1 line, -1 line 0 comments Download
M core/fpdfdoc/include/cpdf_annot.h View 2 chunks +35 lines, -2 lines 0 comments Download
M fpdfsdk/cba_annotiterator.cpp View 4 chunks +5 lines, -5 lines 0 comments Download
M fpdfsdk/cpdfsdk_annot.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M fpdfsdk/cpdfsdk_annothandlermgr.cpp View 1 4 chunks +7 lines, -6 lines 0 comments Download
M fpdfsdk/cpdfsdk_baannot.cpp View 1 chunk +1 line, -1 line 0 comments Download
M fpdfsdk/cpdfsdk_baannothandler.cpp View 1 1 chunk +0 lines, -4 lines 0 comments Download
M fpdfsdk/cpdfsdk_interform.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M fpdfsdk/cpdfsdk_widgethandler.cpp View 1 1 chunk +1 line, -5 lines 0 comments Download
M fpdfsdk/cpdfsdk_xfawidget.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M fpdfsdk/cpdfsdk_xfawidgethandler.cpp View 1 1 chunk +0 lines, -4 lines 0 comments Download
M fpdfsdk/formfiller/cffl_formfiller.cpp View 1 chunk +1 line, -1 line 0 comments Download
M fpdfsdk/formfiller/cffl_iformfiller.cpp View 13 chunks +13 lines, -13 lines 0 comments Download
M fpdfsdk/fpdf_ext.cpp View 1 chunk +10 lines, -12 lines 0 comments Download
M fpdfsdk/fsdk_baseform_embeddertest.cpp View 3 chunks +6 lines, -3 lines 0 comments Download
M fpdfsdk/fsdk_mgr.cpp View 4 chunks +6 lines, -6 lines 0 comments Download
M fpdfsdk/include/cba_annotiterator.h View 3 chunks +3 lines, -2 lines 0 comments Download
M fpdfsdk/include/cpdfsdk_annot.h View 1 chunk +1 line, -1 line 0 comments Download
M fpdfsdk/include/cpdfsdk_annothandlermgr.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M fpdfsdk/include/cpdfsdk_baannot.h View 1 chunk +1 line, -1 line 0 comments Download
M fpdfsdk/include/cpdfsdk_baannothandler.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M fpdfsdk/include/cpdfsdk_widgethandler.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M fpdfsdk/include/cpdfsdk_xfawidget.h View 1 chunk +1 line, -1 line 0 comments Download
M fpdfsdk/include/cpdfsdk_xfawidgethandler.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M fpdfsdk/include/ipdfsdk_annothandler.h View 1 2 chunks +0 lines, -5 lines 0 comments Download
M fpdfsdk/javascript/Annot.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 18 (12 generated)
jaepark
4 years, 3 months ago (2016-08-30 18:46:45 UTC) #6
dsinclair
lgtm w/ nit. https://codereview.chromium.org/2295953002/diff/1/fpdfsdk/cpdfsdk_annothandlermgr.cpp File fpdfsdk/cpdfsdk_annothandlermgr.cpp (left): https://codereview.chromium.org/2295953002/diff/1/fpdfsdk/cpdfsdk_annothandlermgr.cpp#oldcode49 fpdfsdk/cpdfsdk_annothandlermgr.cpp:49: return GetAnnotHandler(FSDK_XFAWIDGET_TYPENAME)->NewAnnot(pAnnot, pPageView); nit: Can this ...
4 years, 3 months ago (2016-08-30 20:40:30 UTC) #7
jaepark
Rebased, and removed IPDFSDK_AnnotHandler::GetType. https://codereview.chromium.org/2295953002/diff/1/fpdfsdk/cpdfsdk_annothandlermgr.cpp File fpdfsdk/cpdfsdk_annothandlermgr.cpp (left): https://codereview.chromium.org/2295953002/diff/1/fpdfsdk/cpdfsdk_annothandlermgr.cpp#oldcode49 fpdfsdk/cpdfsdk_annothandlermgr.cpp:49: return GetAnnotHandler(FSDK_XFAWIDGET_TYPENAME)->NewAnnot(pAnnot, pPageView); On 2016/08/30 ...
4 years, 3 months ago (2016-08-30 21:21:53 UTC) #13
dsinclair
lgtm
4 years, 3 months ago (2016-08-31 13:49:03 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2295953002/20001
4 years, 3 months ago (2016-08-31 13:49:07 UTC) #16
commit-bot: I haz the power
4 years, 3 months ago (2016-08-31 13:49:30 UTC) #18
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://pdfium.googlesource.com/pdfium/+/956553e715787cfc4dd8423d5e9a04a01318...

Powered by Google App Engine
This is Rietveld 408576698