diff options
author | tsepez <tsepez@chromium.org> | 2016-11-02 15:17:29 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-11-02 15:17:30 -0700 |
commit | 12f3e4a58f05850b93af35619cb04f0231d86acc (patch) | |
tree | 9851d8e46e5c168f5d148864caa2eebf814529dd /core/fpdftext | |
parent | 3b3ce1a242f8445848d3f23d6c35ba01d7c645f4 (diff) | |
download | pdfium-12f3e4a58f05850b93af35619cb04f0231d86acc.tar.xz |
Remove FX_BOOL from core
Review-Url: https://codereview.chromium.org/2477443002
Diffstat (limited to 'core/fpdftext')
-rw-r--r-- | core/fpdftext/cpdf_linkextract.cpp | 2 | ||||
-rw-r--r-- | core/fpdftext/cpdf_textpage.cpp | 64 | ||||
-rw-r--r-- | core/fpdftext/cpdf_textpage.h | 23 | ||||
-rw-r--r-- | core/fpdftext/cpdf_textpagefind.cpp | 100 | ||||
-rw-r--r-- | core/fpdftext/cpdf_textpagefind.h | 28 |
5 files changed, 107 insertions, 110 deletions
diff --git a/core/fpdftext/cpdf_linkextract.cpp b/core/fpdftext/cpdf_linkextract.cpp index 8546a8294c..a1fc93e158 100644 --- a/core/fpdftext/cpdf_linkextract.cpp +++ b/core/fpdftext/cpdf_linkextract.cpp @@ -108,7 +108,7 @@ bool CPDF_LinkExtract::CheckMailLink(CFX_WideString& str) { if (ch != L'.' || i == pPos - 1 || i == 0) { if (i == aPos - 1) { // There is '.' or invalid char before '@'. - return FALSE; + return false; } // End extracting for other invalid chars, '.' at the beginning, or // consecutive '.'. diff --git a/core/fpdftext/cpdf_textpage.cpp b/core/fpdftext/cpdf_textpage.cpp index a65af601cc..f7654f3e87 100644 --- a/core/fpdftext/cpdf_textpage.cpp +++ b/core/fpdftext/cpdf_textpage.cpp @@ -670,7 +670,7 @@ void CPDF_TextPage::AddCharInfoByRLDirection(FX_WCHAR wChar, } info.m_Index = m_TextBuf.GetLength(); - wChar = FX_GetMirrorChar(wChar, TRUE, FALSE); + wChar = FX_GetMirrorChar(wChar, true, false); FX_WCHAR* pDst = nullptr; FX_STRSIZE nCount = Unicode_GetNormalization(wChar, pDst); if (nCount >= 1) { @@ -952,9 +952,9 @@ void CPDF_TextPage::SwapTempTextBuf(int32_t iCharListStartAppend, std::swap(pTempBuffer[i], pTempBuffer[j]); } -FX_BOOL CPDF_TextPage::IsRightToLeft(const CPDF_TextObject* pTextObj, - const CPDF_Font* pFont, - int nItems) const { +bool CPDF_TextPage::IsRightToLeft(const CPDF_TextObject* pTextObj, + const CPDF_Font* pFont, + int nItems) const { CFX_WideString str; for (int32_t i = 0; i < nItems; i++) { CPDF_TextObjectItem item; @@ -1059,8 +1059,8 @@ void CPDF_TextPage::ProcessTextObject(PDFTEXT_Obj Obj) { int nItems = pTextObj->CountItems(); FX_FLOAT baseSpace = CalculateBaseSpace(pTextObj, matrix); - const FX_BOOL bR2L = IsRightToLeft(pTextObj, pFont, nItems); - const FX_BOOL bIsBidiAndMirrorInverse = + const bool bR2L = IsRightToLeft(pTextObj, pFont, nItems); + const bool bIsBidiAndMirrorInverse = bR2L && (matrix.a * matrix.d - matrix.b * matrix.c) < 0; int32_t iBufStartAppend = m_TempTextBuf.GetLength(); int32_t iCharListStartAppend = @@ -1241,7 +1241,7 @@ CPDF_TextPage::TextOrientation CPDF_TextPage::GetTextObjectWritingMode( return m_TextlineDir; } -FX_BOOL CPDF_TextPage::IsHyphen(FX_WCHAR curChar) { +bool CPDF_TextPage::IsHyphen(FX_WCHAR curChar) { CFX_WideString strCurText = m_TempTextBuf.MakeString(); if (strCurText.IsEmpty()) strCurText = m_TextBuf.AsStringC(); @@ -1257,7 +1257,7 @@ FX_BOOL CPDF_TextPage::IsHyphen(FX_WCHAR curChar) { (preChar >= L'a' && preChar <= L'z')) && ((curChar >= L'A' && curChar <= L'Z') || (curChar >= L'a' && curChar <= L'z'))) { - return TRUE; + return true; } } const PAGECHAR_INFO* preInfo; @@ -1266,13 +1266,13 @@ FX_BOOL CPDF_TextPage::IsHyphen(FX_WCHAR curChar) { else if (!m_CharList.empty()) preInfo = &m_CharList.back(); else - return FALSE; + return false; if (FPDFTEXT_CHAR_PIECE == preInfo->m_Flag && (0xAD == preInfo->m_Unicode || 0x2D == preInfo->m_Unicode)) { - return TRUE; + return true; } } - return FALSE; + return false; } CPDF_TextPage::GenerateCharacter CPDF_TextPage::ProcessInsertObject( @@ -1350,7 +1350,7 @@ CPDF_TextPage::GenerateCharacter CPDF_TextPage::ProcessInsertObject( rect1.Intersect(rect2); if ((rect1.IsEmpty() && rect2.Height() > 5 && rect3.Height() > 5) || ((y > threshold * 2 || y < threshold * -3) && - (FXSYS_fabs(y) < 1 ? FXSYS_fabs(x) < FXSYS_fabs(y) : TRUE))) { + (FXSYS_fabs(y) < 1 ? FXSYS_fabs(x) < FXSYS_fabs(y) : true))) { bNewline = true; if (nItem > 1) { CPDF_TextObjectItem tempItem; @@ -1428,10 +1428,10 @@ CPDF_TextPage::GenerateCharacter CPDF_TextPage::ProcessInsertObject( return GenerateCharacter::None; } -FX_BOOL CPDF_TextPage::IsSameTextObject(CPDF_TextObject* pTextObj1, - CPDF_TextObject* pTextObj2) { +bool CPDF_TextPage::IsSameTextObject(CPDF_TextObject* pTextObj1, + CPDF_TextObject* pTextObj2) { if (!pTextObj1 || !pTextObj2) - return FALSE; + return false; CFX_FloatRect rcPreObj(pTextObj2->m_Left, pTextObj2->m_Bottom, pTextObj2->m_Right, pTextObj2->m_Top); CFX_FloatRect rcCurObj(pTextObj1->m_Left, pTextObj1->m_Bottom, @@ -1443,27 +1443,27 @@ FX_BOOL CPDF_TextPage::IsSameTextObject(CPDF_TextObject* pTextObj1, PAGECHAR_INFO perCharTemp = m_CharList[nCount - 2]; FX_FLOAT dbSpace = perCharTemp.m_CharBox.Width(); if (dbXdif > dbSpace) - return FALSE; + return false; } } if (!rcPreObj.IsEmpty() || !rcCurObj.IsEmpty()) { rcPreObj.Intersect(rcCurObj); if (rcPreObj.IsEmpty()) - return FALSE; + return false; if (FXSYS_fabs(rcPreObj.Width() - rcCurObj.Width()) > rcCurObj.Width() / 2) { - return FALSE; + return false; } if (pTextObj2->GetFontSize() != pTextObj1->GetFontSize()) - return FALSE; + return false; } int nPreCount = pTextObj2->CountItems(); int nCurCount = pTextObj1->CountItems(); if (nPreCount != nCurCount) - return FALSE; + return false; // If both objects have no items, consider them same. if (!nPreCount) - return TRUE; + return true; CPDF_TextObjectItem itemPer = {0, 0.0f, 0.0f}; CPDF_TextObjectItem itemCur = {0, 0.0f, 0.0f}; @@ -1471,7 +1471,7 @@ FX_BOOL CPDF_TextPage::IsSameTextObject(CPDF_TextObject* pTextObj1, pTextObj2->GetItemInfo(i, &itemPer); pTextObj1->GetItemInfo(i, &itemCur); if (itemCur.m_CharCode != itemPer.m_CharCode) - return FALSE; + return false; } if (FXSYS_fabs(pTextObj1->GetPosX() - pTextObj2->GetPosX()) > GetCharWidth(itemPer.m_CharCode, pTextObj2->GetFont()) * @@ -1480,12 +1480,12 @@ FX_BOOL CPDF_TextPage::IsSameTextObject(CPDF_TextObject* pTextObj1, std::max(std::max(rcPreObj.Height(), rcPreObj.Width()), pTextObj2->GetFontSize()) / 8) { - return FALSE; + return false; } - return TRUE; + return true; } -FX_BOOL CPDF_TextPage::IsSameAsPreTextObject( +bool CPDF_TextPage::IsSameAsPreTextObject( CPDF_TextObject* pTextObj, const CPDF_PageObjectList* pObjList, CPDF_PageObjectList::const_iterator iter) { @@ -1496,20 +1496,20 @@ FX_BOOL CPDF_TextPage::IsSameAsPreTextObject( if (pOtherObj == pTextObj || !pOtherObj->IsText()) continue; if (IsSameTextObject(pOtherObj->AsText(), pTextObj)) - return TRUE; + return true; ++i; } - return FALSE; + return false; } -FX_BOOL CPDF_TextPage::GenerateCharInfo(FX_WCHAR unicode, PAGECHAR_INFO& info) { +bool CPDF_TextPage::GenerateCharInfo(FX_WCHAR unicode, PAGECHAR_INFO& info) { const PAGECHAR_INFO* preChar; if (!m_TempCharList.empty()) preChar = &m_TempCharList.back(); else if (!m_CharList.empty()) preChar = &m_CharList.back(); else - return FALSE; + return false; info.m_Index = m_TextBuf.GetLength(); info.m_Unicode = unicode; info.m_pTextObj = nullptr; @@ -1530,11 +1530,11 @@ FX_BOOL CPDF_TextPage::GenerateCharInfo(FX_WCHAR unicode, PAGECHAR_INFO& info) { info.m_OriginY = preChar->m_OriginY; info.m_CharBox = CFX_FloatRect(info.m_OriginX, info.m_OriginY, info.m_OriginX, info.m_OriginY); - return TRUE; + return true; } -FX_BOOL CPDF_TextPage::IsRectIntersect(const CFX_FloatRect& rect1, - const CFX_FloatRect& rect2) { +bool CPDF_TextPage::IsRectIntersect(const CFX_FloatRect& rect1, + const CFX_FloatRect& rect2) { CFX_FloatRect rect = rect1; rect.Intersect(rect2); return !rect.IsEmpty(); diff --git a/core/fpdftext/cpdf_textpage.h b/core/fpdftext/cpdf_textpage.h index 99c2b5299b..aa1fc5bb03 100644 --- a/core/fpdftext/cpdf_textpage.h +++ b/core/fpdftext/cpdf_textpage.h @@ -107,8 +107,8 @@ class CPDF_TextPage { FX_FLOAT& right, FX_FLOAT& bottom) const; - static FX_BOOL IsRectIntersect(const CFX_FloatRect& rect1, - const CFX_FloatRect& rect2); + static bool IsRectIntersect(const CFX_FloatRect& rect1, + const CFX_FloatRect& rect2); private: enum class TextOrientation { @@ -124,7 +124,7 @@ class CPDF_TextPage { Hyphen, }; - FX_BOOL IsHyphen(FX_WCHAR curChar); + bool IsHyphen(FX_WCHAR curChar); bool IsControlChar(const PAGECHAR_INFO& charInfo); void ProcessObject(); void ProcessFormObject(CPDF_FormObject* pFormObj, @@ -136,12 +136,11 @@ class CPDF_TextPage { CPDF_PageObjectList::const_iterator ObjPos); GenerateCharacter ProcessInsertObject(const CPDF_TextObject* pObj, const CFX_Matrix& formMatrix); - FX_BOOL GenerateCharInfo(FX_WCHAR unicode, PAGECHAR_INFO& info); - FX_BOOL IsSameAsPreTextObject(CPDF_TextObject* pTextObj, - const CPDF_PageObjectList* pObjList, - CPDF_PageObjectList::const_iterator ObjPos); - FX_BOOL IsSameTextObject(CPDF_TextObject* pTextObj1, - CPDF_TextObject* pTextObj2); + bool GenerateCharInfo(FX_WCHAR unicode, PAGECHAR_INFO& info); + bool IsSameAsPreTextObject(CPDF_TextObject* pTextObj, + const CPDF_PageObjectList* pObjList, + CPDF_PageObjectList::const_iterator ObjPos); + bool IsSameTextObject(CPDF_TextObject* pTextObj1, CPDF_TextObject* pTextObj2); int GetCharWidth(uint32_t charCode, CPDF_Font* pFont) const; void CloseTempLine(); FPDFText_MarkedContent PreMarkedContent(PDFTEXT_Obj pObj); @@ -156,9 +155,9 @@ class CPDF_TextPage { void AppendGeneratedCharacter(FX_WCHAR unicode, const CFX_Matrix& formMatrix); void SwapTempTextBuf(int32_t iCharListStartAppend, int32_t iBufStartAppend); - FX_BOOL IsRightToLeft(const CPDF_TextObject* pTextObj, - const CPDF_Font* pFont, - int nItems) const; + bool IsRightToLeft(const CPDF_TextObject* pTextObj, + const CPDF_Font* pFont, + int nItems) const; const CPDF_Page* const m_pPage; std::vector<uint16_t> m_CharIndex; diff --git a/core/fpdftext/cpdf_textpagefind.cpp b/core/fpdftext/cpdf_textpagefind.cpp index 1eb5c4e67b..a79b5e7e8a 100644 --- a/core/fpdftext/cpdf_textpagefind.cpp +++ b/core/fpdftext/cpdf_textpagefind.cpp @@ -17,7 +17,7 @@ namespace { -FX_BOOL IsIgnoreSpaceCharacter(FX_WCHAR curChar) { +bool IsIgnoreSpaceCharacter(FX_WCHAR curChar) { if (curChar < 255 || (curChar >= 0x0600 && curChar <= 0x06FF) || (curChar >= 0xFE70 && curChar <= 0xFEFF) || (curChar >= 0xFB50 && curChar <= 0xFDFF) || @@ -26,9 +26,9 @@ FX_BOOL IsIgnoreSpaceCharacter(FX_WCHAR curChar) { (curChar >= 0xA640 && curChar <= 0xA69F) || (curChar >= 0x2DE0 && curChar <= 0x2DFF) || curChar == 8467 || (curChar >= 0x2000 && curChar <= 0x206F)) { - return FALSE; + return false; } - return TRUE; + return true; } } // namespace @@ -38,11 +38,11 @@ CPDF_TextPageFind::CPDF_TextPageFind(const CPDF_TextPage* pTextPage) m_flags(0), m_findNextStart(-1), m_findPreStart(-1), - m_bMatchCase(FALSE), - m_bMatchWholeWord(FALSE), + m_bMatchCase(false), + m_bMatchWholeWord(false), m_resStart(0), m_resEnd(-1), - m_IsFind(FALSE) { + m_IsFind(false) { m_strText = m_pTextPage->GetPageText(); int nCount = pTextPage->CountChars(); if (nCount) @@ -81,11 +81,11 @@ int CPDF_TextPageFind::GetCharIndex(int index) const { return m_pTextPage->CharIndexFromTextIndex(index); } -FX_BOOL CPDF_TextPageFind::FindFirst(const CFX_WideString& findwhat, - int flags, - int startPos) { +bool CPDF_TextPageFind::FindFirst(const CFX_WideString& findwhat, + int flags, + int startPos) { if (!m_pTextPage) - return FALSE; + return false; if (m_strText.IsEmpty() || m_bMatchCase != (flags & FPDFTEXT_MATCHCASE)) m_strText = m_pTextPage->GetPageText(); CFX_WideString findwhatStr = findwhat; @@ -93,8 +93,8 @@ FX_BOOL CPDF_TextPageFind::FindFirst(const CFX_WideString& findwhat, m_flags = flags; m_bMatchCase = flags & FPDFTEXT_MATCHCASE; if (m_strText.IsEmpty()) { - m_IsFind = FALSE; - return TRUE; + m_IsFind = false; + return true; } FX_STRSIZE len = findwhatStr.GetLength(); if (!m_bMatchCase) { @@ -119,26 +119,26 @@ FX_BOOL CPDF_TextPageFind::FindFirst(const CFX_WideString& findwhat, else m_csFindWhatArray.push_back(findwhatStr); if (m_csFindWhatArray.empty()) - return FALSE; - m_IsFind = TRUE; + return false; + m_IsFind = true; m_resStart = 0; m_resEnd = -1; - return TRUE; + return true; } -FX_BOOL CPDF_TextPageFind::FindNext() { +bool CPDF_TextPageFind::FindNext() { if (!m_pTextPage) - return FALSE; + return false; m_resArray.clear(); if (m_findNextStart == -1) - return FALSE; + return false; if (m_strText.IsEmpty()) { - m_IsFind = FALSE; + m_IsFind = false; return m_IsFind; } int strLen = m_strText.GetLength(); if (m_findNextStart > strLen - 1) { - m_IsFind = FALSE; + m_IsFind = false; return m_IsFind; } int nCount = pdfium::CollectionSize<int>(m_csFindWhatArray); @@ -165,13 +165,13 @@ FX_BOOL CPDF_TextPageFind::FindNext() { int endIndex; nResultPos = m_strText.Find(csWord.c_str(), nStartPos); if (nResultPos == -1) { - m_IsFind = FALSE; + m_IsFind = false; return m_IsFind; } endIndex = nResultPos + csWord.GetLength() - 1; if (iWord == 0) m_resStart = nResultPos; - FX_BOOL bMatch = TRUE; + bool bMatch = true; if (iWord != 0 && !bSpaceStart) { int PreResEndPos = nStartPos; int curChar = csWord.GetAt(0); @@ -180,13 +180,13 @@ FX_BOOL CPDF_TextPageFind::FindNext() { if (nStartPos == nResultPos && !(IsIgnoreSpaceCharacter(lastChar) || IsIgnoreSpaceCharacter(curChar))) { - bMatch = FALSE; + bMatch = false; } for (int d = PreResEndPos; d < nResultPos; d++) { FX_WCHAR strInsert = m_strText.GetAt(d); if (strInsert != TEXT_LINEFEED_CHAR && strInsert != TEXT_SPACE_CHAR && strInsert != TEXT_RETURN_CHAR && strInsert != 160) { - bMatch = FALSE; + bMatch = false; break; } } @@ -195,7 +195,7 @@ FX_BOOL CPDF_TextPageFind::FindNext() { FX_WCHAR strInsert = m_strText.GetAt(nResultPos - 1); if (strInsert != TEXT_LINEFEED_CHAR && strInsert != TEXT_SPACE_CHAR && strInsert != TEXT_RETURN_CHAR && strInsert != 160) { - bMatch = FALSE; + bMatch = false; m_resStart = nResultPos; } else { m_resStart = nResultPos - 1; @@ -215,7 +215,7 @@ FX_BOOL CPDF_TextPageFind::FindNext() { } } m_resEnd = nResultPos + m_csFindWhatArray.back().GetLength() - 1; - m_IsFind = TRUE; + m_IsFind = true; int resStart = GetCharIndex(m_resStart); int resEnd = GetCharIndex(m_resEnd); m_resArray = m_pTextPage->GetRectArray(resStart, resEnd - resStart + 1); @@ -229,18 +229,18 @@ FX_BOOL CPDF_TextPageFind::FindNext() { return m_IsFind; } -FX_BOOL CPDF_TextPageFind::FindPrev() { +bool CPDF_TextPageFind::FindPrev() { if (!m_pTextPage) - return FALSE; + return false; m_resArray.clear(); if (m_strText.IsEmpty() || m_findPreStart < 0) { - m_IsFind = FALSE; + m_IsFind = false; return m_IsFind; } CPDF_TextPageFind findEngine(m_pTextPage); - FX_BOOL ret = findEngine.FindFirst(m_findWhat, m_flags); + bool ret = findEngine.FindFirst(m_findWhat, m_flags); if (!ret) { - m_IsFind = FALSE; + m_IsFind = false; return m_IsFind; } int order = -1, MatchedCount = 0; @@ -256,12 +256,12 @@ FX_BOOL CPDF_TextPageFind::FindPrev() { } } if (order == -1) { - m_IsFind = FALSE; + m_IsFind = false; return m_IsFind; } m_resStart = m_pTextPage->TextIndexFromCharIndex(order); m_resEnd = m_pTextPage->TextIndexFromCharIndex(order + MatchedCount - 1); - m_IsFind = TRUE; + m_IsFind = true; m_resArray = m_pTextPage->GetRectArray(order, MatchedCount); if (m_flags & FPDFTEXT_CONSECUTIVE) { m_findNextStart = m_resStart + 1; @@ -318,16 +318,16 @@ void CPDF_TextPageFind::ExtractFindWhat(const CFX_WideString& findwhat) { } } -FX_BOOL CPDF_TextPageFind::IsMatchWholeWord(const CFX_WideString& csPageText, - int startPos, - int endPos) { +bool CPDF_TextPageFind::IsMatchWholeWord(const CFX_WideString& csPageText, + int startPos, + int endPos) { FX_WCHAR char_left = 0; FX_WCHAR char_right = 0; int char_count = endPos - startPos + 1; if (char_count < 1) - return FALSE; + return false; if (char_count == 1 && csPageText.GetAt(startPos) > 255) - return TRUE; + return true; if (startPos - 1 >= 0) char_left = csPageText.GetAt(startPos - 1); if (startPos + char_count < csPageText.GetLength()) @@ -339,39 +339,39 @@ FX_BOOL CPDF_TextPageFind::IsMatchWholeWord(const CFX_WideString& csPageText, (char_right > 'a' && char_right < 'z') || (char_right > 0xfb00 && char_right < 0xfb06) || std::iswdigit(char_right)) { - return FALSE; + return false; } if (!(('A' > char_left || char_left > 'Z') && ('a' > char_left || char_left > 'z') && ('A' > char_right || char_right > 'Z') && ('a' > char_right || char_right > 'z'))) { - return FALSE; + return false; } if (char_count > 0) { if (csPageText.GetAt(startPos) >= L'0' && csPageText.GetAt(startPos) <= L'9' && char_left >= L'0' && char_left <= L'9') { - return FALSE; + return false; } if (csPageText.GetAt(endPos) >= L'0' && csPageText.GetAt(endPos) <= L'9' && char_right >= L'0' && char_right <= L'9') { - return FALSE; + return false; } } - return TRUE; + return true; } -FX_BOOL CPDF_TextPageFind::ExtractSubString(CFX_WideString& rString, - const FX_WCHAR* lpszFullString, - int iSubString, - FX_WCHAR chSep) { +bool CPDF_TextPageFind::ExtractSubString(CFX_WideString& rString, + const FX_WCHAR* lpszFullString, + int iSubString, + FX_WCHAR chSep) { if (!lpszFullString) - return FALSE; + return false; while (iSubString--) { lpszFullString = std::wcschr(lpszFullString, chSep); if (!lpszFullString) { rString.clear(); - return FALSE; + return false; } lpszFullString++; while (*lpszFullString == chSep) @@ -384,7 +384,7 @@ FX_BOOL CPDF_TextPageFind::ExtractSubString(CFX_WideString& rString, FXSYS_memcpy(rString.GetBuffer(nLen), lpszFullString, nLen * sizeof(FX_WCHAR)); rString.ReleaseBuffer(); - return TRUE; + return true; } CFX_WideString CPDF_TextPageFind::MakeReverse(const CFX_WideString& str) { diff --git a/core/fpdftext/cpdf_textpagefind.h b/core/fpdftext/cpdf_textpagefind.h index f84ae37c73..c60cb576a7 100644 --- a/core/fpdftext/cpdf_textpagefind.h +++ b/core/fpdftext/cpdf_textpagefind.h @@ -20,23 +20,21 @@ class CPDF_TextPageFind { explicit CPDF_TextPageFind(const CPDF_TextPage* pTextPage); ~CPDF_TextPageFind(); - FX_BOOL FindFirst(const CFX_WideString& findwhat, - int flags, - int startPos = 0); - FX_BOOL FindNext(); - FX_BOOL FindPrev(); + bool FindFirst(const CFX_WideString& findwhat, int flags, int startPos = 0); + bool FindNext(); + bool FindPrev(); int GetCurOrder() const; int GetMatchedCount() const; protected: void ExtractFindWhat(const CFX_WideString& findwhat); - FX_BOOL IsMatchWholeWord(const CFX_WideString& csPageText, - int startPos, - int endPos); - FX_BOOL ExtractSubString(CFX_WideString& rString, - const FX_WCHAR* lpszFullString, - int iSubString, - FX_WCHAR chSep); + bool IsMatchWholeWord(const CFX_WideString& csPageText, + int startPos, + int endPos); + bool ExtractSubString(CFX_WideString& rString, + const FX_WCHAR* lpszFullString, + int iSubString, + FX_WCHAR chSep); CFX_WideString MakeReverse(const CFX_WideString& str); int GetCharIndex(int index) const; @@ -49,12 +47,12 @@ class CPDF_TextPageFind { std::vector<CFX_WideString> m_csFindWhatArray; int m_findNextStart; int m_findPreStart; - FX_BOOL m_bMatchCase; - FX_BOOL m_bMatchWholeWord; + bool m_bMatchCase; + bool m_bMatchWholeWord; int m_resStart; int m_resEnd; std::vector<CFX_FloatRect> m_resArray; - FX_BOOL m_IsFind; + bool m_IsFind; }; #endif // CORE_FPDFTEXT_CPDF_TEXTPAGEFIND_H_ |