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

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

Issue 1477583002: Inflict PDF_ENABLE_XFA ifdefs on XFA fpdfsdk/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 1 month 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
Index: fpdfsdk/src/formfiller/FFL_TextField.cpp
diff --git a/fpdfsdk/src/formfiller/FFL_TextField.cpp b/fpdfsdk/src/formfiller/FFL_TextField.cpp
index 253671d5549346a6700316550c27c84917b8aeff..e99a1351b32afd3d1ccada48a3231296adc78f28 100644
--- a/fpdfsdk/src/formfiller/FFL_TextField.cpp
+++ b/fpdfsdk/src/formfiller/FFL_TextField.cpp
@@ -119,8 +119,13 @@ FX_BOOL CFFL_TextField::OnChar(CPDFSDK_Annot* pAnnot,
ASSERT(pPageView != NULL);
m_bValid = !m_bValid;
CPDF_Rect rcAnnot = pAnnot->GetRect();
+#ifndef PDF_ENABLE_XFA
+ m_pApp->FFI_Invalidate(pAnnot->GetPDFPage(), rcAnnot.left, rcAnnot.top,
Lei Zhang 2015/11/25 00:12:02 GetUnderlyingPage?
+ rcAnnot.right, rcAnnot.bottom);
+#else
m_pApp->FFI_Invalidate(pAnnot->GetPDFXFAPage(), rcAnnot.left,
rcAnnot.top, rcAnnot.right, rcAnnot.bottom);
+#endif
if (m_bValid) {
if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, TRUE))
@@ -268,6 +273,7 @@ CPWL_Wnd* CFFL_TextField::ResetPDFWindow(CPDFSDK_PageView* pPageView,
return pRet;
}
+#ifdef PDF_ENABLE_XFA
FX_BOOL CFFL_TextField::IsFieldFull(CPDFSDK_PageView* pPageView) {
if (CPWL_Edit* pWnd = (CPWL_Edit*)GetPDFWindow(pPageView, FALSE)) {
return pWnd->IsTextFull();
@@ -276,6 +282,7 @@ FX_BOOL CFFL_TextField::IsFieldFull(CPDFSDK_PageView* pPageView) {
return FALSE;
}
+#endif
void CFFL_TextField::OnSetFocus(CPWL_Wnd* pWnd) {
ASSERT(m_pApp != NULL);

Powered by Google App Engine
This is Rietveld 408576698