diff options
author | jaepark <jaepark@google.com> | 2016-08-31 06:49:27 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-31 06:49:27 -0700 |
commit | 956553e715787cfc4dd8423d5e9a04a0131878c3 (patch) | |
tree | 08622d504322d5dae37b5bb5025a90c81ebdee6b /fpdfsdk/fsdk_baseform_embeddertest.cpp | |
parent | 87dffc0315477150c9c1964913b65bc97bdf654f (diff) | |
download | pdfium-956553e715787cfc4dd8423d5e9a04a0131878c3.tar.xz |
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.
Review-Url: https://codereview.chromium.org/2295953002
Diffstat (limited to 'fpdfsdk/fsdk_baseform_embeddertest.cpp')
-rw-r--r-- | fpdfsdk/fsdk_baseform_embeddertest.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fpdfsdk/fsdk_baseform_embeddertest.cpp b/fpdfsdk/fsdk_baseform_embeddertest.cpp index c87073d38b..53611ae698 100644 --- a/fpdfsdk/fsdk_baseform_embeddertest.cpp +++ b/fpdfsdk/fsdk_baseform_embeddertest.cpp @@ -42,7 +42,8 @@ TEST_F(FSDKBaseFormEmbeddertest, CBA_AnnotIterator) { CPDFSDK_Document::FromFPDFFormHandle(form_handle()); { // Page 0 specifies "row order". - CBA_AnnotIterator iter(pSDKDoc->GetPageView(0), "Widget"); + CBA_AnnotIterator iter(pSDKDoc->GetPageView(0), + CPDF_Annot::Subtype::WIDGET); CPDFSDK_Annot* pAnnot = iter.GetFirstAnnot(); CheckRect(pAnnot->GetRect(), RightTop); pAnnot = iter.GetNextAnnot(pAnnot); @@ -67,7 +68,8 @@ TEST_F(FSDKBaseFormEmbeddertest, CBA_AnnotIterator) { } { // Page 1 specifies "column order" - CBA_AnnotIterator iter(pSDKDoc->GetPageView(1), "Widget"); + CBA_AnnotIterator iter(pSDKDoc->GetPageView(1), + CPDF_Annot::Subtype::WIDGET); CPDFSDK_Annot* pAnnot = iter.GetFirstAnnot(); CheckRect(pAnnot->GetRect(), RightTop); pAnnot = iter.GetNextAnnot(pAnnot); @@ -92,7 +94,8 @@ TEST_F(FSDKBaseFormEmbeddertest, CBA_AnnotIterator) { } { // Page 2 specifies "struct order" - CBA_AnnotIterator iter(pSDKDoc->GetPageView(2), "Widget"); + CBA_AnnotIterator iter(pSDKDoc->GetPageView(2), + CPDF_Annot::Subtype::WIDGET); CPDFSDK_Annot* pAnnot = iter.GetFirstAnnot(); CheckRect(pAnnot->GetRect(), LeftBottom); pAnnot = iter.GetNextAnnot(pAnnot); |