summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_widgetdata.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-07 21:34:00 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-07 21:34:00 +0000
commit31ed75b714b80b8497b35825bb926c5abb035299 (patch)
tree01b2ed5bee1665b665f77a0d8f6f676906bfbb82 /xfa/fxfa/parser/cxfa_widgetdata.cpp
parent71335de2577ae27d00f03aeb007bf6b9c90d9391 (diff)
downloadpdfium-31ed75b714b80b8497b35825bb926c5abb035299.tar.xz
Rename CXFA_Stroke to CXFA_StrokeData
This CL renames CXFA_Stroke to CXFA_StrokeData to show it is part of the data hierarchy. Change-Id: If0041c410630c61129ed1ff0879c68244ad01aa5 Reviewed-on: https://pdfium-review.googlesource.com/18013 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_widgetdata.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_widgetdata.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp
index 841fbd065a..b9a54bd447 100644
--- a/xfa/fxfa/parser/cxfa_widgetdata.cpp
+++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp
@@ -20,7 +20,7 @@
namespace {
-float GetEdgeThickness(const std::vector<CXFA_Stroke>& strokes,
+float GetEdgeThickness(const std::vector<CXFA_StrokeData>& strokes,
bool b3DStyle,
int32_t nIndex) {
float fThickness = 0;
@@ -397,11 +397,10 @@ CXFA_BorderData CXFA_WidgetData::GetUIBorderData() {
CFX_RectF CXFA_WidgetData::GetUIMargin() {
CXFA_Node* pUIChild = GetUIChild();
- if (!pUIChild)
- return CFX_RectF();
-
CXFA_MarginData mgUI = CXFA_MarginData(
- pUIChild->JSNode()->GetProperty(0, XFA_Element::Margin, false));
+ pUIChild ? pUIChild->JSNode()->GetProperty(0, XFA_Element::Margin, false)
+ : nullptr);
+
if (!mgUI)
return CFX_RectF();
@@ -419,8 +418,7 @@ CFX_RectF CXFA_WidgetData::GetUIMargin() {
float fThickness = 0;
borderData.Get3DStyle(bVisible, fThickness);
if (!bLeft || !bTop || !bRight || !bBottom) {
- std::vector<CXFA_Stroke> strokes;
- borderData.GetStrokes(&strokes);
+ std::vector<CXFA_StrokeData> strokes = borderData.GetStrokes();
if (!bTop)
fTopInset = GetEdgeThickness(strokes, bVisible, 0);
if (!bRight)