summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_node.cpp
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2018-02-16 03:46:28 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-02-16 03:46:28 +0000
commit067a44fcad9196c6ad8cc3b2f86261b78ae54f48 (patch)
tree8e04bf7d5c20701fee0f688411edeea4b74caa47 /xfa/fxfa/parser/cxfa_node.cpp
parent844d79e853074c99b7e5e64e051f1e1236c1723e (diff)
downloadpdfium-067a44fcad9196c6ad8cc3b2f86261b78ae54f48.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 'xfa/fxfa/parser/cxfa_node.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_node.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp
index bfee8fa746..77b6f74fe4 100644
--- a/xfa/fxfa/parser/cxfa_node.cpp
+++ b/xfa/fxfa/parser/cxfa_node.cpp
@@ -18,6 +18,7 @@
#include "core/fxcrt/cfx_memorystream.h"
#include "core/fxcrt/fx_codepage.h"
#include "core/fxcrt/fx_extension.h"
+#include "core/fxcrt/fx_fallthrough.h"
#include "core/fxcrt/xml/cfx_xmlelement.h"
#include "core/fxcrt/xml/cfx_xmlnode.h"
#include "core/fxcrt/xml/cfx_xmltext.h"
@@ -2622,6 +2623,7 @@ void CXFA_Node::ResetData() {
}
case XFA_FFWidgetType::kChoiceList:
ClearAllSelections();
+ FX_FALLTHROUGH;
default: {
CXFA_Value* defValue = GetDefaultValueIfExists();
if (defValue)
@@ -2762,6 +2764,7 @@ bool CXFA_Node::CalculateFieldAutoSize(CXFA_FFDoc* doc, CFX_SizeF& size) {
case XFA_AttributeEnum::Bottom: {
size.height += szCap.height;
size.width = std::max(size.width, szCap.width);
+ break;
}
default:
break;
@@ -2858,6 +2861,7 @@ bool CXFA_Node::CalculateTextEditAutoSize(CXFA_FFDoc* doc, CFX_SizeF& size) {
case XFA_AttributeEnum::Right:
case XFA_AttributeEnum::Inline: {
size.width -= szCap.width;
+ break;
}
default:
break;
@@ -2881,6 +2885,7 @@ bool CXFA_Node::CalculateTextEditAutoSize(CXFA_FFDoc* doc, CFX_SizeF& size) {
case XFA_AttributeEnum::Top:
case XFA_AttributeEnum::Bottom: {
size.height += szCap.height;
+ break;
}
default:
break;