From aa5769a417251214d1a8b3ebb5153a9251f50448 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 16 Aug 2018 21:22:42 +0000 Subject: Replace optional bool bDrawFocus with enum type. Change-Id: Ide4a972337afaf346e46edc4ede48140cd4544c1 Reviewed-on: https://pdfium-review.googlesource.com/40390 Commit-Queue: Tom Sepez Reviewed-by: Lei Zhang --- fpdfsdk/cpdfsdk_xfawidgethandler.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'fpdfsdk') diff --git a/fpdfsdk/cpdfsdk_xfawidgethandler.cpp b/fpdfsdk/cpdfsdk_xfawidgethandler.cpp index a395eef038..82eda21469 100644 --- a/fpdfsdk/cpdfsdk_xfawidgethandler.cpp +++ b/fpdfsdk/cpdfsdk_xfawidgethandler.cpp @@ -79,17 +79,17 @@ void CPDFSDK_XFAWidgetHandler::ReleaseAnnot(CPDFSDK_Annot* pAnnot) { CFX_FloatRect CPDFSDK_XFAWidgetHandler::GetViewBBox(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot) { - ASSERT(pAnnot); - CXFA_Node* node = pAnnot->GetXFAWidget()->GetNode(); ASSERT(node->IsWidgetReady()); CFX_RectF rcBBox; - if (node->GetFFWidgetType() == XFA_FFWidgetType::kSignature) - rcBBox = pAnnot->GetXFAWidget()->GetBBox(XFA_WidgetStatus_Visible, true); - else - rcBBox = pAnnot->GetXFAWidget()->GetBBox(XFA_WidgetStatus_None); - + if (node->GetFFWidgetType() == XFA_FFWidgetType::kSignature) { + rcBBox = pAnnot->GetXFAWidget()->GetBBox(XFA_WidgetStatus_Visible, + CXFA_FFWidget::kDrawFocus); + } else { + rcBBox = pAnnot->GetXFAWidget()->GetBBox(XFA_WidgetStatus_None, + CXFA_FFWidget::kDoNotDrawFocus); + } CFX_FloatRect rcWidget(rcBBox.left, rcBBox.top, rcBBox.left + rcBBox.width, rcBBox.top + rcBBox.height); rcWidget.left -= 1.0f; -- cgit v1.2.3