Do IWYU for public/fpdf_fwlevent.h. Change-Id: Id45ea6185f7ccdf9f8aef4c6b0adc58dcd1dceb1 Reviewed-on: https://pdfium-review.googlesource.com/c/47151 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/fpdfsdk/cpdfsdk_annothandlermgr.cpp b/fpdfsdk/cpdfsdk_annothandlermgr.cpp index 7d253c8..619d66d 100644 --- a/fpdfsdk/cpdfsdk_annothandlermgr.cpp +++ b/fpdfsdk/cpdfsdk_annothandlermgr.cpp
@@ -17,6 +17,7 @@ #include "fpdfsdk/cpdfsdk_pageview.h" #include "fpdfsdk/cpdfsdk_widget.h" #include "fpdfsdk/cpdfsdk_widgethandler.h" +#include "public/fpdf_fwlevent.h" #include "third_party/base/ptr_util.h" #ifdef PDF_ENABLE_XFA
diff --git a/fpdfsdk/cpdfsdk_formfillenvironment.cpp b/fpdfsdk/cpdfsdk_formfillenvironment.cpp index 68f5a67..ae18b0a 100644 --- a/fpdfsdk/cpdfsdk_formfillenvironment.cpp +++ b/fpdfsdk/cpdfsdk_formfillenvironment.cpp
@@ -19,6 +19,7 @@ #include "fpdfsdk/cpdfsdk_widget.h" #include "fpdfsdk/formfiller/cffl_interactiveformfiller.h" #include "fxjs/ijs_runtime.h" +#include "public/fpdf_fwlevent.h" #include "third_party/base/ptr_util.h" #include "third_party/base/stl_util.h" @@ -62,6 +63,21 @@ m_pInfo->Release(m_pInfo); } +// static +bool CPDFSDK_FormFillEnvironment::IsSHIFTKeyDown(uint32_t nFlag) { + return !!(nFlag & FWL_EVENTFLAG_ShiftKey); +} + +// static +bool CPDFSDK_FormFillEnvironment::IsCTRLKeyDown(uint32_t nFlag) { + return !!(nFlag & FWL_EVENTFLAG_ControlKey); +} + +// static +bool CPDFSDK_FormFillEnvironment::IsALTKeyDown(uint32_t nFlag) { + return !!(nFlag & FWL_EVENTFLAG_AltKey); +} + #ifdef PDF_ENABLE_V8 int CPDFSDK_FormFillEnvironment::JS_appAlert(const WideString& Msg, const WideString& Title,
diff --git a/fpdfsdk/cpdfsdk_formfillenvironment.h b/fpdfsdk/cpdfsdk_formfillenvironment.h index 23e2522..2ece107 100644 --- a/fpdfsdk/cpdfsdk_formfillenvironment.h +++ b/fpdfsdk/cpdfsdk_formfillenvironment.h
@@ -19,7 +19,6 @@ #include "fpdfsdk/cpdfsdk_annot.h" #include "fpdfsdk/cpdfsdk_helpers.h" #include "public/fpdf_formfill.h" -#include "public/fpdf_fwlevent.h" class CFFL_InteractiveFormFiller; class CFX_SystemHandler; @@ -50,15 +49,9 @@ CPDFSDK_FormFillEnvironment(CPDF_Document* pDoc, FPDF_FORMFILLINFO* pFFinfo); ~CPDFSDK_FormFillEnvironment(); - static bool IsSHIFTKeyDown(uint32_t nFlag) { - return !!(nFlag & FWL_EVENTFLAG_ShiftKey); - } - static bool IsCTRLKeyDown(uint32_t nFlag) { - return !!(nFlag & FWL_EVENTFLAG_ControlKey); - } - static bool IsALTKeyDown(uint32_t nFlag) { - return !!(nFlag & FWL_EVENTFLAG_AltKey); - } + static bool IsSHIFTKeyDown(uint32_t nFlag); + static bool IsCTRLKeyDown(uint32_t nFlag); + static bool IsALTKeyDown(uint32_t nFlag); CPDFSDK_PageView* GetPageView(IPDF_Page* pPage, bool renew); CPDFSDK_PageView* GetPageView(int nIndex);
diff --git a/fpdfsdk/cpdfsdk_xfawidgethandler.cpp b/fpdfsdk/cpdfsdk_xfawidgethandler.cpp index 20386f6..fcbfae8 100644 --- a/fpdfsdk/cpdfsdk_xfawidgethandler.cpp +++ b/fpdfsdk/cpdfsdk_xfawidgethandler.cpp
@@ -13,6 +13,7 @@ #include "fpdfsdk/cpdfsdk_pageview.h" #include "fpdfsdk/cpdfsdk_xfawidget.h" #include "fpdfsdk/fpdfxfa/cpdfxfa_context.h" +#include "public/fpdf_fwlevent.h" #include "xfa/fwl/cfwl_app.h" #include "xfa/fwl/fwl_widgethit.h" #include "xfa/fxfa/cxfa_ffdocview.h"
diff --git a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp index b578a44..4a33c71 100644 --- a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp +++ b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
@@ -23,6 +23,7 @@ #include "fpdfsdk/formfiller/cffl_pushbutton.h" #include "fpdfsdk/formfiller/cffl_radiobutton.h" #include "fpdfsdk/formfiller/cffl_textfield.h" +#include "public/fpdf_fwlevent.h" #include "third_party/base/ptr_util.h" #include "third_party/base/stl_util.h"
diff --git a/fpdfsdk/formfiller/cffl_textfield.cpp b/fpdfsdk/formfiller/cffl_textfield.cpp index fffdfbf..5ebedc3 100644 --- a/fpdfsdk/formfiller/cffl_textfield.cpp +++ b/fpdfsdk/formfiller/cffl_textfield.cpp
@@ -12,6 +12,7 @@ #include "fpdfsdk/cpdfsdk_formfillenvironment.h" #include "fpdfsdk/cpdfsdk_widget.h" #include "fpdfsdk/formfiller/cba_fontmap.h" +#include "public/fpdf_fwlevent.h" #include "third_party/base/ptr_util.h" CFFL_TextField::CFFL_TextField(CPDFSDK_FormFillEnvironment* pApp,
diff --git a/fpdfsdk/pwl/cpwl_combo_box_embeddertest.cpp b/fpdfsdk/pwl/cpwl_combo_box_embeddertest.cpp index e839de0..f207aa0 100644 --- a/fpdfsdk/pwl/cpwl_combo_box_embeddertest.cpp +++ b/fpdfsdk/pwl/cpwl_combo_box_embeddertest.cpp
@@ -9,6 +9,7 @@ #include "fpdfsdk/formfiller/cffl_interactiveformfiller.h" #include "fpdfsdk/pwl/cpwl_combo_box.h" #include "fpdfsdk/pwl/cpwl_wnd.h" +#include "public/fpdf_fwlevent.h" #include "testing/embedder_test.h" #include "testing/gtest/include/gtest/gtest.h"
diff --git a/fpdfsdk/pwl/cpwl_edit_embeddertest.cpp b/fpdfsdk/pwl/cpwl_edit_embeddertest.cpp index d751023..7dc0b11 100644 --- a/fpdfsdk/pwl/cpwl_edit_embeddertest.cpp +++ b/fpdfsdk/pwl/cpwl_edit_embeddertest.cpp
@@ -9,6 +9,7 @@ #include "fpdfsdk/cpdfsdk_formfillenvironment.h" #include "fpdfsdk/formfiller/cffl_formfiller.h" #include "fpdfsdk/formfiller/cffl_interactiveformfiller.h" +#include "public/fpdf_fwlevent.h" #include "testing/embedder_test.h" #include "testing/gtest/include/gtest/gtest.h"