diff options
Diffstat (limited to 'fpdfsdk/cpdfsdk_interform.cpp')
-rw-r--r-- | fpdfsdk/cpdfsdk_interform.cpp | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/fpdfsdk/cpdfsdk_interform.cpp b/fpdfsdk/cpdfsdk_interform.cpp index bd3c7fa1a3..549caafb51 100644 --- a/fpdfsdk/cpdfsdk_interform.cpp +++ b/fpdfsdk/cpdfsdk_interform.cpp @@ -122,15 +122,9 @@ bool FDFToURLEncodedData(std::vector<uint8_t>* pBuffer) { CPDFSDK_InterForm::CPDFSDK_InterForm(CPDFSDK_FormFillEnvironment* pFormFillEnv) : m_pFormFillEnv(pFormFillEnv), - m_pInterForm( - pdfium::MakeUnique<CPDF_InterForm>(m_pFormFillEnv->GetPDFDocument())), -#ifdef PDF_ENABLE_XFA - m_bXfaCalculate(true), - m_bXfaValidationsEnabled(true), -#endif // PDF_ENABLE_XFA - m_bCalculate(true), - m_bBusy(false), - m_HighlightAlpha(0) { + m_pInterForm(pdfium::MakeUnique<CPDF_InterForm>( + m_pFormFillEnv->GetPDFDocument())) { + ASSERT(m_pFormFillEnv); m_pInterForm->SetFormNotify(this); RemoveAllHighLights(); } @@ -142,10 +136,6 @@ CPDFSDK_InterForm::~CPDFSDK_InterForm() { #endif // PDF_ENABLE_XFA } -bool CPDFSDK_InterForm::HighlightWidgets() { - return false; -} - CPDFSDK_Widget* CPDFSDK_InterForm::GetSibling(CPDFSDK_Widget* pWidget, bool bNext) const { auto pIterator = pdfium::MakeUnique<CPDFSDK_AnnotIterator>( @@ -156,7 +146,7 @@ CPDFSDK_Widget* CPDFSDK_InterForm::GetSibling(CPDFSDK_Widget* pWidget, } CPDFSDK_Widget* CPDFSDK_InterForm::GetWidget(CPDF_FormControl* pControl) const { - if (!pControl || !m_pInterForm) + if (!pControl) return nullptr; CPDFSDK_Widget* pWidget = nullptr; @@ -527,9 +517,6 @@ bool CPDFSDK_InterForm::SubmitForm(const WideString& sDestination, if (sDestination.IsEmpty()) return false; - if (!m_pFormFillEnv || !m_pInterForm) - return false; - std::unique_ptr<CFDF_Document> pFDFDoc = m_pInterForm->ExportToFDF(m_pFormFillEnv->JS_docGetFilePath(), false); if (!pFDFDoc) @@ -642,7 +629,7 @@ void CPDFSDK_InterForm::AfterFormReset(CPDF_InterForm* pForm) { OnCalculate(nullptr); } -bool CPDFSDK_InterForm::IsNeedHighLight(FormFieldType fieldType) { +bool CPDFSDK_InterForm::IsNeedHighLight(FormFieldType fieldType) const { if (fieldType == FormFieldType::kUnknown) return false; |