summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffwidget.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-07 20:49:20 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-07 20:49:20 +0000
commit2a69b9ef97ddf46fe01de432bd0ccc1b7ce92bcb (patch)
treed0138d82b52cc63e0956a12faebf6433dd9303fd /xfa/fxfa/cxfa_ffwidget.cpp
parentc5a729ec5ada8ef0edc3f4d9976e96865f516598 (diff)
downloadpdfium-2a69b9ef97ddf46fe01de432bd0ccc1b7ce92bcb.tar.xz
Rename CXFA_Margin to CXFA_MarginData
This CL renames CXFA_Margin to CXFA_MarginData to reflect the fact this is part of the data hierarchy. Change-Id: I50d82d01fcaf35c621f13b8b68bc04d850ec885a Reviewed-on: https://pdfium-review.googlesource.com/17986 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_ffwidget.cpp')
-rw-r--r--xfa/fxfa/cxfa_ffwidget.cpp27
1 files changed, 16 insertions, 11 deletions
diff --git a/xfa/fxfa/cxfa_ffwidget.cpp b/xfa/fxfa/cxfa_ffwidget.cpp
index 48e7ae49ac..6ca1710298 100644
--- a/xfa/fxfa/cxfa_ffwidget.cpp
+++ b/xfa/fxfa/cxfa_ffwidget.cpp
@@ -991,9 +991,9 @@ void CXFA_FFWidget::RenderWidget(CXFA_Graphics* pGS,
return;
CFX_RectF rtBorder = GetRectWithoutRotate();
- CXFA_Margin margin = borderData.GetMargin();
- if (margin)
- XFA_RectWidthoutMargin(rtBorder, margin);
+ CXFA_MarginData marginData = borderData.GetMarginData();
+ if (marginData)
+ XFA_RectWidthoutMargin(rtBorder, marginData);
rtBorder.Normalize();
DrawBorder(pGS, borderData, rtBorder, matrix);
@@ -2033,15 +2033,20 @@ RetainPtr<CFX_DIBitmap> XFA_LoadImageFromBuffer(
return pBitmap;
}
-void XFA_RectWidthoutMargin(CFX_RectF& rt, const CXFA_Margin& mg, bool bUI) {
- if (!mg) {
+void XFA_RectWidthoutMargin(CFX_RectF& rt,
+ const CXFA_MarginData& marginData,
+ bool bUI) {
+ if (!marginData)
return;
- }
- float fLeftInset, fTopInset, fRightInset, fBottomInset;
- mg.GetLeftInset(fLeftInset);
- mg.GetTopInset(fTopInset);
- mg.GetRightInset(fRightInset);
- mg.GetBottomInset(fBottomInset);
+
+ float fLeftInset;
+ float fTopInset;
+ float fRightInset;
+ float fBottomInset;
+ marginData.GetLeftInset(fLeftInset);
+ marginData.GetTopInset(fTopInset);
+ marginData.GetRightInset(fRightInset);
+ marginData.GetBottomInset(fBottomInset);
rt.Deflate(fLeftInset, fTopInset, fRightInset, fBottomInset);
}