diff options
author | Henrique Nakashima <hnakashima@chromium.org> | 2018-05-11 18:37:26 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-05-11 18:37:26 +0000 |
commit | ce7a8158376dd81e2321a77a331dca5f451b471c (patch) | |
tree | 9de6a5e8356c8392bfe6890cc4822cadd5b56dae /xfa/fwl/cfwl_monthcalendar.cpp | |
parent | ddfa5177021f76b4d84c6fbdce964ab3ca17e046 (diff) | |
download | pdfium-ce7a8158376dd81e2321a77a331dca5f451b471c.tar.xz |
Remove CFWL_WidgetMgr::IsFormDisabled().
This method always returns true, so make that assumption and clean up
dead code.
More cleanups will follow this one to remove the code that can now
be inferred to be dead.
Change-Id: I73f077561ab511a1c2c09ac6990ab5cdc5bfb055
Reviewed-on: https://pdfium-review.googlesource.com/32391
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'xfa/fwl/cfwl_monthcalendar.cpp')
-rw-r--r-- | xfa/fwl/cfwl_monthcalendar.cpp | 42 |
1 files changed, 1 insertions, 41 deletions
diff --git a/xfa/fwl/cfwl_monthcalendar.cpp b/xfa/fwl/cfwl_monthcalendar.cpp index f2bd845a19..9ee6d6670c 100644 --- a/xfa/fwl/cfwl_monthcalendar.cpp +++ b/xfa/fwl/cfwl_monthcalendar.cpp @@ -765,47 +765,7 @@ void CFWL_MonthCalendar::OnLButtonDown(CFWL_MessageMouse* pMsg) { } void CFWL_MonthCalendar::OnLButtonUp(CFWL_MessageMouse* pMsg) { - if (m_pWidgetMgr->IsFormDisabled()) - return DisForm_OnLButtonUp(pMsg); - - if (m_rtLBtn.Contains(pMsg->m_pos)) { - m_iLBtnPartStates = 0; - RepaintRect(m_rtLBtn); - return; - } - if (m_rtRBtn.Contains(pMsg->m_pos)) { - m_iRBtnPartStates = 0; - RepaintRect(m_rtRBtn); - return; - } - if (m_rtToday.Contains(pMsg->m_pos)) - return; - - int32_t iOldSel = 0; - if (!m_arrSelDays.empty()) - iOldSel = m_arrSelDays[0]; - - int32_t iCurSel = GetDayAtPoint(pMsg->m_pos); - CFWL_DateTimePicker* pIPicker = static_cast<CFWL_DateTimePicker*>(m_pOuter); - if (iCurSel > 0) { - DATEINFO* lpDatesInfo = m_arrDates[iCurSel - 1].get(); - CFX_RectF rtInvalidate(lpDatesInfo->rect); - if (iOldSel > 0 && iOldSel <= pdfium::CollectionSize<int32_t>(m_arrDates)) { - lpDatesInfo = m_arrDates[iOldSel - 1].get(); - rtInvalidate.Union(lpDatesInfo->rect); - } - AddSelDay(iCurSel); - if (!m_pOuter) - return; - - pIPicker->ProcessSelChanged(m_iCurYear, m_iCurMonth, iCurSel); - pIPicker->ShowMonthCalendar(false); - } else if (m_bFlag && - (!CFX_RectF(0, 0, pIPicker->GetFormProxy()->GetWidgetRect().Size()) - .Contains(pMsg->m_pos))) { - pIPicker->ShowMonthCalendar(false); - } - m_bFlag = false; + return DisForm_OnLButtonUp(pMsg); } void CFWL_MonthCalendar::DisForm_OnLButtonUp(CFWL_MessageMouse* pMsg) { |