summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-05-19 19:25:16 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-22 18:28:21 +0000
commit671630e52cda1abb5b1da71f366211cc3c95482f (patch)
tree701f3f8af350b0065415876ecfc86c4a300d0078 /fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
parent6c8ed646d1fcb8cce5a01c843c5149d989e6d5f0 (diff)
downloadpdfium-671630e52cda1abb5b1da71f366211cc3c95482f.tar.xz
Use less opaque types in CPDFSDK_FormFillEnvironment.
Fix type mismatches. Change-Id: Id475f927d0919f60a84f17bd9545ec67d569ff64 Reviewed-on: https://pdfium-review.googlesource.com/5740 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp')
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
index 4695c64ce1..28badc4144 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
@@ -66,7 +66,7 @@ void CPDFXFA_DocEnvironment::InvalidateRect(CXFA_FFPageView* pPageView,
if (!pFormFillEnv)
return;
- pFormFillEnv->Invalidate(static_cast<FPDF_PAGE>(pPage.Get()),
+ pFormFillEnv->Invalidate(pPage.Get(),
CFX_FloatRect::FromCFXRectF(rt).ToFxRect());
}
@@ -98,9 +98,8 @@ void CPDFXFA_DocEnvironment::DisplayCaret(CXFA_FFWidget* hWidget,
return;
CFX_FloatRect rcCaret = CFX_FloatRect::FromCFXRectF(*pRtAnchor);
- pFormFillEnv->DisplayCaret(static_cast<FPDF_PAGE>(pPage.Get()), bVisible,
- rcCaret.left, rcCaret.top, rcCaret.right,
- rcCaret.bottom);
+ pFormFillEnv->DisplayCaret(pPage.Get(), bVisible, rcCaret.left, rcCaret.top,
+ rcCaret.right, rcCaret.bottom);
}
bool CPDFXFA_DocEnvironment::GetPopupPos(CXFA_FFWidget* hWidget,
@@ -344,7 +343,7 @@ int32_t CPDFXFA_DocEnvironment::GetCurrentPage(CXFA_FFDoc* hDoc) {
if (!pFormFillEnv)
return -1;
- return pFormFillEnv->GetCurrentPageIndex(this);
+ return pFormFillEnv->GetCurrentPageIndex(m_pContext.Get());
}
void CPDFXFA_DocEnvironment::SetCurrentPage(CXFA_FFDoc* hDoc,
@@ -358,7 +357,7 @@ void CPDFXFA_DocEnvironment::SetCurrentPage(CXFA_FFDoc* hDoc,
CPDFSDK_FormFillEnvironment* pFormFillEnv = m_pContext->GetFormFillEnv();
if (!pFormFillEnv)
return;
- pFormFillEnv->SetCurrentPage(this, iCurPage);
+ pFormFillEnv->SetCurrentPage(m_pContext.Get(), iCurPage);
}
bool CPDFXFA_DocEnvironment::IsCalculationsEnabled(CXFA_FFDoc* hDoc) {
@@ -518,7 +517,7 @@ void CPDFXFA_DocEnvironment::GotoURL(CXFA_FFDoc* hDoc,
return;
CFX_WideStringC str(bsURL.c_str());
- pFormFillEnv->GotoURL(this, str);
+ pFormFillEnv->GotoURL(m_pContext.Get(), str);
}
bool CPDFXFA_DocEnvironment::IsValidationsEnabled(CXFA_FFDoc* hDoc) {