| 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_EventHandler.h" | 9 #include "../../include/javascript/JS_EventHandler.h" |
| 10 //#include "../../include/javascript/JS_ResMgr.h" | |
| 11 #include "../../include/javascript/JS_Context.h" | 10 #include "../../include/javascript/JS_Context.h" |
| 12 #include "../../include/javascript/JS_Runtime.h" | 11 #include "../../include/javascript/JS_Runtime.h" |
| 13 #include "../../include/javascript/JS_Define.h" | 12 #include "../../include/javascript/JS_Define.h" |
| 14 #include "../../include/javascript/JS_Object.h" | 13 #include "../../include/javascript/JS_Object.h" |
| 15 #include "../../include/javascript/JS_Value.h" | 14 #include "../../include/javascript/JS_Value.h" |
| 16 #include "../../include/javascript/Document.h" | 15 #include "../../include/javascript/Document.h" |
| 17 #include "../../include/javascript/Field.h" | 16 #include "../../include/javascript/Field.h" |
| 18 | 17 |
| 19 /* ---------------------------- CJS_EventHandler ---------------------------- */ | 18 /* ---------------------------- CJS_EventHandler ---------------------------- */ |
| 20 | 19 |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 m_bValid = FALSE; | 421 m_bValid = FALSE; |
| 423 } | 422 } |
| 424 | 423 |
| 425 FX_BOOL CJS_EventHandler::IsValid() | 424 FX_BOOL CJS_EventHandler::IsValid() |
| 426 { | 425 { |
| 427 return m_bValid; | 426 return m_bValid; |
| 428 } | 427 } |
| 429 | 428 |
| 430 CFX_WideString & CJS_EventHandler::Change() | 429 CFX_WideString & CJS_EventHandler::Change() |
| 431 { | 430 { |
| 432 » if (m_pWideStrChange != NULL) | 431 » if (m_pWideStrChange) { |
| 433 return *m_pWideStrChange; | 432 return *m_pWideStrChange; |
| 434 » else | 433 } |
| 435 » { | 434 return m_WideStrChangeDu; |
| 436 » » return m_WideStrChangeDu; | |
| 437 » } | |
| 438 } | 435 } |
| 439 | 436 |
| 440 CFX_WideString CJS_EventHandler::ChangeEx() | 437 CFX_WideString CJS_EventHandler::ChangeEx() |
| 441 { | 438 { |
| 442 return m_WideStrChangeEx; | 439 return m_WideStrChangeEx; |
| 443 } | 440 } |
| 444 | 441 |
| 445 int CJS_EventHandler::CommitKey() | 442 int CJS_EventHandler::CommitKey() |
| 446 { | 443 { |
| 447 return m_nCommitKey; | 444 return m_nCommitKey; |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 case JET_PAGE_OUTVIEW:return L"Page"; | 550 case JET_PAGE_OUTVIEW:return L"Page"; |
| 554 default: | 551 default: |
| 555 return L""; | 552 return L""; |
| 556 } | 553 } |
| 557 | 554 |
| 558 return L""; | 555 return L""; |
| 559 } | 556 } |
| 560 | 557 |
| 561 FX_BOOL& CJS_EventHandler::Rc() | 558 FX_BOOL& CJS_EventHandler::Rc() |
| 562 { | 559 { |
| 563 » if (m_pbRc != NULL) | 560 » if (m_pbRc) { |
| 564 return *m_pbRc; | 561 return *m_pbRc; |
| 565 » else | 562 } |
| 566 » { | 563 return m_bRcDu; |
| 567 » » return m_bRcDu; | |
| 568 » } | |
| 569 } | 564 } |
| 570 | 565 |
| 571 int & CJS_EventHandler::SelEnd() | 566 int & CJS_EventHandler::SelEnd() |
| 572 { | 567 { |
| 573 » if (m_pISelEnd != NULL) | 568 » if (m_pISelEnd)»{ |
| 574 » { | |
| 575 return *m_pISelEnd; | 569 return *m_pISelEnd; |
| 576 } | 570 } |
| 577 » else | 571 return m_nSelEndDu; |
| 578 » { | |
| 579 » » return m_nSelEndDu; | |
| 580 » } | |
| 581 } | 572 } |
| 582 | 573 |
| 583 int & CJS_EventHandler::SelStart() | 574 int & CJS_EventHandler::SelStart() |
| 584 { | 575 { |
| 585 » if (m_pISelStart != NULL) | 576 » if (m_pISelStart) { |
| 586 » » return * m_pISelStart; | 577 » » return *m_pISelStart; |
| 587 » else | 578 } |
| 588 » { | 579 return m_nSelStartDu; |
| 589 » » return m_nSelStartDu; | |
| 590 » } | |
| 591 } | 580 } |
| 592 | 581 |
| 593 FX_BOOL CJS_EventHandler::Shift() | 582 FX_BOOL CJS_EventHandler::Shift() |
| 594 { | 583 { |
| 595 return m_bShift; | 584 return m_bShift; |
| 596 } | 585 } |
| 597 | 586 |
| 598 Field* CJS_EventHandler::Source() | 587 Field* CJS_EventHandler::Source() |
| 599 { | 588 { |
| 600 ASSERT(m_pJSContext != NULL); | 589 ASSERT(m_pJSContext != NULL); |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 { | 657 { |
| 669 return m_bWillCommit; | 658 return m_bWillCommit; |
| 670 } | 659 } |
| 671 | 660 |
| 672 CFX_WideString CJS_EventHandler::TargetName() | 661 CFX_WideString CJS_EventHandler::TargetName() |
| 673 { | 662 { |
| 674 return m_strTargetName; | 663 return m_strTargetName; |
| 675 } | 664 } |
| 676 | 665 |
| 677 | 666 |
| OLD | NEW |