| Index: fpdfsdk/src/pdfwindow/PWL_Edit.cpp
|
| diff --git a/fpdfsdk/src/pdfwindow/PWL_Edit.cpp b/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
|
| index 057cb4191ef13dcd5360843975589f6107c7b716..4b3886a11d36571c2a4a37f4cbf4861d4419d941 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"");
|
|
|
|
|