summaryrefslogtreecommitdiff
path: root/xfa/fde/cfde_txtedtengine.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-01-10 16:35:58 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-01-10 21:50:44 +0000
commit0e6438e40a95702edb8327286c8253aa269c9826 (patch)
tree5d3b07277b5fa4a1fb96a9d2a23108a3d02bdc9e /xfa/fde/cfde_txtedtengine.cpp
parent6c0c48227aa024aa6e188ed7adf4d7c3d410cff9 (diff)
downloadpdfium-0e6438e40a95702edb8327286c8253aa269c9826.tar.xz
Remove custom allocator from CFDE_TxtEdtBuf.
This CL removes the custom allocator from CFDE_TxtEdtBuf and uses std::vector<std::unique_ptr>> instead. The Iterator code has been made an inner class of the buffer and rename to CFDE_TxtEdtBuf::Iterator instead of CFDE_TxtEdtBufIter. Change-Id: Ied8e844dea700e0ef37087f0d3fad4882d9eada1 Reviewed-on: https://pdfium-review.googlesource.com/2159 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fde/cfde_txtedtengine.cpp')
-rw-r--r--xfa/fde/cfde_txtedtengine.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/xfa/fde/cfde_txtedtengine.cpp b/xfa/fde/cfde_txtedtengine.cpp
index 555df20b99..8bb944712a 100644
--- a/xfa/fde/cfde_txtedtengine.cpp
+++ b/xfa/fde/cfde_txtedtengine.cpp
@@ -10,7 +10,6 @@
#include "third_party/base/ptr_util.h"
#include "xfa/fde/cfde_txtedtbuf.h"
-#include "xfa/fde/cfde_txtedtbufiter.h"
#include "xfa/fde/cfde_txtedtdorecord_deleterange.h"
#include "xfa/fde/cfde_txtedtdorecord_insert.h"
#include "xfa/fde/cfde_txtedtpage.h"
@@ -706,7 +705,7 @@ CFDE_TxtEdtParag* CFDE_TxtEdtEngine::GetParag(int32_t nParagIndex) const {
IFX_CharIter* CFDE_TxtEdtEngine::CreateCharIter() {
if (!m_pTxtBuf)
return nullptr;
- return new CFDE_TxtEdtBufIter(m_pTxtBuf.get());
+ return new CFDE_TxtEdtBuf::Iterator(m_pTxtBuf.get());
}
int32_t CFDE_TxtEdtEngine::Line2Parag(int32_t nStartParag,
@@ -932,7 +931,8 @@ void CFDE_TxtEdtEngine::RebuildParagraphs() {
FX_WCHAR wChar = L' ';
int32_t nParagStart = 0;
int32_t nIndex = 0;
- std::unique_ptr<IFX_CharIter> pIter(new CFDE_TxtEdtBufIter(m_pTxtBuf.get()));
+ std::unique_ptr<IFX_CharIter> pIter(
+ new CFDE_TxtEdtBuf::Iterator(m_pTxtBuf.get()));
pIter->SetAt(0);
do {
wChar = pIter->GetChar();