diff options
author | Tom Sepez <tsepez@chromium.org> | 2016-02-17 10:07:21 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2016-02-17 10:07:21 -0800 |
commit | ab27768d235985c0789a10ab490be43e262f48f6 (patch) | |
tree | 692c2707020bee87753c05208c7d0c6f176ff30b /fpdfsdk/src/pdfwindow | |
parent | 32c70815316672091946be88e5941089c359d151 (diff) | |
download | pdfium-ab27768d235985c0789a10ab490be43e262f48f6.tar.xz |
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 .
Diffstat (limited to 'fpdfsdk/src/pdfwindow')
-rw-r--r-- | fpdfsdk/src/pdfwindow/PWL_Edit.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
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<CFX_ByteString> 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<int32_t>(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""); |