summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/ifwl_barcode.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-11-10 09:40:14 -0800
committerCommit bot <commit-bot@chromium.org>2016-11-10 09:40:14 -0800
commit98329fe75b9c3e5422344a37d787fb22c89c2ca2 (patch)
treea1e7f3d35bc97695b074756ab7ef531c17c6262d /xfa/fwl/core/ifwl_barcode.cpp
parent50feafc7f367a87b7e4e689421eb7ae1484660d9 (diff)
downloadpdfium-98329fe75b9c3e5422344a37d787fb22c89c2ca2.tar.xz
Cleanup IFWL_Widget visibility and virtual parameters
This Cl cleans up the IFWL_Widget class including: * Making members and methods private where possible * Removing virtual methods that are never overridden * Removing methods that do nothing * Removing unchecked FWL_Error return codes Review-Url: https://codereview.chromium.org/2488953003
Diffstat (limited to 'xfa/fwl/core/ifwl_barcode.cpp')
-rw-r--r--xfa/fwl/core/ifwl_barcode.cpp27
1 files changed, 12 insertions, 15 deletions
diff --git a/xfa/fwl/core/ifwl_barcode.cpp b/xfa/fwl/core/ifwl_barcode.cpp
index 3fb430d71b..518ed4a599 100644
--- a/xfa/fwl/core/ifwl_barcode.cpp
+++ b/xfa/fwl/core/ifwl_barcode.cpp
@@ -25,25 +25,24 @@ FWL_Type IFWL_Barcode::GetClassID() const {
return FWL_Type::Barcode;
}
-FWL_Error IFWL_Barcode::Update() {
+void IFWL_Barcode::Update() {
if (IsLocked()) {
- return FWL_Error::Indefinite;
+ return;
}
- FWL_Error ret = IFWL_Edit::Update();
+ IFWL_Edit::Update();
GenerateBarcodeImageCache();
- return ret;
}
-FWL_Error IFWL_Barcode::DrawWidget(CFX_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
+void IFWL_Barcode::DrawWidget(CFX_Graphics* pGraphics,
+ const CFX_Matrix* pMatrix) {
if (!pGraphics)
- return FWL_Error::Indefinite;
+ return;
if (!m_pProperties->m_pThemeProvider)
- return FWL_Error::Indefinite;
+ return;
if ((m_pProperties->m_dwStates & FWL_WGTSTATE_Focused) == 0) {
GenerateBarcodeImageCache();
if (!m_pBarcodeEngine || (m_dwStatus & XFA_BCS_EncodeSuccess) == 0) {
- return FWL_Error::Succeeded;
+ return;
}
CFX_Matrix mt;
mt.e = m_rtClient.left;
@@ -52,13 +51,11 @@ FWL_Error IFWL_Barcode::DrawWidget(CFX_Graphics* pGraphics,
mt.Concat(*pMatrix);
}
int32_t errorCode = 0;
- if (!m_pBarcodeEngine->RenderDevice(pGraphics->GetRenderDevice(), pMatrix,
- errorCode)) {
- return FWL_Error::Indefinite;
- }
- return FWL_Error::Succeeded;
+ m_pBarcodeEngine->RenderDevice(pGraphics->GetRenderDevice(), pMatrix,
+ errorCode);
+ return;
}
- return IFWL_Edit::DrawWidget(pGraphics, pMatrix);
+ IFWL_Edit::DrawWidget(pGraphics, pMatrix);
}
void IFWL_Barcode::GenerateBarcodeImageCache() {
if ((m_dwStatus & XFA_BCS_NeedUpdate) == 0)