summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/cfwl_monthcalendar.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-12-07 18:47:00 -0800
committerCommit bot <commit-bot@chromium.org>2016-12-07 18:47:00 -0800
commitda911bc12558667555266425d0b7e83296e8cc7d (patch)
treed0e0e84597e30f2d59856a9a55b737f49faa9522 /xfa/fwl/core/cfwl_monthcalendar.cpp
parent67c6ca3cd86b6a31c888264bb8067c6c4324e56c (diff)
downloadpdfium-da911bc12558667555266425d0b7e83296e8cc7d.tar.xz
Convert GetWidgetRect to return rect.
Current GetWidgetRect accepts the rect as an out-param. This CL converts the code to return the rect instead. Review-Url: https://codereview.chromium.org/2556873004
Diffstat (limited to 'xfa/fwl/core/cfwl_monthcalendar.cpp')
-rw-r--r--xfa/fwl/core/cfwl_monthcalendar.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/xfa/fwl/core/cfwl_monthcalendar.cpp b/xfa/fwl/core/cfwl_monthcalendar.cpp
index c182338460..8a284aae52 100644
--- a/xfa/fwl/core/cfwl_monthcalendar.cpp
+++ b/xfa/fwl/core/cfwl_monthcalendar.cpp
@@ -160,15 +160,12 @@ FWL_Type CFWL_MonthCalendar::GetClassID() const {
return FWL_Type::MonthCalendar;
}
-void CFWL_MonthCalendar::GetWidgetRect(CFX_RectF& rect, bool bAutoSize) {
- if (!bAutoSize) {
- rect = m_pProperties->m_rtWidget;
- return;
- }
-
+CFX_RectF CFWL_MonthCalendar::GetAutosizedWidgetRect() {
CFX_SizeF fs = CalcSize();
+ CFX_RectF rect;
rect.Set(0, 0, fs.x, fs.y);
InflateWidgetRect(rect);
+ return rect;
}
void CFWL_MonthCalendar::Update() {
@@ -976,9 +973,8 @@ void CFWL_MonthCalendar::OnLButtonUp(CFWL_MsgMouse* pMsg) {
iOldSel = m_arrSelDays[0];
int32_t iCurSel = GetDayAtPoint(pMsg->m_fx, pMsg->m_fy);
- CFX_RectF rt;
CFWL_DateTimePicker* pIPicker = static_cast<CFWL_DateTimePicker*>(m_pOuter);
- pIPicker->GetFormProxy()->GetWidgetRect(rt, false);
+ CFX_RectF rt = pIPicker->GetFormProxy()->GetWidgetRect();
rt.Set(0, 0, rt.width, rt.height);
if (iCurSel > 0) {
DATEINFO* lpDatesInfo = m_arrDates.GetAt(iCurSel - 1);