summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa')
-rw-r--r--xfa/fwl/cfwl_barcode.cpp2
-rw-r--r--xfa/fwl/cfx_barcode.cpp4
-rw-r--r--xfa/fwl/cfx_barcode.h2
-rw-r--r--xfa/fwl/cfx_barcode_unittest.cpp38
4 files changed, 23 insertions, 23 deletions
diff --git a/xfa/fwl/cfwl_barcode.cpp b/xfa/fwl/cfwl_barcode.cpp
index 8db40d2b19..5e67c71435 100644
--- a/xfa/fwl/cfwl_barcode.cpp
+++ b/xfa/fwl/cfwl_barcode.cpp
@@ -203,7 +203,7 @@ void CFWL_Barcode::GenerateBarcodeImageCache() {
if (m_dwAttributeMask & FWL_BCDATTRIBUTE_TRUNCATED)
m_pBarcodeEngine->SetTruncated(m_bTruncated);
- m_dwStatus = m_pBarcodeEngine->Encode(GetText().AsStringC(), true)
+ m_dwStatus = m_pBarcodeEngine->Encode(GetText().AsStringC())
? XFA_BCS_EncodeSuccess
: 0;
}
diff --git a/xfa/fwl/cfx_barcode.cpp b/xfa/fwl/cfx_barcode.cpp
index eeeac6164e..8b51f2d741 100644
--- a/xfa/fwl/cfx_barcode.cpp
+++ b/xfa/fwl/cfx_barcode.cpp
@@ -294,8 +294,8 @@ bool CFX_Barcode::SetTruncated(bool truncated) {
: false;
}
-bool CFX_Barcode::Encode(const CFX_WideStringC& contents, bool isDevice) {
- return m_pBCEngine && m_pBCEngine->Encode(contents, isDevice);
+bool CFX_Barcode::Encode(const CFX_WideStringC& contents) {
+ return m_pBCEngine && m_pBCEngine->Encode(contents);
}
bool CFX_Barcode::RenderDevice(CFX_RenderDevice* device,
diff --git a/xfa/fwl/cfx_barcode.h b/xfa/fwl/cfx_barcode.h
index 83cb23437f..32a6db57cc 100644
--- a/xfa/fwl/cfx_barcode.h
+++ b/xfa/fwl/cfx_barcode.h
@@ -27,7 +27,7 @@ class CFX_Barcode {
bool Create(BC_TYPE type);
BC_TYPE GetType();
- bool Encode(const CFX_WideStringC& contents, bool isDevice);
+ bool Encode(const CFX_WideStringC& contents);
bool RenderDevice(CFX_RenderDevice* device, const CFX_Matrix* matrix);
diff --git a/xfa/fwl/cfx_barcode_unittest.cpp b/xfa/fwl/cfx_barcode_unittest.cpp
index 3283dd132b..b66d90495e 100644
--- a/xfa/fwl/cfx_barcode_unittest.cpp
+++ b/xfa/fwl/cfx_barcode_unittest.cpp
@@ -69,77 +69,77 @@ class BarcodeTest : public testing::Test {
TEST_F(BarcodeTest, Code39) {
EXPECT_TRUE(Create(BC_CODE39));
- EXPECT_TRUE(barcode()->Encode(L"clams", false));
+ EXPECT_TRUE(barcode()->Encode(L"clams"));
RenderDevice();
- EXPECT_EQ("e0d784db2d4fb5dab7836722a1ad7001", BitmapChecksum());
+ EXPECT_EQ("cd4cd3f36da38ff58d9f621827018903", BitmapChecksum());
}
TEST_F(BarcodeTest, CodaBar) {
EXPECT_TRUE(Create(BC_CODABAR));
- EXPECT_TRUE(barcode()->Encode(L"clams", false));
+ EXPECT_TRUE(barcode()->Encode(L"clams"));
RenderDevice();
- EXPECT_EQ("26b50593e698a0a9714fd2a60131ef70", BitmapChecksum());
+ EXPECT_EQ("481189dc4f86eddb8c42343c9b8ef1dd", BitmapChecksum());
}
TEST_F(BarcodeTest, Code128) {
EXPECT_TRUE(Create(BC_CODE128));
- EXPECT_TRUE(barcode()->Encode(L"clams", false));
+ EXPECT_TRUE(barcode()->Encode(L"clams"));
RenderDevice();
- EXPECT_EQ("0beb98f447c632e3085a6b1eae49379f", BitmapChecksum());
+ EXPECT_EQ("11b21c178a9fd866d8be196c2103b263", BitmapChecksum());
}
TEST_F(BarcodeTest, Code128_B) {
EXPECT_TRUE(Create(BC_CODE128_B));
- EXPECT_TRUE(barcode()->Encode(L"clams", false));
+ EXPECT_TRUE(barcode()->Encode(L"clams"));
RenderDevice();
- EXPECT_EQ("0beb98f447c632e3085a6b1eae49379f", BitmapChecksum());
+ EXPECT_EQ("11b21c178a9fd866d8be196c2103b263", BitmapChecksum());
}
TEST_F(BarcodeTest, Code128_C) {
EXPECT_TRUE(Create(BC_CODE128_C));
- EXPECT_TRUE(barcode()->Encode(L"clams", false));
+ EXPECT_TRUE(barcode()->Encode(L"clams"));
RenderDevice();
- EXPECT_EQ("5d75bfdd601494fc4f6451cce7452922", BitmapChecksum());
+ EXPECT_EQ("6284ec8503d5a948c9518108da33cdd3", BitmapChecksum());
}
TEST_F(BarcodeTest, Ean8) {
EXPECT_TRUE(Create(BC_EAN8));
- EXPECT_TRUE(barcode()->Encode(L"clams", false));
+ EXPECT_TRUE(barcode()->Encode(L"clams"));
RenderDevice();
- EXPECT_EQ("0a9a7bc34e6d0c82c2950fa592a0039e", BitmapChecksum());
+ EXPECT_EQ("22d85bcb02d48f48813f02a1cc9cfe8c", BitmapChecksum());
}
TEST_F(BarcodeTest, UPCA) {
EXPECT_TRUE(Create(BC_UPCA));
- EXPECT_TRUE(barcode()->Encode(L"clams", false));
+ EXPECT_TRUE(barcode()->Encode(L"clams"));
RenderDevice();
- EXPECT_EQ("d3f993c0fc0131ce11b863a73e27f8e6", BitmapChecksum());
+ EXPECT_EQ("cce41fc30852744c44b3353059b568b4", BitmapChecksum());
}
TEST_F(BarcodeTest, Ean13) {
EXPECT_TRUE(Create(BC_EAN13));
- EXPECT_TRUE(barcode()->Encode(L"clams", false));
+ EXPECT_TRUE(barcode()->Encode(L"clams"));
RenderDevice();
- EXPECT_EQ("461acb9e4f1a284a8e699f9f121a09d3", BitmapChecksum());
+ EXPECT_EQ("187091ec1fd1830fc4d41d40a923d4fb", BitmapChecksum());
}
TEST_F(BarcodeTest, Pdf417) {
EXPECT_TRUE(Create(BC_PDF417));
- EXPECT_TRUE(barcode()->Encode(L"clams", false));
+ EXPECT_TRUE(barcode()->Encode(L"clams"));
RenderDevice();
EXPECT_EQ("2bdb9b39f20c5763da6a0d7c7b1f6933", BitmapChecksum());
}
TEST_F(BarcodeTest, DataMatrix) {
EXPECT_TRUE(Create(BC_DATAMATRIX));
- EXPECT_TRUE(barcode()->Encode(L"clams", false));
+ EXPECT_TRUE(barcode()->Encode(L"clams"));
RenderDevice();
EXPECT_EQ("5e5cd9a680b86fcd4ffd53ed36e3c980", BitmapChecksum());
}
TEST_F(BarcodeTest, QrCode) {
EXPECT_TRUE(Create(BC_QR_CODE));
- EXPECT_TRUE(barcode()->Encode(L"clams", false));
+ EXPECT_TRUE(barcode()->Encode(L"clams"));
RenderDevice();
EXPECT_EQ("4751c6e0f67749fabe24f787128decee", BitmapChecksum());
}