| 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 "../../include/javascript/JavaScript.h" | 7 #include "../../include/javascript/JavaScript.h" |
| 8 #include "../../include/javascript/IJavaScript.h" | 8 #include "../../include/javascript/IJavaScript.h" |
| 9 #include "../../include/javascript/JS_Define.h" | 9 #include "../../include/javascript/JS_Define.h" |
| 10 #include "../../include/javascript/JS_Object.h" | 10 #include "../../include/javascript/JS_Object.h" |
| (...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1067 if(!pEvent->m_pValue) | 1067 if(!pEvent->m_pValue) |
| 1068 return FALSE; | 1068 return FALSE; |
| 1069 CFX_WideString& Value = pEvent->Value(); | 1069 CFX_WideString& Value = pEvent->Value(); |
| 1070 CFX_ByteString strValue = StrTrim(CFX_ByteString::FromUnicode(Value)); | 1070 CFX_ByteString strValue = StrTrim(CFX_ByteString::FromUnicode(Value)); |
| 1071 | 1071 |
| 1072 if (strValue.IsEmpty()) return TRUE; | 1072 if (strValue.IsEmpty()) return TRUE; |
| 1073 | 1073 |
| 1074 int iDec = params[0]; | 1074 int iDec = params[0]; |
| 1075 int iSepStyle = params[1]; | 1075 int iSepStyle = params[1]; |
| 1076 int iNegStyle = params[2]; | 1076 int iNegStyle = params[2]; |
| 1077 » int icurrStyle = params[3]; //it's no use! | 1077 » // params[3] is iCurrStyle, it's not used. |
| 1078 std::wstring wstrCurrency(params[4].operator CFX_WideString()); | 1078 std::wstring wstrCurrency(params[4].operator CFX_WideString()); |
| 1079 FX_BOOL bCurrencyPrepend = params[5]; | 1079 FX_BOOL bCurrencyPrepend = params[5]; |
| 1080 | 1080 |
| 1081 if (iDec < 0) iDec = -iDec; | 1081 if (iDec < 0) iDec = -iDec; |
| 1082 | 1082 |
| 1083 if (iSepStyle < 0 || iSepStyle > 3) | 1083 if (iSepStyle < 0 || iSepStyle > 3) |
| 1084 iSepStyle = 0; | 1084 iSepStyle = 0; |
| 1085 | 1085 |
| 1086 if (iNegStyle < 0 || iNegStyle > 3) | 1086 if (iNegStyle < 0 || iNegStyle > 3) |
| 1087 iNegStyle = 0; | 1087 iNegStyle = 0; |
| (...skipping 1228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2316 nums.SetElement(nIndex,CJS_Value(isolate,(FX_LPCWSTR)sPart)); | 2316 nums.SetElement(nIndex,CJS_Value(isolate,(FX_LPCWSTR)sPart)); |
| 2317 } | 2317 } |
| 2318 | 2318 |
| 2319 if (nums.GetLength() > 0) | 2319 if (nums.GetLength() > 0) |
| 2320 vRet = nums; | 2320 vRet = nums; |
| 2321 else | 2321 else |
| 2322 vRet.SetNull(); | 2322 vRet.SetNull(); |
| 2323 | 2323 |
| 2324 return TRUE; | 2324 return TRUE; |
| 2325 } | 2325 } |
| OLD | NEW |