| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |