summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_actionhandler.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-05-25 21:48:49 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-25 21:48:49 +0000
commit5cee3f28ead05cb336377483e24664c004af8b0a (patch)
tree8fb5db3232e1359831682c809be3ec10de1ce1e0 /fpdfsdk/cpdfsdk_actionhandler.cpp
parent1f17bd73afa6b1b79ec4a2f81c995b43d15a9814 (diff)
downloadpdfium-5cee3f28ead05cb336377483e24664c004af8b0a.tar.xz
Mark more CPDF_Objects as const in action and bookmark code.
Change-Id: Ib5f4cdb9c7f9c33561028a85029649ba68f4a6e5 Reviewed-on: https://pdfium-review.googlesource.com/32912 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/cpdfsdk_actionhandler.cpp')
-rw-r--r--fpdfsdk/cpdfsdk_actionhandler.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/fpdfsdk/cpdfsdk_actionhandler.cpp b/fpdfsdk/cpdfsdk_actionhandler.cpp
index 660b09c515..d7bcd7f350 100644
--- a/fpdfsdk/cpdfsdk_actionhandler.cpp
+++ b/fpdfsdk/cpdfsdk_actionhandler.cpp
@@ -23,7 +23,7 @@
bool CPDFSDK_ActionHandler::DoAction_DocOpen(
const CPDF_Action& action,
CPDFSDK_FormFillEnvironment* pFormFillEnv) {
- std::set<CPDF_Dictionary*> visited;
+ std::set<const CPDF_Dictionary*> visited;
return ExecuteDocumentOpenAction(action, pFormFillEnv, &visited);
}
@@ -64,7 +64,7 @@ bool CPDFSDK_ActionHandler::DoAction_Page(
const CPDF_Action& action,
enum CPDF_AAction::AActionType eType,
CPDFSDK_FormFillEnvironment* pFormFillEnv) {
- std::set<CPDF_Dictionary*> visited;
+ std::set<const CPDF_Dictionary*> visited;
return ExecuteDocumentPageAction(action, eType, pFormFillEnv, &visited);
}
@@ -72,7 +72,7 @@ bool CPDFSDK_ActionHandler::DoAction_Document(
const CPDF_Action& action,
enum CPDF_AAction::AActionType eType,
CPDFSDK_FormFillEnvironment* pFormFillEnv) {
- std::set<CPDF_Dictionary*> visited;
+ std::set<const CPDF_Dictionary*> visited;
return ExecuteDocumentPageAction(action, eType, pFormFillEnv, &visited);
}
@@ -81,7 +81,7 @@ bool CPDFSDK_ActionHandler::DoAction_BookMark(
const CPDF_Action& action,
CPDF_AAction::AActionType type,
CPDFSDK_FormFillEnvironment* pFormFillEnv) {
- std::set<CPDF_Dictionary*> visited;
+ std::set<const CPDF_Dictionary*> visited;
return ExecuteBookMark(action, pFormFillEnv, pBookMark, &visited);
}
@@ -90,14 +90,14 @@ bool CPDFSDK_ActionHandler::DoAction_Screen(
CPDF_AAction::AActionType type,
CPDFSDK_FormFillEnvironment* pFormFillEnv,
CPDFSDK_Annot* pScreen) {
- std::set<CPDF_Dictionary*> visited;
+ std::set<const CPDF_Dictionary*> visited;
return ExecuteScreenAction(action, type, pFormFillEnv, pScreen, &visited);
}
bool CPDFSDK_ActionHandler::DoAction_Link(
const CPDF_Action& action,
CPDFSDK_FormFillEnvironment* pFormFillEnv) {
- std::set<CPDF_Dictionary*> visited;
+ std::set<const CPDF_Dictionary*> visited;
return ExecuteLinkAction(action, pFormFillEnv, &visited);
}
@@ -107,7 +107,7 @@ bool CPDFSDK_ActionHandler::DoAction_Field(
CPDFSDK_FormFillEnvironment* pFormFillEnv,
CPDF_FormField* pFormField,
CPDFSDK_FieldAction* data) {
- std::set<CPDF_Dictionary*> visited;
+ std::set<const CPDF_Dictionary*> visited;
return ExecuteFieldAction(action, type, pFormFillEnv, pFormField, data,
&visited);
}
@@ -115,8 +115,8 @@ bool CPDFSDK_ActionHandler::DoAction_Field(
bool CPDFSDK_ActionHandler::ExecuteDocumentOpenAction(
const CPDF_Action& action,
CPDFSDK_FormFillEnvironment* pFormFillEnv,
- std::set<CPDF_Dictionary*>* visited) {
- CPDF_Dictionary* pDict = action.GetDict();
+ std::set<const CPDF_Dictionary*>* visited) {
+ const CPDF_Dictionary* pDict = action.GetDict();
if (pdfium::ContainsKey(*visited, pDict))
return false;
@@ -145,8 +145,8 @@ bool CPDFSDK_ActionHandler::ExecuteDocumentOpenAction(
bool CPDFSDK_ActionHandler::ExecuteLinkAction(
const CPDF_Action& action,
CPDFSDK_FormFillEnvironment* pFormFillEnv,
- std::set<CPDF_Dictionary*>* visited) {
- CPDF_Dictionary* pDict = action.GetDict();
+ std::set<const CPDF_Dictionary*>* visited) {
+ const CPDF_Dictionary* pDict = action.GetDict();
if (pdfium::ContainsKey(*visited, pDict))
return false;
@@ -175,8 +175,8 @@ bool CPDFSDK_ActionHandler::ExecuteDocumentPageAction(
const CPDF_Action& action,
CPDF_AAction::AActionType type,
CPDFSDK_FormFillEnvironment* pFormFillEnv,
- std::set<CPDF_Dictionary*>* visited) {
- CPDF_Dictionary* pDict = action.GetDict();
+ std::set<const CPDF_Dictionary*>* visited) {
+ const CPDF_Dictionary* pDict = action.GetDict();
if (pdfium::ContainsKey(*visited, pDict))
return false;
@@ -220,8 +220,8 @@ bool CPDFSDK_ActionHandler::ExecuteFieldAction(
CPDFSDK_FormFillEnvironment* pFormFillEnv,
CPDF_FormField* pFormField,
CPDFSDK_FieldAction* data,
- std::set<CPDF_Dictionary*>* visited) {
- CPDF_Dictionary* pDict = action.GetDict();
+ std::set<const CPDF_Dictionary*>* visited) {
+ const CPDF_Dictionary* pDict = action.GetDict();
if (pdfium::ContainsKey(*visited, pDict))
return false;
@@ -256,8 +256,8 @@ bool CPDFSDK_ActionHandler::ExecuteScreenAction(
CPDF_AAction::AActionType type,
CPDFSDK_FormFillEnvironment* pFormFillEnv,
CPDFSDK_Annot* pScreen,
- std::set<CPDF_Dictionary*>* visited) {
- CPDF_Dictionary* pDict = action.GetDict();
+ std::set<const CPDF_Dictionary*>* visited) {
+ const CPDF_Dictionary* pDict = action.GetDict();
if (pdfium::ContainsKey(*visited, pDict))
return false;
@@ -282,8 +282,8 @@ bool CPDFSDK_ActionHandler::ExecuteBookMark(
const CPDF_Action& action,
CPDFSDK_FormFillEnvironment* pFormFillEnv,
CPDF_Bookmark* pBookmark,
- std::set<CPDF_Dictionary*>* visited) {
- CPDF_Dictionary* pDict = action.GetDict();
+ std::set<const CPDF_Dictionary*>* visited) {
+ const CPDF_Dictionary* pDict = action.GetDict();
if (pdfium::ContainsKey(*visited, pDict))
return false;