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

Unified Diff: fpdfsdk/src/formfiller/FFL_FormFiller.cpp

Issue 1566583002: Merge to XFA: Remove header files that only have includes. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Fix XFA Created 4 years, 11 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/src/formfiller/FFL_ComboBox.cpp ('k') | fpdfsdk/src/formfiller/FFL_IFormFiller.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/formfiller/FFL_FormFiller.cpp
diff --git a/fpdfsdk/src/formfiller/FFL_FormFiller.cpp b/fpdfsdk/src/formfiller/FFL_FormFiller.cpp
index a903824c6ac32efed61e79a091c1bdb91fc8ed01..2e73b491c93c284da7c59d1ad720abfc4eb8f9f5 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,
« no previous file with comments | « fpdfsdk/src/formfiller/FFL_ComboBox.cpp ('k') | fpdfsdk/src/formfiller/FFL_IFormFiller.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698