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

Unified Diff: core/src/fpdftext/fpdf_text_int.cpp

Issue 1294713002: Cleanup: s/Torelance/Tolerance/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/include/fpdftext/fpdf_text.h ('k') | core/src/fpdftext/text_int.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdftext/fpdf_text_int.cpp
diff --git a/core/src/fpdftext/fpdf_text_int.cpp b/core/src/fpdftext/fpdf_text_int.cpp
index 7b2f3abf48d91d8259d6c0a74bc583f59fd1355d..ce673447a4f620eb9f5057d30f4dfc6c2d4d664b 100644
--- a/core/src/fpdftext/fpdf_text_int.cpp
+++ b/core/src/fpdftext/fpdf_text_int.cpp
@@ -350,8 +350,8 @@ void CPDF_TextPage::GetRectArray(int start,
return;
}
int CPDF_TextPage::GetIndexAtPos(CPDF_Point point,
- FX_FLOAT xTorelance,
- FX_FLOAT yTorelance) const {
+ FX_FLOAT xTolerance,
+ FX_FLOAT yTolerance) const {
if (m_ParseOptions.m_bGetCharCodeOnly) {
return -3;
}
@@ -367,13 +367,13 @@ int CPDF_TextPage::GetIndexAtPos(CPDF_Point point,
if (charrect.Contains(point.x, point.y)) {
break;
}
- if (xTorelance > 0 || yTorelance > 0) {
+ if (xTolerance > 0 || yTolerance > 0) {
CFX_FloatRect charRectExt;
charrect.Normalize();
- charRectExt.left = charrect.left - xTorelance / 2;
- charRectExt.right = charrect.right + xTorelance / 2;
- charRectExt.top = charrect.top + yTorelance / 2;
- charRectExt.bottom = charrect.bottom - yTorelance / 2;
+ charRectExt.left = charrect.left - xTolerance / 2;
+ charRectExt.right = charrect.right + xTolerance / 2;
+ charRectExt.top = charrect.top + yTolerance / 2;
+ charRectExt.bottom = charrect.bottom - yTolerance / 2;
if (charRectExt.Contains(point.x, point.y)) {
double curXdif, curYdif;
curXdif = FXSYS_fabs(point.x - charrect.left) <
@@ -489,13 +489,13 @@ void CPDF_TextPage::GetRectsArrayByRect(const CFX_FloatRect& rect,
}
int CPDF_TextPage::GetIndexAtPos(FX_FLOAT x,
FX_FLOAT y,
- FX_FLOAT xTorelance,
- FX_FLOAT yTorelance) const {
+ FX_FLOAT xTolerance,
+ FX_FLOAT yTolerance) const {
if (m_ParseOptions.m_bGetCharCodeOnly) {
return -3;
}
CPDF_Point point(x, y);
- return GetIndexAtPos(point, xTorelance, yTorelance);
+ return GetIndexAtPos(point, xTolerance, yTolerance);
}
void CPDF_TextPage::GetCharInfo(int index, FPDF_CHAR_INFO& info) const {
if (m_ParseOptions.m_bGetCharCodeOnly) {
« no previous file with comments | « core/include/fpdftext/fpdf_text.h ('k') | core/src/fpdftext/text_int.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698