summaryrefslogtreecommitdiff
path: root/xfa/fwl
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2018-08-23 17:38:26 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-23 17:38:26 +0000
commit7aa4bc461a171cc2b5a27490a55f0baedd6623fb (patch)
treef12a7b8e5d444a2980a1fca469cb85350794b635 /xfa/fwl
parent85e622ce52eb3864e94d0fa387af39fc6993bacf (diff)
downloadpdfium-7aa4bc461a171cc2b5a27490a55f0baedd6623fb.tar.xz
Remove m_bTruncated flag from CBC_PDF417Writer.
The flag is unused. Change-Id: I15eb3e20e6a632ae2aa2afc19cb09d2402e607e0 Reviewed-on: https://pdfium-review.googlesource.com/41031 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'xfa/fwl')
-rw-r--r--xfa/fwl/cfwl_barcode.cpp7
-rw-r--r--xfa/fwl/cfwl_barcode.h3
-rw-r--r--xfa/fwl/cfx_barcode.cpp14
-rw-r--r--xfa/fwl/cfx_barcode.h1
4 files changed, 0 insertions, 25 deletions
diff --git a/xfa/fwl/cfwl_barcode.cpp b/xfa/fwl/cfwl_barcode.cpp
index 649dea0c8e..edd3512773 100644
--- a/xfa/fwl/cfwl_barcode.cpp
+++ b/xfa/fwl/cfwl_barcode.cpp
@@ -150,11 +150,6 @@ void CFWL_Barcode::SetErrorCorrectionLevel(int32_t ecLevel) {
m_nECLevel = ecLevel;
}
-void CFWL_Barcode::SetTruncated(bool truncated) {
- m_dwAttributeMask |= FWL_BCDATTRIBUTE_TRUNCATED;
- m_bTruncated = truncated;
-}
-
void CFWL_Barcode::GenerateBarcodeImageCache() {
if ((m_dwStatus & XFA_BCS_NeedUpdate) == 0)
return;
@@ -202,8 +197,6 @@ void CFWL_Barcode::GenerateBarcodeImageCache() {
m_pBarcodeEngine->SetEndChar(m_cEndChar);
if (m_dwAttributeMask & FWL_BCDATTRIBUTE_ECLEVEL)
m_pBarcodeEngine->SetErrorCorrectionLevel(m_nECLevel);
- if (m_dwAttributeMask & FWL_BCDATTRIBUTE_TRUNCATED)
- m_pBarcodeEngine->SetTruncated(m_bTruncated);
m_dwStatus = m_pBarcodeEngine->Encode(GetText().AsStringView())
? XFA_BCS_EncodeSuccess
diff --git a/xfa/fwl/cfwl_barcode.h b/xfa/fwl/cfwl_barcode.h
index 58484dfba1..a4991d4cf7 100644
--- a/xfa/fwl/cfwl_barcode.h
+++ b/xfa/fwl/cfwl_barcode.h
@@ -34,7 +34,6 @@ enum FWL_BCDAttribute {
FWL_BCDATTRIBUTE_STARTCHAR = 1 << 8,
FWL_BCDATTRIBUTE_ENDCHAR = 1 << 9,
FWL_BCDATTRIBUTE_ECLEVEL = 1 << 10,
- FWL_BCDATTRIBUTE_TRUNCATED = 1 << 11,
};
class CFWL_Barcode : public CFWL_Edit {
@@ -68,7 +67,6 @@ class CFWL_Barcode : public CFWL_Edit {
void SetStartChar(char startChar);
void SetEndChar(char endChar);
void SetErrorCorrectionLevel(int32_t ecLevel);
- void SetTruncated(bool truncated);
private:
void GenerateBarcodeImageCache();
@@ -88,7 +86,6 @@ class CFWL_Barcode : public CFWL_Edit {
char m_cStartChar;
char m_cEndChar;
int32_t m_nECLevel;
- bool m_bTruncated;
uint32_t m_dwAttributeMask;
};
diff --git a/xfa/fwl/cfx_barcode.cpp b/xfa/fwl/cfx_barcode.cpp
index 2d1253630e..583fa9ce56 100644
--- a/xfa/fwl/cfx_barcode.cpp
+++ b/xfa/fwl/cfx_barcode.cpp
@@ -282,20 +282,6 @@ bool CFX_Barcode::SetErrorCorrectionLevel(int32_t level) {
return m_pBCEngine && memptr ? (m_pBCEngine.get()->*memptr)(level) : false;
}
-bool CFX_Barcode::SetTruncated(bool truncated) {
- typedef void (CBC_CodeBase::*memptrtype)(bool);
- memptrtype memptr = nullptr;
- switch (GetType()) {
- case BC_PDF417:
- memptr = (memptrtype)&CBC_PDF417I::SetTruncated;
- break;
- default:
- break;
- }
- return m_pBCEngine && memptr ? ((m_pBCEngine.get()->*memptr)(truncated), true)
- : false;
-}
-
bool CFX_Barcode::Encode(const WideStringView& contents) {
return m_pBCEngine && m_pBCEngine->Encode(contents);
}
diff --git a/xfa/fwl/cfx_barcode.h b/xfa/fwl/cfx_barcode.h
index a5f0513241..488af04bc8 100644
--- a/xfa/fwl/cfx_barcode.h
+++ b/xfa/fwl/cfx_barcode.h
@@ -52,7 +52,6 @@ class CFX_Barcode {
bool SetStartChar(char start);
bool SetEndChar(char end);
bool SetErrorCorrectionLevel(int32_t level);
- bool SetTruncated(bool truncated);
private:
CFX_Barcode();