From 73895de7dea3737d1a25801001b8efe186c6f5a3 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Thu, 20 Oct 2016 07:19:43 -0700 Subject: Cleanup unused methods and return values in FWL code. This CL does an initial pass to remove unused methods and return values in the FWL code base. Review-Url: https://chromiumcodereview.appspot.com/2435603003 --- xfa/fwl/core/ifwl_edit.cpp | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'xfa/fwl/core/ifwl_edit.cpp') diff --git a/xfa/fwl/core/ifwl_edit.cpp b/xfa/fwl/core/ifwl_edit.cpp index 189df97c89..1d769af6cb 100644 --- a/xfa/fwl/core/ifwl_edit.cpp +++ b/xfa/fwl/core/ifwl_edit.cpp @@ -79,11 +79,6 @@ IFWL_Edit::~IFWL_Edit() { ClearRecord(); } -FWL_Error IFWL_Edit::GetClassName(CFX_WideString& wsClass) const { - wsClass = FWL_CLASS_Edit; - return FWL_Error::Succeeded; -} - FWL_Type IFWL_Edit::GetClassID() const { return FWL_Type::Edit; } @@ -101,20 +96,19 @@ FWL_Error IFWL_Edit::Initialize() { return FWL_Error::Succeeded; } -FWL_Error IFWL_Edit::Finalize() { - if (m_pProperties->m_dwStates & FWL_WGTSTATE_Focused) { +void IFWL_Edit::Finalize() { + if (m_pProperties->m_dwStates & FWL_WGTSTATE_Focused) ShowCaret(FALSE); - } - if (m_pHorzScrollBar) { + if (m_pHorzScrollBar) m_pHorzScrollBar->Finalize(); - } - if (m_pVertScrollBar) { + if (m_pVertScrollBar) m_pVertScrollBar->Finalize(); - } + delete m_pDelegate; m_pDelegate = nullptr; - return IFWL_Widget::Finalize(); + IFWL_Widget::Finalize(); } + FWL_Error IFWL_Edit::GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize) { if (bAutoSize) { rect.Set(0, 0, 0, 0); @@ -796,19 +790,23 @@ FX_BOOL IFWL_Edit::On_Validate(CFDE_TxtEdtEngine* pEdit, DispatchEvent(&event); return event.bValidate; } + FWL_Error IFWL_Edit::SetBackgroundColor(uint32_t color) { m_backColor = color; m_updateBackColor = TRUE; return FWL_Error::Succeeded; } + FWL_Error IFWL_Edit::SetFont(const CFX_WideString& wsFont, FX_FLOAT fSize) { m_wsFont = wsFont; m_fFontSize = fSize; return FWL_Error::Succeeded; } + void IFWL_Edit::SetScrollOffset(FX_FLOAT fScrollOffset) { m_fScrollOffsetY = fScrollOffset; } + void IFWL_Edit::DrawTextBk(CFX_Graphics* pGraphics, IFWL_ThemeProvider* pTheme, const CFX_Matrix* pMatrix) { -- cgit v1.2.3