summaryrefslogtreecommitdiff
path: root/xfa/fwl/lightwidget/cfwl_datetimepicker.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-05-04 17:57:03 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-04 17:57:03 -0700
commitc777f486f84611d2fdd2d03af661b14955f9efb6 (patch)
tree679012454d82e885f749d17f75fd12735efec29a /xfa/fwl/lightwidget/cfwl_datetimepicker.cpp
parent41aad19ba366540bd4efa20a9009ac1c70a81403 (diff)
downloadpdfium-c777f486f84611d2fdd2d03af661b14955f9efb6.tar.xz
Convert FWL_ERR into an enum class.
This Cl updates FWL_ERR to be an FWL_Error enum class. It removes FX_ERR and replaces it with FWL_Error as well as the values were the same. There were many places where we either returned other values for FWL_ERR results. This Cl is the same as: https://codereview.chromium.org/1943413002/ but I seem to have messed up the base URL in that one. TBR=tsepez@chromium.org Review-Url: https://codereview.chromium.org/1952693003
Diffstat (limited to 'xfa/fwl/lightwidget/cfwl_datetimepicker.cpp')
-rw-r--r--xfa/fwl/lightwidget/cfwl_datetimepicker.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/xfa/fwl/lightwidget/cfwl_datetimepicker.cpp b/xfa/fwl/lightwidget/cfwl_datetimepicker.cpp
index ba99ad8551..dba1a527b4 100644
--- a/xfa/fwl/lightwidget/cfwl_datetimepicker.cpp
+++ b/xfa/fwl/lightwidget/cfwl_datetimepicker.cpp
@@ -16,10 +16,10 @@ CFWL_DateTimePicker* CFWL_DateTimePicker::Create() {
return new CFWL_DateTimePicker;
}
-FWL_ERR CFWL_DateTimePicker::Initialize(
+FWL_Error CFWL_DateTimePicker::Initialize(
const CFWL_WidgetProperties* pProperties) {
if (m_pIface)
- return FWL_ERR_Indefinite;
+ return FWL_Error::Indefinite;
if (pProperties) {
*m_pProperties = *pProperties;
}
@@ -27,22 +27,22 @@ FWL_ERR CFWL_DateTimePicker::Initialize(
IFWL_DateTimePicker::Create(
m_pProperties->MakeWidgetImpProperties(&m_DateTimePickerDP),
nullptr));
- FWL_ERR ret = pDateTimePicker->Initialize();
- if (ret != FWL_ERR_Succeeded) {
+ FWL_Error ret = pDateTimePicker->Initialize();
+ if (ret != FWL_Error::Succeeded) {
return ret;
}
m_pIface = pDateTimePicker.release();
CFWL_Widget::Initialize();
- return FWL_ERR_Succeeded;
+ return FWL_Error::Succeeded;
}
-FWL_ERR CFWL_DateTimePicker::SetToday(int32_t iYear,
- int32_t iMonth,
- int32_t iDay) {
+FWL_Error CFWL_DateTimePicker::SetToday(int32_t iYear,
+ int32_t iMonth,
+ int32_t iDay) {
m_DateTimePickerDP.m_iYear = iYear;
m_DateTimePickerDP.m_iMonth = iMonth;
m_DateTimePickerDP.m_iDay = iDay;
- return FWL_ERR_Succeeded;
+ return FWL_Error::Succeeded;
}
int32_t CFWL_DateTimePicker::CountSelRanges() {
@@ -54,24 +54,24 @@ int32_t CFWL_DateTimePicker::GetSelRange(int32_t nIndex, int32_t& nStart) {
->GetSelRange(nIndex, nStart);
}
-FWL_ERR CFWL_DateTimePicker::GetEditText(CFX_WideString& wsText) {
+FWL_Error CFWL_DateTimePicker::GetEditText(CFX_WideString& wsText) {
return static_cast<IFWL_DateTimePicker*>(m_pIface)->GetEditText(wsText);
}
-FWL_ERR CFWL_DateTimePicker::SetEditText(const CFX_WideString& wsText) {
+FWL_Error CFWL_DateTimePicker::SetEditText(const CFX_WideString& wsText) {
return static_cast<IFWL_DateTimePicker*>(m_pIface)->SetEditText(wsText);
}
-FWL_ERR CFWL_DateTimePicker::GetCurSel(int32_t& iYear,
- int32_t& iMonth,
- int32_t& iDay) {
+FWL_Error CFWL_DateTimePicker::GetCurSel(int32_t& iYear,
+ int32_t& iMonth,
+ int32_t& iDay) {
return static_cast<IFWL_DateTimePicker*>(m_pIface)
->GetCurSel(iYear, iMonth, iDay);
}
-FWL_ERR CFWL_DateTimePicker::SetCurSel(int32_t iYear,
- int32_t iMonth,
- int32_t iDay) {
+FWL_Error CFWL_DateTimePicker::SetCurSel(int32_t iYear,
+ int32_t iMonth,
+ int32_t iDay) {
return static_cast<IFWL_DateTimePicker*>(m_pIface)
->SetCurSel(iYear, iMonth, iDay);
}
@@ -86,14 +86,14 @@ CFWL_DateTimePicker::CFWL_DateTimePickerDP::CFWL_DateTimePickerDP() {
m_iDay = 1;
}
-FWL_ERR CFWL_DateTimePicker::CFWL_DateTimePickerDP::GetCaption(
+FWL_Error CFWL_DateTimePicker::CFWL_DateTimePickerDP::GetCaption(
IFWL_Widget* pWidget,
CFX_WideString& wsCaption) {
wsCaption = m_wsData;
- return FWL_ERR_Succeeded;
+ return FWL_Error::Succeeded;
}
-FWL_ERR CFWL_DateTimePicker::CFWL_DateTimePickerDP::GetToday(
+FWL_Error CFWL_DateTimePicker::CFWL_DateTimePickerDP::GetToday(
IFWL_Widget* pWidget,
int32_t& iYear,
int32_t& iMonth,
@@ -101,7 +101,7 @@ FWL_ERR CFWL_DateTimePicker::CFWL_DateTimePickerDP::GetToday(
iYear = m_iYear;
iMonth = m_iMonth;
iDay = m_iDay;
- return FWL_ERR_Succeeded;
+ return FWL_Error::Succeeded;
}
FX_BOOL CFWL_DateTimePicker::CanUndo() {
@@ -156,16 +156,16 @@ FX_BOOL CFWL_DateTimePicker::DeSelect() {
return static_cast<IFWL_DateTimePicker*>(m_pIface)->DeSelect();
}
-FWL_ERR CFWL_DateTimePicker::GetBBox(CFX_RectF& rect) {
+FWL_Error CFWL_DateTimePicker::GetBBox(CFX_RectF& rect) {
return static_cast<IFWL_DateTimePicker*>(m_pIface)->GetBBox(rect);
}
-FWL_ERR CFWL_DateTimePicker::SetEditLimit(int32_t nLimit) {
+FWL_Error CFWL_DateTimePicker::SetEditLimit(int32_t nLimit) {
return static_cast<IFWL_DateTimePicker*>(m_pIface)->SetEditLimit(nLimit);
}
-FWL_ERR CFWL_DateTimePicker::ModifyEditStylesEx(uint32_t dwStylesExAdded,
- uint32_t dwStylesExRemoved) {
+FWL_Error CFWL_DateTimePicker::ModifyEditStylesEx(uint32_t dwStylesExAdded,
+ uint32_t dwStylesExRemoved) {
return static_cast<IFWL_DateTimePicker*>(m_pIface)
->ModifyEditStylesEx(dwStylesExAdded, dwStylesExRemoved);
}