diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-01-02 17:17:02 -0500 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-01-03 19:54:37 +0000 |
commit | c8fd3318a8deca3e1eabd6f7a9449ae4a0fa964d (patch) | |
tree | a5aedd888a3981f53722b7d65ea969d246f267c8 /xfa/fxfa/app/xfa_fffield.cpp | |
parent | db194cf018069b930d0e3d5fc0242e14f70e8620 (diff) | |
download | pdfium-c8fd3318a8deca3e1eabd6f7a9449ae4a0fa964d.tar.xz |
Cleaning out params in CPDFXFA_Context
This CL cleans up some of the out params in CPDFXFA_Context. In the process
several of the strings returned by ::LoadString() are inlined in their
call sites and the defines removed.
BUG=pdfium:549
Change-Id: I41a7ceeba3962299eecd0cb714ddb03d28dbb0ea
Reviewed-on: https://pdfium-review.googlesource.com/2134
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/app/xfa_fffield.cpp')
-rw-r--r-- | xfa/fxfa/app/xfa_fffield.cpp | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/xfa/fxfa/app/xfa_fffield.cpp b/xfa/fxfa/app/xfa_fffield.cpp index 68db2ba765..2e15696ab7 100644 --- a/xfa/fxfa/app/xfa_fffield.cpp +++ b/xfa/fxfa/app/xfa_fffield.cpp @@ -687,13 +687,8 @@ int32_t CXFA_FFField::CalculateWidgetAcc(CXFA_WidgetAcc* pAcc) { } IXFA_AppProvider* pAppProvider = GetApp()->GetAppProvider(); if (pAppProvider) { - CFX_WideString wsMessage; - CFX_WideString wsWarning; - pAppProvider->LoadString(XFA_IDS_NotModifyField, wsWarning); - wsMessage += wsWarning; - CFX_WideString wsTitle; - pAppProvider->LoadString(XFA_IDS_CalcOverride, wsTitle); - pAppProvider->MsgBox(wsMessage, wsTitle, XFA_MBICON_Warning, + pAppProvider->MsgBox(L"You are not allowed to modify this field.", + L"Calculate Override", XFA_MBICON_Warning, XFA_MB_OK); } } @@ -717,15 +712,11 @@ int32_t CXFA_FFField::CalculateWidgetAcc(CXFA_WidgetAcc* pAcc) { if (pAppProvider) { CFX_WideString wsMessage; calc.GetMessageText(wsMessage); - if (!wsMessage.IsEmpty()) { + if (!wsMessage.IsEmpty()) wsMessage += L"\r\n"; - } - CFX_WideString wsWarning; - pAppProvider->LoadString(XFA_IDS_ModifyField, wsWarning); - wsMessage += wsWarning; - CFX_WideString wsTitle; - pAppProvider->LoadString(XFA_IDS_CalcOverride, wsTitle); - if (pAppProvider->MsgBox(wsMessage, wsTitle, XFA_MBICON_Warning, + wsMessage += L"Are you sure you want to modify this field?"; + if (pAppProvider->MsgBox(wsMessage, L"Calculate Override", + XFA_MBICON_Warning, XFA_MB_YesNo) == XFA_IDYes) { pAcc->GetNode()->SetFlag(XFA_NodeFlag_UserInteractive, false); return 1; |