diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-11-22 22:04:12 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-11-22 22:04:12 +0000 |
commit | 9d0d36b7f3e2106bbeb332edf821fc2c637e6ea0 (patch) | |
tree | 6d1a17b202cdb73956e768c56c1316c0d163effb /xfa/fxfa/cxfa_widgetacc.cpp | |
parent | a1c4205eff6c8a0bb6a6abf58bbec06cb0fe22c5 (diff) | |
download | pdfium-9d0d36b7f3e2106bbeb332edf821fc2c637e6ea0.tar.xz |
Cleanup CXFA_ValidateData
This CL removes out-params in favour of returns; Makes params const;
Cleans up return types.
Change-Id: I2b7c237130a99859b08af0486a95b4c6f6974f62
Reviewed-on: https://pdfium-review.googlesource.com/19130
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_widgetacc.cpp')
-rw-r--r-- | xfa/fxfa/cxfa_widgetacc.cpp | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/xfa/fxfa/cxfa_widgetacc.cpp b/xfa/fxfa/cxfa_widgetacc.cpp index fcc1e69762..644b1688c0 100644 --- a/xfa/fxfa/cxfa_widgetacc.cpp +++ b/xfa/fxfa/cxfa_widgetacc.cpp @@ -356,10 +356,8 @@ void CXFA_WidgetAcc::ProcessScriptTestValidate(CXFA_ValidateData validateData, return; WideString wsTitle = pAppProvider->GetAppTitle(); - WideString wsScriptMsg; - validateData.GetScriptMessageText(wsScriptMsg); - int32_t eScriptTest = validateData.GetScriptTest(); - if (eScriptTest == XFA_ATTRIBUTEENUM_Warning) { + WideString wsScriptMsg = validateData.GetScriptMessageText(); + if (validateData.GetScriptTest() == XFA_ATTRIBUTEENUM_Warning) { if (GetNode()->IsUserInteractive()) return; if (wsScriptMsg.IsEmpty()) @@ -386,8 +384,7 @@ int32_t CXFA_WidgetAcc::ProcessFormatTestValidate( bool bVersionFlag) { WideString wsRawValue = GetRawValue(); if (!wsRawValue.IsEmpty()) { - WideString wsPicture; - validateData.GetPicture(wsPicture); + WideString wsPicture = validateData.GetPicture(); if (wsPicture.IsEmpty()) return XFA_EVENTERROR_NotExist; @@ -402,11 +399,9 @@ int32_t CXFA_WidgetAcc::ProcessFormatTestValidate( if (!pAppProvider) return XFA_EVENTERROR_NotExist; - WideString wsFormatMsg; - validateData.GetFormatMessageText(wsFormatMsg); + WideString wsFormatMsg = validateData.GetFormatMessageText(); WideString wsTitle = pAppProvider->GetAppTitle(); - int32_t eFormatTest = validateData.GetFormatTest(); - if (eFormatTest == XFA_ATTRIBUTEENUM_Error) { + if (validateData.GetFormatTest() == XFA_ATTRIBUTEENUM_Error) { if (wsFormatMsg.IsEmpty()) wsFormatMsg = GetValidateMessage(true, bVersionFlag); pAppProvider->MsgBox(wsFormatMsg, wsTitle, XFA_MBICON_Error, XFA_MB_OK); @@ -442,9 +437,8 @@ int32_t CXFA_WidgetAcc::ProcessNullTestValidate(CXFA_ValidateData validateData, if (m_bIsNull && (m_bPreNull == m_bIsNull)) return XFA_EVENTERROR_Success; - int32_t eNullTest = validateData.GetNullTest(); - WideString wsNullMsg; - validateData.GetNullMessageText(wsNullMsg); + XFA_ATTRIBUTEENUM eNullTest = validateData.GetNullTest(); + WideString wsNullMsg = validateData.GetNullMessageText(); if (iFlags & 0x01) { int32_t iRet = XFA_EVENTERROR_Success; if (eNullTest != XFA_ATTRIBUTEENUM_Disabled) |