summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_widgetacc.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-01-10 19:51:41 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-01-10 19:51:41 +0000
commit678b97f3fc747cc203c036c01d23fe790b230b85 (patch)
tree1669701f109d2b5575a6983a37245cd14cd7805a /xfa/fxfa/cxfa_widgetacc.cpp
parent78d841011655b868486a45e0fe865a972742aa0c (diff)
downloadpdfium-678b97f3fc747cc203c036c01d23fe790b230b85.tar.xz
Rename GetOccur to GetOccurIfExists
This CL makes it explicit that GetOccurIfExists can return nullptr and fixes up the call sites. Change-Id: I542d0098aa316632239df7f1a5796b4ffe6ba202 Reviewed-on: https://pdfium-review.googlesource.com/22676 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_widgetacc.cpp')
-rw-r--r--xfa/fxfa/cxfa_widgetacc.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/xfa/fxfa/cxfa_widgetacc.cpp b/xfa/fxfa/cxfa_widgetacc.cpp
index 9f9b29fe3b..efcd320a03 100644
--- a/xfa/fxfa/cxfa_widgetacc.cpp
+++ b/xfa/fxfa/cxfa_widgetacc.cpp
@@ -551,8 +551,8 @@ bool CXFA_WidgetAcc::CalculateFieldAutoSize(CXFA_FFDoc* doc, CFX_SizeF& size) {
size.height += rtUIMargin.top + rtUIMargin.height;
if (szCap.width > 0 && szCap.height > 0) {
CXFA_Caption* caption = m_pNode->GetCaptionIfExists();
- XFA_AttributeEnum placement =
- caption ? caption->GetPlacementType() : XFA_AttributeEnum::Left;
+ XFA_AttributeEnum placement = caption ? caption->GetPlacementType()
+ : CXFA_Caption::kDefaultPlacementType;
switch (placement) {
case XFA_AttributeEnum::Left:
case XFA_AttributeEnum::Right:
@@ -655,8 +655,8 @@ bool CXFA_WidgetAcc::CalculateTextEditAutoSize(CXFA_FFDoc* doc,
XFA_AttributeEnum iCapPlacement = XFA_AttributeEnum::Unknown;
if (bCapExit) {
CXFA_Caption* caption = m_pNode->GetCaptionIfExists();
- iCapPlacement =
- caption ? caption->GetPlacementType() : XFA_AttributeEnum::Left;
+ iCapPlacement = caption ? caption->GetPlacementType()
+ : CXFA_Caption::kDefaultPlacementType;
switch (iCapPlacement) {
case XFA_AttributeEnum::Left:
case XFA_AttributeEnum::Right: