summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffnotify.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/cxfa_ffnotify.cpp')
-rw-r--r--xfa/fxfa/cxfa_ffnotify.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/xfa/fxfa/cxfa_ffnotify.cpp b/xfa/fxfa/cxfa_ffnotify.cpp
index 616edf7507..c7872f662b 100644
--- a/xfa/fxfa/cxfa_ffnotify.cpp
+++ b/xfa/fxfa/cxfa_ffnotify.cpp
@@ -70,8 +70,9 @@ void CXFA_FFNotify::OnWidgetListItemAdded(CXFA_WidgetAcc* pSender,
if (pSender->GetUIType() != XFA_Element::ChoiceList)
return;
- CXFA_FFWidget* pWidget = nullptr;
- while ((pWidget = pSender->GetNextWidget(pWidget)) != nullptr) {
+ CXFA_FFWidget* pWidget =
+ m_pDoc->GetDocView()->GetWidgetForNode(pSender->GetNode());
+ for (; pWidget; pWidget = pSender->GetNextWidget(pWidget)) {
if (pWidget->IsLoaded()) {
if (pSender->IsListBox())
ToListBox(pWidget)->InsertItem(pLabel, iIndex);
@@ -86,8 +87,9 @@ void CXFA_FFNotify::OnWidgetListItemRemoved(CXFA_WidgetAcc* pSender,
if (pSender->GetUIType() != XFA_Element::ChoiceList)
return;
- CXFA_FFWidget* pWidget = nullptr;
- while ((pWidget = pSender->GetNextWidget(pWidget)) != nullptr) {
+ CXFA_FFWidget* pWidget =
+ m_pDoc->GetDocView()->GetWidgetForNode(pSender->GetNode());
+ for (; pWidget; pWidget = pSender->GetNextWidget(pWidget)) {
if (pWidget->IsLoaded()) {
if (pSender->IsListBox())
ToListBox(pWidget)->DeleteItem(iIndex);
@@ -369,8 +371,9 @@ void CXFA_FFNotify::OnValueChanging(CXFA_Node* pSender, XFA_Attribute eAttr) {
if (!pWidgetAcc)
return;
- CXFA_FFWidget* pWidget = nullptr;
- while ((pWidget = pWidgetAcc->GetNextWidget(pWidget)) != nullptr) {
+ CXFA_FFWidget* pWidget =
+ m_pDoc->GetDocView()->GetWidgetForNode(pWidgetAcc->GetNode());
+ for (; pWidget; pWidget = pWidgetAcc->GetNextWidget(pWidget)) {
if (pWidget->IsLoaded())
pWidget->AddInvalidateRect();
}
@@ -432,8 +435,9 @@ void CXFA_FFNotify::OnValueChanged(CXFA_Node* pSender,
}
}
- CXFA_FFWidget* pWidget = nullptr;
- while ((pWidget = pWidgetAcc->GetNextWidget(pWidget)) != nullptr) {
+ CXFA_FFWidget* pWidget =
+ m_pDoc->GetDocView()->GetWidgetForNode(pWidgetAcc->GetNode());
+ for (; pWidget; pWidget = pWidgetAcc->GetNextWidget(pWidget)) {
if (!pWidget->IsLoaded())
continue;