Chromium Code Reviews| 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, |