summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/cfwl_barcode.h
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-11-07 10:28:47 -0800
committerCommit bot <commit-bot@chromium.org>2016-11-07 10:28:47 -0800
commiteb3f68cc7f25a1e28464eb251161b8f08fcd04bc (patch)
tree36e565bac1a7760e605b181b7da4c08bda151cdd /xfa/fwl/core/cfwl_barcode.h
parenta97fc7c6392c0adbd702bdf898cb9e20cee00a3e (diff)
downloadpdfium-eb3f68cc7f25a1e28464eb251161b8f08fcd04bc.tar.xz
Fold DataProviders into parent classes
This CL removes the data provider classes and folds the code into the parent classes. Review-Url: https://codereview.chromium.org/2480233003
Diffstat (limited to 'xfa/fwl/core/cfwl_barcode.h')
-rw-r--r--xfa/fwl/core/cfwl_barcode.h77
1 files changed, 34 insertions, 43 deletions
diff --git a/xfa/fwl/core/cfwl_barcode.h b/xfa/fwl/core/cfwl_barcode.h
index b5642d21c5..be89318f40 100644
--- a/xfa/fwl/core/cfwl_barcode.h
+++ b/xfa/fwl/core/cfwl_barcode.h
@@ -11,9 +11,7 @@
#include "xfa/fwl/core/fwl_error.h"
#include "xfa/fwl/core/ifwl_barcode.h"
-class CFWL_Widget;
-
-class CFWL_Barcode : public CFWL_Edit {
+class CFWL_Barcode : public CFWL_Edit, public IFWL_BarcodeDP {
public:
CFWL_Barcode(const IFWL_App*);
~CFWL_Barcode() override;
@@ -38,48 +36,41 @@ class CFWL_Barcode : public CFWL_Edit {
void SetTruncated(bool truncated);
void ResetBarcodeAttributes();
- protected:
- class CFWL_BarcodeDP : public IFWL_BarcodeDP {
- public:
- CFWL_BarcodeDP();
-
- // IFWL_DataProvider
- FWL_Error GetCaption(IFWL_Widget* pWidget,
- CFX_WideString& wsCaption) override;
-
- // IFWL_BarcodeDP
- BC_CHAR_ENCODING GetCharEncoding() const override;
- int32_t GetModuleHeight() const override;
- int32_t GetModuleWidth() const override;
- int32_t GetDataLength() const override;
- bool GetCalChecksum() const override;
- bool GetPrintChecksum() const override;
- BC_TEXT_LOC GetTextLocation() const override;
- int32_t GetWideNarrowRatio() const override;
- FX_CHAR GetStartChar() const override;
- FX_CHAR GetEndChar() const override;
- int32_t GetVersion() const override;
- int32_t GetErrorCorrectionLevel() const override;
- bool GetTruncated() const override;
- uint32_t GetBarcodeAttributeMask() const override;
+ // IFWL_DataProvider
+ FWL_Error GetCaption(IFWL_Widget* pWidget,
+ CFX_WideString& wsCaption) override;
- BC_CHAR_ENCODING m_eCharEncoding;
- int32_t m_nModuleHeight;
- int32_t m_nModuleWidth;
- int32_t m_nDataLength;
- bool m_bCalChecksum;
- bool m_bPrintChecksum;
- BC_TEXT_LOC m_eTextLocation;
- int32_t m_nWideNarrowRatio;
- FX_CHAR m_cStartChar;
- FX_CHAR m_cEndChar;
- int32_t m_nVersion;
- int32_t m_nECLevel;
- bool m_bTruncated;
- uint32_t m_dwAttributeMask;
- };
+ // IFWL_BarcodeDP
+ BC_CHAR_ENCODING GetCharEncoding() const override;
+ int32_t GetModuleHeight() const override;
+ int32_t GetModuleWidth() const override;
+ int32_t GetDataLength() const override;
+ bool GetCalChecksum() const override;
+ bool GetPrintChecksum() const override;
+ BC_TEXT_LOC GetTextLocation() const override;
+ int32_t GetWideNarrowRatio() const override;
+ FX_CHAR GetStartChar() const override;
+ FX_CHAR GetEndChar() const override;
+ int32_t GetVersion() const override;
+ int32_t GetErrorCorrectionLevel() const override;
+ bool GetTruncated() const override;
+ uint32_t GetBarcodeAttributeMask() const override;
- CFWL_BarcodeDP m_barcodeData;
+ private:
+ BC_CHAR_ENCODING m_eCharEncoding;
+ int32_t m_nModuleHeight;
+ int32_t m_nModuleWidth;
+ int32_t m_nDataLength;
+ bool m_bCalChecksum;
+ bool m_bPrintChecksum;
+ BC_TEXT_LOC m_eTextLocation;
+ int32_t m_nWideNarrowRatio;
+ FX_CHAR m_cStartChar;
+ FX_CHAR m_cEndChar;
+ int32_t m_nVersion;
+ int32_t m_nECLevel;
+ bool m_bTruncated;
+ uint32_t m_dwAttributeMask;
};
#endif // XFA_FWL_CORE_CFWL_BARCODE_H_