diff options
Diffstat (limited to 'core/src/fpdfdoc/doc_form.cpp')
-rw-r--r-- | core/src/fpdfdoc/doc_form.cpp | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/core/src/fpdfdoc/doc_form.cpp b/core/src/fpdfdoc/doc_form.cpp index 20b59cd498..9f949cc965 100644 --- a/core/src/fpdfdoc/doc_form.cpp +++ b/core/src/fpdfdoc/doc_form.cpp @@ -1048,10 +1048,7 @@ CFDF_Document* CPDF_InterForm::ExportToFDF( pMainDict->SetAt("F", static_cast<CPDF_Object*>(filespec)); } } - CPDF_Array* pFields = CPDF_Array::Create(); - if (!pFields) { - return NULL; - } + CPDF_Array* pFields = new CPDF_Array; pMainDict->SetAt("Fields", pFields); int nCount = m_pFieldTree->m_Root.CountFields(); for (int i = 0; i < nCount; i++) { @@ -1069,16 +1066,8 @@ CFDF_Document* CPDF_InterForm::ExportToFDF( continue; CFX_WideString fullname = GetFullName(pField->GetFieldDict()); - CPDF_Dictionary* pFieldDict = CPDF_Dictionary::Create(); - if (!pFieldDict) - return nullptr; - - CPDF_String* pString = CPDF_String::Create(fullname); - if (!pString) { - pFieldDict->Release(); - return nullptr; - } - pFieldDict->SetAt("T", pString); + CPDF_Dictionary* pFieldDict = new CPDF_Dictionary; + pFieldDict->SetAt("T", new CPDF_String(fullname)); if (pField->GetType() == CPDF_FormField::CheckBox || pField->GetType() == CPDF_FormField::RadioButton) { CFX_WideString csExport = pField->GetCheckValue(FALSE); |