From 90d9386825b872a0b668eac5dff3e268fa7ad16c Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 30 Jan 2018 21:38:40 +0000 Subject: Shuffle more code out of CXFA_Node This CL moves more code out of the CXFA_Node class and into specific subclasses. Change-Id: Idca36f251431bf7efd4da045aeabf097ab23f0ce Reviewed-on: https://pdfium-review.googlesource.com/24714 Reviewed-by: Ryan Harrison Commit-Queue: dsinclair --- xfa/fxfa/cxfa_ffpushbutton.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'xfa/fxfa/cxfa_ffpushbutton.cpp') diff --git a/xfa/fxfa/cxfa_ffpushbutton.cpp b/xfa/fxfa/cxfa_ffpushbutton.cpp index d0611bbd8c..7c556b81a8 100644 --- a/xfa/fxfa/cxfa_ffpushbutton.cpp +++ b/xfa/fxfa/cxfa_ffpushbutton.cpp @@ -19,13 +19,14 @@ #include "xfa/fxfa/cxfa_textlayout.h" #include "xfa/fxfa/cxfa_textprovider.h" #include "xfa/fxfa/parser/cxfa_border.h" +#include "xfa/fxfa/parser/cxfa_button.h" #include "xfa/fxfa/parser/cxfa_caption.h" #include "xfa/fxfa/parser/cxfa_edge.h" #include "xfa/fxgraphics/cxfa_gecolor.h" #include "xfa/fxgraphics/cxfa_gepath.h" -CXFA_FFPushButton::CXFA_FFPushButton(CXFA_Node* pNode) - : CXFA_FFField(pNode), m_pOldDelegate(nullptr) {} +CXFA_FFPushButton::CXFA_FFPushButton(CXFA_Node* pNode, CXFA_Button* button) + : CXFA_FFField(pNode), button_(button) {} CXFA_FFPushButton::~CXFA_FFPushButton() { CXFA_FFPushButton::UnloadWidget(); @@ -71,7 +72,7 @@ bool CXFA_FFPushButton::LoadWidget() { void CXFA_FFPushButton::UpdateWidgetProperty() { uint32_t dwStyleEx = 0; - switch (m_pNode->GetButtonHighlight()) { + switch (button_->GetHighlight()) { case XFA_AttributeEnum::Inverted: dwStyleEx = XFA_FWL_PSBSTYLEEXT_HiliteInverted; break; -- cgit v1.2.3