summaryrefslogtreecommitdiff
path: root/core/src/fpdftext/text_int.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-09-04 14:11:03 -0700
committerLei Zhang <thestig@chromium.org>2015-09-04 14:11:03 -0700
commit0bfe588f394e2a00a866d31a30a9d795022f4a6c (patch)
tree695f7889e21c26ee6e6bdf01e430443fb619d4c8 /core/src/fpdftext/text_int.h
parent6087a2f18e0c779c1bae62812801cee98fe8a09d (diff)
downloadpdfium-0bfe588f394e2a00a866d31a30a9d795022f4a6c.tar.xz
Fix typos, nits and remove dead code in fpdf_text_int.cpp.
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1316643004 .
Diffstat (limited to 'core/src/fpdftext/text_int.h')
-rw-r--r--core/src/fpdftext/text_int.h23
1 files changed, 10 insertions, 13 deletions
diff --git a/core/src/fpdftext/text_int.h b/core/src/fpdftext/text_int.h
index 481c48294f..0b3b9c8ae0 100644
--- a/core/src/fpdftext/text_int.h
+++ b/core/src/fpdftext/text_int.h
@@ -51,15 +51,13 @@ typedef CFX_ArrayTemplate<PDFTEXT_Obj> LINEOBJ;
class CPDF_TextPage : public IPDF_TextPage {
public:
- CPDF_TextPage(const CPDF_Page* pPage, int flags = 0);
- CPDF_TextPage(const CPDF_PageObjects* pPage, int flags = 0);
- CPDF_TextPage(const CPDF_Page* pPage, CPDFText_ParseOptions ParserOptions);
+ CPDF_TextPage(const CPDF_Page* pPage, int flags);
~CPDF_TextPage() override {}
// IPDF_TextPage
FX_BOOL ParseTextPage() override;
void NormalizeObjects(FX_BOOL bNormalize) override;
- FX_BOOL IsParsered() const override { return m_IsParsered; }
+ bool IsParsed() const override { return m_bIsParsed; }
int CharIndexFromTextIndex(int TextIndex) const override;
int TextIndexFromCharIndex(int CharIndex) const override;
int CountChars() const override;
@@ -132,20 +130,18 @@ class CPDF_TextPage : public IPDF_TextPage {
const CPDF_Font* pFont,
int nItems) const;
- protected:
CPDFText_ParseOptions m_ParseOptions;
CFX_WordArray m_CharIndex;
- const CPDF_PageObjects* m_pPage;
+ const CPDF_PageObjects* const m_pPage;
PAGECHAR_InfoArray m_charList;
CFX_WideTextBuf m_TextBuf;
PAGECHAR_InfoArray m_TempCharList;
CFX_WideTextBuf m_TempTextBuf;
- int m_parserflag;
+ const int m_parserflag;
CPDF_TextObject* m_pPreTextObj;
CFX_AffineMatrix m_perMatrix;
- FX_BOOL m_IsParsered;
+ bool m_bIsParsed;
CFX_AffineMatrix m_DisplayMatrix;
-
SEGMENT_Array m_Segment;
CFX_RectArray m_SelRects;
LINEOBJ m_LineObj;
@@ -155,7 +151,7 @@ class CPDF_TextPage : public IPDF_TextPage {
class CPDF_TextPageFind : public IPDF_TextPageFind {
public:
- CPDF_TextPageFind(const IPDF_TextPage* pTextPage);
+ explicit CPDF_TextPageFind(const IPDF_TextPage* pTextPage);
~CPDF_TextPageFind() override {}
// IPDF_TextPageFind
@@ -200,6 +196,7 @@ class CPDF_TextPageFind : public IPDF_TextPageFind {
CFX_RectArray m_resArray;
FX_BOOL m_IsFind;
};
+
class CPDF_LinkExt {
public:
CPDF_LinkExt() {}
@@ -223,10 +220,10 @@ class CPDF_LinkExtract : public IPDF_LinkExtract {
void GetBoundedSegment(int index, int& start, int& count) const override;
void GetRects(int index, CFX_RectArray& rects) const override;
- FX_BOOL IsExtract() const { return m_IsParserd; }
+ FX_BOOL IsExtract() const { return m_bIsParsed; }
protected:
- void parserLink();
+ void ParseLink();
void DeleteLinkList();
FX_BOOL CheckWebLink(CFX_WideString& strBeCheck);
FX_BOOL CheckMailLink(CFX_WideString& str);
@@ -236,7 +233,7 @@ class CPDF_LinkExtract : public IPDF_LinkExtract {
LINK_InfoArray m_LinkList;
const CPDF_TextPage* m_pTextPage;
CFX_WideString m_strPageText;
- FX_BOOL m_IsParserd;
+ bool m_bIsParsed;
};
FX_STRSIZE FX_Unicode_GetNormalization(FX_WCHAR wch, FX_WCHAR* pDst);