summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp')
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
index 26227c068e..9bb1418379 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
@@ -6,6 +6,8 @@
#include "fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h"
+#include <memory>
+
#include "core/fpdfapi/parser/cpdf_array.h"
#include "core/fpdfapi/parser/cpdf_stream_acc.h"
#include "core/fpdfapi/parser/cpdf_string.h"
@@ -398,7 +400,7 @@ void CPDFXFA_DocEnvironment::SetTitle(CXFA_FFDoc* hDoc,
return;
if (CPDF_Dictionary* pInfoDict = m_pContext->GetPDFDoc()->GetInfo())
- pInfoDict->SetFor("Title", new CPDF_String(wsTitle));
+ pInfoDict->SetNewFor<CPDF_String>("Title", wsTitle);
}
void CPDFXFA_DocEnvironment::ExportData(CXFA_FFDoc* hDoc,