summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_fffield.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-07 18:44:51 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-07 18:44:51 +0000
commit0a9b0a15133370657a2f3e13f062028c17a3dc0b (patch)
tree37ae48dbc880c6ff38a4a8ee3f7e1f6a33a050a3 /xfa/fxfa/cxfa_fffield.cpp
parentf44cf89c0263708b7d475fb1aeba6ba42f54766f (diff)
downloadpdfium-0a9b0a15133370657a2f3e13f062028c17a3dc0b.tar.xz
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 <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_fffield.cpp')
-rw-r--r--xfa/fxfa/cxfa_fffield.cpp28
1 files changed, 14 insertions, 14 deletions
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())