summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffline.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-20 21:19:13 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-20 21:19:13 +0000
commit2501ae2474c1f097a06634d647de2eb3fb730864 (patch)
tree3ac7d386a3e73f3c848c203c3f0e61af9d284c1f /xfa/fxfa/cxfa_ffline.cpp
parent89453e92d5d0b7aaf9e0c3890a90a21adc94a0ce (diff)
downloadpdfium-2501ae2474c1f097a06634d647de2eb3fb730864.tar.xz
Remove CXFA_DataData operator bool override
This CL removes CXFA_DataData::operator bool in favour of an explicit HasValidNode method. This makes the call sites a lot clearer. Change-Id: I6fae14fdeec4674ca7916e21b9e5703070fc3069 Reviewed-on: https://pdfium-review.googlesource.com/18830 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_ffline.cpp')
-rw-r--r--xfa/fxfa/cxfa_ffline.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/xfa/fxfa/cxfa_ffline.cpp b/xfa/fxfa/cxfa_ffline.cpp
index d24444c401..62a4f86998 100644
--- a/xfa/fxfa/cxfa_ffline.cpp
+++ b/xfa/fxfa/cxfa_ffline.cpp
@@ -54,7 +54,7 @@ void CXFA_FFLine::RenderWidget(CXFA_Graphics* pGS,
return;
CXFA_ValueData valueData = m_pDataAcc->GetFormValueData();
- if (!valueData)
+ if (!valueData.HasValidNode())
return;
CXFA_LineData lineData = valueData.GetLineData();
@@ -63,7 +63,7 @@ void CXFA_FFLine::RenderWidget(CXFA_Graphics* pGS,
float fLineWidth = 1.0f;
int32_t iCap = 0;
CXFA_EdgeData edgeData = lineData.GetEdgeData();
- if (edgeData) {
+ if (edgeData.HasValidNode()) {
if (edgeData.GetPresence() != XFA_ATTRIBUTEENUM_Visible)
return;
@@ -77,7 +77,8 @@ void CXFA_FFLine::RenderWidget(CXFA_Graphics* pGS,
mtRotate.Concat(matrix);
CFX_RectF rtLine = GetRectWithoutRotate();
- if (CXFA_MarginData marginData = m_pDataAcc->GetMarginData())
+ CXFA_MarginData marginData = m_pDataAcc->GetMarginData();
+ if (marginData.HasValidNode())
XFA_RectWidthoutMargin(rtLine, marginData);
GetRectFromHand(rtLine, lineData.GetHand(), fLineWidth);