summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-08-13 17:52:16 -0700
committerLei Zhang <thestig@chromium.org>2015-08-13 17:52:16 -0700
commit38a5a399a4dc00b8db5db665de68a97d3f86335c (patch)
tree312d6ee60d9f18a1ea9c8aa2936042c7362b46ca /core
parent97108cb8cd9318be6cdf62cba7447a373910f349 (diff)
downloadpdfium-38a5a399a4dc00b8db5db665de68a97d3f86335c.tar.xz
Merge to XFA: Cleanup: s/Torelance/Tolerance/
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1294713002 . (cherry picked from commit 45c910f02063cab51d0d90137d451a666c33b85f) Review URL: https://codereview.chromium.org/1285183005 .
Diffstat (limited to 'core')
-rw-r--r--core/include/fpdftext/fpdf_text.h8
-rw-r--r--core/src/fpdftext/fpdf_text_int.cpp20
-rw-r--r--core/src/fpdftext/text_int.h8
3 files changed, 18 insertions, 18 deletions
diff --git a/core/include/fpdftext/fpdf_text.h b/core/include/fpdftext/fpdf_text.h
index eb16ca9a90..f27f1db7e6 100644
--- a/core/include/fpdftext/fpdf_text.h
+++ b/core/include/fpdftext/fpdf_text.h
@@ -102,13 +102,13 @@ class IPDF_TextPage {
CFX_RectArray& rectArray) const = 0;
virtual int GetIndexAtPos(CPDF_Point point,
- FX_FLOAT xTorelance,
- FX_FLOAT yTorelance) const = 0;
+ FX_FLOAT xTolerance,
+ FX_FLOAT yTolerance) const = 0;
virtual int GetIndexAtPos(FX_FLOAT x,
FX_FLOAT y,
- FX_FLOAT xTorelance,
- FX_FLOAT yTorelance) const = 0;
+ FX_FLOAT xTolerance,
+ FX_FLOAT yTolerance) const = 0;
virtual CFX_WideString GetTextByRect(const CFX_FloatRect& rect) const = 0;
diff --git a/core/src/fpdftext/fpdf_text_int.cpp b/core/src/fpdftext/fpdf_text_int.cpp
index 9d4555c27e..55e997c177 100644
--- a/core/src/fpdftext/fpdf_text_int.cpp
+++ b/core/src/fpdftext/fpdf_text_int.cpp
@@ -353,8 +353,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;
}
@@ -370,13 +370,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) <
@@ -492,13 +492,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) {
diff --git a/core/src/fpdftext/text_int.h b/core/src/fpdftext/text_int.h
index 50b9ab2c42..ec25c2b78a 100644
--- a/core/src/fpdftext/text_int.h
+++ b/core/src/fpdftext/text_int.h
@@ -61,12 +61,12 @@ class CPDF_TextPage : public IPDF_TextPage {
int nCount,
CFX_RectArray& rectArray) const;
virtual int GetIndexAtPos(CPDF_Point point,
- FX_FLOAT xTorelance,
- FX_FLOAT yTorelance) const;
+ FX_FLOAT xTolerance,
+ FX_FLOAT yTolerance) const;
virtual int GetIndexAtPos(FX_FLOAT x,
FX_FLOAT y,
- FX_FLOAT xTorelance,
- FX_FLOAT yTorelance) const;
+ FX_FLOAT xTolerance,
+ FX_FLOAT yTolerance) const;
virtual CFX_WideString GetTextByRect(const CFX_FloatRect& rect) const;
virtual void GetRectsArrayByRect(const CFX_FloatRect& rect,
CFX_RectArray& resRectArray) const;