Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1576)

Unified Diff: xfa/fwl/core/cfwl_barcode.h

Issue 2480233003: Fold DataProviders into parent classes (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | xfa/fwl/core/cfwl_barcode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/core/cfwl_barcode.h
diff --git a/xfa/fwl/core/cfwl_barcode.h b/xfa/fwl/core/cfwl_barcode.h
index b5642d21c5f7b379d44ccc69448d5eb6ecb67275..89aac5db09efa6197ebfefdda384427038ab8821 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;
@@ -39,47 +37,40 @@ class CFWL_Barcode : public CFWL_Edit {
void ResetBarcodeAttributes();
protected:
Tom Sepez 2016/11/07 18:00:20 I'd expect the overrides to be public since we pub
dsinclair 2016/11/07 18:14:23 Done.
- 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;
+ 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_
« no previous file with comments | « no previous file | xfa/fwl/core/cfwl_barcode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698