summaryrefslogtreecommitdiff
path: root/xfa/src/fxbarcode/qrcode/BC_QRCoderMatrixUtil.h
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/qrcode/BC_QRCoderMatrixUtil.h
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/qrcode/BC_QRCoderMatrixUtil.h')
-rw-r--r--xfa/src/fxbarcode/qrcode/BC_QRCoderMatrixUtil.h108
1 files changed, 72 insertions, 36 deletions
diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoderMatrixUtil.h b/xfa/src/fxbarcode/qrcode/BC_QRCoderMatrixUtil.h
index 5da32441fc..2efccad101 100644
--- a/xfa/src/fxbarcode/qrcode/BC_QRCoderMatrixUtil.h
+++ b/xfa/src/fxbarcode/qrcode/BC_QRCoderMatrixUtil.h
@@ -9,41 +9,77 @@
class CBC_CommonByteMatrix;
class CBC_QRCoderErrorCorrectionLevel;
class CBC_QRCoderBitVector;
-class CBC_QRCoderMatrixUtil
-{
-private:
- const static int32_t POSITION_DETECTION_PATTERN[7][7];
- const static int32_t VERTICAL_SEPARATION_PATTERN[7][1];
- const static int32_t HORIZONTAL_SEPARATION_PATTERN[1][8];
- const static int32_t POSITION_ADJUSTMENT_PATTERN[5][5];
- const static int32_t POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[40][7];
- const static int32_t TYPE_INFO_COORDINATES[15][2];
- const static int32_t VERSION_INFO_POLY;
- const static int32_t TYPE_INFO_POLY;
- const static int32_t TYPE_INFO_MASK_PATTERN;
-public:
- CBC_QRCoderMatrixUtil();
- virtual ~CBC_QRCoderMatrixUtil();
- static void ClearMatrix(CBC_CommonByteMatrix* matrix, int32_t &e);
- static void BuildMatrix(CBC_QRCoderBitVector* dataBits, CBC_QRCoderErrorCorrectionLevel* ecLevel,
- int32_t version, int32_t maskPattern, CBC_CommonByteMatrix* matrix, int32_t &e);
- static void EmbedBasicPatterns(int32_t version, CBC_CommonByteMatrix* matrix, int32_t &e);
- static void EmbedTypeInfo(CBC_QRCoderErrorCorrectionLevel* ecLevel, int32_t maskPattern, CBC_CommonByteMatrix *matrix, int32_t &e);
- static void EmbedDataBits(CBC_QRCoderBitVector* dataBits, int32_t maskPattern, CBC_CommonByteMatrix* matrix, int32_t &e);
- static void MaybeEmbedVersionInfo(int32_t version, CBC_CommonByteMatrix* matrix, int32_t &e);
- static int32_t FindMSBSet(int32_t value);
- static int32_t CalculateBCHCode(int32_t code, int32_t poly);
- static void MakeTypeInfoBits(CBC_QRCoderErrorCorrectionLevel* ecLevel, int32_t maskPattern, CBC_QRCoderBitVector* bits, int32_t &e);
- static void MakeVersionInfoBits(int32_t version, CBC_QRCoderBitVector* bits, int32_t &e);
- static FX_BOOL IsEmpty(int32_t value);
- static FX_BOOL IsValidValue(int32_t value);
- static void EmbedTimingPatterns(CBC_CommonByteMatrix* matrix, int32_t &e);
- static void EmbedDarkDotAtLeftBottomCorner(CBC_CommonByteMatrix* matrix, int32_t &e);
- static void EmbedHorizontalSeparationPattern(int32_t xStart, int32_t yStart, CBC_CommonByteMatrix* matrix, int32_t &e);
- static void EmbedVerticalSeparationPattern(int32_t xStart, int32_t yStart, CBC_CommonByteMatrix* matrix, int32_t &e);
- static void EmbedPositionAdjustmentPattern(int32_t xStart, int32_t yStart, CBC_CommonByteMatrix* matrix, int32_t &e);
- static void EmbedPositionDetectionPattern(int32_t xStart, int32_t yStart, CBC_CommonByteMatrix* matrix, int32_t &e);
- static void EmbedPositionDetectionPatternsAndSeparators(CBC_CommonByteMatrix* matrix, int32_t &e);
- static void MaybeEmbedPositionAdjustmentPatterns(int32_t version, CBC_CommonByteMatrix* matrix, int32_t &e);
+class CBC_QRCoderMatrixUtil {
+ private:
+ const static int32_t POSITION_DETECTION_PATTERN[7][7];
+ const static int32_t VERTICAL_SEPARATION_PATTERN[7][1];
+ const static int32_t HORIZONTAL_SEPARATION_PATTERN[1][8];
+ const static int32_t POSITION_ADJUSTMENT_PATTERN[5][5];
+ const static int32_t POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[40][7];
+ const static int32_t TYPE_INFO_COORDINATES[15][2];
+ const static int32_t VERSION_INFO_POLY;
+ const static int32_t TYPE_INFO_POLY;
+ const static int32_t TYPE_INFO_MASK_PATTERN;
+
+ public:
+ CBC_QRCoderMatrixUtil();
+ virtual ~CBC_QRCoderMatrixUtil();
+ static void ClearMatrix(CBC_CommonByteMatrix* matrix, int32_t& e);
+ static void BuildMatrix(CBC_QRCoderBitVector* dataBits,
+ CBC_QRCoderErrorCorrectionLevel* ecLevel,
+ int32_t version,
+ int32_t maskPattern,
+ CBC_CommonByteMatrix* matrix,
+ int32_t& e);
+ static void EmbedBasicPatterns(int32_t version,
+ CBC_CommonByteMatrix* matrix,
+ int32_t& e);
+ static void EmbedTypeInfo(CBC_QRCoderErrorCorrectionLevel* ecLevel,
+ int32_t maskPattern,
+ CBC_CommonByteMatrix* matrix,
+ int32_t& e);
+ static void EmbedDataBits(CBC_QRCoderBitVector* dataBits,
+ int32_t maskPattern,
+ CBC_CommonByteMatrix* matrix,
+ int32_t& e);
+ static void MaybeEmbedVersionInfo(int32_t version,
+ CBC_CommonByteMatrix* matrix,
+ int32_t& e);
+ static int32_t FindMSBSet(int32_t value);
+ static int32_t CalculateBCHCode(int32_t code, int32_t poly);
+ static void MakeTypeInfoBits(CBC_QRCoderErrorCorrectionLevel* ecLevel,
+ int32_t maskPattern,
+ CBC_QRCoderBitVector* bits,
+ int32_t& e);
+ static void MakeVersionInfoBits(int32_t version,
+ CBC_QRCoderBitVector* bits,
+ int32_t& e);
+ static FX_BOOL IsEmpty(int32_t value);
+ static FX_BOOL IsValidValue(int32_t value);
+ static void EmbedTimingPatterns(CBC_CommonByteMatrix* matrix, int32_t& e);
+ static void EmbedDarkDotAtLeftBottomCorner(CBC_CommonByteMatrix* matrix,
+ int32_t& e);
+ static void EmbedHorizontalSeparationPattern(int32_t xStart,
+ int32_t yStart,
+ CBC_CommonByteMatrix* matrix,
+ int32_t& e);
+ static void EmbedVerticalSeparationPattern(int32_t xStart,
+ int32_t yStart,
+ CBC_CommonByteMatrix* matrix,
+ int32_t& e);
+ static void EmbedPositionAdjustmentPattern(int32_t xStart,
+ int32_t yStart,
+ CBC_CommonByteMatrix* matrix,
+ int32_t& e);
+ static void EmbedPositionDetectionPattern(int32_t xStart,
+ int32_t yStart,
+ CBC_CommonByteMatrix* matrix,
+ int32_t& e);
+ static void EmbedPositionDetectionPatternsAndSeparators(
+ CBC_CommonByteMatrix* matrix,
+ int32_t& e);
+ static void MaybeEmbedPositionAdjustmentPatterns(int32_t version,
+ CBC_CommonByteMatrix* matrix,
+ int32_t& e);
};
#endif