summaryrefslogtreecommitdiff
path: root/xfa/fwl/lightwidget/cfwl_tooltip.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_tooltip.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_tooltip.cpp')
-rw-r--r--xfa/fwl/lightwidget/cfwl_tooltip.cpp46
1 files changed, 20 insertions, 26 deletions
diff --git a/xfa/fwl/lightwidget/cfwl_tooltip.cpp b/xfa/fwl/lightwidget/cfwl_tooltip.cpp
index efb61ce018..7a9a26cf9e 100644
--- a/xfa/fwl/lightwidget/cfwl_tooltip.cpp
+++ b/xfa/fwl/lightwidget/cfwl_tooltip.cpp
@@ -16,79 +16,73 @@ CFWL_ToolTip* CFWL_ToolTip::Create() {
return new CFWL_ToolTip;
}
-FWL_ERR CFWL_ToolTip::Initialize(const CFWL_WidgetProperties* pProperties) {
+FWL_Error CFWL_ToolTip::Initialize(const CFWL_WidgetProperties* pProperties) {
if (m_pIface)
- return FWL_ERR_Indefinite;
+ return FWL_Error::Indefinite;
if (pProperties) {
*m_pProperties = *pProperties;
}
std::unique_ptr<IFWL_ToolTip> pToolTip(IFWL_ToolTip::Create(
m_pProperties->MakeWidgetImpProperties(&m_tooltipData), nullptr));
- FWL_ERR ret = pToolTip->Initialize();
- if (ret != FWL_ERR_Succeeded) {
+ FWL_Error ret = pToolTip->Initialize();
+ if (ret != FWL_Error::Succeeded) {
return ret;
}
m_pIface = pToolTip.release();
CFWL_Widget::Initialize();
- return FWL_ERR_Succeeded;
+ return FWL_Error::Succeeded;
}
-FWL_ERR CFWL_ToolTip::GetCaption(CFX_WideString& wsCaption) {
+void CFWL_ToolTip::GetCaption(CFX_WideString& wsCaption) {
wsCaption = m_tooltipData.m_wsCaption;
- return FWL_ERR_Succeeded;
}
-FWL_ERR CFWL_ToolTip::SetCaption(const CFX_WideStringC& wsCaption) {
+void CFWL_ToolTip::SetCaption(const CFX_WideStringC& wsCaption) {
m_tooltipData.m_wsCaption = wsCaption;
- return FWL_ERR_Succeeded;
}
int32_t CFWL_ToolTip::GetInitialDelay() {
return m_tooltipData.m_nInitDelayTime;
}
-int32_t CFWL_ToolTip::SetInitialDelay(int32_t nDelayTime) {
+void CFWL_ToolTip::SetInitialDelay(int32_t nDelayTime) {
m_tooltipData.m_nInitDelayTime = nDelayTime;
- return FWL_ERR_Succeeded;
}
int32_t CFWL_ToolTip::GetAutoPopDelay() {
return m_tooltipData.m_nAutoPopDelayTime;
}
-int32_t CFWL_ToolTip::SetAutoPopDelay(int32_t nDelayTime) {
+void CFWL_ToolTip::SetAutoPopDelay(int32_t nDelayTime) {
m_tooltipData.m_nAutoPopDelayTime = nDelayTime;
- return FWL_ERR_Succeeded;
}
CFX_DIBitmap* CFWL_ToolTip::GetToolTipIcon() {
return m_tooltipData.m_pBitmap;
}
-FWL_ERR CFWL_ToolTip::SetToolTipIcon(CFX_DIBitmap* pBitmap) {
+void CFWL_ToolTip::SetToolTipIcon(CFX_DIBitmap* pBitmap) {
m_tooltipData.m_pBitmap = pBitmap;
- return FWL_ERR_Succeeded;
}
CFX_SizeF CFWL_ToolTip::GetToolTipIconSize() {
return m_tooltipData.m_fIconSize;
}
-FWL_ERR CFWL_ToolTip::SetToolTipIconSize(CFX_SizeF fSize) {
+void CFWL_ToolTip::SetToolTipIconSize(CFX_SizeF fSize) {
m_tooltipData.m_fIconSize = fSize;
- return FWL_ERR_Succeeded;
}
-FWL_ERR CFWL_ToolTip::SetAnchor(const CFX_RectF& rtAnchor) {
- return static_cast<IFWL_ToolTip*>(m_pIface)->SetAnchor(rtAnchor);
+void CFWL_ToolTip::SetAnchor(const CFX_RectF& rtAnchor) {
+ static_cast<IFWL_ToolTip*>(m_pIface)->SetAnchor(rtAnchor);
}
-FWL_ERR CFWL_ToolTip::Show() {
- return static_cast<IFWL_ToolTip*>(m_pIface)->Show();
+void CFWL_ToolTip::Show() {
+ static_cast<IFWL_ToolTip*>(m_pIface)->Show();
}
-FWL_ERR CFWL_ToolTip::Hide() {
- return static_cast<IFWL_ToolTip*>(m_pIface)->Hide();
+void CFWL_ToolTip::Hide() {
+ static_cast<IFWL_ToolTip*>(m_pIface)->Hide();
}
CFWL_ToolTip::CFWL_ToolTip() {}
@@ -102,10 +96,10 @@ CFWL_ToolTip::CFWL_ToolTipDP::CFWL_ToolTipDP() : m_pBitmap(NULL) {
m_fAnchor.Set(0.0, 0.0, 0.0, 0.0);
}
-FWL_ERR CFWL_ToolTip::CFWL_ToolTipDP::GetCaption(IFWL_Widget* pWidget,
- CFX_WideString& wsCaption) {
+FWL_Error CFWL_ToolTip::CFWL_ToolTipDP::GetCaption(IFWL_Widget* pWidget,
+ CFX_WideString& wsCaption) {
wsCaption = m_wsCaption;
- return FWL_ERR_Succeeded;
+ return FWL_Error::Succeeded;
}
int32_t CFWL_ToolTip::CFWL_ToolTipDP::GetInitialDelay(IFWL_Widget* pWidget) {