| Index: core/src/fpdfdoc/doc_action.cpp
|
| diff --git a/core/src/fpdfdoc/doc_action.cpp b/core/src/fpdfdoc/doc_action.cpp
|
| index da2e05af2e639d97319c8f468f6acaec38155760..851b2d67098de8d57c9478f89de29bbaf6c1f8b5 100644
|
| --- a/core/src/fpdfdoc/doc_action.cpp
|
| +++ b/core/src/fpdfdoc/doc_action.cpp
|
| @@ -112,9 +112,11 @@ FX_DWORD CPDF_ActionFields::GetFieldsCount() const
|
| int iType = pFields->GetType();
|
| if (iType == PDFOBJ_DICTIONARY) {
|
| return 1;
|
| - } else if (iType == PDFOBJ_STRING) {
|
| + }
|
| + if (iType == PDFOBJ_STRING) {
|
| return 1;
|
| - } else if (iType == PDFOBJ_ARRAY) {
|
| + }
|
| + if (iType == PDFOBJ_ARRAY) {
|
| return ((CPDF_Array*)pFields)->GetCount();
|
| }
|
| return 0;
|
| @@ -207,16 +209,17 @@ CFX_WideString CPDF_Action::GetJavaScript() const
|
| }
|
| CPDF_Dictionary* CPDF_Action::GetAnnot() const
|
| {
|
| - if (m_pDict == NULL) {
|
| - return NULL;
|
| + if (!m_pDict) {
|
| + return nullptr;
|
| }
|
| CFX_ByteString csType = m_pDict->GetString("S");
|
| if (csType == FX_BSTRC("Rendition")) {
|
| return m_pDict->GetDict("AN");
|
| - } else if (csType == FX_BSTRC("Movie")) {
|
| + }
|
| + if (csType == FX_BSTRC("Movie")) {
|
| return m_pDict->GetDict("Annotation");
|
| }
|
| - return NULL;
|
| + return nullptr;
|
| }
|
| int32_t CPDF_Action::GetOperationType() const
|
| {
|
| @@ -226,15 +229,19 @@ int32_t CPDF_Action::GetOperationType() const
|
| CFX_ByteString csType = m_pDict->GetString("S");
|
| if (csType == FX_BSTRC("Rendition")) {
|
| return m_pDict->GetInteger("OP");
|
| - } else if (csType == FX_BSTRC("Movie")) {
|
| + }
|
| + if (csType == FX_BSTRC("Movie")) {
|
| CFX_ByteString csOP = m_pDict->GetString("Operation");
|
| if (csOP == FX_BSTRC("Play")) {
|
| return 0;
|
| - } else if (csOP == FX_BSTRC("Stop")) {
|
| + }
|
| + if (csOP == FX_BSTRC("Stop")) {
|
| return 1;
|
| - } else if (csOP == FX_BSTRC("Pause")) {
|
| + }
|
| + if (csOP == FX_BSTRC("Pause")) {
|
| return 2;
|
| - } else if (csOP == FX_BSTRC("Resume")) {
|
| + }
|
| + if (csOP == FX_BSTRC("Resume")) {
|
| return 3;
|
| }
|
| }
|
|
|