From 221caf6f6f9810cbc0e0c4c50af9b036a052ae13 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Mon, 4 Apr 2016 12:08:40 -0700 Subject: Cleanup the FF Handler proxy methods. This CL removes the proxy methods from CXFA_FFWidgetHandler and CXFA_DocHandler and removes CXFA_FFMenuHandler as it was only proxy methods. The calls are made directly on the object now. Review URL: https://codereview.chromium.org/1857893002 --- fpdfsdk/fsdk_annothandler.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'fpdfsdk/fsdk_annothandler.cpp') diff --git a/fpdfsdk/fsdk_annothandler.cpp b/fpdfsdk/fsdk_annothandler.cpp index b89a63696c..5afe8e493b 100644 --- a/fpdfsdk/fsdk_annothandler.cpp +++ b/fpdfsdk/fsdk_annothandler.cpp @@ -20,6 +20,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_ffwidget.h" #endif // PDF_ENABLE_XFA CPDFSDK_AnnotHandlerMgr::CPDFSDK_AnnotHandlerMgr(CPDFDoc_Environment* pApp) { @@ -785,15 +786,12 @@ CFX_FloatRect CPDFSDK_XFAAnnotHandler::GetViewBBox(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot) { ASSERT(pAnnot); - CXFA_FFWidgetHandler* pWidgetHandler = GetXFAWidgetHandler(pAnnot); CFX_RectF rcBBox; - XFA_ELEMENT eType = - pWidgetHandler->GetDataAcc(pAnnot->GetXFAWidget())->GetUIType(); + XFA_ELEMENT eType = pAnnot->GetXFAWidget()->GetDataAcc()->GetUIType(); if (eType == XFA_ELEMENT_Signature) - pWidgetHandler->GetBBox(pAnnot->GetXFAWidget(), rcBBox, - XFA_WIDGETSTATUS_Visible, TRUE); + pAnnot->GetXFAWidget()->GetBBox(rcBBox, XFA_WIDGETSTATUS_Visible, TRUE); else - pWidgetHandler->GetBBox(pAnnot->GetXFAWidget(), rcBBox, 0); + pAnnot->GetXFAWidget()->GetBBox(rcBBox, 0); CFX_FloatRect rcWidget(rcBBox.left, rcBBox.top, rcBBox.left + rcBBox.width, rcBBox.top + rcBBox.height); @@ -1004,7 +1002,7 @@ FX_BOOL CPDFSDK_XFAAnnotHandler::OnXFAChangedFocus(CPDFSDK_Annot* pOldAnnot, FX_BOOL bRet = TRUE; CXFA_FFWidget* hWidget = pNewAnnot ? pNewAnnot->GetXFAWidget() : NULL; if (hWidget) { - CXFA_FFPageView* pXFAPageView = pWidgetHandler->GetPageView(hWidget); + CXFA_FFPageView* pXFAPageView = hWidget->GetPageView(); if (pXFAPageView) { bRet = pXFAPageView->GetDocView()->SetFocus(hWidget); if (pXFAPageView->GetDocView()->GetFocusWidget() == hWidget) -- cgit v1.2.3