Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: fpdfsdk/fsdk_annothandler.cpp

Issue 1857893002: Cleanup the FF Handler proxy methods. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp ('k') | fpdfsdk/fsdk_baseform.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/fsdk_annothandler.cpp
diff --git a/fpdfsdk/fsdk_annothandler.cpp b/fpdfsdk/fsdk_annothandler.cpp
index b89a63696ccc434a929257ba7223cb5593d35b79..5afe8e493b87df1c6cc66d360d6599e5848db722 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)
« no previous file with comments | « fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp ('k') | fpdfsdk/fsdk_baseform.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698