From 98329fe75b9c3e5422344a37d787fb22c89c2ca2 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Thu, 10 Nov 2016 09:40:14 -0800 Subject: Cleanup IFWL_Widget visibility and virtual parameters This Cl cleans up the IFWL_Widget class including: * Making members and methods private where possible * Removing virtual methods that are never overridden * Removing methods that do nothing * Removing unchecked FWL_Error return codes Review-Url: https://codereview.chromium.org/2488953003 --- xfa/fwl/core/ifwl_barcode.cpp | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) (limited to 'xfa/fwl/core/ifwl_barcode.cpp') diff --git a/xfa/fwl/core/ifwl_barcode.cpp b/xfa/fwl/core/ifwl_barcode.cpp index 3fb430d71b..518ed4a599 100644 --- a/xfa/fwl/core/ifwl_barcode.cpp +++ b/xfa/fwl/core/ifwl_barcode.cpp @@ -25,25 +25,24 @@ FWL_Type IFWL_Barcode::GetClassID() const { return FWL_Type::Barcode; } -FWL_Error IFWL_Barcode::Update() { +void IFWL_Barcode::Update() { if (IsLocked()) { - return FWL_Error::Indefinite; + return; } - FWL_Error ret = IFWL_Edit::Update(); + IFWL_Edit::Update(); GenerateBarcodeImageCache(); - return ret; } -FWL_Error IFWL_Barcode::DrawWidget(CFX_Graphics* pGraphics, - const CFX_Matrix* pMatrix) { +void IFWL_Barcode::DrawWidget(CFX_Graphics* pGraphics, + const CFX_Matrix* pMatrix) { if (!pGraphics) - return FWL_Error::Indefinite; + return; if (!m_pProperties->m_pThemeProvider) - return FWL_Error::Indefinite; + return; if ((m_pProperties->m_dwStates & FWL_WGTSTATE_Focused) == 0) { GenerateBarcodeImageCache(); if (!m_pBarcodeEngine || (m_dwStatus & XFA_BCS_EncodeSuccess) == 0) { - return FWL_Error::Succeeded; + return; } CFX_Matrix mt; mt.e = m_rtClient.left; @@ -52,13 +51,11 @@ FWL_Error IFWL_Barcode::DrawWidget(CFX_Graphics* pGraphics, mt.Concat(*pMatrix); } int32_t errorCode = 0; - if (!m_pBarcodeEngine->RenderDevice(pGraphics->GetRenderDevice(), pMatrix, - errorCode)) { - return FWL_Error::Indefinite; - } - return FWL_Error::Succeeded; + m_pBarcodeEngine->RenderDevice(pGraphics->GetRenderDevice(), pMatrix, + errorCode); + return; } - return IFWL_Edit::DrawWidget(pGraphics, pMatrix); + IFWL_Edit::DrawWidget(pGraphics, pMatrix); } void IFWL_Barcode::GenerateBarcodeImageCache() { if ((m_dwStatus & XFA_BCS_NeedUpdate) == 0) -- cgit v1.2.3