From 7d36c3e835bc32898f0064226d79a8f0f89e15ec Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 10 Jan 2018 17:48:57 +0000 Subject: Rename CXFA_Node::GetBorder to GetBorderIfExists Renaming GetBorder makes it clear that the method may return a nullptr. Change-Id: I50a8b511e273552e3a4a226ba72a7c0e2ae74ea3 Reviewed-on: https://pdfium-review.googlesource.com/22653 Reviewed-by: Ryan Harrison Commit-Queue: dsinclair --- xfa/fxfa/cxfa_ffpushbutton.cpp | 2 +- xfa/fxfa/cxfa_ffwidget.cpp | 2 +- xfa/fxfa/parser/cxfa_node.cpp | 2 +- xfa/fxfa/parser/cxfa_node.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xfa/fxfa/cxfa_ffpushbutton.cpp b/xfa/fxfa/cxfa_ffpushbutton.cpp index 690a7163a0..e3ca6eedff 100644 --- a/xfa/fxfa/cxfa_ffpushbutton.cpp +++ b/xfa/fxfa/cxfa_ffpushbutton.cpp @@ -118,7 +118,7 @@ bool CXFA_FFPushButton::PerformLayout() { return true; } float CXFA_FFPushButton::GetLineWidth() { - CXFA_Border* border = m_pNode->GetBorder(); + CXFA_Border* border = m_pNode->GetBorderIfExists(); if (border && border->GetPresence() == XFA_AttributeEnum::Visible) return border->GetEdge(0)->GetThickness(); return 0; diff --git a/xfa/fxfa/cxfa_ffwidget.cpp b/xfa/fxfa/cxfa_ffwidget.cpp index d420b3cf3c..20719519a4 100644 --- a/xfa/fxfa/cxfa_ffwidget.cpp +++ b/xfa/fxfa/cxfa_ffwidget.cpp @@ -982,7 +982,7 @@ void CXFA_FFWidget::RenderWidget(CXFA_Graphics* pGS, if (!IsMatchVisibleStatus(dwStatus)) return; - CXFA_Border* border = m_pNode->GetBorder(); + CXFA_Border* border = m_pNode->GetBorderIfExists(); if (!border) return; diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp index 6d77f74c4e..02d1c0f6f3 100644 --- a/xfa/fxfa/parser/cxfa_node.cpp +++ b/xfa/fxfa/parser/cxfa_node.cpp @@ -1530,7 +1530,7 @@ int32_t CXFA_Node::GetRotate() { return degrees ? XFA_MapRotation(*degrees) / 90 * 90 : 0; } -CXFA_Border* CXFA_Node::GetBorder() const { +CXFA_Border* CXFA_Node::GetBorderIfExists() const { return JSObject()->GetProperty(0, XFA_Element::Border); } diff --git a/xfa/fxfa/parser/cxfa_node.h b/xfa/fxfa/parser/cxfa_node.h index c1074ffaad..b175a83a84 100644 --- a/xfa/fxfa/parser/cxfa_node.h +++ b/xfa/fxfa/parser/cxfa_node.h @@ -236,7 +236,7 @@ class CXFA_Node : public CXFA_Object { bool IsOpenAccess(); - CXFA_Border* GetBorder() const; + CXFA_Border* GetBorderIfExists() const; CXFA_Border* GetOrCreateBorder(); CXFA_Caption* GetCaption() const; -- cgit v1.2.3