From 067a44fcad9196c6ad8cc3b2f86261b78ae54f48 Mon Sep 17 00:00:00 2001 From: Henrique Nakashima Date: Fri, 16 Feb 2018 03:46:28 +0000 Subject: Fix fallthroughs in XFA code. Change-Id: I1fd4bf85cd709de1c14ed2895d045018f79bc61f Reviewed-on: https://pdfium-review.googlesource.com/26950 Reviewed-by: dsinclair Commit-Queue: Henrique Nakashima --- fpdfsdk/fpdfxfa/cpdfxfa_page.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'fpdfsdk/fpdfxfa/cpdfxfa_page.cpp') 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(); -- cgit v1.2.3