Lines Matching refs:chunk

55     ChunkHeader* chunk = m_chunks[i].get();  in SetText()  local
56 FXSYS_memcpy(chunk->wChars.get(), lpSrcBuf, in SetText()
60 chunk->nUsed = nCopyedLength; in SetText()
74 for (const auto& chunk : m_chunks) { in GetCharByIndex() local
75 pChunkHeader = chunk.get(); in GetCharByIndex()
141 ChunkHeader* chunk = m_chunks[chunkIndex].get(); in Insert() local
142 int32_t nCopy = chunk->nUsed - charIndex; in Insert()
144 FXSYS_memcpy(newChunk->wChars.get(), chunk->wChars.get() + charIndex, in Insert()
146 chunk->nUsed -= nCopy; in Insert()
155 ChunkHeader* chunk = m_chunks[chunkIndex - 1].get(); in Insert() local
156 if (chunk->nUsed != GetChunkSize()) { in Insert()
158 int32_t nFree = GetChunkSize() - chunk->nUsed; in Insert()
160 FXSYS_memcpy(chunk->wChars.get() + chunk->nUsed, lpText, in Insert()
164 chunk->nUsed += nCopy; in Insert()
170 auto chunk = NewChunk(); in Insert() local
173 FXSYS_memcpy(chunk->wChars.get(), lpText, nCopy * sizeof(FX_WCHAR)); in Insert()
176 chunk->nUsed = nCopy; in Insert()
177 m_chunks.insert(m_chunks.begin() + chunkIndex, std::move(chunk)); in Insert()
191 ChunkHeader* chunk = m_chunks[endChunkIndex].get(); in Delete() local
193 int32_t nMovePart = chunk->nUsed - nFirstPart; in Delete()
196 FXSYS_memmove(chunk->wChars.get() + nFirstPart - nDelete, in Delete()
197 chunk->wChars.get() + nFirstPart, in Delete()
199 chunk->nUsed -= nDelete; in Delete()
245 for (auto& chunk : m_chunks) { in Index2CP() local
246 nTotal += chunk->nUsed; in Index2CP()
257 auto chunk = pdfium::MakeUnique<ChunkHeader>(); in NewChunk() local
258 chunk->wChars.reset(FX_Alloc(FX_WCHAR, GetChunkSize())); in NewChunk()
259 chunk->nUsed = 0; in NewChunk()
260 return chunk; in NewChunk()
285 ChunkHeader* chunk = nullptr; in Next() local
291 chunk = m_pBuf->m_chunks[m_nCurChunk].get(); in Next()
292 if (chunk->nUsed > 0) { in Next()
293 m_nCurIndex = chunk->nUsed - 1; in Next()