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 "util.h" | 7 #include "util.h" |
8 | 8 |
9 #include "JS_Context.h" | 9 #include "JS_Context.h" |
10 #include "JS_Define.h" | 10 #include "JS_Define.h" |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 break; | 461 break; |
462 } | 462 } |
463 case '*': { | 463 case '*': { |
464 cPurpose.append(cSource, itSource, iSize - itSource); | 464 cPurpose.append(cSource, itSource, iSize - itSource); |
465 itSource = iSize - 1; | 465 itSource = iSize - 1; |
466 break; | 466 break; |
467 } | 467 } |
468 case '\\': | 468 case '\\': |
469 break; | 469 break; |
470 case '>': { | 470 case '>': { |
471 for (std::string::iterator it = cSource.begin(); it != cSource.end(); | 471 for (char& c : cSource) |
472 it++) { | 472 c = toupper(c); |
473 *it = toupper(*it); | |
474 } | |
475 break; | 473 break; |
476 } | 474 } |
477 case '<': { | 475 case '<': { |
478 for (std::string::iterator it = cSource.begin(); it != cSource.end(); | 476 for (char& c : cSource) |
479 it++) { | 477 c = tolower(c); |
480 *it = tolower(*it); | |
481 } | |
482 break; | 478 break; |
483 } | 479 } |
484 case '=': | 480 case '=': |
485 break; | 481 break; |
486 default: | 482 default: |
487 cPurpose += letter; | 483 cPurpose += letter; |
488 break; | 484 break; |
489 } | 485 } |
490 } | 486 } |
491 } | 487 } |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 int iSize = params.size(); | 541 int iSize = params.size(); |
546 if (iSize == 0) | 542 if (iSize == 0) |
547 return FALSE; | 543 return FALSE; |
548 int nByte = params[0].ToInt(); | 544 int nByte = params[0].ToInt(); |
549 unsigned char cByte = (unsigned char)nByte; | 545 unsigned char cByte = (unsigned char)nByte; |
550 CFX_WideString csValue; | 546 CFX_WideString csValue; |
551 csValue.Format(L"%c", cByte); | 547 csValue.Format(L"%c", cByte); |
552 vRet = csValue.c_str(); | 548 vRet = csValue.c_str(); |
553 return TRUE; | 549 return TRUE; |
554 } | 550 } |
OLD | NEW |