From 490842eac38daebf5e49e3ae6aef601a00c73dce Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Fri, 15 May 2015 15:38:01 -0700 Subject: Merge to XFA: Initialize members of CPDF_TextPageFind class. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1137933004 (cherry picked from commit acae9257203971ee1e34d8d7573b7ba9a50041af) BUG= Review URL: https://codereview.chromium.org/1135793003 --- core/src/fpdftext/fpdf_text_int.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'core/src') diff --git a/core/src/fpdftext/fpdf_text_int.cpp b/core/src/fpdftext/fpdf_text_int.cpp index f19d3de9dc..73c7355c02 100644 --- a/core/src/fpdftext/fpdf_text_int.cpp +++ b/core/src/fpdftext/fpdf_text_int.cpp @@ -2226,13 +2226,16 @@ 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) { - return; - } - m_pTextPage = pTextPage; m_strText = m_pTextPage->GetPageText(); int nCount = pTextPage->CountChars(); if(nCount) { @@ -2266,8 +2269,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 { -- cgit v1.2.3