From 6d8555d72d31f73c2b32849b602d1ba57b09c469 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Fri, 22 Apr 2016 08:16:40 -0700 Subject: Fix standalone mac build Missing default statement in the switch. Duplicated the method signature on both sides of the #ifdef to make it clearer what was going on. Review URL: https://codereview.chromium.org/1905303003 --- xfa/fwl/core/fwl_formimp.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'xfa') diff --git a/xfa/fwl/core/fwl_formimp.cpp b/xfa/fwl/core/fwl_formimp.cpp index ad3c173590..e31f7e8202 100644 --- a/xfa/fwl/core/fwl_formimp.cpp +++ b/xfa/fwl/core/fwl_formimp.cpp @@ -860,15 +860,11 @@ void CFWL_FormImp::DoHeightLimit(FX_FLOAT& fTop, CFWL_FormImpDelegate::CFWL_FormImpDelegate(CFWL_FormImp* pOwner) : m_pOwner(pOwner) {} +#ifdef FWL_UseMacSystemBorder int32_t CFWL_FormImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { if (!pMessage) return 0; - - CFWL_MessageType dwMsgCode = pMessage->GetClassID(); - -#ifdef FWL_UseMacSystemBorder - - switch (dwMsgCode) { + switch (pMessage->GetClassID()) { case CFWL_MessageType::Activate: { m_pOwner->m_pProperties->m_dwStates &= ~FWL_WGTSTATE_Deactivated; m_pOwner->Repaint(&m_pOwner->m_rtRelative); @@ -879,11 +875,17 @@ int32_t CFWL_FormImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { m_pOwner->Repaint(&m_pOwner->m_rtRelative); break; } + default: + break; } return FWL_ERR_Succeeded; +} #else +int32_t CFWL_FormImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { + if (!pMessage) + return 0; int32_t iRet = 1; - switch (dwMsgCode) { + switch (pMessage->GetClassID()) { case CFWL_MessageType::Activate: { m_pOwner->m_pProperties->m_dwStates &= ~FWL_WGTSTATE_Deactivated; IFWL_Thread* pThread = m_pOwner->GetOwnerThread(); @@ -984,8 +986,8 @@ int32_t CFWL_FormImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { } } return iRet; -#endif // FWL_UseMacSystemBorder } +#endif // FWL_UseMacSystemBorder FWL_ERR CFWL_FormImpDelegate::OnProcessEvent(CFWL_Event* pEvent) { if (!pEvent) -- cgit v1.2.3