Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Side by Side Diff: xfa/fxfa/app/xfa_ffwidgetacc.cpp

Issue 1861183002: Make CFX_WideString::FromUTF8() take a CFX_ByteStringC argument. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase, combine delcs with initialization. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fxbarcode/cbc_upca.cpp ('k') | xfa/fxfa/fm2js/xfa_fm2jscontext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "xfa/fxfa/app/xfa_ffwidgetacc.h" 7 #include "xfa/fxfa/app/xfa_ffwidgetacc.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 int32_t iRet = XFA_EVENTERROR_Error; 689 int32_t iRet = XFA_EVENTERROR_Error;
690 if (bRet) { 690 if (bRet) {
691 iRet = XFA_EVENTERROR_Success; 691 iRet = XFA_EVENTERROR_Success;
692 if (pEventParam->m_eType == XFA_EVENT_Calculate || 692 if (pEventParam->m_eType == XFA_EVENT_Calculate ||
693 pEventParam->m_eType == XFA_EVENT_InitCalculate) { 693 pEventParam->m_eType == XFA_EVENT_InitCalculate) {
694 if (!FXJSE_Value_IsUndefined(hRetValue)) { 694 if (!FXJSE_Value_IsUndefined(hRetValue)) {
695 if (!FXJSE_Value_IsNull(hRetValue)) { 695 if (!FXJSE_Value_IsNull(hRetValue)) {
696 CFX_ByteString bsString; 696 CFX_ByteString bsString;
697 FXJSE_Value_ToUTF8String(hRetValue, bsString); 697 FXJSE_Value_ToUTF8String(hRetValue, bsString);
698 pEventParam->m_wsResult = 698 pEventParam->m_wsResult =
699 CFX_WideString::FromUTF8(bsString, bsString.GetLength()); 699 CFX_WideString::FromUTF8(bsString.AsByteStringC());
700 } 700 }
701 iRet = XFA_EVENTERROR_Success; 701 iRet = XFA_EVENTERROR_Success;
702 } else { 702 } else {
703 iRet = XFA_EVENTERROR_Error; 703 iRet = XFA_EVENTERROR_Error;
704 } 704 }
705 if (pEventParam->m_eType == XFA_EVENT_InitCalculate) { 705 if (pEventParam->m_eType == XFA_EVENT_InitCalculate) {
706 if ((iRet == XFA_EVENTERROR_Success) && 706 if ((iRet == XFA_EVENTERROR_Success) &&
707 (GetRawValue() != pEventParam->m_wsResult)) { 707 (GetRawValue() != pEventParam->m_wsResult)) {
708 SetValue(pEventParam->m_wsResult, XFA_VALUEPICTURE_Raw); 708 SetValue(pEventParam->m_wsResult, XFA_VALUEPICTURE_Raw);
709 m_pDocView->AddValidateWidget(this); 709 m_pDocView->AddValidateWidget(this);
(...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after
1722 if (pIDNode) { 1722 if (pIDNode) {
1723 pEmbAcc = (CXFA_WidgetAcc*)pIDNode->GetWidgetData(); 1723 pEmbAcc = (CXFA_WidgetAcc*)pIDNode->GetWidgetData();
1724 } 1724 }
1725 if (pEmbAcc) { 1725 if (pEmbAcc) {
1726 pEmbAcc->GetValue(wsValue, XFA_VALUEPICTURE_Display); 1726 pEmbAcc->GetValue(wsValue, XFA_VALUEPICTURE_Display);
1727 return TRUE; 1727 return TRUE;
1728 } 1728 }
1729 } 1729 }
1730 return FALSE; 1730 return FALSE;
1731 } 1731 }
OLDNEW
« no previous file with comments | « xfa/fxbarcode/cbc_upca.cpp ('k') | xfa/fxfa/fm2js/xfa_fm2jscontext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698