summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/cpdfsdk_widget.cpp19
-rw-r--r--fpdfsdk/fpdfsave.cpp5
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp4
3 files changed, 13 insertions, 15 deletions
diff --git a/fpdfsdk/cpdfsdk_widget.cpp b/fpdfsdk/cpdfsdk_widget.cpp
index 184c223736..ffb4dde286 100644
--- a/fpdfsdk/cpdfsdk_widget.cpp
+++ b/fpdfsdk/cpdfsdk_widget.cpp
@@ -210,7 +210,7 @@ bool CPDFSDK_Widget::HasXFAAAction(PDFSDK_XFAAActionType eXFAAAT) {
if (CXFA_FFWidget* hGroupWidget = GetGroupMixXFAWidget()) {
CXFA_Node* node = hGroupWidget->GetNode();
if (node->IsWidgetReady()) {
- if (pXFAWidgetHandler->HasEvent(node->GetWidgetAcc(), eEventType))
+ if (pXFAWidgetHandler->HasEvent(node, eEventType))
return true;
}
}
@@ -218,7 +218,7 @@ bool CPDFSDK_Widget::HasXFAAAction(PDFSDK_XFAAActionType eXFAAAT) {
CXFA_Node* node = hWidget->GetNode();
if (!node->IsWidgetReady())
return false;
- return pXFAWidgetHandler->HasEvent(node->GetWidgetAcc(), eEventType);
+ return pXFAWidgetHandler->HasEvent(node, eEventType);
}
bool CPDFSDK_Widget::OnXFAAAction(PDFSDK_XFAAActionType eXFAAAT,
@@ -263,9 +263,8 @@ bool CPDFSDK_Widget::OnXFAAAction(PDFSDK_XFAAActionType eXFAAAT,
if (!node->IsWidgetReady())
return false;
- CXFA_WidgetAcc* pAcc = node->GetWidgetAcc();
- param.m_pTarget = pAcc;
- if (pXFAWidgetHandler->ProcessEvent(pAcc, &param) !=
+ param.m_pTarget = node->GetWidgetAcc();
+ if (pXFAWidgetHandler->ProcessEvent(node, &param) !=
XFA_EVENTERROR_Success) {
return false;
}
@@ -275,9 +274,8 @@ bool CPDFSDK_Widget::OnXFAAAction(PDFSDK_XFAAActionType eXFAAAT,
int32_t nRet = XFA_EVENTERROR_NotExist;
CXFA_Node* node = hWidget->GetNode();
if (node->IsWidgetReady()) {
- CXFA_WidgetAcc* pAcc = node->GetWidgetAcc();
- param.m_pTarget = pAcc;
- nRet = pXFAWidgetHandler->ProcessEvent(pAcc, &param);
+ param.m_pTarget = node->GetWidgetAcc();
+ nRet = pXFAWidgetHandler->ProcessEvent(node, &param);
}
if (CXFA_FFDocView* pDocView = pContext->GetXFADocView())
pDocView->UpdateDocView();
@@ -1018,9 +1016,8 @@ bool CPDFSDK_Widget::OnAAction(CPDF_AAction::AActionType type,
int32_t nRet = XFA_EVENTERROR_NotExist;
CXFA_Node* node = hWidget->GetNode();
if (node->IsWidgetReady()) {
- CXFA_WidgetAcc* pAcc = node->GetWidgetAcc();
- param.m_pTarget = pAcc;
- nRet = pXFAWidgetHandler->ProcessEvent(pAcc, &param);
+ param.m_pTarget = node->GetWidgetAcc();
+ nRet = pXFAWidgetHandler->ProcessEvent(node, &param);
}
if (CXFA_FFDocView* pDocView = pContext->GetXFADocView())
diff --git a/fpdfsdk/fpdfsave.cpp b/fpdfsdk/fpdfsave.cpp
index ddbc994577..b4d4a4107a 100644
--- a/fpdfsdk/fpdfsave.cpp
+++ b/fpdfsdk/fpdfsave.cpp
@@ -31,6 +31,7 @@
#include "xfa/fxfa/cxfa_ffapp.h"
#include "xfa/fxfa/cxfa_ffdocview.h"
#include "xfa/fxfa/cxfa_ffwidgethandler.h"
+#include "xfa/fxfa/cxfa_widgetacc.h"
#include "xfa/fxfa/cxfa_widgetacciterator.h"
#include "xfa/fxfa/parser/cxfa_object.h"
#endif
@@ -209,7 +210,7 @@ bool SendPostSaveToXFADoc(CPDFXFA_Context* pContext) {
while (CXFA_WidgetAcc* pWidgetAcc = pWidgetAccIterator->MoveToNext()) {
CXFA_EventParam preParam;
preParam.m_eType = XFA_EVENT_PostSave;
- pWidgetHandler->ProcessEvent(pWidgetAcc, &preParam);
+ pWidgetHandler->ProcessEvent(pWidgetAcc->GetNode(), &preParam);
}
pXFADocView->UpdateDocView();
pContext->ClearChangeMark();
@@ -231,7 +232,7 @@ bool SendPreSaveToXFADoc(CPDFXFA_Context* pContext,
while (CXFA_WidgetAcc* pWidgetAcc = pWidgetAccIterator->MoveToNext()) {
CXFA_EventParam preParam;
preParam.m_eType = XFA_EVENT_PreSave;
- pWidgetHandler->ProcessEvent(pWidgetAcc, &preParam);
+ pWidgetHandler->ProcessEvent(pWidgetAcc->GetNode(), &preParam);
}
pXFADocView->UpdateDocView();
return SaveXFADocumentData(pContext, fileList);
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
index a1bea0d7d5..9735584369 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
@@ -626,7 +626,7 @@ bool CPDFXFA_DocEnvironment::OnBeforeNotifySubmit() {
CXFA_EventParam Param;
Param.m_eType = XFA_EVENT_PreSubmit;
while (CXFA_WidgetAcc* pWidgetAcc = pWidgetAccIterator->MoveToNext())
- pWidgetHandler->ProcessEvent(pWidgetAcc, &Param);
+ pWidgetHandler->ProcessEvent(pWidgetAcc->GetNode(), &Param);
}
pWidgetAccIterator = docView->CreateWidgetAccIterator();
@@ -678,7 +678,7 @@ void CPDFXFA_DocEnvironment::OnAfterNotifySubmit() {
Param.m_eType = XFA_EVENT_PostSubmit;
CXFA_WidgetAcc* pWidgetAcc = pWidgetAccIterator->MoveToNext();
while (pWidgetAcc) {
- pWidgetHandler->ProcessEvent(pWidgetAcc, &Param);
+ pWidgetHandler->ProcessEvent(pWidgetAcc->GetNode(), &Param);
pWidgetAcc = pWidgetAccIterator->MoveToNext();
}
m_pContext->GetXFADocView()->UpdateDocView();