diff options
Diffstat (limited to 'xfa/src/fxbarcode/datamatrix/BC_DataMatrixReader.cpp')
-rw-r--r-- | xfa/src/fxbarcode/datamatrix/BC_DataMatrixReader.cpp | 63 |
1 files changed, 31 insertions, 32 deletions
diff --git a/xfa/src/fxbarcode/datamatrix/BC_DataMatrixReader.cpp b/xfa/src/fxbarcode/datamatrix/BC_DataMatrixReader.cpp index 1b9f55dc9f..7e1777fa7b 100644 --- a/xfa/src/fxbarcode/datamatrix/BC_DataMatrixReader.cpp +++ b/xfa/src/fxbarcode/datamatrix/BC_DataMatrixReader.cpp @@ -28,40 +28,39 @@ #include "BC_DataMatrixDecoder.h"
#include "BC_DataMatrixDetector.h"
#include "BC_DataMatrixReader.h"
-CBC_DataMatrixReader::CBC_DataMatrixReader()
-{
- m_decoder = NULL;
+CBC_DataMatrixReader::CBC_DataMatrixReader() {
+ m_decoder = NULL;
}
-void CBC_DataMatrixReader::Init()
-{
- m_decoder = FX_NEW CBC_DataMatrixDecoder;
- m_decoder->Init();
+void CBC_DataMatrixReader::Init() {
+ m_decoder = FX_NEW CBC_DataMatrixDecoder;
+ m_decoder->Init();
}
-CBC_DataMatrixReader::~CBC_DataMatrixReader()
-{
- if(m_decoder != NULL) {
- delete m_decoder;
- }
- m_decoder = NULL;
+CBC_DataMatrixReader::~CBC_DataMatrixReader() {
+ if (m_decoder != NULL) {
+ delete m_decoder;
+ }
+ m_decoder = NULL;
}
-CFX_ByteString CBC_DataMatrixReader::Decode(CBC_BinaryBitmap *image, int32_t hints, int32_t &e)
-{
- CBC_CommonBitMatrix *cdr = image->GetBlackMatrix(e);
- BC_EXCEPTION_CHECK_ReturnValue(e, "");
- CBC_DataMatrixDetector detector(cdr);
- detector.Init(e);
- BC_EXCEPTION_CHECK_ReturnValue(e, "");
- CBC_QRDetectorResult* ddr = detector.Detect(e);
- BC_EXCEPTION_CHECK_ReturnValue(e, "");
- CBC_AutoPtr<CBC_QRDetectorResult> detectorResult(ddr);
- CBC_CommonDecoderResult* ResultTemp = m_decoder->Decode(detectorResult->GetBits(), e);
- BC_EXCEPTION_CHECK_ReturnValue(e, "");
- CBC_AutoPtr<CBC_CommonDecoderResult> decodeResult(ResultTemp);
- return decodeResult->GetText();
+CFX_ByteString CBC_DataMatrixReader::Decode(CBC_BinaryBitmap* image,
+ int32_t hints,
+ int32_t& e) {
+ CBC_CommonBitMatrix* cdr = image->GetBlackMatrix(e);
+ BC_EXCEPTION_CHECK_ReturnValue(e, "");
+ CBC_DataMatrixDetector detector(cdr);
+ detector.Init(e);
+ BC_EXCEPTION_CHECK_ReturnValue(e, "");
+ CBC_QRDetectorResult* ddr = detector.Detect(e);
+ BC_EXCEPTION_CHECK_ReturnValue(e, "");
+ CBC_AutoPtr<CBC_QRDetectorResult> detectorResult(ddr);
+ CBC_CommonDecoderResult* ResultTemp =
+ m_decoder->Decode(detectorResult->GetBits(), e);
+ BC_EXCEPTION_CHECK_ReturnValue(e, "");
+ CBC_AutoPtr<CBC_CommonDecoderResult> decodeResult(ResultTemp);
+ return decodeResult->GetText();
}
-CFX_ByteString CBC_DataMatrixReader::Decode(CBC_BinaryBitmap *image, int32_t &e)
-{
- CFX_ByteString bs = Decode(image, 0, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, "");
- return bs;
+CFX_ByteString CBC_DataMatrixReader::Decode(CBC_BinaryBitmap* image,
+ int32_t& e) {
+ CFX_ByteString bs = Decode(image, 0, e);
+ BC_EXCEPTION_CHECK_ReturnValue(e, "");
+ return bs;
}
|