summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app/xfa_ffbarcode.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-04-24 09:45:54 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-04-24 14:01:51 +0000
commit67b2a358814beb7135552219cceca8c9b3f137a1 (patch)
tree887ddf983c91bc9284de5f2a1bf75cb727da0639 /xfa/fxfa/app/xfa_ffbarcode.h
parent25694831670ef6172b1b9b71359a6c192e26da20 (diff)
downloadpdfium-67b2a358814beb7135552219cceca8c9b3f137a1.tar.xz
Cleanup the XFA Bacode widget
This Cl cleans up the XFA barcode widget. The custom binary search is removed. Some code shuffled from the header to the cpp file. Nits fixed. Change-Id: Icad0d2b25b07ea36afc5a5922a79f55b82616486 Reviewed-on: https://pdfium-review.googlesource.com/4394 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/app/xfa_ffbarcode.h')
-rw-r--r--xfa/fxfa/app/xfa_ffbarcode.h146
1 files changed, 74 insertions, 72 deletions
diff --git a/xfa/fxfa/app/xfa_ffbarcode.h b/xfa/fxfa/app/xfa_ffbarcode.h
index ad12218f3d..51646236d0 100644
--- a/xfa/fxfa/app/xfa_ffbarcode.h
+++ b/xfa/fxfa/app/xfa_ffbarcode.h
@@ -11,8 +11,82 @@
#include "xfa/fxfa/app/xfa_fftextedit.h"
#include "xfa/fxfa/cxfa_ffpageview.h"
+enum class BarcodeType {
+ aztec,
+ codabar,
+ code11,
+ code128,
+ code128A,
+ code128B,
+ code128C,
+ code128SSCC,
+ code2Of5Industrial,
+ code2Of5Interleaved,
+ code2Of5Matrix,
+ code2Of5Standard,
+ code3Of9,
+ code3Of9extended,
+ code49,
+ code93,
+ dataMatrix,
+ ean13,
+ ean13add2,
+ ean13add5,
+ ean13pwcd,
+ ean8,
+ ean8add2,
+ ean8add5,
+ fim,
+ logmars,
+ maxicode,
+ msi,
+ pdf417,
+ pdf417macro,
+ plessey,
+ postAUSCust2,
+ postAUSCust3,
+ postAUSReplyPaid,
+ postAUSStandard,
+ postUKRM4SCC,
+ postUS5Zip,
+ postUSDPBC,
+ postUSIMB,
+ postUSStandard,
+ QRCode,
+ rfid,
+ rss14,
+ rss14Expanded,
+ rss14Limited,
+ rss14Stacked,
+ rss14StackedOmni,
+ rss14Truncated,
+ telepen,
+ ucc128,
+ ucc128random,
+ ucc128sscc,
+ upcA,
+ upcAadd2,
+ upcAadd5,
+ upcApwcd,
+ upcE,
+ upcEadd2,
+ upcEadd5,
+ upcean2,
+ upcean5,
+ upsMaxicode
+};
+
+struct BarCodeInfo {
+ uint32_t uHash;
+ const wchar_t* pName;
+ BarcodeType eName;
+ BC_TYPE eBCType;
+};
+
class CXFA_FFBarcode : public CXFA_FFTextEdit {
public:
+ static const BarCodeInfo* GetBarcodeTypeByName(const CFX_WideStringC& wsName);
+
explicit CXFA_FFBarcode(CXFA_WidgetAcc* pDataAcc);
~CXFA_FFBarcode() override;
@@ -26,76 +100,4 @@ class CXFA_FFBarcode : public CXFA_FFTextEdit {
bool OnRButtonDown(uint32_t dwFlags, const CFX_PointF& point) override;
};
-enum XFA_BARCODETYPEENUM {
- XFA_BARCODETYPE_aztec,
- XFA_BARCODETYPE_codabar,
- XFA_BARCODETYPE_code11,
- XFA_BARCODETYPE_code128,
- XFA_BARCODETYPE_code128A,
- XFA_BARCODETYPE_code128B,
- XFA_BARCODETYPE_code128C,
- XFA_BARCODETYPE_code128SSCC,
- XFA_BARCODETYPE_code2Of5Industrial,
- XFA_BARCODETYPE_code2Of5Interleaved,
- XFA_BARCODETYPE_code2Of5Matrix,
- XFA_BARCODETYPE_code2Of5Standard,
- XFA_BARCODETYPE_code3Of9,
- XFA_BARCODETYPE_code3Of9extended,
- XFA_BARCODETYPE_code49,
- XFA_BARCODETYPE_code93,
- XFA_BARCODETYPE_dataMatrix,
- XFA_BARCODETYPE_ean13,
- XFA_BARCODETYPE_ean13add2,
- XFA_BARCODETYPE_ean13add5,
- XFA_BARCODETYPE_ean13pwcd,
- XFA_BARCODETYPE_ean8,
- XFA_BARCODETYPE_ean8add2,
- XFA_BARCODETYPE_ean8add5,
- XFA_BARCODETYPE_fim,
- XFA_BARCODETYPE_logmars,
- XFA_BARCODETYPE_maxicode,
- XFA_BARCODETYPE_msi,
- XFA_BARCODETYPE_pdf417,
- XFA_BARCODETYPE_pdf417macro,
- XFA_BARCODETYPE_plessey,
- XFA_BARCODETYPE_postAUSCust2,
- XFA_BARCODETYPE_postAUSCust3,
- XFA_BARCODETYPE_postAUSReplyPaid,
- XFA_BARCODETYPE_postAUSStandard,
- XFA_BARCODETYPE_postUKRM4SCC,
- XFA_BARCODETYPE_postUS5Zip,
- XFA_BARCODETYPE_postUSDPBC,
- XFA_BARCODETYPE_postUSIMB,
- XFA_BARCODETYPE_postUSStandard,
- XFA_BARCODETYPE_QRCode,
- XFA_BARCODETYPE_rfid,
- XFA_BARCODETYPE_rss14,
- XFA_BARCODETYPE_rss14Expanded,
- XFA_BARCODETYPE_rss14Limited,
- XFA_BARCODETYPE_rss14Stacked,
- XFA_BARCODETYPE_rss14StackedOmni,
- XFA_BARCODETYPE_rss14Truncated,
- XFA_BARCODETYPE_telepen,
- XFA_BARCODETYPE_ucc128,
- XFA_BARCODETYPE_ucc128random,
- XFA_BARCODETYPE_ucc128sscc,
- XFA_BARCODETYPE_upcA,
- XFA_BARCODETYPE_upcAadd2,
- XFA_BARCODETYPE_upcAadd5,
- XFA_BARCODETYPE_upcApwcd,
- XFA_BARCODETYPE_upcE,
- XFA_BARCODETYPE_upcEadd2,
- XFA_BARCODETYPE_upcEadd5,
- XFA_BARCODETYPE_upcean2,
- XFA_BARCODETYPE_upcean5,
- XFA_BARCODETYPE_upsMaxicode
-};
-
-struct XFA_BARCODETYPEENUMINFO {
- uint32_t uHash;
- const wchar_t* pName;
- XFA_BARCODETYPEENUM eName;
- BC_TYPE eBCType;
-};
-
#endif // XFA_FXFA_APP_XFA_FFBARCODE_H_