Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Unified Diff: xfa/fwl/core/cfwl_monthcalendar.cpp

Issue 2556873004: Convert GetWidgetRect to return rect. (Closed)
Patch Set: Review feedback Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fwl/core/cfwl_monthcalendar.h ('k') | xfa/fwl/core/cfwl_picturebox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/core/cfwl_monthcalendar.cpp
diff --git a/xfa/fwl/core/cfwl_monthcalendar.cpp b/xfa/fwl/core/cfwl_monthcalendar.cpp
index c1823384607cfac0b6b1d904a8c59d32c4141a51..8a284aae52c6f14390f3b5a9e4b8629137536f7e 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);
« no previous file with comments | « xfa/fwl/core/cfwl_monthcalendar.h ('k') | xfa/fwl/core/cfwl_picturebox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698