From 2f5582f46dce2abfe9d75ea5f885a2ce0a4c10d2 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Thu, 9 Jun 2016 11:48:23 -0700 Subject: Convert CFXJSE_Value::ToString to return. ThiS Cl updates CFXJSE_Value::ToString() to return a CFX_ByteString instead of taking an out parameter. It also adds a ToStringC() and ToWideString() to hide the common conversions that are done on the string value. Review-Url: https://codereview.chromium.org/2044293004 --- xfa/fxfa/app/xfa_ffwidgetacc.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'xfa/fxfa/app') diff --git a/xfa/fxfa/app/xfa_ffwidgetacc.cpp b/xfa/fxfa/app/xfa_ffwidgetacc.cpp index 3301bed50e..59e3805991 100644 --- a/xfa/fxfa/app/xfa_ffwidgetacc.cpp +++ b/xfa/fxfa/app/xfa_ffwidgetacc.cpp @@ -659,12 +659,9 @@ int32_t CXFA_WidgetAcc::ExecuteScript(CXFA_Script script, if (pEventParam->m_eType == XFA_EVENT_Calculate || pEventParam->m_eType == XFA_EVENT_InitCalculate) { if (!pTmpRetValue->IsUndefined()) { - if (!pTmpRetValue->IsNull()) { - CFX_ByteString bsString; - pTmpRetValue->ToString(bsString); - pEventParam->m_wsResult = - CFX_WideString::FromUTF8(bsString.AsStringC()); - } + if (!pTmpRetValue->IsNull()) + pEventParam->m_wsResult = pTmpRetValue->ToWideString(); + iRet = XFA_EVENTERROR_Success; } else { iRet = XFA_EVENTERROR_Error; -- cgit v1.2.3