From 0a9b0a15133370657a2f3e13f062028c17a3dc0b Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 7 Nov 2017 18:44:51 +0000 Subject: Rename CXFA_Caption to CXFA_CaptionData This CL renames CXFA_Caption to CXFA_CaptionData to make it clear it's part of the data hierarchy. Change-Id: I0268005e12a6b58aed7274bf9d023887119a8a63 Reviewed-on: https://pdfium-review.googlesource.com/17977 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- xfa/fxfa/cxfa_fffield.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'xfa/fxfa/cxfa_fffield.cpp') diff --git a/xfa/fxfa/cxfa_fffield.cpp b/xfa/fxfa/cxfa_fffield.cpp index b1c8c32684..b1f4f20861 100644 --- a/xfa/fxfa/cxfa_fffield.cpp +++ b/xfa/fxfa/cxfa_fffield.cpp @@ -191,15 +191,15 @@ void CXFA_FFField::CapPlacement() { XFA_ATTRIBUTEENUM iCapPlacement = XFA_ATTRIBUTEENUM_Unknown; float fCapReserve = 0; - CXFA_Caption caption = m_pDataAcc->GetCaption(); - if (caption && caption.GetPresence() != XFA_ATTRIBUTEENUM_Hidden) { - iCapPlacement = (XFA_ATTRIBUTEENUM)caption.GetPlacementType(); + CXFA_CaptionData captionData = m_pDataAcc->GetCaptionData(); + if (captionData && captionData.GetPresence() != XFA_ATTRIBUTEENUM_Hidden) { + iCapPlacement = (XFA_ATTRIBUTEENUM)captionData.GetPlacementType(); if (iCapPlacement == XFA_ATTRIBUTEENUM_Top && GetPrev()) { m_rtCaption.Reset(); } else if (iCapPlacement == XFA_ATTRIBUTEENUM_Bottom && GetNext()) { m_rtCaption.Reset(); } else { - fCapReserve = caption.GetReserve(); + fCapReserve = captionData.GetReserve(); CXFA_LayoutItem* pItem = this; if (!pItem->GetPrev() && !pItem->GetNext()) { m_rtCaption = rtWidget; @@ -234,14 +234,14 @@ void CXFA_FFField::CapPlacement() { switch (iCapPlacement) { case XFA_ATTRIBUTEENUM_Left: { m_rtCaption.width = fCapReserve; - CapLeftRightPlacement(caption, rtWidget, iCapPlacement); + CapLeftRightPlacement(captionData, rtWidget, iCapPlacement); m_rtUI.width -= fCapReserve; m_rtUI.left += fCapReserve; break; } case XFA_ATTRIBUTEENUM_Top: { m_rtCaption.height = fCapReserve; - CapTopBottomPlacement(caption, rtWidget, iCapPlacement); + CapTopBottomPlacement(captionData, rtWidget, iCapPlacement); m_rtUI.top += fCapReserve; m_rtUI.height -= fCapReserve; break; @@ -249,14 +249,14 @@ void CXFA_FFField::CapPlacement() { case XFA_ATTRIBUTEENUM_Right: { m_rtCaption.left = m_rtCaption.right() - fCapReserve; m_rtCaption.width = fCapReserve; - CapLeftRightPlacement(caption, rtWidget, iCapPlacement); + CapLeftRightPlacement(captionData, rtWidget, iCapPlacement); m_rtUI.width -= fCapReserve; break; } case XFA_ATTRIBUTEENUM_Bottom: { m_rtCaption.top = m_rtCaption.bottom() - fCapReserve; m_rtCaption.height = fCapReserve; - CapTopBottomPlacement(caption, rtWidget, iCapPlacement); + CapTopBottomPlacement(captionData, rtWidget, iCapPlacement); m_rtUI.height -= fCapReserve; break; } @@ -275,12 +275,12 @@ void CXFA_FFField::CapPlacement() { m_rtUI.Normalize(); } -void CXFA_FFField::CapTopBottomPlacement(CXFA_Caption caption, +void CXFA_FFField::CapTopBottomPlacement(CXFA_CaptionData captionData, const CFX_RectF& rtWidget, int32_t iCapPlacement) { CFX_RectF rtUIMargin = m_pDataAcc->GetUIMargin(); m_rtCaption.left += rtUIMargin.left; - if (CXFA_Margin mgCap = caption.GetMargin()) { + if (CXFA_Margin mgCap = captionData.GetMargin()) { XFA_RectWidthoutMargin(m_rtCaption, mgCap); if (m_rtCaption.height < 0) m_rtCaption.top += m_rtCaption.height; @@ -301,13 +301,13 @@ void CXFA_FFField::CapTopBottomPlacement(CXFA_Caption caption, } } -void CXFA_FFField::CapLeftRightPlacement(CXFA_Caption caption, +void CXFA_FFField::CapLeftRightPlacement(CXFA_CaptionData captionData, 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_Margin mgCap = caption.GetMargin()) { + if (CXFA_Margin mgCap = captionData.GetMargin()) { XFA_RectWidthoutMargin(m_rtCaption, mgCap); if (m_rtCaption.height < 0) m_rtCaption.top += m_rtCaption.height; @@ -604,8 +604,8 @@ void CXFA_FFField::RenderCaption(CXFA_Graphics* pGS, CFX_Matrix* pMatrix) { if (!pCapTextLayout) return; - CXFA_Caption caption = m_pDataAcc->GetCaption(); - if (!caption || caption.GetPresence() != XFA_ATTRIBUTEENUM_Visible) + CXFA_CaptionData captionData = m_pDataAcc->GetCaptionData(); + if (!captionData || captionData.GetPresence() != XFA_ATTRIBUTEENUM_Visible) return; if (!pCapTextLayout->IsLoaded()) -- cgit v1.2.3