summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app
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
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')
-rw-r--r--xfa/fxfa/app/xfa_ffdocview.cpp10
-rw-r--r--xfa/fxfa/app/xfa_fffield.cpp8
-rw-r--r--xfa/fxfa/app/xfa_ffnotify.cpp10
-rw-r--r--xfa/fxfa/app/xfa_ffpageview.cpp66
-rw-r--r--xfa/fxfa/app/xfa_fftextedit.cpp18
-rw-r--r--xfa/fxfa/app/xfa_ffwidget.cpp28
-rw-r--r--xfa/fxfa/app/xfa_ffwidgethandler.cpp4
-rw-r--r--xfa/fxfa/app/xfa_rendercontext.cpp10
8 files changed, 78 insertions, 76 deletions
diff --git a/xfa/fxfa/app/xfa_ffdocview.cpp b/xfa/fxfa/app/xfa_ffdocview.cpp
index 4a610495dd..faf5c8baff 100644
--- a/xfa/fxfa/app/xfa_ffdocview.cpp
+++ b/xfa/fxfa/app/xfa_ffdocview.cpp
@@ -329,7 +329,7 @@ CXFA_FFWidget* CXFA_FFDocView::GetFocusWidget() {
}
void CXFA_FFDocView::KillFocus() {
if (m_pFocusWidget &&
- (m_pFocusWidget->GetStatus() & XFA_WIDGETSTATUS_Focused)) {
+ (m_pFocusWidget->GetStatus() & XFA_WidgetStatus_Focused)) {
(m_pFocusWidget)->OnKillFocus(NULL);
}
m_pFocusAcc = NULL;
@@ -345,10 +345,10 @@ FX_BOOL CXFA_FFDocView::SetFocus(CXFA_FFWidget* hWidget) {
m_pOldFocusWidget = pNewFocus;
if (pOldFocus) {
if (m_pFocusWidget != m_pOldFocusWidget &&
- (pOldFocus->GetStatus() & XFA_WIDGETSTATUS_Focused)) {
+ (pOldFocus->GetStatus() & XFA_WidgetStatus_Focused)) {
m_pFocusWidget = pOldFocus;
pOldFocus->OnKillFocus(pNewFocus);
- } else if ((pOldFocus->GetStatus() & XFA_WIDGETSTATUS_Visible)) {
+ } else if ((pOldFocus->GetStatus() & XFA_WidgetStatus_Visible)) {
if (!pOldFocus->IsLoaded()) {
pOldFocus->LoadWidget();
}
@@ -368,7 +368,7 @@ FX_BOOL CXFA_FFDocView::SetFocus(CXFA_FFWidget* hWidget) {
m_pOldFocusWidget = NULL;
return FALSE;
}
- if (pNewFocus && (pNewFocus->GetStatus() & XFA_WIDGETSTATUS_Visible)) {
+ if (pNewFocus && (pNewFocus->GetStatus() & XFA_WidgetStatus_Visible)) {
if (!pNewFocus->IsLoaded()) {
pNewFocus->LoadWidget();
}
@@ -844,7 +844,7 @@ CXFA_FFWidget* CXFA_FFDocWidgetIterator::MoveToNext() {
if (CXFA_WidgetAcc* pAcc = (CXFA_WidgetAcc*)pItem->GetWidgetData()) {
while ((m_pCurWidget = pAcc->GetNextWidget(NULL))) {
if (!m_pCurWidget->IsLoaded() &&
- (m_pCurWidget->GetStatus() & XFA_WIDGETSTATUS_Visible)) {
+ (m_pCurWidget->GetStatus() & XFA_WidgetStatus_Visible)) {
m_pCurWidget->LoadWidget();
}
return m_pCurWidget;
diff --git a/xfa/fxfa/app/xfa_fffield.cpp b/xfa/fxfa/app/xfa_fffield.cpp
index 7cf0c6e3fc..5b70caa924 100644
--- a/xfa/fxfa/app/xfa_fffield.cpp
+++ b/xfa/fxfa/app/xfa_fffield.cpp
@@ -81,7 +81,7 @@ void CXFA_FFField::DrawHighlight(CFX_Graphics* pGS,
if (m_rtUI.IsEmpty() || !m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) {
return;
}
- if ((dwStatus & XFA_WIDGETSTATUS_Highlight) &&
+ if ((dwStatus & XFA_WidgetStatus_Highlight) &&
m_pDataAcc->GetAccess() == XFA_ATTRIBUTEENUM_Open) {
CXFA_FFDoc* pDoc = GetDoc();
CFX_Color crHighlight(pDoc->GetDocProvider()->GetHighlightColor(pDoc));
@@ -97,7 +97,7 @@ void CXFA_FFField::DrawHighlight(CFX_Graphics* pGS,
}
}
void CXFA_FFField::DrawFocus(CFX_Graphics* pGS, CFX_Matrix* pMatrix) {
- if (m_dwStatus & XFA_WIDGETSTATUS_Focused) {
+ if (m_dwStatus & XFA_WidgetStatus_Focused) {
CFX_Color cr(0xFF000000);
pGS->SetStrokeColor(&cr);
FX_FLOAT DashPattern[2] = {1, 1};
@@ -533,7 +533,7 @@ FX_BOOL CXFA_FFField::OnSetFocus(CXFA_FFWidget* pOldWidget) {
ms.m_pDstTarget = m_pNormalWidget->m_pIface;
ms.m_pSrcTarget = NULL;
TranslateFWLMessage(&ms);
- m_dwStatus |= XFA_WIDGETSTATUS_Focused;
+ m_dwStatus |= XFA_WidgetStatus_Focused;
AddInvalidateRect();
return TRUE;
}
@@ -545,7 +545,7 @@ FX_BOOL CXFA_FFField::OnKillFocus(CXFA_FFWidget* pNewWidget) {
ms.m_pDstTarget = m_pNormalWidget->m_pIface;
ms.m_pSrcTarget = NULL;
TranslateFWLMessage(&ms);
- m_dwStatus &= ~XFA_WIDGETSTATUS_Focused;
+ m_dwStatus &= ~XFA_WidgetStatus_Focused;
AddInvalidateRect();
CXFA_FFWidget::OnKillFocus(pNewWidget);
return TRUE;
diff --git a/xfa/fxfa/app/xfa_ffnotify.cpp b/xfa/fxfa/app/xfa_ffnotify.cpp
index a28888e7d8..4d7d4799f2 100644
--- a/xfa/fxfa/app/xfa_ffnotify.cpp
+++ b/xfa/fxfa/app/xfa_ffnotify.cpp
@@ -473,18 +473,18 @@ void CXFA_FFNotify::OnLayoutItemAdded(CXFA_LayoutProcessor* pLayout,
return;
CXFA_FFPageView* pNewPageView = pDocView->GetPageView(iPageIdx);
- uint32_t dwFilter = XFA_WIDGETSTATUS_Visible | XFA_WIDGETSTATUS_Viewable |
- XFA_WIDGETSTATUS_Printable;
+ uint32_t dwFilter = XFA_WidgetStatus_Visible | XFA_WidgetStatus_Viewable |
+ XFA_WidgetStatus_Printable;
pWidget->ModifyStatus(dwStatus, dwFilter);
CXFA_FFPageView* pPrePageView = pWidget->GetPageView();
if (pPrePageView != pNewPageView ||
- (dwStatus & (XFA_WIDGETSTATUS_Visible | XFA_WIDGETSTATUS_Viewable)) ==
- (XFA_WIDGETSTATUS_Visible | XFA_WIDGETSTATUS_Viewable)) {
+ (dwStatus & (XFA_WidgetStatus_Visible | XFA_WidgetStatus_Viewable)) ==
+ (XFA_WidgetStatus_Visible | XFA_WidgetStatus_Viewable)) {
pWidget->SetPageView(pNewPageView);
m_pDoc->GetDocProvider()->WidgetPostAdd(pWidget, pWidget->GetDataAcc());
}
if (pDocView->GetLayoutStatus() != XFA_DOCVIEW_LAYOUTSTATUS_End ||
- !(dwStatus & XFA_WIDGETSTATUS_Visible)) {
+ !(dwStatus & XFA_WidgetStatus_Visible)) {
return;
}
if (pWidget->IsLoaded()) {
diff --git a/xfa/fxfa/app/xfa_ffpageview.cpp b/xfa/fxfa/app/xfa_ffpageview.cpp
index e5a05734dc..16461eb07c 100644
--- a/xfa/fxfa/app/xfa_ffpageview.cpp
+++ b/xfa/fxfa/app/xfa_ffpageview.cpp
@@ -69,7 +69,30 @@ void GetPageMatrix(CFX_Matrix& pageMatrix,
pageMatrix = m;
}
+bool PageWidgetFilter(CXFA_FFWidget* pWidget,
+ uint32_t dwFilter,
+ FX_BOOL bTraversal,
+ FX_BOOL bIgnorerelevant) {
+ CXFA_WidgetAcc* pWidgetAcc = pWidget->GetDataAcc();
+
+ if (!!(dwFilter & XFA_WidgetStatus_Focused) &&
+ pWidgetAcc->GetClassID() != XFA_ELEMENT_Field) {
+ return false;
+ }
+
+ uint32_t dwStatus = pWidget->GetStatus();
+ if (bTraversal && (dwStatus & XFA_WidgetStatus_Disabled))
+ return false;
+ if (bIgnorerelevant)
+ return !!(dwStatus & XFA_WidgetStatus_Visible);
+
+ dwFilter &= (XFA_WidgetStatus_Visible | XFA_WidgetStatus_Viewable |
+ XFA_WidgetStatus_Printable);
+ return (dwFilter & dwStatus) == dwFilter;
+}
+
} // namespace
+
CXFA_FFPageView::CXFA_FFPageView(CXFA_FFDocView* pDocView, CXFA_Node* pPageArea)
: CXFA_ContainerLayoutItem(pPageArea), m_pDocView(pDocView) {}
@@ -110,27 +133,6 @@ IXFA_WidgetIterator* CXFA_FFPageView::CreateWidgetIterator(
return nullptr;
}
-static FX_BOOL XFA_PageWidgetFilter(CXFA_FFWidget* pWidget,
- uint32_t dwFilter,
- FX_BOOL bTraversal,
- FX_BOOL bIgnorerelevant) {
- CXFA_WidgetAcc* pWidgetAcc = pWidget->GetDataAcc();
- uint32_t dwType = dwFilter & XFA_WIDGETFILTER_AllType;
- if ((dwType == XFA_WIDGETFILTER_Field) &&
- (pWidgetAcc->GetClassID() != XFA_ELEMENT_Field)) {
- return FALSE;
- }
- uint32_t dwStatus = pWidget->GetStatus();
- if (bTraversal && (dwStatus & XFA_WIDGETSTATUS_Disabled)) {
- return FALSE;
- }
- if (bIgnorerelevant) {
- return (dwStatus & XFA_WIDGETFILTER_Visible) != 0;
- }
- dwFilter &= (XFA_WIDGETFILTER_Visible | XFA_WIDGETFILTER_Viewable |
- XFA_WIDGETFILTER_Printable);
- return (dwFilter & dwStatus) == dwFilter;
-}
CXFA_FFPageWidgetIterator::CXFA_FFPageWidgetIterator(CXFA_FFPageView* pPageView,
uint32_t dwFilter) {
m_pPageView = pPageView;
@@ -186,11 +188,11 @@ FX_BOOL CXFA_FFPageWidgetIterator::SetCurrentWidget(CXFA_FFWidget* hWidget) {
CXFA_FFWidget* CXFA_FFPageWidgetIterator::GetWidget(
CXFA_LayoutItem* pLayoutItem) {
if (CXFA_FFWidget* pWidget = XFA_GetWidgetFromLayoutItem(pLayoutItem)) {
- if (!XFA_PageWidgetFilter(pWidget, m_dwFilter, FALSE, m_bIgnorerelevant)) {
+ if (!PageWidgetFilter(pWidget, m_dwFilter, FALSE, m_bIgnorerelevant)) {
return NULL;
}
if (!pWidget->IsLoaded() &&
- (pWidget->GetStatus() & XFA_WIDGETSTATUS_Visible) != 0) {
+ (pWidget->GetStatus() & XFA_WidgetStatus_Visible) != 0) {
pWidget->LoadWidget();
}
return pWidget;
@@ -217,8 +219,8 @@ void CXFA_FFTabOrderPageWidgetIterator::Reset() {
CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::MoveToFirst() {
if (m_TabOrderWidgetArray.GetSize() > 0) {
for (int32_t i = 0; i < m_TabOrderWidgetArray.GetSize(); i++) {
- if (XFA_PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, TRUE,
- m_bIgnorerelevant)) {
+ if (PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, TRUE,
+ m_bIgnorerelevant)) {
m_iCurWidget = i;
return m_TabOrderWidgetArray[m_iCurWidget];
}
@@ -229,8 +231,8 @@ CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::MoveToFirst() {
CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::MoveToLast() {
if (m_TabOrderWidgetArray.GetSize() > 0) {
for (int32_t i = m_TabOrderWidgetArray.GetSize() - 1; i >= 0; i--) {
- if (XFA_PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, TRUE,
- m_bIgnorerelevant)) {
+ if (PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, TRUE,
+ m_bIgnorerelevant)) {
m_iCurWidget = i;
return m_TabOrderWidgetArray[m_iCurWidget];
}
@@ -240,8 +242,8 @@ CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::MoveToLast() {
}
CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::MoveToNext() {
for (int32_t i = m_iCurWidget + 1; i < m_TabOrderWidgetArray.GetSize(); i++) {
- if (XFA_PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, TRUE,
- m_bIgnorerelevant)) {
+ if (PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, TRUE,
+ m_bIgnorerelevant)) {
m_iCurWidget = i;
return m_TabOrderWidgetArray[m_iCurWidget];
}
@@ -251,8 +253,8 @@ CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::MoveToNext() {
}
CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::MoveToPrevious() {
for (int32_t i = m_iCurWidget - 1; i >= 0; i--) {
- if (XFA_PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, TRUE,
- m_bIgnorerelevant)) {
+ if (PageWidgetFilter(m_TabOrderWidgetArray[i], m_dwFilter, TRUE,
+ m_bIgnorerelevant)) {
m_iCurWidget = i;
return m_TabOrderWidgetArray[m_iCurWidget];
}
@@ -427,7 +429,7 @@ CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::GetWidget(
CXFA_LayoutItem* pLayoutItem) {
if (CXFA_FFWidget* pWidget = XFA_GetWidgetFromLayoutItem(pLayoutItem)) {
if (!pWidget->IsLoaded() &&
- (pWidget->GetStatus() & XFA_WIDGETSTATUS_Visible)) {
+ (pWidget->GetStatus() & XFA_WidgetStatus_Visible)) {
pWidget->LoadWidget();
}
return pWidget;
diff --git a/xfa/fxfa/app/xfa_fftextedit.cpp b/xfa/fxfa/app/xfa_fftextedit.cpp
index ea641f2066..89c9d356bd 100644
--- a/xfa/fxfa/app/xfa_fftextedit.cpp
+++ b/xfa/fxfa/app/xfa_fftextedit.cpp
@@ -101,7 +101,7 @@ FX_BOOL CXFA_FFTextEdit::OnLButtonDown(uint32_t dwFlags,
return FALSE;
}
if (!IsFocused()) {
- m_dwStatus |= XFA_WIDGETSTATUS_Focused;
+ m_dwStatus |= XFA_WidgetStatus_Focused;
UpdateFWLData();
AddInvalidateRect();
}
@@ -126,7 +126,7 @@ FX_BOOL CXFA_FFTextEdit::OnRButtonDown(uint32_t dwFlags,
return FALSE;
}
if (!IsFocused()) {
- m_dwStatus |= XFA_WIDGETSTATUS_Focused;
+ m_dwStatus |= XFA_WidgetStatus_Focused;
UpdateFWLData();
AddInvalidateRect();
}
@@ -150,9 +150,9 @@ FX_BOOL CXFA_FFTextEdit::OnRButtonUp(uint32_t dwFlags,
return TRUE;
}
FX_BOOL CXFA_FFTextEdit::OnSetFocus(CXFA_FFWidget* pOldWidget) {
- m_dwStatus &= ~XFA_WIDGETSTATUS_TextEditValueChanged;
+ m_dwStatus &= ~XFA_WidgetStatus_TextEditValueChanged;
if (!IsFocused()) {
- m_dwStatus |= XFA_WIDGETSTATUS_Focused;
+ m_dwStatus |= XFA_WidgetStatus_Focused;
UpdateFWLData();
AddInvalidateRect();
}
@@ -168,13 +168,13 @@ FX_BOOL CXFA_FFTextEdit::OnKillFocus(CXFA_FFWidget* pNewWidget) {
ms.m_pDstTarget = m_pNormalWidget->m_pIface;
ms.m_pSrcTarget = NULL;
TranslateFWLMessage(&ms);
- m_dwStatus &= ~XFA_WIDGETSTATUS_Focused;
+ m_dwStatus &= ~XFA_WidgetStatus_Focused;
SetEditScrollOffset();
ProcessCommittedData();
UpdateFWLData();
AddInvalidateRect();
CXFA_FFWidget::OnKillFocus(pNewWidget);
- m_dwStatus &= ~XFA_WIDGETSTATUS_TextEditValueChanged;
+ m_dwStatus &= ~XFA_WidgetStatus_TextEditValueChanged;
return TRUE;
}
FX_BOOL CXFA_FFTextEdit::CommitData() {
@@ -205,7 +205,7 @@ void CXFA_FFTextEdit::ValidateNumberField(const CFX_WideString& wsText) {
}
}
FX_BOOL CXFA_FFTextEdit::IsDataChanged() {
- return (m_dwStatus & XFA_WIDGETSTATUS_TextEditValueChanged) != 0;
+ return (m_dwStatus & XFA_WidgetStatus_TextEditValueChanged) != 0;
}
uint32_t CXFA_FFTextEdit::GetAlignment() {
uint32_t dwExtendedStyle = 0;
@@ -356,7 +356,7 @@ FX_BOOL CXFA_FFTextEdit::ReplaceSpellCheckWord(
void CXFA_FFTextEdit::OnTextChanged(IFWL_Widget* pWidget,
const CFX_WideString& wsChanged,
const CFX_WideString& wsPrevText) {
- m_dwStatus |= XFA_WIDGETSTATUS_TextEditValueChanged;
+ m_dwStatus |= XFA_WidgetStatus_TextEditValueChanged;
CXFA_EventParam eParam;
eParam.m_eType = XFA_EVENT_Change;
eParam.m_wsChange = wsChanged;
@@ -712,7 +712,7 @@ FX_BOOL CXFA_FFDateTimeEdit::UpdateFWLData() {
return TRUE;
}
FX_BOOL CXFA_FFDateTimeEdit::IsDataChanged() {
- if (m_dwStatus & XFA_WIDGETSTATUS_TextEditValueChanged) {
+ if (m_dwStatus & XFA_WidgetStatus_TextEditValueChanged) {
return TRUE;
}
CFX_WideString wsText;
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,
diff --git a/xfa/fxfa/app/xfa_ffwidgethandler.cpp b/xfa/fxfa/app/xfa_ffwidgethandler.cpp
index 13cee333a5..027c3d9fa8 100644
--- a/xfa/fxfa/app/xfa_ffwidgethandler.cpp
+++ b/xfa/fxfa/app/xfa_ffwidgethandler.cpp
@@ -163,7 +163,7 @@ FX_BOOL CXFA_FFWidgetHandler::OnChar(CXFA_FFWidget* hWidget,
FWL_WidgetHit CXFA_FFWidgetHandler::OnHitTest(CXFA_FFWidget* hWidget,
FX_FLOAT fx,
FX_FLOAT fy) {
- if (!(hWidget->GetStatus() & XFA_WIDGETSTATUS_Visible))
+ if (!(hWidget->GetStatus() & XFA_WidgetStatus_Visible))
return FWL_WidgetHit::Unknown;
hWidget->Rotate2Normal(fx, fy);
@@ -182,7 +182,7 @@ void CXFA_FFWidgetHandler::RenderWidget(CXFA_FFWidget* hWidget,
CFX_Matrix* pMatrix,
FX_BOOL bHighlight) {
hWidget->RenderWidget(pGS, pMatrix,
- bHighlight ? XFA_WIDGETSTATUS_Highlight : 0, 0);
+ bHighlight ? XFA_WidgetStatus_Highlight : 0, 0);
}
FX_BOOL CXFA_FFWidgetHandler::HasEvent(CXFA_WidgetAcc* pWidgetAcc,
diff --git a/xfa/fxfa/app/xfa_rendercontext.cpp b/xfa/fxfa/app/xfa_rendercontext.cpp
index e7bacec281..7bfd9630cb 100644
--- a/xfa/fxfa/app/xfa_rendercontext.cpp
+++ b/xfa/fxfa/app/xfa_rendercontext.cpp
@@ -38,10 +38,10 @@ int32_t CXFA_RenderContext::StartRender(CXFA_FFPageView* pPageView,
mtRes.SetReverse(matrix);
m_rtClipRect.Set(rtPage.left, rtPage.top, rtPage.width, rtPage.height);
mtRes.TransformRect(m_rtClipRect);
- m_dwStatus = m_options.m_bHighlight ? XFA_WIDGETSTATUS_Highlight : 0;
- uint32_t dwFilterType = XFA_WIDGETFILTER_Visible | XFA_WIDGETFILTER_AllType |
- (m_options.m_bPrint ? XFA_WIDGETSTATUS_Printable
- : XFA_WIDGETSTATUS_Viewable);
+ m_dwStatus = m_options.m_bHighlight ? XFA_WidgetStatus_Highlight : 0;
+ uint32_t dwFilterType = XFA_WidgetStatus_Visible |
+ (m_options.m_bPrint ? XFA_WidgetStatus_Printable
+ : XFA_WidgetStatus_Viewable);
m_pWidgetIterator =
m_pPageView->CreateWidgetIterator(XFA_TRAVERSEWAY_Form, dwFilterType);
m_pWidget = m_pWidgetIterator->MoveToNext();
@@ -52,7 +52,7 @@ int32_t CXFA_RenderContext::DoRender(IFX_Pause* pPause) {
while (m_pWidget) {
CXFA_FFWidget* pWidget = (CXFA_FFWidget*)m_pWidget;
CFX_RectF rtWidgetBox;
- pWidget->GetBBox(rtWidgetBox, XFA_WIDGETSTATUS_Visible);
+ pWidget->GetBBox(rtWidgetBox, XFA_WidgetStatus_Visible);
rtWidgetBox.width += 1;
rtWidgetBox.height += 1;
if (rtWidgetBox.IntersectWith(m_rtClipRect)) {