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

Side by Side Diff: fpdfsdk/src/javascript/JS_EventHandler.cpp

Issue 726143002: Remove FX_LPCWSTR cast to wchar_t* literals (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 6 years, 1 month 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 | « fpdfsdk/src/javascript/JS_Context.cpp ('k') | fpdfsdk/src/javascript/JS_Runtime.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 "../../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" 10 //#include "../../include/javascript/JS_ResMgr.h"
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 458
459 FX_BOOL CJS_EventHandler::Modifier() 459 FX_BOOL CJS_EventHandler::Modifier()
460 { 460 {
461 return m_bModifier; 461 return m_bModifier;
462 } 462 }
463 463
464 FX_LPCWSTR CJS_EventHandler::Name() 464 FX_LPCWSTR CJS_EventHandler::Name()
465 { 465 {
466 switch (m_eEventType) 466 switch (m_eEventType)
467 { 467 {
468 » case JET_APP_INIT:» » » return (FX_LPCWSTR)L"Init"; 468 » case JET_APP_INIT:» » » return L"Init";
469 » case JET_BATCH_EXEC:» » return (FX_LPCWSTR)L"Exec"; 469 » case JET_BATCH_EXEC:» » return L"Exec";
470 » case JET_BOOKMARK_MOUSEUP:» return (FX_LPCWSTR)L"Mouse Up"; 470 » case JET_BOOKMARK_MOUSEUP:» return L"Mouse Up";
471 » case JET_CONSOLE_EXEC:» » return (FX_LPCWSTR)L"Exec"; 471 » case JET_CONSOLE_EXEC:» » return L"Exec";
472 » case JET_DOC_DIDPRINT:» » return (FX_LPCWSTR)L"DidPrint"; 472 » case JET_DOC_DIDPRINT:» » return L"DidPrint";
473 » case JET_DOC_DIDSAVE:» » return (FX_LPCWSTR)L"DidSave"; 473 » case JET_DOC_DIDSAVE:» » return L"DidSave";
474 » case JET_DOC_OPEN:» » » return (FX_LPCWSTR)L"Open"; 474 » case JET_DOC_OPEN:» » » return L"Open";
475 » case JET_DOC_WILLCLOSE:»» return (FX_LPCWSTR)L"WillClose"; 475 » case JET_DOC_WILLCLOSE:»» return L"WillClose";
476 » case JET_DOC_WILLPRINT:»» return (FX_LPCWSTR)L"WillPrint"; 476 » case JET_DOC_WILLPRINT:»» return L"WillPrint";
477 » case JET_DOC_WILLSAVE:» » return (FX_LPCWSTR)L"WillSave"; 477 » case JET_DOC_WILLSAVE:» » return L"WillSave";
478 » case JET_EXTERNAL_EXEC:»» return (FX_LPCWSTR)L"Exec"; 478 » case JET_EXTERNAL_EXEC:»» return L"Exec";
479 case JET_FIELD_FOCUS: 479 case JET_FIELD_FOCUS:
480 » case JET_SCREEN_FOCUS:» » return (FX_LPCWSTR)L"Focus"; 480 » case JET_SCREEN_FOCUS:» » return L"Focus";
481 case JET_FIELD_BLUR: 481 case JET_FIELD_BLUR:
482 » case JET_SCREEN_BLUR:» » return (FX_LPCWSTR)L"Blur"; 482 » case JET_SCREEN_BLUR:» » return L"Blur";
483 case JET_FIELD_MOUSEDOWN: 483 case JET_FIELD_MOUSEDOWN:
484 » case JET_SCREEN_MOUSEDOWN:» return (FX_LPCWSTR)L"Mouse Down"; 484 » case JET_SCREEN_MOUSEDOWN:» return L"Mouse Down";
485 case JET_FIELD_MOUSEUP: 485 case JET_FIELD_MOUSEUP:
486 » case JET_SCREEN_MOUSEUP:» return (FX_LPCWSTR)L"Mouse Up"; 486 » case JET_SCREEN_MOUSEUP:» return L"Mouse Up";
487 case JET_FIELD_MOUSEENTER: 487 case JET_FIELD_MOUSEENTER:
488 » case JET_SCREEN_MOUSEENTER:» return (FX_LPCWSTR)L"Mouse Enter"; 488 » case JET_SCREEN_MOUSEENTER:» return L"Mouse Enter";
489 case JET_FIELD_MOUSEEXIT: 489 case JET_FIELD_MOUSEEXIT:
490 » case JET_SCREEN_MOUSEEXIT:» return (FX_LPCWSTR)L"Mouse Exit"; 490 » case JET_SCREEN_MOUSEEXIT:» return L"Mouse Exit";
491 » case JET_FIELD_CALCULATE:» return (FX_LPCWSTR)L"Calculate"; 491 » case JET_FIELD_CALCULATE:» return L"Calculate";
492 » case JET_FIELD_FORMAT:» » return (FX_LPCWSTR)L"Format"; 492 » case JET_FIELD_FORMAT:» » return L"Format";
493 » case JET_FIELD_KEYSTROKE:» return (FX_LPCWSTR)L"Keystroke"; 493 » case JET_FIELD_KEYSTROKE:» return L"Keystroke";
494 » case JET_FIELD_VALIDATE:» return (FX_LPCWSTR)L"Validate"; 494 » case JET_FIELD_VALIDATE:» return L"Validate";
495 » case JET_LINK_MOUSEUP:» » return (FX_LPCWSTR)L"Mouse Up"; 495 » case JET_LINK_MOUSEUP:» » return L"Mouse Up";
496 » case JET_MENU_EXEC:» » » return (FX_LPCWSTR)L"Exec"; 496 » case JET_MENU_EXEC:» » » return L"Exec";
497 case JET_PAGE_OPEN: 497 case JET_PAGE_OPEN:
498 » case JET_SCREEN_OPEN:» » return (FX_LPCWSTR)L"Open"; 498 » case JET_SCREEN_OPEN:» » return L"Open";
499 case JET_PAGE_CLOSE: 499 case JET_PAGE_CLOSE:
500 » case JET_SCREEN_CLOSE:» » return (FX_LPCWSTR)L"Close"; 500 » case JET_SCREEN_CLOSE:» » return L"Close";
501 case JET_SCREEN_INVIEW: 501 case JET_SCREEN_INVIEW:
502 » case JET_PAGE_INVIEW:» » return (FX_LPCWSTR)L"InView"; 502 » case JET_PAGE_INVIEW:» » return L"InView";
503 case JET_PAGE_OUTVIEW: 503 case JET_PAGE_OUTVIEW:
504 » case JET_SCREEN_OUTVIEW:» return (FX_LPCWSTR)L"OutView"; 504 » case JET_SCREEN_OUTVIEW:» return L"OutView";
505 default: 505 default:
506 » » return (FX_LPCWSTR)L""; 506 » » return L"";
507 } 507 }
508 508
509 » return (FX_LPCWSTR)L""; 509 » return L"";
510 } 510 }
511 511
512 FX_LPCWSTR CJS_EventHandler::Type() 512 FX_LPCWSTR CJS_EventHandler::Type()
513 { 513 {
514 switch (m_eEventType) 514 switch (m_eEventType)
515 { 515 {
516 » case JET_APP_INIT:» » » return (FX_LPCWSTR)L"App"; 516 » case JET_APP_INIT:» » » return L"App";
517 » case JET_BATCH_EXEC:» » return (FX_LPCWSTR)L"Batch"; 517 » case JET_BATCH_EXEC:» » return L"Batch";
518 » case JET_BOOKMARK_MOUSEUP:» return (FX_LPCWSTR)L"BookMark";» 518 » case JET_BOOKMARK_MOUSEUP:» return L"BookMark";»
519 » case JET_CONSOLE_EXEC:» » return (FX_LPCWSTR)L"Console"; 519 » case JET_CONSOLE_EXEC:» » return L"Console";
520 case JET_DOC_DIDPRINT: 520 case JET_DOC_DIDPRINT:
521 case JET_DOC_DIDSAVE: 521 case JET_DOC_DIDSAVE:
522 case JET_DOC_OPEN: 522 case JET_DOC_OPEN:
523 case JET_DOC_WILLCLOSE: 523 case JET_DOC_WILLCLOSE:
524 case JET_DOC_WILLPRINT: 524 case JET_DOC_WILLPRINT:
525 » case JET_DOC_WILLSAVE:» » return (FX_LPCWSTR)L"Doc"; 525 » case JET_DOC_WILLSAVE:» » return L"Doc";
526 » case JET_EXTERNAL_EXEC:»» return (FX_LPCWSTR)L"External"; 526 » case JET_EXTERNAL_EXEC:»» return L"External";
527 case JET_FIELD_BLUR: 527 case JET_FIELD_BLUR:
528 case JET_FIELD_FOCUS: 528 case JET_FIELD_FOCUS:
529 case JET_FIELD_MOUSEDOWN: 529 case JET_FIELD_MOUSEDOWN:
530 case JET_FIELD_MOUSEENTER: 530 case JET_FIELD_MOUSEENTER:
531 case JET_FIELD_MOUSEEXIT: 531 case JET_FIELD_MOUSEEXIT:
532 case JET_FIELD_MOUSEUP: 532 case JET_FIELD_MOUSEUP:
533 case JET_FIELD_CALCULATE: 533 case JET_FIELD_CALCULATE:
534 case JET_FIELD_FORMAT: 534 case JET_FIELD_FORMAT:
535 case JET_FIELD_KEYSTROKE: 535 case JET_FIELD_KEYSTROKE:
536 » case JET_FIELD_VALIDATE:» return (FX_LPCWSTR)L"Field"; 536 » case JET_FIELD_VALIDATE:» return L"Field";
537 case JET_SCREEN_FOCUS: 537 case JET_SCREEN_FOCUS:
538 case JET_SCREEN_BLUR: 538 case JET_SCREEN_BLUR:
539 case JET_SCREEN_OPEN: 539 case JET_SCREEN_OPEN:
540 case JET_SCREEN_CLOSE: 540 case JET_SCREEN_CLOSE:
541 case JET_SCREEN_MOUSEDOWN: 541 case JET_SCREEN_MOUSEDOWN:
542 case JET_SCREEN_MOUSEUP: 542 case JET_SCREEN_MOUSEUP:
543 case JET_SCREEN_MOUSEENTER: 543 case JET_SCREEN_MOUSEENTER:
544 case JET_SCREEN_MOUSEEXIT: 544 case JET_SCREEN_MOUSEEXIT:
545 case JET_SCREEN_INVIEW: 545 case JET_SCREEN_INVIEW:
546 » case JET_SCREEN_OUTVIEW:» return (FX_LPCWSTR)L"Screen"; 546 » case JET_SCREEN_OUTVIEW:» return L"Screen";
547 » case JET_LINK_MOUSEUP:» » return (FX_LPCWSTR)L"Link";» 547 » case JET_LINK_MOUSEUP:» » return L"Link";»
548 » case JET_MENU_EXEC:» » » return (FX_LPCWSTR)L"Menu"; 548 » case JET_MENU_EXEC:» » » return L"Menu";
549 case JET_PAGE_OPEN: 549 case JET_PAGE_OPEN:
550 case JET_PAGE_CLOSE: 550 case JET_PAGE_CLOSE:
551 case JET_PAGE_INVIEW: 551 case JET_PAGE_INVIEW:
552 » case JET_PAGE_OUTVIEW:return (FX_LPCWSTR)L"Page"; 552 » case JET_PAGE_OUTVIEW:return L"Page";
553 default: 553 default:
554 » » return (FX_LPCWSTR)L""; 554 » » return L"";
555 } 555 }
556 556
557 » return (FX_LPCWSTR)L""; 557 » return L"";
558 } 558 }
559 559
560 FX_BOOL& CJS_EventHandler::Rc() 560 FX_BOOL& CJS_EventHandler::Rc()
561 { 561 {
562 if (m_pbRc != NULL) 562 if (m_pbRc != NULL)
563 return *m_pbRc; 563 return *m_pbRc;
564 else 564 else
565 { 565 {
566 return m_bRcDu; 566 return m_bRcDu;
567 } 567 }
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 { 667 {
668 return m_bWillCommit; 668 return m_bWillCommit;
669 } 669 }
670 670
671 CFX_WideString CJS_EventHandler::TargetName() 671 CFX_WideString CJS_EventHandler::TargetName()
672 { 672 {
673 return m_strTargetName; 673 return m_strTargetName;
674 } 674 }
675 675
676 676
OLDNEW
« no previous file with comments | « fpdfsdk/src/javascript/JS_Context.cpp ('k') | fpdfsdk/src/javascript/JS_Runtime.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698