summaryrefslogtreecommitdiff
path: root/xfa/src/fxbarcode/datamatrix/BC_HighLevelEncoder.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/datamatrix/BC_HighLevelEncoder.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/datamatrix/BC_HighLevelEncoder.h')
-rw-r--r--xfa/src/fxbarcode/datamatrix/BC_HighLevelEncoder.h105
1 files changed, 59 insertions, 46 deletions
diff --git a/xfa/src/fxbarcode/datamatrix/BC_HighLevelEncoder.h b/xfa/src/fxbarcode/datamatrix/BC_HighLevelEncoder.h
index c2bfdccb1b..8b2fa2c0e8 100644
--- a/xfa/src/fxbarcode/datamatrix/BC_HighLevelEncoder.h
+++ b/xfa/src/fxbarcode/datamatrix/BC_HighLevelEncoder.h
@@ -8,53 +8,66 @@
#define _BC_HIGHLEVALENCODER_H_
class CBC_SymbolShapeHint;
class CBC_HighLevelEncoder;
-#define ASCII_ENCODATION 0
-#define C40_ENCODATION 1
-#define TEXT_ENCODATION 2
-#define X12_ENCODATION 3
-#define EDIFACT_ENCODATION 4
-#define BASE256_ENCODATION 5
-class CBC_HighLevelEncoder : public CBC_SymbolShapeHint
-{
-public:
- CBC_HighLevelEncoder();
- virtual ~CBC_HighLevelEncoder();
- CFX_ByteArray& getBytesForMessage(CFX_WideString msg);
- static CFX_WideString encodeHighLevel(CFX_WideString msg, CFX_WideString ecLevel, int32_t &e);
- static CFX_WideString encodeHighLevel(CFX_WideString msg, CFX_WideString ecLevel, SymbolShapeHint shape, CBC_Dimension* minSize, CBC_Dimension* maxSize, int32_t &e);
- static int32_t lookAheadTest(CFX_WideString msg, int32_t startpos, int32_t currentMode);
- static FX_BOOL isDigit(FX_WCHAR ch);
- static FX_BOOL isExtendedASCII(FX_WCHAR ch);
- static int32_t determineConsecutiveDigitCount(CFX_WideString msg, int32_t startpos);
- static void illegalCharacter(FX_WCHAR c, int32_t &e);
+#define ASCII_ENCODATION 0
+#define C40_ENCODATION 1
+#define TEXT_ENCODATION 2
+#define X12_ENCODATION 3
+#define EDIFACT_ENCODATION 4
+#define BASE256_ENCODATION 5
+class CBC_HighLevelEncoder : public CBC_SymbolShapeHint {
+ public:
+ CBC_HighLevelEncoder();
+ virtual ~CBC_HighLevelEncoder();
+ CFX_ByteArray& getBytesForMessage(CFX_WideString msg);
+ static CFX_WideString encodeHighLevel(CFX_WideString msg,
+ CFX_WideString ecLevel,
+ int32_t& e);
+ static CFX_WideString encodeHighLevel(CFX_WideString msg,
+ CFX_WideString ecLevel,
+ SymbolShapeHint shape,
+ CBC_Dimension* minSize,
+ CBC_Dimension* maxSize,
+ int32_t& e);
+ static int32_t lookAheadTest(CFX_WideString msg,
+ int32_t startpos,
+ int32_t currentMode);
+ static FX_BOOL isDigit(FX_WCHAR ch);
+ static FX_BOOL isExtendedASCII(FX_WCHAR ch);
+ static int32_t determineConsecutiveDigitCount(CFX_WideString msg,
+ int32_t startpos);
+ static void illegalCharacter(FX_WCHAR c, int32_t& e);
-public:
- static FX_WCHAR LATCH_TO_C40;
- static FX_WCHAR LATCH_TO_BASE256;
- static FX_WCHAR UPPER_SHIFT;
- static FX_WCHAR LATCH_TO_ANSIX12;
- static FX_WCHAR LATCH_TO_TEXT;
- static FX_WCHAR LATCH_TO_EDIFACT;
- static FX_WCHAR C40_UNLATCH;
- static FX_WCHAR X12_UNLATCH;
-private:
- static FX_WCHAR PAD;
- static FX_WCHAR MACRO_05;
- static FX_WCHAR MACRO_06;
- static const wchar_t* MACRO_05_HEADER;
- static const wchar_t* MACRO_06_HEADER;
- static const wchar_t MACRO_TRAILER;
- CFX_ByteArray m_bytearray;
-private:
- static FX_WCHAR randomize253State(FX_WCHAR ch, int32_t codewordPosition);
- static int32_t findMinimums(CFX_FloatArray &charCounts, CFX_Int32Array &intCharCounts, int32_t min, CFX_ByteArray &mins);
- static int32_t getMinimumCount(CFX_ByteArray &mins);
- static FX_BOOL isNativeC40(FX_WCHAR ch);
- static FX_BOOL isNativeText(FX_WCHAR ch);
- static FX_BOOL isNativeX12(FX_WCHAR ch);
- static FX_BOOL isX12TermSep(FX_WCHAR ch);
- static FX_BOOL isNativeEDIFACT(FX_WCHAR ch);
- static FX_BOOL isSpecialB256(FX_WCHAR ch);
+ public:
+ static FX_WCHAR LATCH_TO_C40;
+ static FX_WCHAR LATCH_TO_BASE256;
+ static FX_WCHAR UPPER_SHIFT;
+ static FX_WCHAR LATCH_TO_ANSIX12;
+ static FX_WCHAR LATCH_TO_TEXT;
+ static FX_WCHAR LATCH_TO_EDIFACT;
+ static FX_WCHAR C40_UNLATCH;
+ static FX_WCHAR X12_UNLATCH;
+ private:
+ static FX_WCHAR PAD;
+ static FX_WCHAR MACRO_05;
+ static FX_WCHAR MACRO_06;
+ static const wchar_t* MACRO_05_HEADER;
+ static const wchar_t* MACRO_06_HEADER;
+ static const wchar_t MACRO_TRAILER;
+ CFX_ByteArray m_bytearray;
+
+ private:
+ static FX_WCHAR randomize253State(FX_WCHAR ch, int32_t codewordPosition);
+ static int32_t findMinimums(CFX_FloatArray& charCounts,
+ CFX_Int32Array& intCharCounts,
+ int32_t min,
+ CFX_ByteArray& mins);
+ static int32_t getMinimumCount(CFX_ByteArray& mins);
+ static FX_BOOL isNativeC40(FX_WCHAR ch);
+ static FX_BOOL isNativeText(FX_WCHAR ch);
+ static FX_BOOL isNativeX12(FX_WCHAR ch);
+ static FX_BOOL isX12TermSep(FX_WCHAR ch);
+ static FX_BOOL isNativeEDIFACT(FX_WCHAR ch);
+ static FX_BOOL isSpecialB256(FX_WCHAR ch);
};
#endif