summaryrefslogtreecommitdiff
path: root/xfa/src/fxbarcode/datamatrix/BC_DataMatrixReader.cpp
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2015-08-04 13:00:21 -0700
committerNico Weber <thakis@chromium.org>2015-08-04 13:00:21 -0700
commit9d8ec5a6e37e8d1d4d4edca9040de234e2d4728f (patch)
treec97037f398d714665aefccb6eb54d0969ad7030c /xfa/src/fxbarcode/datamatrix/BC_DataMatrixReader.cpp
parent780cee82236d1b3b0f9b01a22424e4b8ec9a6f12 (diff)
downloadpdfium-9d8ec5a6e37e8d1d4d4edca9040de234e2d4728f.tar.xz
XFA: clang-format all pdfium code.
No behavior change. Generated by: find . -name '*.cpp' -o -name '*.h' | \ grep -E -v 'third_party|thirdparties|lpng_v163|tiff_v403' | \ xargs ../../buildtools/mac/clang-format -i Then manually merged https://codereview.chromium.org/1269223002/ See thread "tabs vs spaces" on pdfium@googlegroups.com for discussion. BUG=none
Diffstat (limited to 'xfa/src/fxbarcode/datamatrix/BC_DataMatrixReader.cpp')
-rw-r--r--xfa/src/fxbarcode/datamatrix/BC_DataMatrixReader.cpp63
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;
}