summaryrefslogtreecommitdiff
path: root/xfa/src/fxbarcode/datamatrix
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2015-08-06 15:08:57 -0700
committerNico Weber <thakis@chromium.org>2015-08-06 15:08:57 -0700
commit077f1a335560a8014e466c768c1e9d24c8a61ac9 (patch)
tree8d080d5e2fbef32e5d945129eb19ff9909b192f5 /xfa/src/fxbarcode/datamatrix
parent792d55cfe3cf046125fd69d8914ae459216a68ab (diff)
downloadpdfium-077f1a335560a8014e466c768c1e9d24c8a61ac9.tar.xz
XFA: clang-format all pdfium code, again.
Also add a presubmit that checks for this so I don't have to keep doing it. 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 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1277043002 .
Diffstat (limited to 'xfa/src/fxbarcode/datamatrix')
-rw-r--r--xfa/src/fxbarcode/datamatrix/BC_DataMatrixVersion.cpp116
-rw-r--r--xfa/src/fxbarcode/datamatrix/BC_DataMatrixWriter.cpp2
-rw-r--r--xfa/src/fxbarcode/datamatrix/BC_SymbolInfo.cpp21
3 files changed, 66 insertions, 73 deletions
diff --git a/xfa/src/fxbarcode/datamatrix/BC_DataMatrixVersion.cpp b/xfa/src/fxbarcode/datamatrix/BC_DataMatrixVersion.cpp
index e642478571..69257b1b06 100644
--- a/xfa/src/fxbarcode/datamatrix/BC_DataMatrixVersion.cpp
+++ b/xfa/src/fxbarcode/datamatrix/BC_DataMatrixVersion.cpp
@@ -96,67 +96,67 @@ CBC_DataMatrixVersion* CBC_DataMatrixVersion::GetVersionForDimensions(
return NULL;
}
if (VERSIONS->GetSize() == 0) {
- VERSIONS->Add(new CBC_DataMatrixVersion(
- 1, 10, 10, 8, 8, new ECBlocks(5, new ECB(1, 3))));
- VERSIONS->Add(new CBC_DataMatrixVersion(
- 2, 12, 12, 10, 10, new ECBlocks(7, new ECB(1, 5))));
- VERSIONS->Add(new CBC_DataMatrixVersion(
- 3, 14, 14, 12, 12, new ECBlocks(10, new ECB(1, 8))));
- VERSIONS->Add(new CBC_DataMatrixVersion(
- 4, 16, 16, 14, 14, new ECBlocks(12, new ECB(1, 12))));
- VERSIONS->Add(new CBC_DataMatrixVersion(
- 5, 18, 18, 16, 16, new ECBlocks(14, new ECB(1, 18))));
- VERSIONS->Add(new CBC_DataMatrixVersion(
- 6, 20, 20, 18, 18, new ECBlocks(18, new ECB(1, 22))));
- VERSIONS->Add(new CBC_DataMatrixVersion(
- 7, 22, 22, 20, 20, new ECBlocks(20, new ECB(1, 30))));
- VERSIONS->Add(new CBC_DataMatrixVersion(
- 8, 24, 24, 22, 22, new ECBlocks(24, new ECB(1, 36))));
- VERSIONS->Add(new CBC_DataMatrixVersion(
- 9, 26, 26, 24, 24, new ECBlocks(28, new ECB(1, 44))));
- VERSIONS->Add(new CBC_DataMatrixVersion(
- 10, 32, 32, 14, 14, new ECBlocks(36, new ECB(1, 62))));
- VERSIONS->Add(new CBC_DataMatrixVersion(
- 11, 36, 36, 16, 16, new ECBlocks(42, new ECB(1, 86))));
- VERSIONS->Add(new CBC_DataMatrixVersion(
- 12, 40, 40, 18, 18, new ECBlocks(48, new ECB(1, 114))));
- VERSIONS->Add(new CBC_DataMatrixVersion(
- 13, 44, 44, 20, 20, new ECBlocks(56, new ECB(1, 144))));
- VERSIONS->Add(new CBC_DataMatrixVersion(
- 14, 48, 48, 22, 22, new ECBlocks(68, new ECB(1, 174))));
- VERSIONS->Add(new CBC_DataMatrixVersion(
- 15, 52, 52, 24, 24, new ECBlocks(42, new ECB(2, 102))));
- VERSIONS->Add(new CBC_DataMatrixVersion(
- 16, 64, 64, 14, 14, new ECBlocks(56, new ECB(2, 140))));
- VERSIONS->Add(new CBC_DataMatrixVersion(
- 17, 72, 72, 16, 16, new ECBlocks(36, new ECB(4, 92))));
- VERSIONS->Add(new CBC_DataMatrixVersion(
- 18, 80, 80, 18, 18, new ECBlocks(48, new ECB(4, 114))));
- VERSIONS->Add(new CBC_DataMatrixVersion(
- 19, 88, 88, 20, 20, new ECBlocks(56, new ECB(4, 144))));
- VERSIONS->Add(new CBC_DataMatrixVersion(
- 20, 96, 96, 22, 22, new ECBlocks(68, new ECB(4, 174))));
- VERSIONS->Add(new CBC_DataMatrixVersion(
- 21, 104, 104, 24, 24, new ECBlocks(56, new ECB(6, 136))));
- VERSIONS->Add(new CBC_DataMatrixVersion(
- 22, 120, 120, 18, 18, new ECBlocks(68, new ECB(6, 175))));
- VERSIONS->Add(new CBC_DataMatrixVersion(
- 23, 132, 132, 20, 20, new ECBlocks(62, new ECB(8, 163))));
+ VERSIONS->Add(new CBC_DataMatrixVersion(1, 10, 10, 8, 8,
+ new ECBlocks(5, new ECB(1, 3))));
+ VERSIONS->Add(new CBC_DataMatrixVersion(2, 12, 12, 10, 10,
+ new ECBlocks(7, new ECB(1, 5))));
+ VERSIONS->Add(new CBC_DataMatrixVersion(3, 14, 14, 12, 12,
+ new ECBlocks(10, new ECB(1, 8))));
+ VERSIONS->Add(new CBC_DataMatrixVersion(4, 16, 16, 14, 14,
+ new ECBlocks(12, new ECB(1, 12))));
+ VERSIONS->Add(new CBC_DataMatrixVersion(5, 18, 18, 16, 16,
+ new ECBlocks(14, new ECB(1, 18))));
+ VERSIONS->Add(new CBC_DataMatrixVersion(6, 20, 20, 18, 18,
+ new ECBlocks(18, new ECB(1, 22))));
+ VERSIONS->Add(new CBC_DataMatrixVersion(7, 22, 22, 20, 20,
+ new ECBlocks(20, new ECB(1, 30))));
+ VERSIONS->Add(new CBC_DataMatrixVersion(8, 24, 24, 22, 22,
+ new ECBlocks(24, new ECB(1, 36))));
+ VERSIONS->Add(new CBC_DataMatrixVersion(9, 26, 26, 24, 24,
+ new ECBlocks(28, new ECB(1, 44))));
+ VERSIONS->Add(new CBC_DataMatrixVersion(10, 32, 32, 14, 14,
+ new ECBlocks(36, new ECB(1, 62))));
+ VERSIONS->Add(new CBC_DataMatrixVersion(11, 36, 36, 16, 16,
+ new ECBlocks(42, new ECB(1, 86))));
+ VERSIONS->Add(new CBC_DataMatrixVersion(12, 40, 40, 18, 18,
+ new ECBlocks(48, new ECB(1, 114))));
+ VERSIONS->Add(new CBC_DataMatrixVersion(13, 44, 44, 20, 20,
+ new ECBlocks(56, new ECB(1, 144))));
+ VERSIONS->Add(new CBC_DataMatrixVersion(14, 48, 48, 22, 22,
+ new ECBlocks(68, new ECB(1, 174))));
+ VERSIONS->Add(new CBC_DataMatrixVersion(15, 52, 52, 24, 24,
+ new ECBlocks(42, new ECB(2, 102))));
+ VERSIONS->Add(new CBC_DataMatrixVersion(16, 64, 64, 14, 14,
+ new ECBlocks(56, new ECB(2, 140))));
+ VERSIONS->Add(new CBC_DataMatrixVersion(17, 72, 72, 16, 16,
+ new ECBlocks(36, new ECB(4, 92))));
+ VERSIONS->Add(new CBC_DataMatrixVersion(18, 80, 80, 18, 18,
+ new ECBlocks(48, new ECB(4, 114))));
+ VERSIONS->Add(new CBC_DataMatrixVersion(19, 88, 88, 20, 20,
+ new ECBlocks(56, new ECB(4, 144))));
+ VERSIONS->Add(new CBC_DataMatrixVersion(20, 96, 96, 22, 22,
+ new ECBlocks(68, new ECB(4, 174))));
+ VERSIONS->Add(new CBC_DataMatrixVersion(21, 104, 104, 24, 24,
+ new ECBlocks(56, new ECB(6, 136))));
+ VERSIONS->Add(new CBC_DataMatrixVersion(22, 120, 120, 18, 18,
+ new ECBlocks(68, new ECB(6, 175))));
+ VERSIONS->Add(new CBC_DataMatrixVersion(23, 132, 132, 20, 20,
+ new ECBlocks(62, new ECB(8, 163))));
VERSIONS->Add(new CBC_DataMatrixVersion(
24, 144, 144, 22, 22,
new ECBlocks(62, new ECB(8, 156), new ECB(2, 155))));
- VERSIONS->Add(new CBC_DataMatrixVersion(
- 25, 8, 18, 6, 16, new ECBlocks(7, new ECB(1, 5))));
- VERSIONS->Add(new CBC_DataMatrixVersion(
- 26, 8, 32, 6, 14, new ECBlocks(11, new ECB(1, 10))));
- VERSIONS->Add(new CBC_DataMatrixVersion(
- 27, 12, 26, 10, 24, new ECBlocks(14, new ECB(1, 16))));
- VERSIONS->Add(new CBC_DataMatrixVersion(
- 28, 12, 36, 10, 16, new ECBlocks(18, new ECB(1, 22))));
- VERSIONS->Add(new CBC_DataMatrixVersion(
- 29, 16, 36, 14, 16, new ECBlocks(24, new ECB(1, 32))));
- VERSIONS->Add(new CBC_DataMatrixVersion(
- 30, 16, 48, 14, 22, new ECBlocks(28, new ECB(1, 49))));
+ VERSIONS->Add(new CBC_DataMatrixVersion(25, 8, 18, 6, 16,
+ new ECBlocks(7, new ECB(1, 5))));
+ VERSIONS->Add(new CBC_DataMatrixVersion(26, 8, 32, 6, 14,
+ new ECBlocks(11, new ECB(1, 10))));
+ VERSIONS->Add(new CBC_DataMatrixVersion(27, 12, 26, 10, 24,
+ new ECBlocks(14, new ECB(1, 16))));
+ VERSIONS->Add(new CBC_DataMatrixVersion(28, 12, 36, 10, 16,
+ new ECBlocks(18, new ECB(1, 22))));
+ VERSIONS->Add(new CBC_DataMatrixVersion(29, 16, 36, 14, 16,
+ new ECBlocks(24, new ECB(1, 32))));
+ VERSIONS->Add(new CBC_DataMatrixVersion(30, 16, 48, 14, 22,
+ new ECBlocks(28, new ECB(1, 49))));
}
int32_t numVersions = VERSIONS->GetSize();
for (int32_t i = 0; i < numVersions; ++i) {
diff --git a/xfa/src/fxbarcode/datamatrix/BC_DataMatrixWriter.cpp b/xfa/src/fxbarcode/datamatrix/BC_DataMatrixWriter.cpp
index 20eaa4c223..408a5980ff 100644
--- a/xfa/src/fxbarcode/datamatrix/BC_DataMatrixWriter.cpp
+++ b/xfa/src/fxbarcode/datamatrix/BC_DataMatrixWriter.cpp
@@ -73,7 +73,7 @@ uint8_t* CBC_DataMatrixWriter::Encode(const CFX_WideString& contents,
BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
CBC_DefaultPlacement* placement =
new CBC_DefaultPlacement(codewords, symbolInfo->getSymbolDataWidth(e),
- symbolInfo->getSymbolDataHeight(e));
+ symbolInfo->getSymbolDataHeight(e));
BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
placement->place();
CBC_CommonByteMatrix* bytematrix = encodeLowLevel(placement, symbolInfo, e);
diff --git a/xfa/src/fxbarcode/datamatrix/BC_SymbolInfo.cpp b/xfa/src/fxbarcode/datamatrix/BC_SymbolInfo.cpp
index 68b5b4c674..b6a19328a8 100644
--- a/xfa/src/fxbarcode/datamatrix/BC_SymbolInfo.cpp
+++ b/xfa/src/fxbarcode/datamatrix/BC_SymbolInfo.cpp
@@ -57,20 +57,13 @@ void CBC_SymbolInfo::Initialize() {
m_PROD_SYMBOLS[17] = new CBC_SymbolInfo(FALSE, 114, 48, 18, 18, 4);
m_PROD_SYMBOLS[18] = new CBC_SymbolInfo(FALSE, 144, 56, 20, 20, 4);
m_PROD_SYMBOLS[19] = new CBC_SymbolInfo(FALSE, 174, 68, 22, 22, 4);
- m_PROD_SYMBOLS[20] =
- new CBC_SymbolInfo(FALSE, 204, 84, 24, 24, 4, 102, 42);
- m_PROD_SYMBOLS[21] =
- new CBC_SymbolInfo(FALSE, 280, 112, 14, 14, 16, 140, 56);
- m_PROD_SYMBOLS[22] =
- new CBC_SymbolInfo(FALSE, 368, 144, 16, 16, 16, 92, 36);
- m_PROD_SYMBOLS[23] =
- new CBC_SymbolInfo(FALSE, 456, 192, 18, 18, 16, 114, 48);
- m_PROD_SYMBOLS[24] =
- new CBC_SymbolInfo(FALSE, 576, 224, 20, 20, 16, 144, 56);
- m_PROD_SYMBOLS[25] =
- new CBC_SymbolInfo(FALSE, 696, 272, 22, 22, 16, 174, 68);
- m_PROD_SYMBOLS[26] =
- new CBC_SymbolInfo(FALSE, 816, 336, 24, 24, 16, 136, 56);
+ m_PROD_SYMBOLS[20] = new CBC_SymbolInfo(FALSE, 204, 84, 24, 24, 4, 102, 42);
+ m_PROD_SYMBOLS[21] = new CBC_SymbolInfo(FALSE, 280, 112, 14, 14, 16, 140, 56);
+ m_PROD_SYMBOLS[22] = new CBC_SymbolInfo(FALSE, 368, 144, 16, 16, 16, 92, 36);
+ m_PROD_SYMBOLS[23] = new CBC_SymbolInfo(FALSE, 456, 192, 18, 18, 16, 114, 48);
+ m_PROD_SYMBOLS[24] = new CBC_SymbolInfo(FALSE, 576, 224, 20, 20, 16, 144, 56);
+ m_PROD_SYMBOLS[25] = new CBC_SymbolInfo(FALSE, 696, 272, 22, 22, 16, 174, 68);
+ m_PROD_SYMBOLS[26] = new CBC_SymbolInfo(FALSE, 816, 336, 24, 24, 16, 136, 56);
m_PROD_SYMBOLS[27] =
new CBC_SymbolInfo(FALSE, 1050, 408, 18, 18, 36, 175, 68);
m_PROD_SYMBOLS[28] =