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/JS_Define.h" | 8 #include "../../include/javascript/JS_Define.h" |
9 #include "../../include/javascript/JS_Object.h" | 9 #include "../../include/javascript/JS_Object.h" |
10 #include "../../include/javascript/JS_Value.h" | 10 #include "../../include/javascript/JS_Value.h" |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 m_bIsSetting = 1; | 393 m_bIsSetting = 1; |
394 } | 394 } |
395 | 395 |
396 void CJS_PropValue::StartGetting() | 396 void CJS_PropValue::StartGetting() |
397 { | 397 { |
398 m_bIsSetting = 0; | 398 m_bIsSetting = 0; |
399 } | 399 } |
400 void CJS_PropValue::operator <<(CFX_ByteString string) | 400 void CJS_PropValue::operator <<(CFX_ByteString string) |
401 { | 401 { |
402 ASSERT(!m_bIsSetting); | 402 ASSERT(!m_bIsSetting); |
403 » CJS_Value::operator =((FX_LPCSTR)string); | 403 » CJS_Value::operator = (string.c_str()); |
404 } | 404 } |
405 | 405 |
406 void CJS_PropValue::operator >>(CFX_ByteString &string) const | 406 void CJS_PropValue::operator >>(CFX_ByteString &string) const |
407 { | 407 { |
408 ASSERT(m_bIsSetting); | 408 ASSERT(m_bIsSetting); |
409 string = CJS_Value::operator CFX_ByteString(); | 409 string = CJS_Value::operator CFX_ByteString(); |
410 } | 410 } |
411 | 411 |
412 void CJS_PropValue::operator <<(FX_LPCWSTR c_string) | 412 void CJS_PropValue::operator <<(FX_LPCWSTR c_string) |
413 { | 413 { |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 return 0.0; | 643 return 0.0; |
644 return JS_ToNumber(m_pDate); | 644 return JS_ToNumber(m_pDate); |
645 } | 645 } |
646 | 646 |
647 CFX_WideString CJS_Date::ToString() const | 647 CFX_WideString CJS_Date::ToString() const |
648 { | 648 { |
649 if(m_pDate.IsEmpty()) | 649 if(m_pDate.IsEmpty()) |
650 return L""; | 650 return L""; |
651 return JS_ToString(m_pDate); | 651 return JS_ToString(m_pDate); |
652 } | 652 } |
OLD | NEW |