From 1badb85e5c3a4b4cd42ca1a2b223d6b3bc67cc4a Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 20 Apr 2017 15:58:56 -0700 Subject: Change more fxbarcode to use return values. Change-Id: Idcc05fb8c5a1448f552b4db5ae131ad82aef4d59 Reviewed-on: https://pdfium-review.googlesource.com/4258 Reviewed-by: Tom Sepez Commit-Queue: Lei Zhang --- xfa/fwl/cfwl_barcode.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'xfa/fwl/cfwl_barcode.cpp') diff --git a/xfa/fwl/cfwl_barcode.cpp b/xfa/fwl/cfwl_barcode.cpp index 87ecee13b5..378bb8e06b 100644 --- a/xfa/fwl/cfwl_barcode.cpp +++ b/xfa/fwl/cfwl_barcode.cpp @@ -52,9 +52,7 @@ void CFWL_Barcode::DrawWidget(CFX_Graphics* pGraphics, if (pMatrix) mt.Concat(*pMatrix); - int32_t errorCode = 0; - m_pBarcodeEngine->RenderDevice(pGraphics->GetRenderDevice(), pMatrix, - errorCode); + m_pBarcodeEngine->RenderDevice(pGraphics->GetRenderDevice(), pMatrix); return; } CFWL_Edit::DrawWidget(pGraphics, pMatrix); @@ -131,7 +129,7 @@ void CFWL_Barcode::SetTextLocation(BC_TEXT_LOC location) { m_eTextLocation = location; } -void CFWL_Barcode::SetWideNarrowRatio(int32_t ratio) { +void CFWL_Barcode::SetWideNarrowRatio(int8_t ratio) { m_dwAttributeMask |= FWL_BCDATTRIBUTE_WIDENARROWRATIO; m_nWideNarrowRatio = ratio; } @@ -206,8 +204,7 @@ void CFWL_Barcode::GenerateBarcodeImageCache() { if (m_dwAttributeMask & FWL_BCDATTRIBUTE_TRUNCATED) m_pBarcodeEngine->SetTruncated(m_bTruncated); - int32_t errorCode = 0; - m_dwStatus = m_pBarcodeEngine->Encode(GetText().AsStringC(), true, errorCode) + m_dwStatus = m_pBarcodeEngine->Encode(GetText().AsStringC(), true) ? XFA_BCS_EncodeSuccess : 0; } -- cgit v1.2.3