summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffcheckbutton.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_ffcheckbutton.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_ffcheckbutton.cpp')
-rw-r--r--xfa/fxfa/cxfa_ffcheckbutton.cpp27
1 files changed, 14 insertions, 13 deletions
diff --git a/xfa/fxfa/cxfa_ffcheckbutton.cpp b/xfa/fxfa/cxfa_ffcheckbutton.cpp
index 87fa41f3b7..e048598947 100644
--- a/xfa/fxfa/cxfa_ffcheckbutton.cpp
+++ b/xfa/fxfa/cxfa_ffcheckbutton.cpp
@@ -91,10 +91,10 @@ bool CXFA_FFCheckButton::PerformLayout() {
CXFA_FFWidget::PerformLayout();
float fCheckSize = m_pDataAcc->GetCheckButtonSize();
- CXFA_Margin mgWidget = m_pDataAcc->GetMargin();
+ CXFA_MarginData marginData = m_pDataAcc->GetMarginData();
CFX_RectF rtWidget = GetRectWithoutRotate();
- if (mgWidget)
- XFA_RectWidthoutMargin(rtWidget, mgWidget);
+ if (marginData)
+ XFA_RectWidthoutMargin(rtWidget, marginData);
int32_t iCapPlacement = -1;
float fCapReserve = 0;
@@ -121,18 +121,18 @@ bool CXFA_FFCheckButton::PerformLayout() {
}
m_rtUI = rtWidget;
- CXFA_Margin mgCap = captionData.GetMargin();
+ CXFA_MarginData captionMarginData = captionData.GetMarginData();
switch (iCapPlacement) {
case XFA_ATTRIBUTEENUM_Left: {
m_rtCaption.width = fCapReserve;
- CapLeftRightPlacement(mgCap);
+ CapLeftRightPlacement(captionMarginData);
m_rtUI.width -= fCapReserve;
m_rtUI.left += fCapReserve;
break;
}
case XFA_ATTRIBUTEENUM_Top: {
m_rtCaption.height = fCapReserve;
- XFA_RectWidthoutMargin(m_rtCaption, mgCap);
+ XFA_RectWidthoutMargin(m_rtCaption, captionMarginData);
m_rtUI.height -= fCapReserve;
m_rtUI.top += fCapReserve;
break;
@@ -140,14 +140,14 @@ bool CXFA_FFCheckButton::PerformLayout() {
case XFA_ATTRIBUTEENUM_Right: {
m_rtCaption.left = m_rtCaption.right() - fCapReserve;
m_rtCaption.width = fCapReserve;
- CapLeftRightPlacement(mgCap);
+ CapLeftRightPlacement(captionMarginData);
m_rtUI.width -= fCapReserve;
break;
}
case XFA_ATTRIBUTEENUM_Bottom: {
m_rtCaption.top = m_rtCaption.bottom() - fCapReserve;
m_rtCaption.height = fCapReserve;
- XFA_RectWidthoutMargin(m_rtCaption, mgCap);
+ XFA_RectWidthoutMargin(m_rtCaption, captionMarginData);
m_rtUI.height -= fCapReserve;
break;
}
@@ -174,9 +174,9 @@ bool CXFA_FFCheckButton::PerformLayout() {
m_rtCheckBox = m_rtUI;
CXFA_BorderData borderUIData = m_pDataAcc->GetUIBorderData();
if (borderUIData) {
- CXFA_Margin margin = borderUIData.GetMargin();
- if (margin)
- XFA_RectWidthoutMargin(m_rtUI, margin);
+ CXFA_MarginData borderMarginData = borderUIData.GetMarginData();
+ if (borderMarginData)
+ XFA_RectWidthoutMargin(m_rtUI, borderMarginData);
}
m_rtUI.Normalize();
@@ -188,8 +188,9 @@ bool CXFA_FFCheckButton::PerformLayout() {
return true;
}
-void CXFA_FFCheckButton::CapLeftRightPlacement(CXFA_Margin mgCap) {
- XFA_RectWidthoutMargin(m_rtCaption, mgCap);
+void CXFA_FFCheckButton::CapLeftRightPlacement(
+ CXFA_MarginData captionMarginData) {
+ XFA_RectWidthoutMargin(m_rtCaption, captionMarginData);
if (m_rtCaption.height < 0)
m_rtCaption.top += m_rtCaption.height;
if (m_rtCaption.width < 0) {