From c3cc2ab66d3d8f52dea8083abb6775115e17af7d Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Thu, 21 Jun 2018 21:09:54 +0000 Subject: Clean up constant values for JS alert and beep Define constant values in the public API for the valid values of alert button type, alert icon type, and beep type. Replace various magic numbers through out the code base using these values. Also replace the XFA specific versions with an enum class that is guaranteed to have the same values, instead of #defines that just happen to. This CL does not attempt to add error checking on these values, since it currently doesn't exist so adding it may cause regressions. Change-Id: Ief3aee2a4ad419691c18fc1dba8b984ad222141b Reviewed-on: https://pdfium-review.googlesource.com/35730 Commit-Queue: Ryan Harrison Reviewed-by: dsinclair --- xfa/fxfa/cxfa_ffdocview.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'xfa/fxfa/cxfa_ffdocview.cpp') diff --git a/xfa/fxfa/cxfa_ffdocview.cpp b/xfa/fxfa/cxfa_ffdocview.cpp index 51277c91ae..400be36e76 100644 --- a/xfa/fxfa/cxfa_ffdocview.cpp +++ b/xfa/fxfa/cxfa_ffdocview.cpp @@ -156,8 +156,9 @@ void CXFA_FFDocView::ShowNullTestMsg() { L"validation errors not reported.", iRemain); } - pAppProvider->MsgBox(wsMsg, pAppProvider->GetAppTitle(), XFA_MBICON_Status, - XFA_MB_OK); + pAppProvider->MsgBox(wsMsg, pAppProvider->GetAppTitle(), + static_cast(AlertIcon::kStatus), + static_cast(AlertButton::kOK)); } m_arrNullTestMsg.clear(); } -- cgit v1.2.3