summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app/xfa_ffwidget.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-05-17 10:32:18 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-17 10:32:19 -0700
commit935d8d5dcbf1da2b3198675428cbf7ca0406788f (patch)
tree9fc8595b3b169a1b7a5f9e9ead95f41be879fc67 /xfa/fxfa/app/xfa_ffwidget.cpp
parent59ce240d509a3079dab64f891a5363b11d4de3c7 (diff)
downloadpdfium-935d8d5dcbf1da2b3198675428cbf7ca0406788f.tar.xz
XFA_WIDGETSTATUS cleanup.
This CL moves all of the XFA_WIDGETSTATUS values into a single enum instead of multiple defines. The values are also normalized. The name was updated to be XFA_WidgetStatus. The XFA_WIDGETFILTER and XFA_LAYOUTSTATUS defines had to match up to XFA_WIDGETSTATUS. This Cl replaces those so we just have a single enum to work with. Review-Url: https://codereview.chromium.org/1986503002
Diffstat (limited to 'xfa/fxfa/app/xfa_ffwidget.cpp')
-rw-r--r--xfa/fxfa/app/xfa_ffwidget.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/xfa/fxfa/app/xfa_ffwidget.cpp b/xfa/fxfa/app/xfa_ffwidget.cpp
index 5f141e4e84..3af84a6bbe 100644
--- a/xfa/fxfa/app/xfa_ffwidget.cpp
+++ b/xfa/fxfa/app/xfa_ffwidget.cpp
@@ -39,14 +39,14 @@ void CXFA_FFWidget::SetPageView(CXFA_FFPageView* pPageView) {
m_pPageView = pPageView;
}
void CXFA_FFWidget::GetWidgetRect(CFX_RectF& rtWidget) {
- if ((m_dwStatus & XFA_WIDGETSTATUS_RectCached) == 0) {
- m_dwStatus |= XFA_WIDGETSTATUS_RectCached;
+ if ((m_dwStatus & XFA_WidgetStatus_RectCached) == 0) {
+ m_dwStatus |= XFA_WidgetStatus_RectCached;
GetRect(m_rtWidget);
}
rtWidget = m_rtWidget;
}
CFX_RectF CXFA_FFWidget::ReCacheWidgetRect() {
- m_dwStatus |= XFA_WIDGETSTATUS_RectCached;
+ m_dwStatus |= XFA_WidgetStatus_RectCached;
GetRect(m_rtWidget);
return m_rtWidget;
}
@@ -146,7 +146,7 @@ void CXFA_FFWidget::DrawBorder(CFX_Graphics* pGS,
void CXFA_FFWidget::InvalidateWidget(const CFX_RectF* pRect) {
if (!pRect) {
CFX_RectF rtWidget;
- GetBBox(rtWidget, XFA_WIDGETSTATUS_Focused);
+ GetBBox(rtWidget, XFA_WidgetStatus_Focused);
rtWidget.Inflate(2, 2);
GetDoc()->GetDocProvider()->InvalidateRect(m_pPageView, rtWidget,
XFA_INVALIDATE_CurrentPage);
@@ -160,7 +160,7 @@ void CXFA_FFWidget::AddInvalidateRect(const CFX_RectF* pRect) {
if (pRect) {
rtWidget = *pRect;
} else {
- GetBBox(rtWidget, XFA_WIDGETSTATUS_Focused);
+ GetBBox(rtWidget, XFA_WidgetStatus_Focused);
rtWidget.Inflate(2, 2);
}
m_pDocView->AddInvalidateRect(m_pPageView, rtWidget);
@@ -175,7 +175,7 @@ FX_BOOL CXFA_FFWidget::GetCaptionText(CFX_WideString& wsCap) {
}
bool CXFA_FFWidget::IsFocused() {
- return !!(m_dwStatus & XFA_WIDGETSTATUS_Focused);
+ return !!(m_dwStatus & XFA_WidgetStatus_Focused);
}
FX_BOOL CXFA_FFWidget::OnMouseEnter() {
@@ -225,7 +225,7 @@ FX_BOOL CXFA_FFWidget::OnSetFocus(CXFA_FFWidget* pOldWidget) {
if (pParent && !pParent->IsAncestorOf(pOldWidget)) {
pParent->OnSetFocus(pOldWidget);
}
- m_dwStatus |= XFA_WIDGETSTATUS_Focused;
+ m_dwStatus |= XFA_WidgetStatus_Focused;
CXFA_EventParam eParam;
eParam.m_eType = XFA_EVENT_Enter;
eParam.m_pTarget = m_pDataAcc;
@@ -233,7 +233,7 @@ FX_BOOL CXFA_FFWidget::OnSetFocus(CXFA_FFWidget* pOldWidget) {
return TRUE;
}
FX_BOOL CXFA_FFWidget::OnKillFocus(CXFA_FFWidget* pNewWidget) {
- m_dwStatus &= ~XFA_WIDGETSTATUS_Focused;
+ m_dwStatus &= ~XFA_WidgetStatus_Focused;
EventKillFocus();
if (pNewWidget) {
CXFA_FFWidget* pParent = GetParent();
@@ -405,12 +405,12 @@ void CXFA_FFWidget::GetMinMaxHeight(FX_FLOAT fMinHeight, FX_FLOAT fMaxHeight) {
}
bool CXFA_FFWidget::IsMatchVisibleStatus(uint32_t dwStatus) {
- return !!(m_dwStatus & XFA_WIDGETSTATUS_Visible);
+ return !!(m_dwStatus & XFA_WidgetStatus_Visible);
}
void CXFA_FFWidget::EventKillFocus() {
- if (m_dwStatus & XFA_WIDGETSTATUS_Access) {
- m_dwStatus &= ~XFA_WIDGETSTATUS_Access;
+ if (m_dwStatus & XFA_WidgetStatus_Access) {
+ m_dwStatus &= ~XFA_WidgetStatus_Access;
return;
}
CXFA_EventParam eParam;
@@ -419,11 +419,11 @@ void CXFA_FFWidget::EventKillFocus() {
m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Exit, &eParam);
}
FX_BOOL CXFA_FFWidget::IsButtonDown() {
- return (m_dwStatus & XFA_WIDGETSTATUS_ButtonDown) != 0;
+ return (m_dwStatus & XFA_WidgetStatus_ButtonDown) != 0;
}
void CXFA_FFWidget::SetButtonDown(FX_BOOL bSet) {
- bSet ? m_dwStatus |= XFA_WIDGETSTATUS_ButtonDown
- : m_dwStatus &= ~XFA_WIDGETSTATUS_ButtonDown;
+ bSet ? m_dwStatus |= XFA_WidgetStatus_ButtonDown
+ : m_dwStatus &= ~XFA_WidgetStatus_ButtonDown;
}
int32_t XFA_StrokeTypeSetLineDash(CFX_Graphics* pGraphics,
int32_t iStrokeType,