summaryrefslogtreecommitdiff
path: root/fpdfsdk/fsdk_mgr.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-03-31 20:34:43 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-31 20:34:43 -0700
commitdf4bc596c64fb848647c670be66a29ea0861b4f4 (patch)
tree096f18bc5903e45982291daf81424d0d4954d158 /fpdfsdk/fsdk_mgr.cpp
parent64376be4aac4710848b36b823fd98aae75095336 (diff)
downloadpdfium-df4bc596c64fb848647c670be66a29ea0861b4f4.tar.xz
Remove IXFA_* interfaces.
This CL removes the IXFA_* interfaces which are: - Implemented once. - Not implemented by an fpdfsdk class. This requires making a few classes visible to fpdfsdk so we can have the correct instances available instead of the IXFA types. Review URL: https://codereview.chromium.org/1846993002
Diffstat (limited to 'fpdfsdk/fsdk_mgr.cpp')
-rw-r--r--fpdfsdk/fsdk_mgr.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/fpdfsdk/fsdk_mgr.cpp b/fpdfsdk/fsdk_mgr.cpp
index b318b0a9db..323128c9fe 100644
--- a/fpdfsdk/fsdk_mgr.cpp
+++ b/fpdfsdk/fsdk_mgr.cpp
@@ -24,6 +24,7 @@
#include "fpdfsdk/include/fpdfxfa/fpdfxfa_page.h"
#include "fpdfsdk/include/fpdfxfa/fpdfxfa_util.h"
#include "xfa/fxgraphics/include/cfx_graphics.h"
+#include "xfa/include/fxfa/xfa_rendercontext.h"
#endif // PDF_ENABLE_XFA
#if _FX_OS_ == _FX_ANDROID_
@@ -702,17 +703,15 @@ void CPDFSDK_PageView::PageView_OnDraw(CFX_RenderDevice* pDevice,
static_cast<FX_FLOAT>(pClip.Width()),
static_cast<FX_FLOAT>(pClip.Height()));
gs.SetClipRect(rectClip);
- IXFA_RenderContext* pRenderContext = XFA_RenderContext_Create();
- if (!pRenderContext)
- return;
+ CXFA_RenderContext* pRenderContext = new CXFA_RenderContext;
CXFA_RenderOptions renderOptions;
renderOptions.m_bHighlight = TRUE;
- IXFA_PageView* xfaView = pPage->GetXFAPageView();
+ CXFA_FFPageView* xfaView = pPage->GetXFAPageView();
pRenderContext->StartRender(xfaView, &gs, *pUser2Device, renderOptions);
pRenderContext->DoRender();
pRenderContext->StopRender();
pRenderContext->Release();
- IXFA_DocView* docView = xfaView->GetDocView();
+ CXFA_FFDocView* docView = xfaView->GetDocView();
if (!docView)
return;
CPDFSDK_Annot* annot = GetFocusAnnot();
@@ -821,7 +820,7 @@ CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(CPDF_Annot* pPDFAnnot) {
}
#ifdef PDF_ENABLE_XFA
-CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(IXFA_Widget* pPDFAnnot) {
+CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(CXFA_FFWidget* pPDFAnnot) {
if (!pPDFAnnot)
return nullptr;
@@ -914,7 +913,7 @@ CPDFSDK_Annot* CPDFSDK_PageView::GetAnnotByDict(CPDF_Dictionary* pDict) {
}
#ifdef PDF_ENABLE_XFA
-CPDFSDK_Annot* CPDFSDK_PageView::GetAnnotByXFAWidget(IXFA_Widget* hWidget) {
+CPDFSDK_Annot* CPDFSDK_PageView::GetAnnotByXFAWidget(CXFA_FFWidget* hWidget) {
if (!hWidget)
return nullptr;
@@ -1087,7 +1086,7 @@ void CPDFSDK_PageView::LoadFXAnnots() {
#ifdef PDF_ENABLE_XFA
m_page->AddRef();
if (m_pSDKDoc->GetXFADocument()->GetDocType() == DOCTYPE_DYNAMIC_XFA) {
- IXFA_PageView* pageView = m_page->GetXFAPageView();
+ CXFA_FFPageView* pageView = m_page->GetXFAPageView();
IXFA_WidgetIterator* pWidgetHander = pageView->CreateWidgetIterator(
XFA_TRAVERSEWAY_Form, XFA_WIDGETFILTER_Visible |
XFA_WIDGETFILTER_Viewable |
@@ -1098,7 +1097,7 @@ void CPDFSDK_PageView::LoadFXAnnots() {
return;
}
- while (IXFA_Widget* pXFAAnnot = pWidgetHander->MoveToNext()) {
+ while (CXFA_FFWidget* pXFAAnnot = pWidgetHander->MoveToNext()) {
CPDFSDK_Annot* pAnnot = pAnnotHandlerMgr->NewAnnot(pXFAAnnot, this);
if (!pAnnot)
continue;