From 7f302e511fe86611a311748cd7b9dbb18ceea156 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 10 Jan 2018 22:13:45 +0000 Subject: Rename GetPara to GetParaIfExists This CL renames GetPara to make it explicit it can return nullptr. Change-Id: I7c6529c15646b9947964e25a8d28938b38f091d6 Reviewed-on: https://pdfium-review.googlesource.com/22680 Reviewed-by: Ryan Harrison Commit-Queue: dsinclair --- xfa/fxfa/cxfa_fwltheme.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xfa/fxfa/cxfa_fwltheme.cpp') diff --git a/xfa/fxfa/cxfa_fwltheme.cpp b/xfa/fxfa/cxfa_fwltheme.cpp index cd55ca48d7..920968269f 100644 --- a/xfa/fxfa/cxfa_fwltheme.cpp +++ b/xfa/fxfa/cxfa_fwltheme.cpp @@ -155,7 +155,7 @@ CFX_RectF CXFA_FWLTheme::GetUIMargin(CFWL_ThemePart* pThemePart) const { CXFA_LayoutItem* pItem = pWidget; CXFA_WidgetAcc* pWidgetAcc = pWidget->GetNode()->GetWidgetAcc(); rect = pWidgetAcc->GetUIMargin(); - CXFA_Para* para = pWidgetAcc->GetNode()->GetPara(); + CXFA_Para* para = pWidgetAcc->GetNode()->GetParaIfExists(); if (para) { rect.left += para->GetMarginLeft(); if (pWidgetAcc->IsMultiLine()) @@ -213,7 +213,7 @@ FX_COLORREF CXFA_FWLTheme::GetTextColor(CFWL_ThemePart* pThemePart) const { CFX_SizeF CXFA_FWLTheme::GetSpaceAboveBelow(CFWL_ThemePart* pThemePart) const { CFX_SizeF sizeAboveBelow; if (CXFA_FFWidget* pWidget = XFA_ThemeGetOuterWidget(pThemePart->m_pWidget)) { - CXFA_Para* para = pWidget->GetNode()->GetPara(); + CXFA_Para* para = pWidget->GetNode()->GetParaIfExists(); if (para) { sizeAboveBelow.width = para->GetSpaceAbove(); sizeAboveBelow.height = para->GetSpaceBelow(); -- cgit v1.2.3