diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-01-08 14:30:00 -0500 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-08 20:03:36 +0000 |
commit | 0c53b008b4f2f7a790f756d706a00e8de98dfedd (patch) | |
tree | 7e8a3e6c22792f8ee4e79c85a808ce6ea346dac1 /xfa/fxfa/cxfa_ffbarcode.cpp | |
parent | 2f265dbf12831dece93a6a932fd99e5737cd1afd (diff) | |
download | pdfium-0c53b008b4f2f7a790f756d706a00e8de98dfedd.tar.xz |
Change the FFWidgets to store the node
This CL changes the various CXFA_FF* widgets to hold a CXFA_Node instead
of a CXFA_WidgetAcc wrapper.
Change-Id: I7e31633d5ffd3b61abcdcdfeee7822514c5b28da
Reviewed-on: https://pdfium-review.googlesource.com/22410
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_ffbarcode.cpp')
-rw-r--r-- | xfa/fxfa/cxfa_ffbarcode.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/xfa/fxfa/cxfa_ffbarcode.cpp b/xfa/fxfa/cxfa_ffbarcode.cpp index 6aac5dd7f2..c18344f3d4 100644 --- a/xfa/fxfa/cxfa_ffbarcode.cpp +++ b/xfa/fxfa/cxfa_ffbarcode.cpp @@ -111,8 +111,7 @@ const BarCodeInfo* CXFA_FFBarcode::GetBarcodeTypeByName( return nullptr; } -CXFA_FFBarcode::CXFA_FFBarcode(CXFA_WidgetAcc* pDataAcc) - : CXFA_FFTextEdit(pDataAcc) {} +CXFA_FFBarcode::CXFA_FFBarcode(CXFA_Node* pNode) : CXFA_FFTextEdit(pNode) {} CXFA_FFBarcode::~CXFA_FFBarcode() {} @@ -130,7 +129,8 @@ bool CXFA_FFBarcode::LoadWidget() { m_pNormalWidget->SetDelegate(this); m_pNormalWidget->LockUpdate(); - pFWLBarcode->SetText(m_pDataAcc->GetValue(XFA_VALUEPICTURE_Display)); + pFWLBarcode->SetText( + m_pNode->GetWidgetAcc()->GetValue(XFA_VALUEPICTURE_Display)); UpdateWidgetProperty(); m_pNormalWidget->UnlockUpdate(); return CXFA_FFField::LoadWidget(); @@ -146,7 +146,7 @@ void CXFA_FFBarcode::RenderWidget(CXFA_Graphics* pGS, mtRotate.Concat(matrix); CXFA_FFWidget::RenderWidget(pGS, mtRotate, dwStatus); - DrawBorder(pGS, m_pDataAcc->GetUIBorder(), m_rtUI, mtRotate); + DrawBorder(pGS, m_pNode->GetWidgetAcc()->GetUIBorder(), m_rtUI, mtRotate); RenderCaption(pGS, &mtRotate); CFX_RectF rtWidget = m_pNormalWidget->GetWidgetRect(); @@ -159,14 +159,14 @@ void CXFA_FFBarcode::UpdateWidgetProperty() { CXFA_FFTextEdit::UpdateWidgetProperty(); auto* pBarCodeWidget = static_cast<CFWL_Barcode*>(m_pNormalWidget.get()); - WideString wsType = GetDataAcc()->GetBarcodeType(); + WideString wsType = GetNode()->GetWidgetAcc()->GetBarcodeType(); const BarCodeInfo* pBarcodeInfo = GetBarcodeTypeByName(wsType.AsStringView()); if (!pBarcodeInfo) return; pBarCodeWidget->SetType(pBarcodeInfo->eBCType); - CXFA_WidgetAcc* pAcc = GetDataAcc(); + CXFA_WidgetAcc* pAcc = GetNode()->GetWidgetAcc(); Optional<BC_CHAR_ENCODING> encoding = pAcc->GetBarcodeAttribute_CharEncoding(); if (encoding) @@ -228,7 +228,7 @@ bool CXFA_FFBarcode::OnLButtonDown(uint32_t dwFlags, const CFX_PointF& point) { auto* pBarCodeWidget = static_cast<CFWL_Barcode*>(m_pNormalWidget.get()); if (!pBarCodeWidget || pBarCodeWidget->IsProtectedType()) return false; - if (!m_pDataAcc->IsOpenAccess()) + if (!m_pNode->IsOpenAccess()) return false; return CXFA_FFTextEdit::OnLButtonDown(dwFlags, point); } |