From 3418f710f923785a0fd05f7c556d09bc9a8d3447 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 21 Sep 2017 11:40:11 -0400 Subject: Rename CXFA_FFApp::GetWidgetMgr to make it clear the type The CXFA_FFApp::GetWidgetMgr has two return types. This CL renames the methods to make it clear which one is being used. Change-Id: Id4fdaa33c1e6079afd2f0f7dcc77ae46f1c07ac2 Reviewed-on: https://pdfium-review.googlesource.com/14610 Reviewed-by: Henrique Nakashima Commit-Queue: dsinclair --- xfa/fwl/cfwl_widgetmgr.cpp | 3 ++- xfa/fxfa/cxfa_ffapp.cpp | 3 ++- xfa/fxfa/cxfa_ffapp.h | 6 ++++-- xfa/fxfa/cxfa_ffcheckbutton.cpp | 2 +- xfa/fxfa/cxfa_fffield.cpp | 4 ++-- xfa/fxfa/cxfa_ffpushbutton.cpp | 2 +- 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/xfa/fwl/cfwl_widgetmgr.cpp b/xfa/fwl/cfwl_widgetmgr.cpp index d3f2dd4655..4f697361c5 100644 --- a/xfa/fwl/cfwl_widgetmgr.cpp +++ b/xfa/fwl/cfwl_widgetmgr.cpp @@ -29,7 +29,8 @@ struct FWL_NEEDREPAINTHITDATA { } // namespace CFWL_WidgetMgr::CFWL_WidgetMgr(CXFA_FFApp* pAdapterNative) - : m_dwCapability(0), m_pAdapter(pAdapterNative->GetWidgetMgr(this)) { + : m_dwCapability(0), + m_pAdapter(pAdapterNative->GetFWLAdapterWidgetMgr(this)) { ASSERT(m_pAdapter); m_mapWidgetItem[nullptr] = pdfium::MakeUnique(); #if (_FX_OS_ == _FX_WIN32_DESKTOP_) || (_FX_OS_ == _FX_WIN64_) diff --git a/xfa/fxfa/cxfa_ffapp.cpp b/xfa/fxfa/cxfa_ffapp.cpp index 86346e12a3..7ef266b1e5 100644 --- a/xfa/fxfa/cxfa_ffapp.cpp +++ b/xfa/fxfa/cxfa_ffapp.cpp @@ -78,7 +78,8 @@ CXFA_FWLTheme* CXFA_FFApp::GetFWLTheme() { return m_pFWLTheme.get(); } -CXFA_FWLAdapterWidgetMgr* CXFA_FFApp::GetWidgetMgr(CFWL_WidgetMgr* pDelegate) { +CXFA_FWLAdapterWidgetMgr* CXFA_FFApp::GetFWLAdapterWidgetMgr( + CFWL_WidgetMgr* pDelegate) { if (!m_pAdapterWidgetMgr) { m_pAdapterWidgetMgr = pdfium::MakeUnique(); pDelegate->OnSetCapability(FWL_WGTMGR_DisableForm); diff --git a/xfa/fxfa/cxfa_ffapp.h b/xfa/fxfa/cxfa_ffapp.h index c19fe5063d..4f2a06db0a 100644 --- a/xfa/fxfa/cxfa_ffapp.h +++ b/xfa/fxfa/cxfa_ffapp.h @@ -36,7 +36,10 @@ class CXFA_FFApp { void SetDefaultFontMgr(std::unique_ptr pFontMgr); CXFA_FFDocHandler* GetDocHandler(); - CXFA_FWLAdapterWidgetMgr* GetWidgetMgr(CFWL_WidgetMgr* pDelegate); + + CXFA_FWLAdapterWidgetMgr* GetFWLAdapterWidgetMgr(CFWL_WidgetMgr* pDelegate); + CFWL_WidgetMgr* GetFWLWidgetMgr() const { return m_pWidgetMgr.Get(); } + CFGAS_FontMgr* GetFDEFontMgr(); CXFA_FWLTheme* GetFWLTheme(); @@ -44,7 +47,6 @@ class CXFA_FFApp { const CFWL_App* GetFWLApp() const { return m_pFWLApp.get(); } IFWL_AdapterTimerMgr* GetTimerMgr() const; CXFA_FontMgr* GetXFAFontMgr() const; - CFWL_WidgetMgr* GetWidgetMgr() const { return m_pWidgetMgr.Get(); } void ClearEventTargets(); diff --git a/xfa/fxfa/cxfa_ffcheckbutton.cpp b/xfa/fxfa/cxfa_ffcheckbutton.cpp index 5b8766d79c..05c5a72ef5 100644 --- a/xfa/fxfa/cxfa_ffcheckbutton.cpp +++ b/xfa/fxfa/cxfa_ffcheckbutton.cpp @@ -243,7 +243,7 @@ void CXFA_FFCheckButton::RenderWidget(CXFA_Graphics* pGS, m_pDataAcc->GetCheckButtonShape() == XFA_ATTRIBUTEENUM_Round); CFX_Matrix mt(1, 0, 0, 1, m_rtCheckBox.left, m_rtCheckBox.top); mt.Concat(mtRotate); - GetApp()->GetWidgetMgr()->OnDrawWidget(m_pNormalWidget.get(), pGS, mt); + GetApp()->GetFWLWidgetMgr()->OnDrawWidget(m_pNormalWidget.get(), pGS, mt); } bool CXFA_FFCheckButton::OnLButtonUp(uint32_t dwFlags, diff --git a/xfa/fxfa/cxfa_fffield.cpp b/xfa/fxfa/cxfa_fffield.cpp index c35cfe18fe..09ea23f9eb 100644 --- a/xfa/fxfa/cxfa_fffield.cpp +++ b/xfa/fxfa/cxfa_fffield.cpp @@ -73,7 +73,7 @@ void CXFA_FFField::RenderWidget(CXFA_Graphics* pGS, CFX_RectF rtWidget = m_pNormalWidget->GetWidgetRect(); CFX_Matrix mt(1, 0, 0, 1, rtWidget.left, rtWidget.top); mt.Concat(mtRotate); - GetApp()->GetWidgetMgr()->OnDrawWidget(m_pNormalWidget.get(), pGS, mt); + GetApp()->GetFWLWidgetMgr()->OnDrawWidget(m_pNormalWidget.get(), pGS, mt); } void CXFA_FFField::DrawHighlight(CXFA_Graphics* pGS, @@ -732,7 +732,7 @@ bool CXFA_FFField::IsDataChanged() { } void CXFA_FFField::TranslateFWLMessage(CFWL_Message* pMessage) { - GetApp()->GetWidgetMgr()->OnProcessMessageToForm(pMessage); + GetApp()->GetFWLWidgetMgr()->OnProcessMessageToForm(pMessage); } void CXFA_FFField::OnProcessMessage(CFWL_Message* pMessage) {} diff --git a/xfa/fxfa/cxfa_ffpushbutton.cpp b/xfa/fxfa/cxfa_ffpushbutton.cpp index 2fac858a12..2f2c133ede 100644 --- a/xfa/fxfa/cxfa_ffpushbutton.cpp +++ b/xfa/fxfa/cxfa_ffpushbutton.cpp @@ -43,7 +43,7 @@ void CXFA_FFPushButton::RenderWidget(CXFA_Graphics* pGS, CFX_RectF rtWidget = GetRectWithoutRotate(); CFX_Matrix mt(1, 0, 0, 1, rtWidget.left, rtWidget.top); mt.Concat(mtRotate); - GetApp()->GetWidgetMgr()->OnDrawWidget(m_pNormalWidget.get(), pGS, mt); + GetApp()->GetFWLWidgetMgr()->OnDrawWidget(m_pNormalWidget.get(), pGS, mt); } bool CXFA_FFPushButton::LoadWidget() { -- cgit v1.2.3