Home | History | Annotate | Download | only in fpdfdoc

Lines Matching defs:place

34 CPVT_WordPlace CSection::AddWord(const CPVT_WordPlace& place,
37 place.nWordIndex, 0, pdfium::CollectionSize<int32_t>(m_WordArray));
40 return place;
70 CPVT_WordPlace CSection::GetPrevWordPlace(const CPVT_WordPlace& place) const {
71 if (place.nLineIndex < 0)
74 if (place.nLineIndex >= pdfium::CollectionSize<int32_t>(m_LineArray))
77 CLine* pLine = m_LineArray[place.nLineIndex].get();
78 if (place.nWordIndex == pLine->m_LineInfo.nBeginWordIndex)
79 return CPVT_WordPlace(place.nSecIndex, place.nLineIndex, -1);
81 if (place.nWordIndex >= pLine->m_LineInfo.nBeginWordIndex)
82 return pLine->GetPrevWordPlace(place);
84 if (!pdfium::IndexInBounds(m_LineArray, place.nLineIndex - 1))
85 return place;
87 return m_LineArray[place.nLineIndex - 1]->GetEndWordPlace();
90 CPVT_WordPlace CSection::GetNextWordPlace(const CPVT_WordPlace& place) const {
91 if (place.nLineIndex < 0)
94 if (place.nLineIndex >= pdfium::CollectionSize<int32_t>(m_LineArray))
97 CLine* pLine = m_LineArray[place.nLineIndex].get();
98 if (place.nWordIndex < pLine->m_LineInfo.nEndWordIndex)
99 return pLine->GetNextWordPlace(place);
101 if (!pdfium::IndexInBounds(m_LineArray, place.nLineIndex + 1))
102 return place;
104 return m_LineArray[place.nLineIndex + 1]->GetBeginWordPlace();
107 void CSection::UpdateWordPlace(CPVT_WordPlace& place) const {
113 if (place.nWordIndex < pLine->m_LineInfo.nBeginWordIndex) {
116 } else if (place.nWordIndex > pLine->m_LineInfo.nEndWordIndex) {
120 place.nLineIndex = nMid;
128 CPVT_WordPlace place = GetBeginWordPlace();
153 place = SearchWordPlace(
157 place.nLineIndex = nMid;
158 return place;
161 place = GetBeginWordPlace();
163 place = GetEndWordPlace();
164 return place;
255 void CSection::ClearWord(const CPVT_WordPlace& place) {
256 if (pdfium::IndexInBounds(m_WordArray, place.nWordIndex))
257 m_WordArray.erase(m_WordArray.begin() + place.nWordIndex);