diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-06-02 10:35:27 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-06-02 10:35:27 -0700 |
commit | eed467dcf3c661cddaecf4f996bc8964e7090cf9 (patch) | |
tree | 12eb9093d2760566d920ce2862b61371082e75a6 /fpdfsdk/src/fsdk_mgr.cpp | |
parent | 56ba4292f1454f259b52a68dd962cc2d8c2027c8 (diff) | |
download | pdfium-eed467dcf3c661cddaecf4f996bc8964e7090cf9.tar.xz |
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
Diffstat (limited to 'fpdfsdk/src/fsdk_mgr.cpp')
-rw-r--r-- | fpdfsdk/src/fsdk_mgr.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
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) { |