summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_fftextedit.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-01-22 18:43:17 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-01-22 18:43:17 +0000
commited4038bc335385b7e341d8de5c2bec8db5dcdcb6 (patch)
tree86af694f9185c0be181c778cf45ede8f57791534 /xfa/fxfa/cxfa_fftextedit.cpp
parentd7d584df24fda9c9a28330959cc28f94dc0294e2 (diff)
downloadpdfium-ed4038bc335385b7e341d8de5c2bec8db5dcdcb6.tar.xz
Move the UI elements from CXFA_WidgetAcc to CXFA_Node
This CL moves the methods and members related to the UI nodes from the CXFA_WidgetAcc class to the CXFA_Node class. Change-Id: I1fdc5173787141065f1e607bbfefa3b22af738b4 Reviewed-on: https://pdfium-review.googlesource.com/23290 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_fftextedit.cpp')
-rw-r--r--xfa/fxfa/cxfa_fftextedit.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/xfa/fxfa/cxfa_fftextedit.cpp b/xfa/fxfa/cxfa_fftextedit.cpp
index fad9a9b37a..19405d2d2a 100644
--- a/xfa/fxfa/cxfa_fftextedit.cpp
+++ b/xfa/fxfa/cxfa_fftextedit.cpp
@@ -193,15 +193,14 @@ bool CXFA_FFTextEdit::CommitData() {
}
void CXFA_FFTextEdit::ValidateNumberField(const WideString& wsText) {
- CXFA_WidgetAcc* pAcc = GetNode()->GetWidgetAcc();
- if (!pAcc || pAcc->GetUIType() != XFA_Element::NumericEdit)
+ if (GetNode()->GetUIType() != XFA_Element::NumericEdit)
return;
IXFA_AppProvider* pAppProvider = GetApp()->GetAppProvider();
if (!pAppProvider)
return;
- WideString wsSomField = pAcc->GetNode()->GetSOMExpression();
+ WideString wsSomField = GetNode()->GetSOMExpression();
pAppProvider->MsgBox(WideString::Format(L"%ls can not contain %ls",
wsText.c_str(), wsSomField.c_str()),
pAppProvider->GetAppTitle(), XFA_MBICON_Error,
@@ -260,7 +259,7 @@ bool CXFA_FFTextEdit::UpdateFWLData() {
eType = XFA_VALUEPICTURE_Edit;
bool bUpdate = false;
- if (m_pNode->GetWidgetAcc()->GetUIType() == XFA_Element::TextEdit &&
+ if (m_pNode->GetUIType() == XFA_Element::TextEdit &&
!m_pNode->GetWidgetAcc()->GetNumberOfCells()) {
XFA_Element elementType;
int32_t iMaxChars;
@@ -271,7 +270,7 @@ bool CXFA_FFTextEdit::UpdateFWLData() {
pEdit->SetLimit(iMaxChars);
bUpdate = true;
}
- } else if (m_pNode->GetWidgetAcc()->GetUIType() == XFA_Element::Barcode) {
+ } else if (m_pNode->GetUIType() == XFA_Element::Barcode) {
int32_t nDataLen = 0;
if (eType == XFA_VALUEPICTURE_Edit)
nDataLen = m_pNode->GetBarcodeAttribute_DataLength().value_or(0);
@@ -302,7 +301,7 @@ void CXFA_FFTextEdit::OnTextChanged(CFWL_Widget* pWidget,
eParam.m_pTarget = m_pNode->GetWidgetAcc();
eParam.m_wsPrevText = wsPrevText;
CFWL_Edit* pEdit = static_cast<CFWL_Edit*>(m_pNormalWidget.get());
- if (m_pNode->GetWidgetAcc()->GetUIType() == XFA_Element::DateTimeEdit) {
+ if (m_pNode->GetUIType() == XFA_Element::DateTimeEdit) {
CFWL_DateTimePicker* pDateTime = (CFWL_DateTimePicker*)pEdit;
eParam.m_wsNewText = pDateTime->GetEditText();
if (pDateTime->HasSelection()) {
@@ -326,8 +325,7 @@ void CXFA_FFTextEdit::OnTextFull(CFWL_Widget* pWidget) {
}
bool CXFA_FFTextEdit::CheckWord(const ByteStringView& sWord) {
- return sWord.IsEmpty() ||
- m_pNode->GetWidgetAcc()->GetUIType() != XFA_Element::TextEdit;
+ return sWord.IsEmpty() || m_pNode->GetUIType() != XFA_Element::TextEdit;
}
void CXFA_FFTextEdit::OnProcessMessage(CFWL_Message* pMessage) {