summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_context.cpp3
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_page.cpp7
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();