From e3978d0bf4283f6a8b39c2e7a4f980ac92631280 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 23 Mar 2017 09:12:10 -0400 Subject: Remove unused invalidate flag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The flag passed to the DocEnvironment::InvalidateRect method is not used. Remove. Change-Id: I2a996e0bbf7f6a010c985bf4e9df0084dc0a7ea3 Reviewed-on: https://pdfium-review.googlesource.com/3154 Commit-Queue: dsinclair Reviewed-by: Nicolás Peña --- fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp | 3 +-- fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h | 8 +++----- xfa/fxfa/app/xfa_ffdocview.cpp | 2 +- xfa/fxfa/app/xfa_ffwidget.cpp | 6 ++---- xfa/fxfa/fxfa.h | 5 +---- 5 files changed, 8 insertions(+), 16 deletions(-) diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp index 743b68b27f..e54ca85fd9 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp +++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp @@ -55,8 +55,7 @@ void CPDFXFA_DocEnvironment::SetChangeMark(CXFA_FFDoc* hDoc) { } void CPDFXFA_DocEnvironment::InvalidateRect(CXFA_FFPageView* pPageView, - const CFX_RectF& rt, - uint32_t dwFlags /* = 0 */) { + const CFX_RectF& rt) { if (!m_pContext->GetXFADoc() || !m_pContext->GetFormFillEnv()) return; diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h index 4624d8008c..8f1d238103 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h +++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h @@ -21,11 +21,9 @@ class CPDFXFA_DocEnvironment : public IXFA_DocEnvironment { // IXFA_DocEnvironment void SetChangeMark(CXFA_FFDoc* hDoc) override; - // used in dynamic xfa, dwFlags refer to XFA_INVALIDATE_XXX macros. - void InvalidateRect(CXFA_FFPageView* pPageView, - const CFX_RectF& rt, - uint32_t dwFlags) override; - // show or hide caret + // Used in dynamic xfa. + void InvalidateRect(CXFA_FFPageView* pPageView, const CFX_RectF& rt) override; + // Show or hide caret. void DisplayCaret(CXFA_FFWidget* hWidget, bool bVisible, const CFX_RectF* pRtAnchor) override; diff --git a/xfa/fxfa/app/xfa_ffdocview.cpp b/xfa/fxfa/app/xfa_ffdocview.cpp index 1447d09140..210002c530 100644 --- a/xfa/fxfa/app/xfa_ffdocview.cpp +++ b/xfa/fxfa/app/xfa_ffdocview.cpp @@ -555,7 +555,7 @@ void CXFA_FFDocView::AddInvalidateRect(CXFA_FFPageView* pPageView, void CXFA_FFDocView::RunInvalidate() { for (const auto& pair : m_mapPageInvalidate) - m_pDoc->GetDocEnvironment()->InvalidateRect(pair.first, *pair.second, 0); + m_pDoc->GetDocEnvironment()->InvalidateRect(pair.first, *pair.second); m_mapPageInvalidate.clear(); } diff --git a/xfa/fxfa/app/xfa_ffwidget.cpp b/xfa/fxfa/app/xfa_ffwidget.cpp index 43bb32feec..2d52982293 100644 --- a/xfa/fxfa/app/xfa_ffwidget.cpp +++ b/xfa/fxfa/app/xfa_ffwidget.cpp @@ -151,15 +151,13 @@ void CXFA_FFWidget::DrawBorder(CFX_Graphics* pGS, void CXFA_FFWidget::InvalidateWidget(const CFX_RectF* pRect) { if (pRect) { - GetDoc()->GetDocEnvironment()->InvalidateRect(m_pPageView, *pRect, - XFA_INVALIDATE_CurrentPage); + GetDoc()->GetDocEnvironment()->InvalidateRect(m_pPageView, *pRect); return; } CFX_RectF rtWidget = GetBBox(XFA_WidgetStatus_Focused); rtWidget.Inflate(2, 2); - GetDoc()->GetDocEnvironment()->InvalidateRect(m_pPageView, rtWidget, - XFA_INVALIDATE_CurrentPage); + GetDoc()->GetDocEnvironment()->InvalidateRect(m_pPageView, rtWidget); } void CXFA_FFWidget::AddInvalidateRect(const CFX_RectF* pRect) { diff --git a/xfa/fxfa/fxfa.h b/xfa/fxfa/fxfa.h index cfe5618e6e..38b11ee17c 100644 --- a/xfa/fxfa/fxfa.h +++ b/xfa/fxfa/fxfa.h @@ -52,8 +52,6 @@ class IXFA_WidgetIterator; #define XFA_VALIDATE_preExecute 3 #define XFA_VALIDATE_preSave 4 -#define XFA_INVALIDATE_AllPages 0x00000000 -#define XFA_INVALIDATE_CurrentPage 0x00000001 #define XFA_PRINTOPT_ShowDialog 0x00000001 #define XFA_PRINTOPT_CanCancel 0x00000002 #define XFA_PRINTOPT_ShrinkPage 0x00000004 @@ -230,8 +228,7 @@ class IXFA_DocEnvironment { virtual void SetChangeMark(CXFA_FFDoc* hDoc) = 0; virtual void InvalidateRect(CXFA_FFPageView* pPageView, - const CFX_RectF& rt, - uint32_t dwFlags) = 0; + const CFX_RectF& rt) = 0; virtual void DisplayCaret(CXFA_FFWidget* hWidget, bool bVisible, const CFX_RectF* pRtAnchor) = 0; -- cgit v1.2.3