From eed467dcf3c661cddaecf4f996bc8964e7090cf9 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Tue, 2 Jun 2015 10:35:27 -0700 Subject: Replace XFA_HWIDGET with IXFA_Widget* A second case of casting willy-nilly between unrelated structures to provide information hiding. Bad Idea. Remove dozens of casts in the process. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1155273002 --- fpdfsdk/src/fsdk_mgr.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'fpdfsdk/src/fsdk_mgr.cpp') diff --git a/fpdfsdk/src/fsdk_mgr.cpp b/fpdfsdk/src/fsdk_mgr.cpp index ccb1ab6e34..a1d9453c52 100644 --- a/fpdfsdk/src/fsdk_mgr.cpp +++ b/fpdfsdk/src/fsdk_mgr.cpp @@ -805,7 +805,7 @@ CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(CPDF_Annot * pPDFAnnot) return pSDKAnnot; } -CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(XFA_HWIDGET pPDFAnnot) +CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(IXFA_Widget* pPDFAnnot) { if (!pPDFAnnot) return NULL; @@ -905,7 +905,7 @@ CPDFSDK_Annot* CPDFSDK_PageView::GetAnnotByDict(CPDF_Dictionary * pDict) } return NULL; } -CPDFSDK_Annot* CPDFSDK_PageView::GetAnnotByXFAWidget(XFA_HWIDGET hWidget) +CPDFSDK_Annot* CPDFSDK_PageView::GetAnnotByXFAWidget(IXFA_Widget* hWidget) { if (hWidget == NULL) return NULL; @@ -1118,7 +1118,6 @@ void CPDFSDK_PageView::LoadFXAnnots() pageView = m_page->GetXFAPageView(); ASSERT(pageView != NULL); - XFA_HWIDGET pXFAAnnot = NULL; IXFA_WidgetIterator* pWidgetHander = pageView->CreateWidgetIterator(XFA_TRAVERSEWAY_Form, XFA_WIDGETFILTER_Visible|XFA_WIDGETFILTER_Viewable|XFA_WIDGETFILTER_AllType); if (!pWidgetHander) { @@ -1127,7 +1126,7 @@ void CPDFSDK_PageView::LoadFXAnnots() return; } - pXFAAnnot = pWidgetHander->MoveToNext(); + IXFA_Widget* pXFAAnnot = pWidgetHander->MoveToNext(); while (pXFAAnnot) { CPDFSDK_Annot* pAnnot = pAnnotHandlerMgr->NewAnnot(pXFAAnnot, this); if(!pAnnot) { -- cgit v1.2.3