diff options
Diffstat (limited to 'core/fpdfdoc')
-rw-r--r-- | core/fpdfdoc/cpdf_interform.cpp | 9 | ||||
-rw-r--r-- | core/fpdfdoc/cpdf_interform.h | 14 |
2 files changed, 13 insertions, 10 deletions
diff --git a/core/fpdfdoc/cpdf_interform.cpp b/core/fpdfdoc/cpdf_interform.cpp index 00365c7224..c323986603 100644 --- a/core/fpdfdoc/cpdf_interform.cpp +++ b/core/fpdfdoc/cpdf_interform.cpp @@ -1185,8 +1185,9 @@ CPDF_FormField* CPDF_InterForm::CheckRequiredFields( return nullptr; } -CFDF_Document* CPDF_InterForm::ExportToFDF(const CFX_WideStringC& pdf_path, - bool bSimpleFileSpec) const { +std::unique_ptr<CFDF_Document> CPDF_InterForm::ExportToFDF( + const CFX_WideStringC& pdf_path, + bool bSimpleFileSpec) const { std::vector<CPDF_FormField*> fields; size_t nCount = m_pFieldTree->m_Root.CountFields(); for (size_t i = 0; i < nCount; ++i) @@ -1194,12 +1195,12 @@ CFDF_Document* CPDF_InterForm::ExportToFDF(const CFX_WideStringC& pdf_path, return ExportToFDF(pdf_path, fields, true, bSimpleFileSpec); } -CFDF_Document* CPDF_InterForm::ExportToFDF( +std::unique_ptr<CFDF_Document> CPDF_InterForm::ExportToFDF( const CFX_WideStringC& pdf_path, const std::vector<CPDF_FormField*>& fields, bool bIncludeOrExclude, bool bSimpleFileSpec) const { - CFDF_Document* pDoc = CFDF_Document::CreateNewDoc(); + std::unique_ptr<CFDF_Document> pDoc = CFDF_Document::CreateNewDoc(); if (!pDoc) return nullptr; diff --git a/core/fpdfdoc/cpdf_interform.h b/core/fpdfdoc/cpdf_interform.h index fbff0289a1..f03ffb1e60 100644 --- a/core/fpdfdoc/cpdf_interform.h +++ b/core/fpdfdoc/cpdf_interform.h @@ -73,12 +73,14 @@ class CPDF_InterForm { const std::vector<CPDF_FormField*>* fields, bool bIncludeOrExclude) const; - CFDF_Document* ExportToFDF(const CFX_WideStringC& pdf_path, - bool bSimpleFileSpec) const; - CFDF_Document* ExportToFDF(const CFX_WideStringC& pdf_path, - const std::vector<CPDF_FormField*>& fields, - bool bIncludeOrExclude, - bool bSimpleFileSpec) const; + std::unique_ptr<CFDF_Document> ExportToFDF(const CFX_WideStringC& pdf_path, + bool bSimpleFileSpec) const; + + std::unique_ptr<CFDF_Document> ExportToFDF( + const CFX_WideStringC& pdf_path, + const std::vector<CPDF_FormField*>& fields, + bool bIncludeOrExclude, + bool bSimpleFileSpec) const; bool ResetForm(const std::vector<CPDF_FormField*>& fields, bool bIncludeOrExclude, |