summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fsdk_annothandler.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-06-02 10:35:27 -0700
committerTom Sepez <tsepez@chromium.org>2015-06-02 10:35:27 -0700
commiteed467dcf3c661cddaecf4f996bc8964e7090cf9 (patch)
tree12eb9093d2760566d920ce2862b61371082e75a6 /fpdfsdk/src/fsdk_annothandler.cpp
parent56ba4292f1454f259b52a68dd962cc2d8c2027c8 (diff)
downloadpdfium-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_annothandler.cpp')
-rw-r--r--fpdfsdk/src/fsdk_annothandler.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/fpdfsdk/src/fsdk_annothandler.cpp b/fpdfsdk/src/fsdk_annothandler.cpp
index a9e21219a1..6b7c60d7af 100644
--- a/fpdfsdk/src/fsdk_annothandler.cpp
+++ b/fpdfsdk/src/fsdk_annothandler.cpp
@@ -74,7 +74,7 @@ CPDFSDK_Annot* CPDFSDK_AnnotHandlerMgr::NewAnnot(CPDF_Annot * pAnnot, CPDFSDK_Pa
return new CPDFSDK_BAAnnot(pAnnot, pPageView);
}
-CPDFSDK_Annot* CPDFSDK_AnnotHandlerMgr::NewAnnot(XFA_HWIDGET pAnnot, CPDFSDK_PageView* pPageView)
+CPDFSDK_Annot* CPDFSDK_AnnotHandlerMgr::NewAnnot(IXFA_Widget* pAnnot, CPDFSDK_PageView* pPageView)
{
ASSERT(pAnnot != NULL);
ASSERT(pPageView != NULL);
@@ -398,7 +398,7 @@ CPDFSDK_Annot* CPDFSDK_AnnotHandlerMgr::GetNextAnnot(CPDFSDK_Annot* pSDKAnnot,FX
return NULL;
if (pWidgetIterator->GetCurrentWidget() != pSDKAnnot->GetXFAWidget())
pWidgetIterator->SetCurrentWidget(pSDKAnnot->GetXFAWidget());
- XFA_HWIDGET hNextFocus = NULL;
+ IXFA_Widget* hNextFocus = NULL;
hNextFocus = bNext?pWidgetIterator->MoveToNext():pWidgetIterator->MoveToPrevious();
if (hNextFocus == NULL && pSDKAnnot != NULL)
hNextFocus = pWidgetIterator->MoveToFirst();
@@ -466,7 +466,7 @@ CPDFSDK_Annot* CPDFSDK_BFAnnotHandler::NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_Pag
return pWidget;
}
-CPDFSDK_Annot* CPDFSDK_BFAnnotHandler::NewAnnot(XFA_HWIDGET hWidget, CPDFSDK_PageView* pPage)
+CPDFSDK_Annot* CPDFSDK_BFAnnotHandler::NewAnnot(IXFA_Widget* hWidget, CPDFSDK_PageView* pPage)
{
return NULL;
}
@@ -837,7 +837,7 @@ CPDFSDK_XFAAnnotHandler::CPDFSDK_XFAAnnotHandler(CPDFDoc_Environment* pApp) :
}
-CPDFSDK_Annot* CPDFSDK_XFAAnnotHandler::NewAnnot(XFA_HWIDGET pAnnot, CPDFSDK_PageView* pPage)
+CPDFSDK_Annot* CPDFSDK_XFAAnnotHandler::NewAnnot(IXFA_Widget* pAnnot, CPDFSDK_PageView* pPage)
{
ASSERT(pPage != NULL);
ASSERT(pAnnot != NULL);
@@ -879,7 +879,7 @@ void CPDFSDK_XFAAnnotHandler::OnDraw(CPDFSDK_PageView *pPageView, CPDFSDK_Annot*
CFX_Matrix mt;
mt = *(CFX_Matrix*)pUser2Device;
- XFA_HWIDGET hWidget = pAnnot->GetXFAWidget();
+ IXFA_Widget* hWidget = pAnnot->GetXFAWidget();
ASSERT(hWidget != NULL);
FX_BOOL bIsHighlight = FALSE;
@@ -1149,10 +1149,8 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnXFAChangedFocus(CPDFSDK_Annot* pOldAnnot, CPD
if (pWidgetHandler)
{
- FX_BOOL bRet = TRUE; /*pWidgetHandler->OnFocusChange(pNewAnnot ? pNewAnnot->GetXFAWidget() : NULL,
- pOldAnnot ? pOldAnnot->GetXFAWidget() : NULL); */
-
- XFA_HWIDGET hWidget = pNewAnnot ? pNewAnnot->GetXFAWidget() : NULL;
+ FX_BOOL bRet = TRUE;
+ IXFA_Widget* hWidget = pNewAnnot ? pNewAnnot->GetXFAWidget() : NULL;
if (hWidget)
{
IXFA_PageView* pXFAPageView = pWidgetHandler->GetPageView(hWidget);