From ab27768d235985c0789a10ab490be43e262f48f6 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 17 Feb 2016 10:07:21 -0800 Subject: Banish CFX_ByteArray and CFX_WideArray to the XFA side. Fix IWYU and include paths as we go. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1701883004 . --- fpdfsdk/src/pdfwindow/PWL_Edit.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'fpdfsdk/src/pdfwindow/PWL_Edit.cpp') diff --git a/fpdfsdk/src/pdfwindow/PWL_Edit.cpp b/fpdfsdk/src/pdfwindow/PWL_Edit.cpp index 057cb4191e..4b3886a11d 100644 --- a/fpdfsdk/src/pdfwindow/PWL_Edit.cpp +++ b/fpdfsdk/src/pdfwindow/PWL_Edit.cpp @@ -15,6 +15,7 @@ #include "fpdfsdk/include/pdfwindow/PWL_Utils.h" #include "fpdfsdk/include/pdfwindow/PWL_Wnd.h" #include "public/fpdf_fwlevent.h" +#include "third_party/base/stl_util.h" CPWL_Edit::CPWL_Edit() : m_pFillerNotify(NULL), m_pSpellCheck(NULL), m_bFocus(FALSE) { @@ -519,24 +520,21 @@ FX_BOOL CPWL_Edit::OnRButtonUp(const CPDF_Point& point, FX_DWORD nFlag) { if (!hPopup) return FALSE; - CFX_ByteStringArray sSuggestWords; + std::vector sSuggestWords; CPDF_Point ptPopup = point; if (!IsReadOnly()) { if (HasFlag(PES_SPELLCHECK) && !swLatin.IsEmpty()) { if (m_pSpellCheck) { CFX_ByteString sLatin = CFX_ByteString::FromUnicode(swLatin); - if (!m_pSpellCheck->CheckWord(sLatin)) { m_pSpellCheck->SuggestWords(sLatin, sSuggestWords); - int32_t nSuggest = sSuggestWords.GetSize(); - + int32_t nSuggest = pdfium::CollectionSize(sSuggestWords); for (int32_t nWord = 0; nWord < nSuggest; nWord++) { pSH->AppendMenuItem(hPopup, WM_PWLEDIT_SUGGEST + nWord, sSuggestWords[nWord].UTF8Decode()); } - if (nSuggest > 0) pSH->AppendMenuItem(hPopup, 0, L""); -- cgit v1.2.3