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

Side by Side Diff: fpdfsdk/javascript/Document.cpp

Issue 1801383002: Re-enable several MSVC warnings (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase again Created 4 years, 9 months 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/fxedit/fxet_ap.cpp ('k') | pdfium.gyp » ('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 "fpdfsdk/javascript/Document.h" 7 #include "fpdfsdk/javascript/Document.h"
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1441 matching lines...) Expand 10 before | Expand all | Expand 10 after
1452 1452
1453 int nWords = 0; 1453 int nWords = 0;
1454 1454
1455 CPDF_Font* pFont = pTextObj->GetFont(); 1455 CPDF_Font* pFont = pTextObj->GetFont();
1456 if (!pFont) 1456 if (!pFont)
1457 return 0; 1457 return 0;
1458 1458
1459 FX_BOOL bIsLatin = FALSE; 1459 FX_BOOL bIsLatin = FALSE;
1460 1460
1461 for (int i = 0, sz = pTextObj->CountChars(); i < sz; i++) { 1461 for (int i = 0, sz = pTextObj->CountChars(); i < sz; i++) {
1462 FX_DWORD charcode = -1; 1462 FX_DWORD charcode = static_cast<FX_DWORD>(-1);
1463 FX_FLOAT kerning; 1463 FX_FLOAT kerning;
1464 1464
1465 pTextObj->GetCharInfo(i, charcode, kerning); 1465 pTextObj->GetCharInfo(i, charcode, kerning);
1466 CFX_WideString swUnicode = pFont->UnicodeFromCharCode(charcode); 1466 CFX_WideString swUnicode = pFont->UnicodeFromCharCode(charcode);
1467 1467
1468 FX_WORD unicode = 0; 1468 FX_WORD unicode = 0;
1469 if (swUnicode.GetLength() > 0) 1469 if (swUnicode.GetLength() > 0)
1470 unicode = swUnicode[0]; 1470 unicode = swUnicode[0];
1471 1471
1472 if (ISLATINWORD(unicode) && bIsLatin) 1472 if (ISLATINWORD(unicode) && bIsLatin)
(...skipping 12 matching lines...) Expand all
1485 CFX_WideString swRet; 1485 CFX_WideString swRet;
1486 1486
1487 CPDF_Font* pFont = pTextObj->GetFont(); 1487 CPDF_Font* pFont = pTextObj->GetFont();
1488 if (!pFont) 1488 if (!pFont)
1489 return L""; 1489 return L"";
1490 1490
1491 int nWords = 0; 1491 int nWords = 0;
1492 FX_BOOL bIsLatin = FALSE; 1492 FX_BOOL bIsLatin = FALSE;
1493 1493
1494 for (int i = 0, sz = pTextObj->CountChars(); i < sz; i++) { 1494 for (int i = 0, sz = pTextObj->CountChars(); i < sz; i++) {
1495 FX_DWORD charcode = -1; 1495 FX_DWORD charcode = static_cast<FX_DWORD>(-1);
1496 FX_FLOAT kerning; 1496 FX_FLOAT kerning;
1497 1497
1498 pTextObj->GetCharInfo(i, charcode, kerning); 1498 pTextObj->GetCharInfo(i, charcode, kerning);
1499 CFX_WideString swUnicode = pFont->UnicodeFromCharCode(charcode); 1499 CFX_WideString swUnicode = pFont->UnicodeFromCharCode(charcode);
1500 1500
1501 FX_WORD unicode = 0; 1501 FX_WORD unicode = 0;
1502 if (swUnicode.GetLength() > 0) 1502 if (swUnicode.GetLength() > 0)
1503 unicode = swUnicode[0]; 1503 unicode = swUnicode[0];
1504 1504
1505 if (ISLATINWORD(unicode) && bIsLatin) { 1505 if (ISLATINWORD(unicode) && bIsLatin) {
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
1595 } 1595 }
1596 } 1596 }
1597 1597
1598 for (const auto& pData : DelayDataForFieldAndControlIndex) 1598 for (const auto& pData : DelayDataForFieldAndControlIndex)
1599 Field::DoDelay(m_pDocument, pData.get()); 1599 Field::DoDelay(m_pDocument, pData.get());
1600 } 1600 }
1601 1601
1602 CJS_Document* Document::GetCJSDoc() const { 1602 CJS_Document* Document::GetCJSDoc() const {
1603 return static_cast<CJS_Document*>(m_pJSObject); 1603 return static_cast<CJS_Document*>(m_pJSObject);
1604 } 1604 }
OLDNEW
« no previous file with comments | « fpdfsdk/fxedit/fxet_ap.cpp ('k') | pdfium.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698