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

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

Issue 2209153002: Use virtual function to retrieve interface pointer (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comment Created 4 years, 4 months 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/lightwidget/cfwl_barcode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/lightwidget/cfwl_barcode.h
diff --git a/xfa/fwl/lightwidget/cfwl_barcode.h b/xfa/fwl/lightwidget/cfwl_barcode.h
index 466ff6ed09a6a99ea3d744422ca4d44174ec1b5a..cf394f6167f07deb06f4a1402ed275af9cacd4c3 100644
--- a/xfa/fwl/lightwidget/cfwl_barcode.h
+++ b/xfa/fwl/lightwidget/cfwl_barcode.h
@@ -17,6 +17,10 @@ class CFWL_WidgetProperties;
class CFWL_Barcode : public CFWL_Edit {
public:
static CFWL_Barcode* Create();
+
+ IFWL_Barcode* GetWidget() override;
+ const IFWL_Barcode* GetWidget() const override;
+
FWL_Error Initialize(const CFWL_WidgetProperties* pProperties = nullptr);
void SetType(BC_TYPE type);
FX_BOOL IsProtectedType();
@@ -36,7 +40,7 @@ class CFWL_Barcode : public CFWL_Edit {
void SetDataLength(int32_t dataLength) {
m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_DATALENGTH;
m_barcodeData.m_nDataLength = dataLength;
- static_cast<IFWL_Barcode*>(m_pIface)->SetLimit(dataLength);
+ GetWidget()->SetLimit(dataLength);
}
void SetCalChecksum(int32_t calChecksum) {
m_barcodeData.m_dwAttributeMask |= FWL_BCDATTRIBUTE_CALCHECKSUM;
« no previous file with comments | « no previous file | xfa/fwl/lightwidget/cfwl_barcode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698