From a26153440b46b3b37b7e81435debb296f22769f4 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Thu, 16 Jun 2016 12:29:07 -0700 Subject: Remove barcode reading code. We never read barcodes, we only write them. Remove code related to barcode reading. Review-Url: https://codereview.chromium.org/2071633002 --- xfa/fxbarcode/cbc_qrcode.cpp | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) (limited to 'xfa/fxbarcode/cbc_qrcode.cpp') diff --git a/xfa/fxbarcode/cbc_qrcode.cpp b/xfa/fxbarcode/cbc_qrcode.cpp index 1e0703caab..db3cad0dda 100644 --- a/xfa/fxbarcode/cbc_qrcode.cpp +++ b/xfa/fxbarcode/cbc_qrcode.cpp @@ -21,16 +21,9 @@ #include "xfa/fxbarcode/cbc_qrcode.h" -#include "xfa/fxbarcode/BC_BinaryBitmap.h" -#include "xfa/fxbarcode/BC_BufferedImageLuminanceSource.h" -#include "xfa/fxbarcode/common/BC_GlobalHistogramBinarizer.h" -#include "xfa/fxbarcode/qrcode/BC_QRCodeReader.h" #include "xfa/fxbarcode/qrcode/BC_QRCodeWriter.h" -CBC_QRCode::CBC_QRCode() - : CBC_CodeBase(new CBC_QRCodeReader, new CBC_QRCodeWriter) { - static_cast(m_pBCReader.get())->Init(); -} +CBC_QRCode::CBC_QRCode() : CBC_CodeBase(new CBC_QRCodeWriter) {} CBC_QRCode::~CBC_QRCode() {} @@ -84,20 +77,3 @@ FX_BOOL CBC_QRCode::RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) { BC_TYPE CBC_QRCode::GetType() { return BC_QR_CODE; } - -CFX_WideString CBC_QRCode::Decode(uint8_t* buf, - int32_t width, - int32_t height, - int32_t& e) { - CFX_WideString str; - return str; -} - -CFX_WideString CBC_QRCode::Decode(CFX_DIBitmap* pBitmap, int32_t& e) { - CBC_BufferedImageLuminanceSource source(pBitmap); - CBC_GlobalHistogramBinarizer binarizer(&source); - CBC_BinaryBitmap bitmap(&binarizer); - CFX_ByteString retStr = m_pBCReader->Decode(&bitmap, 0, e); - BC_EXCEPTION_CHECK_ReturnValue(e, CFX_WideString()); - return CFX_WideString::FromUTF8(retStr.AsStringC()); -} -- cgit v1.2.3