summaryrefslogtreecommitdiff
path: root/xfa/include/fwl/lightwidget/barcode.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/include/fwl/lightwidget/barcode.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/include/fwl/lightwidget/barcode.h')
-rw-r--r--xfa/include/fwl/lightwidget/barcode.h260
1 files changed, 100 insertions, 160 deletions
diff --git a/xfa/include/fwl/lightwidget/barcode.h b/xfa/include/fwl/lightwidget/barcode.h
index 242b432ab1..ab1719373a 100644
--- a/xfa/include/fwl/lightwidget/barcode.h
+++ b/xfa/include/fwl/lightwidget/barcode.h
@@ -12,166 +12,106 @@ class IFWL_BarcodeDP;
class CFWL_Edit;
class CFWL_Barcode;
class CFWL_BarcodeDP;
-class CFWL_Barcode : public CFWL_Edit
-{
-public:
- static CFWL_Barcode* Create();
- FWL_ERR Initialize(const CFWL_WidgetProperties *pProperties = NULL);
- void SetType(BC_TYPE type);
- FX_BOOL IsProtectedType();
-public:
- void SetCharEncoding(BC_CHAR_ENCODING encoding)
- {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_CHARENCODING;
- m_barcodeData.m_eCharEncoding = encoding;
- }
- void SetModuleHeight(int32_t height)
- {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_MODULEHEIGHT;
- m_barcodeData.m_nModuleHeight = height;
- }
- void SetModuleWidth(int32_t width)
- {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_MODULEWIDTH;
- m_barcodeData.m_nModuleWidth = width;
- }
- void SetDataLength(int32_t dataLength)
- {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_DATALENGTH;
- m_barcodeData.m_nDataLength = dataLength;
- ((IFWL_Barcode*)m_pImp)->SetLimit(dataLength);
- }
- void SetCalChecksum(int32_t calChecksum)
- {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_CALCHECKSUM;
- m_barcodeData.m_nCalChecksum = calChecksum;
- }
- void SetPrintChecksum(FX_BOOL printChecksum)
- {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_PRINTCHECKSUM;
- m_barcodeData.m_bPrintChecksum = printChecksum;
- }
- void SetTextLocation(BC_TEXT_LOC location)
- {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_TEXTLOCATION;
- m_barcodeData.m_eTextLocation = location;
- }
- void SetWideNarrowRatio(int32_t ratio)
- {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_WIDENARROWRATIO;
- m_barcodeData.m_nWideNarrowRatio = ratio;
- }
- void SetStartChar(FX_CHAR startChar)
- {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_STARTCHAR;
- m_barcodeData.m_cStartChar = startChar;
- }
- void SetEndChar(FX_CHAR endChar)
- {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_ENDCHAR;
- m_barcodeData.m_cEndChar = endChar;
- }
- void SetVersion(int32_t version)
- {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_VERSION;
- m_barcodeData.m_nVersion = version;
- }
- void SetErrorCorrectionLevel(int32_t ecLevel)
- {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_ECLEVEL;
- m_barcodeData.m_nECLevel = ecLevel;
- }
- void SetTruncated(FX_BOOL truncated)
- {
- m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_TRUNCATED;
- m_barcodeData.m_bTruncated = truncated;
- }
- void ResetBarcodeAttributes()
- {
- m_barcodeData.m_dwAttributeMask = 0;
- }
-protected:
- CFWL_Barcode();
- virtual ~CFWL_Barcode();
- class CFWL_BarcodeDP : public IFWL_BarcodeDP
- {
- public:
- virtual FWL_ERR GetCaption(IFWL_Widget *pWidget, CFX_WideString &wsCaption);
- BC_CHAR_ENCODING m_eCharEncoding;
- virtual BC_CHAR_ENCODING GetCharEncoding()
- {
- return m_eCharEncoding;
- }
- int32_t m_nModuleHeight, m_nModuleWidth;
- virtual int32_t GetModuleHeight()
- {
- return m_nModuleHeight;
- }
- virtual int32_t GetModuleWidth()
- {
- return m_nModuleWidth;
- }
- int32_t m_nDataLength;
- virtual int32_t GetDataLength()
- {
- return m_nDataLength;
- }
- int32_t m_nCalChecksum;
- virtual int32_t GetCalChecksum()
- {
- return m_nCalChecksum;
- }
- FX_BOOL m_bPrintChecksum;
- virtual FX_BOOL GetPrintChecksum()
- {
- return m_bPrintChecksum;
- }
+class CFWL_Barcode : public CFWL_Edit {
+ public:
+ static CFWL_Barcode* Create();
+ FWL_ERR Initialize(const CFWL_WidgetProperties* pProperties = NULL);
+ void SetType(BC_TYPE type);
+ FX_BOOL IsProtectedType();
- BC_TEXT_LOC m_eTextLocation;
- virtual BC_TEXT_LOC GetTextLocation()
- {
- return m_eTextLocation;
- }
- int32_t m_nWideNarrowRatio;
- virtual int32_t GetWideNarrowRatio()
- {
- return m_nWideNarrowRatio;
- }
- FX_CHAR m_cStartChar, m_cEndChar;
- virtual FX_CHAR GetStartChar()
- {
- return m_cStartChar;
- }
- virtual FX_CHAR GetEndChar()
- {
- return m_cEndChar;
- }
- int32_t m_nVersion;
- virtual int32_t GetVersion()
- {
- return m_nVersion;
- }
- int32_t m_nECLevel;
- virtual int32_t GetErrorCorrectionLevel()
- {
- return m_nECLevel;
- }
- FX_BOOL m_bTruncated;
- virtual FX_BOOL GetTruncated()
- {
- return m_bTruncated;
- }
- FX_DWORD m_dwAttributeMask;
- virtual FX_DWORD GetBarcodeAttributeMask()
- {
- return m_dwAttributeMask;
- }
- public:
- CFWL_BarcodeDP()
- : m_dwAttributeMask(0)
- {
- }
- };
- CFWL_BarcodeDP m_barcodeData;
+ public:
+ void SetCharEncoding(BC_CHAR_ENCODING encoding) {
+ m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_CHARENCODING;
+ m_barcodeData.m_eCharEncoding = encoding;
+ }
+ void SetModuleHeight(int32_t height) {
+ m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_MODULEHEIGHT;
+ m_barcodeData.m_nModuleHeight = height;
+ }
+ void SetModuleWidth(int32_t width) {
+ m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_MODULEWIDTH;
+ m_barcodeData.m_nModuleWidth = width;
+ }
+ void SetDataLength(int32_t dataLength) {
+ m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_DATALENGTH;
+ m_barcodeData.m_nDataLength = dataLength;
+ ((IFWL_Barcode*)m_pImp)->SetLimit(dataLength);
+ }
+ void SetCalChecksum(int32_t calChecksum) {
+ m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_CALCHECKSUM;
+ m_barcodeData.m_nCalChecksum = calChecksum;
+ }
+ void SetPrintChecksum(FX_BOOL printChecksum) {
+ m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_PRINTCHECKSUM;
+ m_barcodeData.m_bPrintChecksum = printChecksum;
+ }
+ void SetTextLocation(BC_TEXT_LOC location) {
+ m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_TEXTLOCATION;
+ m_barcodeData.m_eTextLocation = location;
+ }
+ void SetWideNarrowRatio(int32_t ratio) {
+ m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_WIDENARROWRATIO;
+ m_barcodeData.m_nWideNarrowRatio = ratio;
+ }
+ void SetStartChar(FX_CHAR startChar) {
+ m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_STARTCHAR;
+ m_barcodeData.m_cStartChar = startChar;
+ }
+ void SetEndChar(FX_CHAR endChar) {
+ m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_ENDCHAR;
+ m_barcodeData.m_cEndChar = endChar;
+ }
+ void SetVersion(int32_t version) {
+ m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_VERSION;
+ m_barcodeData.m_nVersion = version;
+ }
+ void SetErrorCorrectionLevel(int32_t ecLevel) {
+ m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_ECLEVEL;
+ m_barcodeData.m_nECLevel = ecLevel;
+ }
+ void SetTruncated(FX_BOOL truncated) {
+ m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_TRUNCATED;
+ m_barcodeData.m_bTruncated = truncated;
+ }
+ void ResetBarcodeAttributes() { m_barcodeData.m_dwAttributeMask = 0; }
+
+ protected:
+ CFWL_Barcode();
+ virtual ~CFWL_Barcode();
+ class CFWL_BarcodeDP : public IFWL_BarcodeDP {
+ public:
+ virtual FWL_ERR GetCaption(IFWL_Widget* pWidget, CFX_WideString& wsCaption);
+ BC_CHAR_ENCODING m_eCharEncoding;
+ virtual BC_CHAR_ENCODING GetCharEncoding() { return m_eCharEncoding; }
+ int32_t m_nModuleHeight, m_nModuleWidth;
+ virtual int32_t GetModuleHeight() { return m_nModuleHeight; }
+ virtual int32_t GetModuleWidth() { return m_nModuleWidth; }
+ int32_t m_nDataLength;
+ virtual int32_t GetDataLength() { return m_nDataLength; }
+ int32_t m_nCalChecksum;
+ virtual int32_t GetCalChecksum() { return m_nCalChecksum; }
+ FX_BOOL m_bPrintChecksum;
+ virtual FX_BOOL GetPrintChecksum() { return m_bPrintChecksum; }
+
+ BC_TEXT_LOC m_eTextLocation;
+ virtual BC_TEXT_LOC GetTextLocation() { return m_eTextLocation; }
+ int32_t m_nWideNarrowRatio;
+ virtual int32_t GetWideNarrowRatio() { return m_nWideNarrowRatio; }
+ FX_CHAR m_cStartChar, m_cEndChar;
+ virtual FX_CHAR GetStartChar() { return m_cStartChar; }
+ virtual FX_CHAR GetEndChar() { return m_cEndChar; }
+ int32_t m_nVersion;
+ virtual int32_t GetVersion() { return m_nVersion; }
+ int32_t m_nECLevel;
+ virtual int32_t GetErrorCorrectionLevel() { return m_nECLevel; }
+ FX_BOOL m_bTruncated;
+ virtual FX_BOOL GetTruncated() { return m_bTruncated; }
+ FX_DWORD m_dwAttributeMask;
+ virtual FX_DWORD GetBarcodeAttributeMask() { return m_dwAttributeMask; }
+
+ public:
+ CFWL_BarcodeDP() : m_dwAttributeMask(0) {}
+ };
+ CFWL_BarcodeDP m_barcodeData;
};
#endif