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

Side by Side Diff: core/src/fpdftext/fpdf_text_int.cpp

Issue 792953005: Resolve all but two VC++ build warnings in pdfium. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Link to warning bugs, and globally suppress 4996 Created 5 years, 11 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 | « build/standalone.gypi ('k') | pdfium.gyp » ('j') | pdfium.gyp » ('J')
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/fpdfapi/fpdf_resource.h" 7 #include "../../include/fpdfapi/fpdf_resource.h"
8 #include "../../include/fpdfapi/fpdf_pageobj.h" 8 #include "../../include/fpdfapi/fpdf_pageobj.h"
9 #include "../../include/fpdftext/fpdf_text.h" 9 #include "../../include/fpdftext/fpdf_text.h"
10 #include "../../include/fpdfapi/fpdf_page.h" 10 #include "../../include/fpdfapi/fpdf_page.h"
(...skipping 19 matching lines...) Expand all
30 || curChar == 8467 30 || curChar == 8467
31 || (curChar >= 0x2000 && curChar <= 0x206F)) { 31 || (curChar >= 0x2000 && curChar <= 0x206F)) {
32 return FALSE; 32 return FALSE;
33 } 33 }
34 return TRUE; 34 return TRUE;
35 } 35 }
36 36
37 FX_FLOAT _NormalizeThreshold(FX_FLOAT threshold) 37 FX_FLOAT _NormalizeThreshold(FX_FLOAT threshold)
38 { 38 {
39 if (threshold < 300) { 39 if (threshold < 300) {
40 return threshold / 2.0; 40 return threshold / 2.0f;
41 } else if (threshold < 500) { 41 } else if (threshold < 500) {
42 return threshold / 4.0; 42 return threshold / 4.0f;
43 } else if (threshold < 700) { 43 } else if (threshold < 700) {
44 return threshold / 5.0; 44 return threshold / 5.0f;
45 } 45 }
46 return threshold / 6.0; 46 return threshold / 6.0f;
47 } 47 }
48 48
49 FX_FLOAT _CalculateBaseSpace(const CPDF_TextObject* pTextObj, 49 FX_FLOAT _CalculateBaseSpace(const CPDF_TextObject* pTextObj,
50 const CFX_AffineMatrix& matrix) 50 const CFX_AffineMatrix& matrix)
51 { 51 {
52 FX_FLOAT baseSpace = 0.0; 52 FX_FLOAT baseSpace = 0.0;
53 const int nItems = pTextObj->CountItems(); 53 const int nItems = pTextObj->CountItems();
54 if (pTextObj->m_TextState.GetObject()->m_CharSpace && nItems >= 3) { 54 if (pTextObj->m_TextState.GetObject()->m_CharSpace && nItems >= 3) {
55 FX_BOOL bAllChar = TRUE; 55 FX_BOOL bAllChar = TRUE;
56 FX_FLOAT spacing = matrix.TransformDistance( 56 FX_FLOAT spacing = matrix.TransformDistance(
(...skipping 2793 matching lines...) Expand 10 before | Expand all | Expand 10 after
2850 if (!m_IsParserd || index < 0 || index >= m_LinkList.GetSize()) { 2850 if (!m_IsParserd || index < 0 || index >= m_LinkList.GetSize()) {
2851 return; 2851 return;
2852 } 2852 }
2853 CPDF_LinkExt* link = NULL; 2853 CPDF_LinkExt* link = NULL;
2854 link = m_LinkList.GetAt(index); 2854 link = m_LinkList.GetAt(index);
2855 if (!link) { 2855 if (!link) {
2856 return ; 2856 return ;
2857 } 2857 }
2858 m_pTextPage->GetRectArray(link->m_Start, link->m_Count, rects); 2858 m_pTextPage->GetRectArray(link->m_Start, link->m_Count, rects);
2859 } 2859 }
OLDNEW
« no previous file with comments | « build/standalone.gypi ('k') | pdfium.gyp » ('j') | pdfium.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698