diff options
author | Lei Zhang <thestig@chromium.org> | 2016-01-05 16:46:58 -0800 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2016-01-05 16:46:58 -0800 |
commit | c2fb35f2bbcf6c8fcf37380000544ae39d9a8cec (patch) | |
tree | 6b8da05d1624cbbe5a0c7042c9820f02180f442c /fpdfsdk/src/formfiller/FFL_FormFiller.cpp | |
parent | 62664cee15230d6cbe08ed010721a4557b36dc22 (diff) | |
download | pdfium-c2fb35f2bbcf6c8fcf37380000544ae39d9a8cec.tar.xz |
Merge to XFA: Remove header files that only have includes.
Also do some cleanups in affected files.
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1552583002 .
(cherry picked from commit d794d34b5deb6ad691c19af758090f9ce46015a3)
Review URL: https://codereview.chromium.org/1566583002 .
Diffstat (limited to 'fpdfsdk/src/formfiller/FFL_FormFiller.cpp')
-rw-r--r-- | fpdfsdk/src/formfiller/FFL_FormFiller.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/fpdfsdk/src/formfiller/FFL_FormFiller.cpp b/fpdfsdk/src/formfiller/FFL_FormFiller.cpp index a903824c6a..2e73b491c9 100644 --- a/fpdfsdk/src/formfiller/FFL_FormFiller.cpp +++ b/fpdfsdk/src/formfiller/FFL_FormFiller.cpp @@ -4,17 +4,19 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h" #include "fpdfsdk/include/formfiller/FFL_FormFiller.h" +#include "fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h" +#include "fpdfsdk/include/fsdk_common.h" +#include "fpdfsdk/include/fsdk_mgr.h" +#include "fpdfsdk/include/pdfwindow/PWL_Utils.h" + #define GetRed(rgb) ((uint8_t)(rgb)) #define GetGreen(rgb) ((uint8_t)(((FX_WORD)(rgb)) >> 8)) #define GetBlue(rgb) ((uint8_t)((rgb) >> 16)) #define FFL_HINT_ELAPSE 800 -/* ------------------------- CFFL_FormFiller ------------------------- */ - CFFL_FormFiller::CFFL_FormFiller(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pAnnot) : m_pApp(pApp), m_pAnnot(pAnnot), m_bValid(FALSE), m_ptOldPos(0, 0) { @@ -622,8 +624,6 @@ void CFFL_FormFiller::InvalidateRect(double left, m_pApp->FFI_Invalidate(pPage, left, top, right, bottom); } -/* ------------------------- CFFL_Button ------------------------- */ - CFFL_Button::CFFL_Button(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pWidget) : CFFL_FormFiller(pApp, pWidget), m_bMouseIn(FALSE), m_bMouseDown(FALSE) {} @@ -696,25 +696,25 @@ void CFFL_Button::OnDraw(CPDFSDK_PageView* pPageView, CPDF_FormControl* pCtrl = pWidget->GetFormControl(); CPDF_FormControl::HighlightingMode eHM = pCtrl->GetHighlightingMode(); - if (eHM == CPDF_FormControl::Push) { - if (m_bMouseDown) { - if (pWidget->IsWidgetAppearanceValid(CPDF_Annot::Down)) - pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Down, NULL); - else - pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, - NULL); - } else if (m_bMouseIn) { - if (pWidget->IsWidgetAppearanceValid(CPDF_Annot::Rollover)) - pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Rollover, - NULL); - else - pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, - NULL); - } else { + if (eHM != CPDF_FormControl::Push) { + pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, NULL); + return; + } + + if (m_bMouseDown) { + if (pWidget->IsWidgetAppearanceValid(CPDF_Annot::Down)) + pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Down, NULL); + else pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, NULL); - } - } else + } else if (m_bMouseIn) { + if (pWidget->IsWidgetAppearanceValid(CPDF_Annot::Rollover)) + pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Rollover, + NULL); + else + pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, NULL); + } else { pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, NULL); + } } void CFFL_Button::OnDrawDeactive(CPDFSDK_PageView* pPageView, |