diff options
Diffstat (limited to 'fpdfsdk/fxedit/fxet_module.cpp')
-rw-r--r-- | fpdfsdk/fxedit/fxet_module.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/fpdfsdk/fxedit/fxet_module.cpp b/fpdfsdk/fxedit/fxet_module.cpp index 889b0f81a6..330b72bc8b 100644 --- a/fpdfsdk/fxedit/fxet_module.cpp +++ b/fpdfsdk/fxedit/fxet_module.cpp @@ -4,21 +4,17 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com +#include "core/fpdfdoc/include/cpdf_variabletext.h" #include "fpdfsdk/include/fxedit/fxet_edit.h" #include "fpdfsdk/include/fxedit/fxet_list.h" IFX_Edit* IFX_Edit::NewEdit() { - if (IPDF_VariableText* pVT = IPDF_VariableText::NewVariableText()) { - return new CFX_Edit(pVT); - } - - return NULL; + return new CFX_Edit(new CPDF_VariableText()); } void IFX_Edit::DelEdit(IFX_Edit* pEdit) { - IPDF_VariableText::DelVariableText(pEdit->GetVariableText()); - - delete (CFX_Edit*)pEdit; + delete pEdit->GetVariableText(); + delete static_cast<CFX_Edit*>(pEdit); } IFX_List* IFX_List::NewList() { |