diff options
author | tsepez <tsepez@chromium.org> | 2016-05-16 12:03:24 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-05-16 12:03:24 -0700 |
commit | 3f80c864d5318d4d80ac811d42c92d8f63e0b5ac (patch) | |
tree | efc4acca871bfb2fb1af80f5ee5779ac6ef70034 /xfa/fxfa/app/xfa_fffield.cpp | |
parent | b22504a8c589ff39a1d6eaa83dcd3ead454d3443 (diff) | |
download | pdfium-3f80c864d5318d4d80ac811d42c92d8f63e0b5ac.tar.xz |
Remove some c_str() calls from StringCs in xfa docs.
Avoids the risk of possibly getting a non-null terminated
buffer if the StringC happened to be created by Mid(), etc.
Doesn't seem to happen in practice.
Review-Url: https://codereview.chromium.org/1983683003
Diffstat (limited to 'xfa/fxfa/app/xfa_fffield.cpp')
-rw-r--r-- | xfa/fxfa/app/xfa_fffield.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/xfa/fxfa/app/xfa_fffield.cpp b/xfa/fxfa/app/xfa_fffield.cpp index cb65a0b9a9..7cf0c6e3fc 100644 --- a/xfa/fxfa/app/xfa_fffield.cpp +++ b/xfa/fxfa/app/xfa_fffield.cpp @@ -725,8 +725,8 @@ int32_t CXFA_FFField::CalculateWidgetAcc(CXFA_WidgetAcc* pAcc) { wsMessage += wsWarning; CFX_WideString wsTitle; pAppProvider->LoadString(XFA_IDS_CalcOverride, wsTitle); - pAppProvider->MsgBox(wsMessage.AsStringC(), wsTitle.AsStringC(), - XFA_MBICON_Warning, XFA_MB_OK); + pAppProvider->MsgBox(wsMessage, wsTitle, XFA_MBICON_Warning, + XFA_MB_OK); } } return 0; @@ -757,8 +757,7 @@ int32_t CXFA_FFField::CalculateWidgetAcc(CXFA_WidgetAcc* pAcc) { wsMessage += wsWarning; CFX_WideString wsTitle; pAppProvider->LoadString(XFA_IDS_CalcOverride, wsTitle); - if (pAppProvider->MsgBox(wsMessage.AsStringC(), wsTitle.AsStringC(), - XFA_MBICON_Warning, + if (pAppProvider->MsgBox(wsMessage, wsTitle, XFA_MBICON_Warning, XFA_MB_YesNo) == XFA_IDYes) { pAcc->GetNode()->SetFlag(XFA_NODEFLAG_UserInteractive, false); return 1; |