From 65c6e0088c48c9cde95699d0ddddcafabddb8d16 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Mon, 27 Mar 2017 15:01:41 -0700 Subject: remove CFX_ArrayTemplate from cfde_txtedtparag.cpp Change-Id: I93ae474434a2867af9e9da96668b1834267bbef3 Reviewed-on: https://pdfium-review.googlesource.com/3237 Reviewed-by: dsinclair Commit-Queue: dsinclair --- xfa/fde/cfde_txtedtparag.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xfa/fde/cfde_txtedtparag.cpp b/xfa/fde/cfde_txtedtparag.cpp index d76fd7114f..19b3f84484 100644 --- a/xfa/fde/cfde_txtedtparag.cpp +++ b/xfa/fde/cfde_txtedtparag.cpp @@ -7,8 +7,10 @@ #include "xfa/fde/cfde_txtedtparag.h" #include +#include #include "third_party/base/ptr_util.h" +#include "third_party/base/stl_util.h" #include "xfa/fde/cfde_txtedtbuf.h" #include "xfa/fde/cfde_txtedtengine.h" #include "xfa/fde/ifde_txtedtengine.h" @@ -45,7 +47,7 @@ void CFDE_TxtEdtParag::LoadParag() { static_cast(pTxtBuf), wcAlias)); pIter->SetAt(m_nCharStart); int32_t nEndIndex = m_nCharStart + m_nCharCount; - CFX_ArrayTemplate LineBaseArr; + std::vector LineBaseArr; bool bReload = false; CFX_BreakType dwBreakStatus = CFX_BreakType::None; do { @@ -66,7 +68,7 @@ void CFDE_TxtEdtParag::LoadParag() { const CFX_BreakPiece* Piece = pTxtBreak->GetBreakPieceUnstable(j); nTotal += Piece->GetLength(); } - LineBaseArr.Add(nTotal); + LineBaseArr.push_back(nTotal); pTxtBreak->ClearBreakPieces(); } if (pIter->GetAt() + 1 == nEndIndex && @@ -77,7 +79,7 @@ void CFDE_TxtEdtParag::LoadParag() { } while (pIter->Next(false) && (pIter->GetAt() < nEndIndex)); pTxtBreak->EndBreak(CFX_BreakType::Paragraph); pTxtBreak->ClearBreakPieces(); - int32_t nLineCount = LineBaseArr.GetSize(); + int32_t nLineCount = pdfium::CollectionSize(LineBaseArr); m_nLineCount = nLineCount; if (m_lpData) m_lpData = FX_Realloc(int32_t, m_lpData, nLineCount + 1); @@ -90,8 +92,6 @@ void CFDE_TxtEdtParag::LoadParag() { pIntArr++; for (int32_t j = 0; j < nLineCount; j++, pIntArr++) *pIntArr = LineBaseArr[j]; - - LineBaseArr.RemoveAll(); } void CFDE_TxtEdtParag::UnloadParag() { -- cgit v1.2.3