summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/cpdfsdk_interform.cpp10
-rw-r--r--fpdfsdk/cpdfsdk_interform.h2
-rw-r--r--fpdfsdk/fsdk_actionhandler.cpp4
-rw-r--r--fpdfsdk/fsdk_actionhandler.h2
4 files changed, 10 insertions, 8 deletions
diff --git a/fpdfsdk/cpdfsdk_interform.cpp b/fpdfsdk/cpdfsdk_interform.cpp
index 57f3a6e90e..f4e22d7744 100644
--- a/fpdfsdk/cpdfsdk_interform.cpp
+++ b/fpdfsdk/cpdfsdk_interform.cpp
@@ -592,19 +592,21 @@ ByteString CPDFSDK_InterForm::ExportFormToFDFTextBuf() {
return pFDF ? pFDF->WriteToString() : ByteString();
}
-bool CPDFSDK_InterForm::DoAction_ResetForm(const CPDF_Action& action) {
+void CPDFSDK_InterForm::DoAction_ResetForm(const CPDF_Action& action) {
ASSERT(action.GetDict());
CPDF_Dictionary* pActionDict = action.GetDict();
- if (!pActionDict->KeyExist("Fields"))
- return m_pInterForm->ResetForm(true);
+ if (!pActionDict->KeyExist("Fields")) {
+ m_pInterForm->ResetForm(true);
+ return;
+ }
CPDF_ActionFields af(&action);
uint32_t dwFlags = action.GetFlags();
std::vector<CPDF_Object*> fieldObjects = af.GetAllFields();
std::vector<CPDF_FormField*> fields = GetFieldFromObjects(fieldObjects);
- return m_pInterForm->ResetForm(fields, !(dwFlags & 0x01), true);
+ m_pInterForm->ResetForm(fields, !(dwFlags & 0x01), true);
}
std::vector<CPDF_FormField*> CPDFSDK_InterForm::GetFieldFromObjects(
diff --git a/fpdfsdk/cpdfsdk_interform.h b/fpdfsdk/cpdfsdk_interform.h
index 58dc2d0993..6195ee9f5f 100644
--- a/fpdfsdk/cpdfsdk_interform.h
+++ b/fpdfsdk/cpdfsdk_interform.h
@@ -77,7 +77,7 @@ class CPDFSDK_InterForm : public IPDF_FormNotify {
bool DoAction_Hide(const CPDF_Action& action);
bool DoAction_SubmitForm(const CPDF_Action& action);
- bool DoAction_ResetForm(const CPDF_Action& action);
+ void DoAction_ResetForm(const CPDF_Action& action);
std::vector<CPDF_FormField*> GetFieldFromObjects(
const std::vector<CPDF_Object*>& objects) const;
diff --git a/fpdfsdk/fsdk_actionhandler.cpp b/fpdfsdk/fsdk_actionhandler.cpp
index 5999763b9c..c0e413f158 100644
--- a/fpdfsdk/fsdk_actionhandler.cpp
+++ b/fpdfsdk/fsdk_actionhandler.cpp
@@ -515,11 +515,11 @@ bool CPDFSDK_ActionHandler::DoAction_SubmitForm(
return pInterForm->DoAction_SubmitForm(action);
}
-bool CPDFSDK_ActionHandler::DoAction_ResetForm(
+void CPDFSDK_ActionHandler::DoAction_ResetForm(
const CPDF_Action& action,
CPDFSDK_FormFillEnvironment* pFormFillEnv) {
CPDFSDK_InterForm* pInterForm = pFormFillEnv->GetInterForm();
- return pInterForm->DoAction_ResetForm(action);
+ pInterForm->DoAction_ResetForm(action);
}
void CPDFSDK_ActionHandler::RunScriptForAction(
diff --git a/fpdfsdk/fsdk_actionhandler.h b/fpdfsdk/fsdk_actionhandler.h
index a77ee77296..1aaf2f903d 100644
--- a/fpdfsdk/fsdk_actionhandler.h
+++ b/fpdfsdk/fsdk_actionhandler.h
@@ -120,7 +120,7 @@ class CPDFSDK_ActionHandler {
CPDFSDK_FormFillEnvironment* pFormFillEnv);
bool DoAction_SubmitForm(const CPDF_Action& action,
CPDFSDK_FormFillEnvironment* pFormFillEnv);
- bool DoAction_ResetForm(const CPDF_Action& action,
+ void DoAction_ResetForm(const CPDF_Action& action,
CPDFSDK_FormFillEnvironment* pFormFillEnv);
};