diff options
author | dsinclair <dsinclair@chromium.org> | 2016-10-11 13:08:04 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-10-11 13:08:04 -0700 |
commit | f3fbe83a0f6c1dfb05722a6f0a4056c53548fb6e (patch) | |
tree | 6064580b9ae64ba4fe0517fcb367a426b98634c1 /fpdfsdk/fsdk_baseform_embeddertest.cpp | |
parent | 19c198b7b80633e6030457d276df99aee3ca8ca4 (diff) | |
download | pdfium-f3fbe83a0f6c1dfb05722a6f0a4056c53548fb6e.tar.xz |
Convert fpdfformfill to use CPDFSDK_FormFillEnvironment
This CL converts to using CPDFSDK_FormFillEnvironment instead of
CPDFSDK_Document internally.
Review-Url: https://codereview.chromium.org/2398253002
Diffstat (limited to 'fpdfsdk/fsdk_baseform_embeddertest.cpp')
-rw-r--r-- | fpdfsdk/fsdk_baseform_embeddertest.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/fpdfsdk/fsdk_baseform_embeddertest.cpp b/fpdfsdk/fsdk_baseform_embeddertest.cpp index 66ee156a7e..a11453b1ec 100644 --- a/fpdfsdk/fsdk_baseform_embeddertest.cpp +++ b/fpdfsdk/fsdk_baseform_embeddertest.cpp @@ -5,6 +5,7 @@ #include "fpdfsdk/cba_annotiterator.h" #include "fpdfsdk/cpdfsdk_annot.h" #include "fpdfsdk/cpdfsdk_document.h" +#include "fpdfsdk/cpdfsdk_formfillenvironment.h" #include "fpdfsdk/fsdk_define.h" #include "testing/embedder_test.h" #include "testing/embedder_test_mock_delegate.h" @@ -39,11 +40,12 @@ TEST_F(FSDKBaseFormEmbeddertest, CBA_AnnotIterator) { CFX_FloatRect LeftTop(201, 400, 221, 420); CFX_FloatRect RightTop(401, 401, 421, 421); - CPDFSDK_Document* pSDKDoc = - CPDFSDK_Document::FromFPDFFormHandle(form_handle()); + CPDFSDK_FormFillEnvironment* pFormFillEnv = + static_cast<CPDFSDK_FormFillEnvironment*>(form_handle()); + { // Page 0 specifies "row order". - CBA_AnnotIterator iter(pSDKDoc->GetPageView(0), + CBA_AnnotIterator iter(pFormFillEnv->GetSDKDocument()->GetPageView(0), CPDF_Annot::Subtype::WIDGET); CPDFSDK_Annot* pAnnot = iter.GetFirstAnnot(); CheckRect(pAnnot->GetRect(), RightTop); @@ -69,7 +71,7 @@ TEST_F(FSDKBaseFormEmbeddertest, CBA_AnnotIterator) { } { // Page 1 specifies "column order" - CBA_AnnotIterator iter(pSDKDoc->GetPageView(1), + CBA_AnnotIterator iter(pFormFillEnv->GetSDKDocument()->GetPageView(1), CPDF_Annot::Subtype::WIDGET); CPDFSDK_Annot* pAnnot = iter.GetFirstAnnot(); CheckRect(pAnnot->GetRect(), RightTop); @@ -95,7 +97,7 @@ TEST_F(FSDKBaseFormEmbeddertest, CBA_AnnotIterator) { } { // Page 2 specifies "struct order" - CBA_AnnotIterator iter(pSDKDoc->GetPageView(2), + CBA_AnnotIterator iter(pFormFillEnv->GetSDKDocument()->GetPageView(2), CPDF_Annot::Subtype::WIDGET); CPDFSDK_Annot* pAnnot = iter.GetFirstAnnot(); CheckRect(pAnnot->GetRect(), LeftBottom); |