summaryrefslogtreecommitdiff
path: root/core/src/fpdfdoc/doc_action.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fpdfdoc/doc_action.cpp')
-rw-r--r--core/src/fpdfdoc/doc_action.cpp27
1 files changed, 10 insertions, 17 deletions
diff --git a/core/src/fpdfdoc/doc_action.cpp b/core/src/fpdfdoc/doc_action.cpp
index 851b2d6709..da2e05af2e 100644
--- a/core/src/fpdfdoc/doc_action.cpp
+++ b/core/src/fpdfdoc/doc_action.cpp
@@ -112,11 +112,9 @@ FX_DWORD CPDF_ActionFields::GetFieldsCount() const
int iType = pFields->GetType();
if (iType == PDFOBJ_DICTIONARY) {
return 1;
- }
- if (iType == PDFOBJ_STRING) {
+ } else if (iType == PDFOBJ_STRING) {
return 1;
- }
- if (iType == PDFOBJ_ARRAY) {
+ } else if (iType == PDFOBJ_ARRAY) {
return ((CPDF_Array*)pFields)->GetCount();
}
return 0;
@@ -209,17 +207,16 @@ CFX_WideString CPDF_Action::GetJavaScript() const
}
CPDF_Dictionary* CPDF_Action::GetAnnot() const
{
- if (!m_pDict) {
- return nullptr;
+ if (m_pDict == NULL) {
+ return NULL;
}
CFX_ByteString csType = m_pDict->GetString("S");
if (csType == FX_BSTRC("Rendition")) {
return m_pDict->GetDict("AN");
- }
- if (csType == FX_BSTRC("Movie")) {
+ } else if (csType == FX_BSTRC("Movie")) {
return m_pDict->GetDict("Annotation");
}
- return nullptr;
+ return NULL;
}
int32_t CPDF_Action::GetOperationType() const
{
@@ -229,19 +226,15 @@ int32_t CPDF_Action::GetOperationType() const
CFX_ByteString csType = m_pDict->GetString("S");
if (csType == FX_BSTRC("Rendition")) {
return m_pDict->GetInteger("OP");
- }
- if (csType == FX_BSTRC("Movie")) {
+ } else if (csType == FX_BSTRC("Movie")) {
CFX_ByteString csOP = m_pDict->GetString("Operation");
if (csOP == FX_BSTRC("Play")) {
return 0;
- }
- if (csOP == FX_BSTRC("Stop")) {
+ } else if (csOP == FX_BSTRC("Stop")) {
return 1;
- }
- if (csOP == FX_BSTRC("Pause")) {
+ } else if (csOP == FX_BSTRC("Pause")) {
return 2;
- }
- if (csOP == FX_BSTRC("Resume")) {
+ } else if (csOP == FX_BSTRC("Resume")) {
return 3;
}
}