summaryrefslogtreecommitdiff
path: root/xfa/fwl/basewidget
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fwl/basewidget')
-rw-r--r--xfa/fwl/basewidget/fwl_datetimepickerimp.cpp10
-rw-r--r--xfa/fwl/basewidget/fwl_monthcalendarimp.h4
2 files changed, 7 insertions, 7 deletions
diff --git a/xfa/fwl/basewidget/fwl_datetimepickerimp.cpp b/xfa/fwl/basewidget/fwl_datetimepickerimp.cpp
index c70ad691a4..94fa549fe4 100644
--- a/xfa/fwl/basewidget/fwl_datetimepickerimp.cpp
+++ b/xfa/fwl/basewidget/fwl_datetimepickerimp.cpp
@@ -311,11 +311,10 @@ void CFWL_DateTimeCalendarImpDelegate::OnLButtonUpEx(CFWL_MsgMouse* pMsg) {
pPicker->m_pForm->GetWidgetRect(rt);
rt.Set(0, 0, rt.width, rt.height);
if (iCurSel > 0) {
- FWL_DATEINFO* lpDatesInfo =
- (FWL_DATEINFO*)m_pOwner->m_arrDates.GetAt(iCurSel - 1);
+ FWL_DATEINFO* lpDatesInfo = m_pOwner->m_arrDates.GetAt(iCurSel - 1);
CFX_RectF rtInvalidate(lpDatesInfo->rect);
if (iOldSel > 0 && iOldSel <= m_pOwner->m_arrDates.GetSize()) {
- lpDatesInfo = (FWL_DATEINFO*)m_pOwner->m_arrDates.GetAt(iOldSel - 1);
+ lpDatesInfo = m_pOwner->m_arrDates.GetAt(iOldSel - 1);
rtInvalidate.Union(lpDatesInfo->rect);
}
m_pOwner->AddSelDay(iCurSel);
@@ -406,11 +405,10 @@ void CFWL_DateTimeCalendarImpDelegate::DisForm_OnLButtonUpEx(
}
int32_t iCurSel = m_pOwner->GetDayAtPoint(pMsg->m_fx, pMsg->m_fy);
if (iCurSel > 0) {
- FWL_DATEINFO* lpDatesInfo =
- (FWL_DATEINFO*)m_pOwner->m_arrDates.GetAt(iCurSel - 1);
+ FWL_DATEINFO* lpDatesInfo = m_pOwner->m_arrDates.GetAt(iCurSel - 1);
CFX_RectF rtInvalidate(lpDatesInfo->rect);
if (iOldSel > 0 && iOldSel <= m_pOwner->m_arrDates.GetSize()) {
- lpDatesInfo = (FWL_DATEINFO*)m_pOwner->m_arrDates.GetAt(iOldSel - 1);
+ lpDatesInfo = m_pOwner->m_arrDates.GetAt(iOldSel - 1);
rtInvalidate.Union(lpDatesInfo->rect);
}
m_pOwner->AddSelDay(iCurSel);
diff --git a/xfa/fwl/basewidget/fwl_monthcalendarimp.h b/xfa/fwl/basewidget/fwl_monthcalendarimp.h
index c67848fd1d..a7deb9a098 100644
--- a/xfa/fwl/basewidget/fwl_monthcalendarimp.h
+++ b/xfa/fwl/basewidget/fwl_monthcalendarimp.h
@@ -15,6 +15,8 @@ class CFWL_MsgMouse;
class CFWL_WidgetImpProperties;
class IFWL_Widget;
+struct FWL_DATEINFO;
+
extern uint8_t FX_DaysInMonth(int32_t iYear, uint8_t iMonth);
class CFWL_MonthCalendarImp : public CFWL_WidgetImp {
@@ -160,7 +162,7 @@ class CFWL_MonthCalendarImp : public CFWL_WidgetImp {
CFX_WideString m_wsHead;
CFX_WideString m_wsToday;
CFX_DateTime* m_pDateTime;
- CFX_PtrArray m_arrDates;
+ CFX_ArrayTemplate<FWL_DATEINFO*> m_arrDates;
int32_t m_iCurYear;
int32_t m_iCurMonth;
int32_t m_iYear;