summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffpushbutton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/cxfa_ffpushbutton.cpp')
-rw-r--r--xfa/fxfa/cxfa_ffpushbutton.cpp27
1 files changed, 14 insertions, 13 deletions
diff --git a/xfa/fxfa/cxfa_ffpushbutton.cpp b/xfa/fxfa/cxfa_ffpushbutton.cpp
index f42e5257b5..c494a3dd82 100644
--- a/xfa/fxfa/cxfa_ffpushbutton.cpp
+++ b/xfa/fxfa/cxfa_ffpushbutton.cpp
@@ -24,8 +24,8 @@
#include "xfa/fxgraphics/cxfa_gecolor.h"
#include "xfa/fxgraphics/cxfa_gepath.h"
-CXFA_FFPushButton::CXFA_FFPushButton(CXFA_WidgetAcc* pDataAcc)
- : CXFA_FFField(pDataAcc), m_pOldDelegate(nullptr) {}
+CXFA_FFPushButton::CXFA_FFPushButton(CXFA_Node* pNode)
+ : CXFA_FFField(pNode), m_pOldDelegate(nullptr) {}
CXFA_FFPushButton::~CXFA_FFPushButton() {
CXFA_FFPushButton::UnloadWidget();
@@ -71,7 +71,7 @@ bool CXFA_FFPushButton::LoadWidget() {
void CXFA_FFPushButton::UpdateWidgetProperty() {
uint32_t dwStyleEx = 0;
- switch (m_pDataAcc->GetButtonHighlight()) {
+ switch (m_pNode->GetWidgetAcc()->GetButtonHighlight()) {
case XFA_AttributeEnum::Inverted:
dwStyleEx = XFA_FWL_PSBSTYLEEXT_HiliteInverted;
break;
@@ -100,11 +100,11 @@ bool CXFA_FFPushButton::PerformLayout() {
CFX_RectF rtWidget = GetRectWithoutRotate();
m_rtUI = rtWidget;
- CXFA_Margin* margin = m_pDataAcc->GetNode()->GetMargin();
+ CXFA_Margin* margin = m_pNode->GetMargin();
if (margin)
XFA_RectWidthoutMargin(rtWidget, margin);
- CXFA_Caption* caption = m_pDataAcc->GetNode()->GetCaption();
+ CXFA_Caption* caption = m_pNode->GetCaption();
m_rtCaption = rtWidget;
CXFA_Margin* captionMargin = caption->GetMargin();
if (captionMargin)
@@ -118,7 +118,7 @@ bool CXFA_FFPushButton::PerformLayout() {
return true;
}
float CXFA_FFPushButton::GetLineWidth() {
- CXFA_Border* border = m_pDataAcc->GetNode()->GetBorder(false);
+ CXFA_Border* border = m_pNode->GetBorder(false);
if (border && border->GetPresence() == XFA_AttributeEnum::Visible)
return border->GetEdge(0)->GetThickness();
return 0;
@@ -133,23 +133,23 @@ FX_ARGB CXFA_FFPushButton::GetFillColor() {
}
void CXFA_FFPushButton::LoadHighlightCaption() {
- CXFA_Caption* caption = m_pDataAcc->GetNode()->GetCaption();
+ CXFA_Caption* caption = m_pNode->GetCaption();
if (!caption || caption->IsHidden())
return;
- if (m_pDataAcc->HasButtonRollover()) {
+ if (m_pNode->GetWidgetAcc()->HasButtonRollover()) {
if (!m_pRollProvider) {
m_pRollProvider = pdfium::MakeUnique<CXFA_TextProvider>(
- m_pDataAcc.Get(), XFA_TEXTPROVIDERTYPE_Rollover);
+ m_pNode->GetWidgetAcc(), XFA_TEXTPROVIDERTYPE_Rollover);
}
m_pRolloverTextLayout =
pdfium::MakeUnique<CXFA_TextLayout>(GetDoc(), m_pRollProvider.get());
}
- if (m_pDataAcc->HasButtonDown()) {
+ if (m_pNode->GetWidgetAcc()->HasButtonDown()) {
if (!m_pDownProvider) {
m_pDownProvider = pdfium::MakeUnique<CXFA_TextProvider>(
- m_pDataAcc.Get(), XFA_TEXTPROVIDERTYPE_Down);
+ m_pNode->GetWidgetAcc(), XFA_TEXTPROVIDERTYPE_Down);
}
m_pDownTextLayout =
pdfium::MakeUnique<CXFA_TextLayout>(GetDoc(), m_pDownProvider.get());
@@ -167,8 +167,9 @@ void CXFA_FFPushButton::LayoutHighlightCaption() {
void CXFA_FFPushButton::RenderHighlightCaption(CXFA_Graphics* pGS,
CFX_Matrix* pMatrix) {
- CXFA_TextLayout* pCapTextLayout = m_pDataAcc->GetCaptionTextLayout();
- CXFA_Caption* caption = m_pDataAcc->GetNode()->GetCaption();
+ CXFA_TextLayout* pCapTextLayout =
+ m_pNode->GetWidgetAcc()->GetCaptionTextLayout();
+ CXFA_Caption* caption = m_pNode->GetCaption();
if (!caption || !caption->IsVisible())
return;