diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-11-14 18:34:43 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-11-14 18:34:43 +0000 |
commit | d1b1127cd452a173ec119587c3a6e137e27df6d7 (patch) | |
tree | 4fa719620920ad545ce2346904d253253659d4ab /xfa/fxfa/cxfa_fffield.cpp | |
parent | a5b0e63b66e8bc8744677f4e5b8de2fe2c1b1a7b (diff) | |
download | pdfium-d1b1127cd452a173ec119587c3a6e137e27df6d7.tar.xz |
Cleanup const refs and some enums
This CL cleans up some const refs and some enum values from the previous
rename CLs.
Change-Id: Ifaa990c9c45485bb059e0bda0026093d0a2c0944
Reviewed-on: https://pdfium-review.googlesource.com/18230
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_fffield.cpp')
-rw-r--r-- | xfa/fxfa/cxfa_fffield.cpp | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/xfa/fxfa/cxfa_fffield.cpp b/xfa/fxfa/cxfa_fffield.cpp index a58fd00cce..0ef6722d7f 100644 --- a/xfa/fxfa/cxfa_fffield.cpp +++ b/xfa/fxfa/cxfa_fffield.cpp @@ -233,14 +233,16 @@ void CXFA_FFField::CapPlacement() { switch (iCapPlacement) { case XFA_ATTRIBUTEENUM_Left: { m_rtCaption.width = fCapReserve; - CapLeftRightPlacement(captionData, rtWidget, iCapPlacement); + CapLeftRightPlacement(captionData.GetMarginData(), rtWidget, + iCapPlacement); m_rtUI.width -= fCapReserve; m_rtUI.left += fCapReserve; break; } case XFA_ATTRIBUTEENUM_Top: { m_rtCaption.height = fCapReserve; - CapTopBottomPlacement(captionData, rtWidget, iCapPlacement); + CapTopBottomPlacement(captionData.GetMarginData(), rtWidget, + iCapPlacement); m_rtUI.top += fCapReserve; m_rtUI.height -= fCapReserve; break; @@ -248,14 +250,16 @@ void CXFA_FFField::CapPlacement() { case XFA_ATTRIBUTEENUM_Right: { m_rtCaption.left = m_rtCaption.right() - fCapReserve; m_rtCaption.width = fCapReserve; - CapLeftRightPlacement(captionData, rtWidget, iCapPlacement); + CapLeftRightPlacement(captionData.GetMarginData(), rtWidget, + iCapPlacement); m_rtUI.width -= fCapReserve; break; } case XFA_ATTRIBUTEENUM_Bottom: { m_rtCaption.top = m_rtCaption.bottom() - fCapReserve; m_rtCaption.height = fCapReserve; - CapTopBottomPlacement(captionData, rtWidget, iCapPlacement); + CapTopBottomPlacement(captionData.GetMarginData(), rtWidget, + iCapPlacement); m_rtUI.height -= fCapReserve; break; } @@ -274,13 +278,13 @@ void CXFA_FFField::CapPlacement() { m_rtUI.Normalize(); } -void CXFA_FFField::CapTopBottomPlacement(CXFA_CaptionData captionData, +void CXFA_FFField::CapTopBottomPlacement(const CXFA_MarginData& marginData, const CFX_RectF& rtWidget, int32_t iCapPlacement) { CFX_RectF rtUIMargin = m_pDataAcc->GetUIMargin(); m_rtCaption.left += rtUIMargin.left; - if (CXFA_MarginData captionMarginData = captionData.GetMarginData()) { - XFA_RectWidthoutMargin(m_rtCaption, captionMarginData); + if (marginData) { + XFA_RectWidthoutMargin(m_rtCaption, marginData); if (m_rtCaption.height < 0) m_rtCaption.top += m_rtCaption.height; } @@ -300,14 +304,14 @@ void CXFA_FFField::CapTopBottomPlacement(CXFA_CaptionData captionData, } } -void CXFA_FFField::CapLeftRightPlacement(CXFA_CaptionData captionData, +void CXFA_FFField::CapLeftRightPlacement(const CXFA_MarginData& marginData, const CFX_RectF& rtWidget, int32_t iCapPlacement) { CFX_RectF rtUIMargin = m_pDataAcc->GetUIMargin(); m_rtCaption.top += rtUIMargin.top; m_rtCaption.height -= rtUIMargin.top; - if (CXFA_MarginData captionMarginData = captionData.GetMarginData()) { - XFA_RectWidthoutMargin(m_rtCaption, captionMarginData); + if (marginData) { + XFA_RectWidthoutMargin(m_rtCaption, marginData); if (m_rtCaption.height < 0) m_rtCaption.top += m_rtCaption.height; } |