summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_fftext.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-01-10 19:44:26 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-01-10 19:44:26 +0000
commit78d841011655b868486a45e0fe865a972742aa0c (patch)
treee2bb52e930000b90d77aaf82af8903d106d63d58 /xfa/fxfa/cxfa_fftext.cpp
parentccd7899b2d662c0a1be6cd52c6b6068472c27375 (diff)
downloadpdfium-78d841011655b868486a45e0fe865a972742aa0c.tar.xz
Rename GetMargin to GetMarginIfExists
This CL makes it explicit that GetMargin may return a nullptr. Change-Id: I46780e8df9e966accc38baf56f8aa5149533db87 Reviewed-on: https://pdfium-review.googlesource.com/22675 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_fftext.cpp')
-rw-r--r--xfa/fxfa/cxfa_fftext.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/xfa/fxfa/cxfa_fftext.cpp b/xfa/fxfa/cxfa_fftext.cpp
index b2ec840504..7ae3cb6f5c 100644
--- a/xfa/fxfa/cxfa_fftext.cpp
+++ b/xfa/fxfa/cxfa_fftext.cpp
@@ -41,7 +41,7 @@ void CXFA_FFText::RenderWidget(CXFA_Graphics* pGS,
CFX_RenderDevice* pRenderDevice = pGS->GetRenderDevice();
CFX_RectF rtText = GetRectWithoutRotate();
- CXFA_Margin* margin = m_pNode->GetMargin();
+ CXFA_Margin* margin = m_pNode->GetMarginIfExists();
if (margin) {
CXFA_LayoutItem* pItem = this;
if (!pItem->GetPrev() && !pItem->GetNext()) {
@@ -86,7 +86,7 @@ bool CXFA_FFText::PerformLayout() {
pItem = pItem->GetFirst();
while (pItem) {
CFX_RectF rtText = pItem->GetRect(false);
- CXFA_Margin* margin = m_pNode->GetMargin();
+ CXFA_Margin* margin = m_pNode->GetMarginIfExists();
if (margin) {
if (!pItem->GetPrev())
rtText.height -= margin->GetTopInset();