summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_fffield.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-01-08 12:28:27 -0500
committerChromium commit bot <commit-bot@chromium.org>2018-01-08 17:58:37 +0000
commit2f265dbf12831dece93a6a932fd99e5737cd1afd (patch)
treeb853bbf28556893ad6abb4a9e5702ebe256a8320 /xfa/fxfa/cxfa_fffield.cpp
parent5dc906eeda8cef7aff368e3c8efed37c0a5b3162 (diff)
downloadpdfium-2f265dbf12831dece93a6a932fd99e5737cd1afd.tar.xz
Move proxy methods from CXFA_WidgetAcc to CXFA_Node
This CL moves methods from WidgetAcc which just proxy to CXFA_Node. Change-Id: Icf1006b4be3f91077de411ed1a571b1507117602 Reviewed-on: https://pdfium-review.googlesource.com/22391 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_fffield.cpp')
-rw-r--r--xfa/fxfa/cxfa_fffield.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/xfa/fxfa/cxfa_fffield.cpp b/xfa/fxfa/cxfa_fffield.cpp
index 4fd0a39276..80752459e2 100644
--- a/xfa/fxfa/cxfa_fffield.cpp
+++ b/xfa/fxfa/cxfa_fffield.cpp
@@ -171,7 +171,7 @@ bool CXFA_FFField::PerformLayout() {
void CXFA_FFField::CapPlacement() {
CFX_RectF rtWidget = GetRectWithoutRotate();
- CXFA_Margin* margin = m_pDataAcc->GetMargin();
+ CXFA_Margin* margin = m_pDataAcc->GetNode()->GetMargin();
if (margin) {
CXFA_LayoutItem* pItem = this;
float fLeftInset = margin->GetLeftInset();
@@ -192,7 +192,7 @@ void CXFA_FFField::CapPlacement() {
XFA_AttributeEnum iCapPlacement = XFA_AttributeEnum::Unknown;
float fCapReserve = 0;
- CXFA_Caption* caption = m_pDataAcc->GetCaption();
+ CXFA_Caption* caption = m_pDataAcc->GetNode()->GetCaption();
if (caption && !caption->IsHidden()) {
iCapPlacement = caption->GetPlacementType();
if (iCapPlacement == XFA_AttributeEnum::Top && GetPrev()) {
@@ -349,7 +349,7 @@ void CXFA_FFField::SetFWLRect() {
if (rtUi.width < 1.0)
rtUi.width = 1.0;
if (!GetDoc()->GetXFADoc()->IsInteractive()) {
- float fFontSize = m_pDataAcc->GetFontSize();
+ float fFontSize = m_pDataAcc->GetNode()->GetFontSize();
if (rtUi.height < fFontSize)
rtUi.height = fFontSize;
}
@@ -599,7 +599,7 @@ void CXFA_FFField::RenderCaption(CXFA_Graphics* pGS, CFX_Matrix* pMatrix) {
if (!pCapTextLayout)
return;
- CXFA_Caption* caption = m_pDataAcc->GetCaption();
+ CXFA_Caption* caption = m_pDataAcc->GetNode()->GetCaption();
if (!caption || !caption->IsVisible())
return;
@@ -633,7 +633,11 @@ bool CXFA_FFField::ProcessCommittedData() {
}
int32_t CXFA_FFField::CalculateOverride() {
- CXFA_WidgetAcc* pAcc = m_pDataAcc->GetExclGroup();
+ CXFA_Node* exclNode = m_pDataAcc->GetNode()->GetExclGroup();
+ if (!exclNode)
+ return CalculateWidgetAcc(m_pDataAcc.Get());
+
+ CXFA_WidgetAcc* pAcc = exclNode->GetWidgetAcc();
if (!pAcc)
return CalculateWidgetAcc(m_pDataAcc.Get());
if (CalculateWidgetAcc(pAcc) == 0)
@@ -657,7 +661,7 @@ int32_t CXFA_FFField::CalculateOverride() {
}
int32_t CXFA_FFField::CalculateWidgetAcc(CXFA_WidgetAcc* pAcc) {
- CXFA_Calculate* calc = pAcc->GetCalculate();
+ CXFA_Calculate* calc = pAcc->GetNode()->GetCalculate();
if (!calc)
return 1;