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

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

Issue 1407583004: Changes to master to more closely match XFA. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | fpdfsdk/src/fpdf_transformpage.cpp » ('j') | fpdfsdk/src/fpdf_transformpage.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/formfiller/FFL_IFormFiller.cpp
diff --git a/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp b/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp
index 69ff93280e2e2efbacf2d3b0935979ef930c1989..ce0a67f4febbd15dd66ca1dfcb8142ccc91aa4a0 100644
--- a/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp
+++ b/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp
@@ -509,23 +509,15 @@ FX_BOOL CFFL_IFormFiller::IsReadOnly(CPDFSDK_Widget* pWidget) {
}
FX_BOOL CFFL_IFormFiller::IsFillingAllowed(CPDFSDK_Widget* pWidget) {
- ASSERT(pWidget != NULL);
-
if (pWidget->GetFieldType() == FIELDTYPE_PUSHBUTTON)
return TRUE;
- else {
- CPDF_Page* pPage = pWidget->GetPDFPage();
- ASSERT(pPage != NULL);
-
- CPDF_Document* pDocument = pPage->m_pDocument;
- ASSERT(pDocument != NULL);
- FX_DWORD dwPermissions = pDocument->GetUserPermissions();
- return (dwPermissions & FPDFPERM_FILL_FORM) ||
- (dwPermissions & FPDFPERM_ANNOT_FORM) ||
- (dwPermissions & FPDFPERM_MODIFY);
- }
- return TRUE;
Lei Zhang 2015/10/13 22:04:38 uhhh
+ CPDF_Page* pPage = pWidget->GetPDFPage();
+ CPDF_Document* pDocument = pPage->m_pDocument;
+ FX_DWORD dwPermissions = pDocument->GetUserPermissions();
+ return (dwPermissions & FPDFPERM_FILL_FORM) ||
+ (dwPermissions & FPDFPERM_ANNOT_FORM) ||
+ (dwPermissions & FPDFPERM_MODIFY);
}
CFFL_FormFiller* CFFL_IFormFiller::GetFormFiller(CPDFSDK_Annot* pAnnot,
@@ -802,13 +794,10 @@ void CFFL_IFormFiller::OnFormat(CPDFSDK_Widget* pWidget,
FX_BOOL CFFL_IFormFiller::IsValidAnnot(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot) {
- ASSERT(pPageView != NULL);
- ASSERT(pAnnot != NULL);
-
if (pPageView)
return pPageView->IsValidAnnot(pAnnot->GetPDFAnnot());
- else
- return FALSE;
+
+ return FALSE;
}
void CFFL_IFormFiller::OnBeforeKeyStroke(FX_BOOL bEditOrList,
« no previous file with comments | « no previous file | fpdfsdk/src/fpdf_transformpage.cpp » ('j') | fpdfsdk/src/fpdf_transformpage.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698