From 59cdc7dc88310bd8cdf2ace60e0f567561d38dbb Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 29 Jan 2018 20:38:16 +0000 Subject: Move barcode code to CXFA_Barcode This CL moves the barcode specific code out of CXFA_Node and into CXFA_Barcode. The CXFA_FFBarcode widget was modified to take the barcode as a parameter. Change-Id: I8ff91cb58402665f4ba63f2eeced45feeaa9ff50 Reviewed-on: https://pdfium-review.googlesource.com/24450 Commit-Queue: dsinclair Reviewed-by: Ryan Harrison --- xfa/fxfa/cxfa_fftextedit.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'xfa/fxfa/cxfa_fftextedit.cpp') diff --git a/xfa/fxfa/cxfa_fftextedit.cpp b/xfa/fxfa/cxfa_fftextedit.cpp index ad03b5273b..d91e7f7086 100644 --- a/xfa/fxfa/cxfa_fftextedit.cpp +++ b/xfa/fxfa/cxfa_fftextedit.cpp @@ -19,6 +19,7 @@ #include "xfa/fxfa/cxfa_eventparam.h" #include "xfa/fxfa/cxfa_ffapp.h" #include "xfa/fxfa/cxfa_ffdoc.h" +#include "xfa/fxfa/parser/cxfa_barcode.h" #include "xfa/fxfa/parser/cxfa_node.h" #include "xfa/fxfa/parser/cxfa_para.h" @@ -271,8 +272,11 @@ bool CXFA_FFTextEdit::UpdateFWLData() { } } else if (m_pNode->GetFFWidgetType() == XFA_FFWidgetType::kBarcode) { int32_t nDataLen = 0; - if (eType == XFA_VALUEPICTURE_Edit) - nDataLen = m_pNode->GetBarcodeAttribute_DataLength().value_or(0); + if (eType == XFA_VALUEPICTURE_Edit) { + nDataLen = static_cast(m_pNode.Get()) + ->GetDataLength() + .value_or(0); + } pEdit->SetLimit(nDataLen); bUpdate = true; -- cgit v1.2.3