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

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

Issue 1137933004: Initialize members of CPDF_TextPageFind class. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Created 5 years, 7 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 | « no previous file | no next file » | 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 4570da224704ed94a42e390dbad5332469e864cb..bb72fffdb8a512fa6cafbbcc597ac043f73b0275 100644
--- a/core/src/fpdftext/fpdf_text_int.cpp
+++ b/core/src/fpdftext/fpdf_text_int.cpp
@@ -2233,13 +2233,19 @@ FX_BOOL CPDF_TextPage::IsLetter(FX_WCHAR unicode)
return TRUE;
}
CPDF_TextPageFind::CPDF_TextPageFind(const IPDF_TextPage* pTextPage)
- : m_pTextPage(NULL),
+ : m_pTextPage(pTextPage),
+ m_flags(0),
+ m_findNextStart(-1),
+ m_findPreStart(-1),
+ m_bMatchCase(FALSE),
+ m_bMatchWholeWord(FALSE),
+ m_resStart(0),
+ m_resEnd(-1),
m_IsFind(FALSE)
{
if (!pTextPage) {
Tom Sepez 2015/05/15 15:25:22 nit: is this even possible?
Lei Zhang 2015/05/15 22:19:07 Nope.
return;
}
- m_pTextPage = pTextPage;
m_strText = m_pTextPage->GetPageText();
int nCount = pTextPage->CountChars();
if(nCount) {
@@ -2273,8 +2279,6 @@ CPDF_TextPageFind::CPDF_TextPageFind(const IPDF_TextPage* pTextPage)
if(indexSize % 2) {
m_CharIndex.RemoveAt(indexSize - 1);
}
- m_resStart = 0;
- m_resEnd = -1;
}
int CPDF_TextPageFind::GetCharIndex(int index) const
{
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698