summaryrefslogtreecommitdiff
path: root/core/src/fpdfdoc/doc_action.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-07-22 15:04:26 -0700
committerTom Sepez <tsepez@chromium.org>2015-07-22 15:04:26 -0700
commit4eb4d7f6c707cc2c23c806aa540d055c8832b55d (patch)
tree43b7a7fac7b4ce08c287bfc03d09e5e1201e20d0 /core/src/fpdfdoc/doc_action.cpp
parent7cc97521db1e52d5927f5605de5f9a7102f8af40 (diff)
downloadpdfium-4eb4d7f6c707cc2c23c806aa540d055c8832b55d.tar.xz
Revert "Fix else-after-returns throughout pdfium."
This reverts commit 7cc97521db1e52d5927f5605de5f9a7102f8af40.
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;
}
}