diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-01-04 16:53:15 -0500 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-04 22:08:21 +0000 |
commit | 9aeb0caba4cda9c6bd39ed079f88000a712f9890 (patch) | |
tree | cf5801fa3e5ed9194896771ca66a8a3b80fda709 /xfa/fxfa/cxfa_widgetacc.cpp | |
parent | 0545d2a5d759dbbb6ac3cce6d82bc0f2188cc4aa (diff) | |
download | pdfium-9aeb0caba4cda9c6bd39ed079f88000a712f9890.tar.xz |
Remove CXFA_WidgetData::{GetElementType|GetDatasets}
The GetElementType and GetDatasets methods have been removed from the
CXFA_WidgetData class and we call the CXFA_Node methods directly.
Change-Id: I5178be76c929ac3405eb6a65f9b8775b2f0283e2
Reviewed-on: https://pdfium-review.googlesource.com/22264
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_widgetacc.cpp')
-rw-r--r-- | xfa/fxfa/cxfa_widgetacc.cpp | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/xfa/fxfa/cxfa_widgetacc.cpp b/xfa/fxfa/cxfa_widgetacc.cpp index 88aaf42a55..12777b9143 100644 --- a/xfa/fxfa/cxfa_widgetacc.cpp +++ b/xfa/fxfa/cxfa_widgetacc.cpp @@ -364,14 +364,6 @@ CXFA_WidgetAcc::CXFA_WidgetAcc(CXFA_Node* pNode) CXFA_WidgetAcc::~CXFA_WidgetAcc() = default; -XFA_Element CXFA_WidgetAcc::GetElementType() const { - return m_pNode ? m_pNode->GetElementType() : XFA_Element::Unknown; -} - -CXFA_Node* CXFA_WidgetAcc::GetDatasets() { - return m_pNode->GetBindData(); -} - void CXFA_WidgetAcc::ResetData() { WideString wsValue; XFA_Element eUIType = GetUIType(); @@ -452,7 +444,7 @@ void CXFA_WidgetAcc::SetImageEdit(const WideString& wsContentType, m_pNode->JSObject()->SetContent(wsData, GetFormatDataValue(wsData), true, false, true); - CXFA_Node* pBind = GetDatasets(); + CXFA_Node* pBind = m_pNode->GetBindData(); if (!pBind) { image->SetTransferEncoding(XFA_AttributeEnum::Base64); return; @@ -479,7 +471,7 @@ CXFA_WidgetAcc* CXFA_WidgetAcc::GetExclGroup() { int32_t CXFA_WidgetAcc::ProcessEvent(CXFA_FFDocView* docView, XFA_AttributeEnum iActivity, CXFA_EventParam* pEventParam) { - if (GetElementType() == XFA_Element::Draw) + if (m_pNode && m_pNode->GetElementType() == XFA_Element::Draw) return XFA_EVENTERROR_NotExist; std::vector<CXFA_Event*> eventArray = @@ -518,7 +510,7 @@ int32_t CXFA_WidgetAcc::ProcessEvent(CXFA_FFDocView* docView, } int32_t CXFA_WidgetAcc::ProcessCalculate(CXFA_FFDocView* docView) { - if (GetElementType() == XFA_Element::Draw) + if (m_pNode && m_pNode->GetElementType() == XFA_Element::Draw) return XFA_EVENTERROR_NotExist; CXFA_Calculate* calc = GetCalculate(); @@ -733,7 +725,7 @@ WideString CXFA_WidgetAcc::GetValidateMessage(bool bError, bool bVersionFlag) { int32_t CXFA_WidgetAcc::ProcessValidate(CXFA_FFDocView* docView, int32_t iFlags) { - if (GetElementType() == XFA_Element::Draw) + if (m_pNode && m_pNode->GetElementType() == XFA_Element::Draw) return XFA_EVENTERROR_NotExist; CXFA_Validate* validate = GetValidate(false); @@ -1582,7 +1574,7 @@ void CXFA_WidgetAcc::InitLayoutData() { default: break; } - if (GetElementType() == XFA_Element::Field) { + if (m_pNode && m_pNode->GetElementType() == XFA_Element::Field) { m_pLayoutData = pdfium::MakeUnique<CXFA_FieldLayoutData>(); return; } |