diff options
Diffstat (limited to 'xfa/fxfa/parser')
-rw-r--r-- | xfa/fxfa/parser/cxfa_node.cpp | 39 |
1 files changed, 27 insertions, 12 deletions
diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp index 00ea7b7a1b..86644694ca 100644 --- a/xfa/fxfa/parser/cxfa_node.cpp +++ b/xfa/fxfa/parser/cxfa_node.cpp @@ -2046,11 +2046,15 @@ void CXFA_Node::ProcessScriptTestValidate(CXFA_FFDocView* docView, wsScriptMsg = GetValidateMessage(false, bVersionFlag); if (bVersionFlag) { - pAppProvider->MsgBox(wsScriptMsg, wsTitle, XFA_MBICON_Warning, XFA_MB_OK); + pAppProvider->MsgBox(wsScriptMsg, wsTitle, + static_cast<uint32_t>(AlertIcon::kWarning), + static_cast<uint32_t>(AlertButton::kOK)); return; } - if (pAppProvider->MsgBox(wsScriptMsg, wsTitle, XFA_MBICON_Warning, - XFA_MB_YesNo) == XFA_IDYes) { + if (pAppProvider->MsgBox(wsScriptMsg, wsTitle, + static_cast<uint32_t>(AlertIcon::kWarning), + static_cast<uint32_t>(AlertButton::kYesNo)) == + static_cast<uint32_t>(AlertReturn::kYes)) { SetFlag(XFA_NodeFlag_UserInteractive); } return; @@ -2058,7 +2062,9 @@ void CXFA_Node::ProcessScriptTestValidate(CXFA_FFDocView* docView, if (wsScriptMsg.IsEmpty()) wsScriptMsg = GetValidateMessage(true, bVersionFlag); - pAppProvider->MsgBox(wsScriptMsg, wsTitle, XFA_MBICON_Error, XFA_MB_OK); + pAppProvider->MsgBox(wsScriptMsg, wsTitle, + static_cast<uint32_t>(AlertIcon::kError), + static_cast<uint32_t>(AlertButton::kOK)); } int32_t CXFA_Node::ProcessFormatTestValidate(CXFA_FFDocView* docView, @@ -2087,7 +2093,9 @@ int32_t CXFA_Node::ProcessFormatTestValidate(CXFA_FFDocView* docView, if (validate->GetFormatTest() == XFA_AttributeEnum::Error) { if (wsFormatMsg.IsEmpty()) wsFormatMsg = GetValidateMessage(true, bVersionFlag); - pAppProvider->MsgBox(wsFormatMsg, wsTitle, XFA_MBICON_Error, XFA_MB_OK); + pAppProvider->MsgBox(wsFormatMsg, wsTitle, + static_cast<uint32_t>(AlertIcon::kError), + static_cast<uint32_t>(AlertButton::kOK)); return XFA_EVENTERROR_Success; } if (IsUserInteractive()) @@ -2096,12 +2104,15 @@ int32_t CXFA_Node::ProcessFormatTestValidate(CXFA_FFDocView* docView, wsFormatMsg = GetValidateMessage(false, bVersionFlag); if (bVersionFlag) { - pAppProvider->MsgBox(wsFormatMsg, wsTitle, XFA_MBICON_Warning, - XFA_MB_OK); + pAppProvider->MsgBox(wsFormatMsg, wsTitle, + static_cast<uint32_t>(AlertIcon::kWarning), + static_cast<uint32_t>(AlertButton::kOK)); return XFA_EVENTERROR_Success; } - if (pAppProvider->MsgBox(wsFormatMsg, wsTitle, XFA_MBICON_Warning, - XFA_MB_YesNo) == XFA_IDYes) { + if (pAppProvider->MsgBox(wsFormatMsg, wsTitle, + static_cast<uint32_t>(AlertIcon::kWarning), + static_cast<uint32_t>(AlertButton::kYesNo)) == + static_cast<uint32_t>(AlertReturn::kYes)) { SetFlag(XFA_NodeFlag_UserInteractive); } return XFA_EVENTERROR_Success; @@ -2153,7 +2164,9 @@ int32_t CXFA_Node::ProcessNullTestValidate(CXFA_FFDocView* docView, wsNullMsg = WideString::Format(L"%ls cannot be blank.", wsCaptionName.c_str()); } - pAppProvider->MsgBox(wsNullMsg, wsTitle, XFA_MBICON_Status, XFA_MB_OK); + pAppProvider->MsgBox(wsNullMsg, wsTitle, + static_cast<uint32_t>(AlertIcon::kStatus), + static_cast<uint32_t>(AlertButton::kOK)); return XFA_EVENTERROR_Error; } case XFA_AttributeEnum::Warning: { @@ -2167,8 +2180,10 @@ int32_t CXFA_Node::ProcessNullTestValidate(CXFA_FFDocView* docView, L"Ignore.", wsCaptionName.c_str(), wsCaptionName.c_str()); } - if (pAppProvider->MsgBox(wsNullMsg, wsTitle, XFA_MBICON_Warning, - XFA_MB_YesNo) == XFA_IDYes) { + if (pAppProvider->MsgBox(wsNullMsg, wsTitle, + static_cast<uint32_t>(AlertIcon::kWarning), + static_cast<uint32_t>(AlertButton::kYesNo)) == + static_cast<uint32_t>(AlertReturn::kYes)) { SetFlag(XFA_NodeFlag_UserInteractive); } return XFA_EVENTERROR_Error; |