diff options
author | Henrique Nakashima <hnakashima@chromium.org> | 2018-02-16 03:46:28 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-02-16 03:46:28 +0000 |
commit | 067a44fcad9196c6ad8cc3b2f86261b78ae54f48 (patch) | |
tree | 8e04bf7d5c20701fee0f688411edeea4b74caa47 /fpdfsdk/fpdfxfa | |
parent | 844d79e853074c99b7e5e64e051f1e1236c1723e (diff) | |
download | pdfium-chromium/3350.tar.xz |
Fix fallthroughs in XFA code.chromium/3350
Change-Id: I1fd4bf85cd709de1c14ed2895d045018f79bc61f
Reviewed-on: https://pdfium-review.googlesource.com/26950
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfxfa')
-rw-r--r-- | fpdfsdk/fpdfxfa/cpdfxfa_context.cpp | 3 | ||||
-rw-r--r-- | fpdfsdk/fpdfxfa/cpdfxfa_page.cpp | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp index 9f07714d04..79599e15dc 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp +++ b/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp @@ -10,6 +10,7 @@ #include <utility> #include "core/fpdfapi/parser/cpdf_document.h" +#include "core/fxcrt/fx_fallthrough.h" #include "fpdfsdk/cpdfsdk_formfillenvironment.h" #include "fpdfsdk/cpdfsdk_interform.h" #include "fpdfsdk/cpdfsdk_pageview.h" @@ -135,9 +136,11 @@ int CPDFXFA_Context::GetPageCount() const { case FormType::kXFAForeground: if (m_pPDFDoc) return m_pPDFDoc->GetPageCount(); + FX_FALLTHROUGH; case FormType::kXFAFull: if (m_pXFADoc) return m_pXFADocView->CountPageViews(); + break; } return 0; } diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp index fbea90d9a9..87cb4ba62a 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp +++ b/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp @@ -8,6 +8,7 @@ #include "core/fpdfapi/page/cpdf_page.h" #include "core/fpdfapi/parser/cpdf_document.h" +#include "core/fxcrt/fx_fallthrough.h" #include "fpdfsdk/fpdfxfa/cpdfxfa_context.h" #include "fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.h" #include "fpdfsdk/fsdk_define.h" @@ -95,9 +96,11 @@ float CPDFXFA_Page::GetPageWidth() const { case FormType::kXFAForeground: if (m_pPDFPage) return m_pPDFPage->GetPageWidth(); + FX_FALLTHROUGH; case FormType::kXFAFull: if (m_pXFAPageView) return m_pXFAPageView->GetPageViewRect().width; + break; } return 0.0f; @@ -113,9 +116,11 @@ float CPDFXFA_Page::GetPageHeight() const { case FormType::kXFAForeground: if (m_pPDFPage) return m_pPDFPage->GetPageHeight(); + FX_FALLTHROUGH; case FormType::kXFAFull: if (m_pXFAPageView) return m_pXFAPageView->GetPageViewRect().height; + break; } return 0.0f; @@ -178,10 +183,12 @@ CFX_Matrix CPDFXFA_Page::GetDisplayMatrix(int xPos, case FormType::kXFAForeground: if (m_pPDFPage) return m_pPDFPage->GetDisplayMatrix(xPos, yPos, xSize, ySize, iRotate); + FX_FALLTHROUGH; case FormType::kXFAFull: if (m_pXFAPageView) return m_pXFAPageView->GetDisplayMatrix( CFX_Rect(xPos, yPos, xSize, ySize), iRotate); + break; } return CFX_Matrix(); |