summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-06-09 11:48:23 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-09 11:48:23 -0700
commit2f5582f46dce2abfe9d75ea5f885a2ce0a4c10d2 (patch)
tree5e4d1dd72b8af7e887912e9f8bf764a9044eba89 /xfa/fxfa/app
parentbd136fb1ad8faa377bee0982ee9ef09d150ce6ca (diff)
downloadpdfium-2f5582f46dce2abfe9d75ea5f885a2ce0a4c10d2.tar.xz
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
Diffstat (limited to 'xfa/fxfa/app')
-rw-r--r--xfa/fxfa/app/xfa_ffwidgetacc.cpp9
1 files changed, 3 insertions, 6 deletions
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;