summaryrefslogtreecommitdiff
path: root/fpdfsdk/src
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2016-03-09 09:59:23 -0500
committerDan Sinclair <dsinclair@chromium.org>2016-03-09 09:59:23 -0500
commit3ebd121d45ceb08918a3dcb5b3b7ac29448c862f (patch)
tree361d5fa0f9be7484cce4aace1b9cc18545046611 /fpdfsdk/src
parent317758574e173367b41928a1575d70600c6b6ea8 (diff)
downloadpdfium-3ebd121d45ceb08918a3dcb5b3b7ac29448c862f.tar.xz
Review and cleanup lint warnings.
This CL goes through the remaining list of list warnings and records why they are currently blacklisted, or fixes and enables them. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1773733002 .
Diffstat (limited to 'fpdfsdk/src')
-rw-r--r--fpdfsdk/src/fpdfdoc_embeddertest.cpp2
-rw-r--r--fpdfsdk/src/fpdfppo.cpp2
-rw-r--r--fpdfsdk/src/fpdfsave.cpp2
-rw-r--r--fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp8
-rw-r--r--fpdfsdk/src/fpdfxfa/fpdfxfa_util.cpp3
-rw-r--r--fpdfsdk/src/fsdk_actionhandler.cpp3
-rw-r--r--fpdfsdk/src/fsdk_annothandler.cpp4
-rw-r--r--fpdfsdk/src/fsdk_baseform.cpp1
-rw-r--r--fpdfsdk/src/fsdk_mgr.cpp4
-rw-r--r--fpdfsdk/src/fxedit/fxet_list.cpp7
-rw-r--r--fpdfsdk/src/javascript/Document.cpp6
-rw-r--r--fpdfsdk/src/javascript/Document.h1
-rw-r--r--fpdfsdk/src/javascript/Field.cpp1
-rw-r--r--fpdfsdk/src/javascript/Field.h3
-rw-r--r--fpdfsdk/src/javascript/JS_Define.h4
-rw-r--r--fpdfsdk/src/javascript/JS_Runtime.h1
-rw-r--r--fpdfsdk/src/javascript/JS_Value.cpp14
-rw-r--r--fpdfsdk/src/javascript/JS_Value.h4
-rw-r--r--fpdfsdk/src/javascript/PublicMethods.cpp23
-rw-r--r--fpdfsdk/src/javascript/PublicMethods.h3
-rw-r--r--fpdfsdk/src/javascript/app.cpp3
-rw-r--r--fpdfsdk/src/javascript/app.h5
-rw-r--r--fpdfsdk/src/javascript/color.cpp2
-rw-r--r--fpdfsdk/src/javascript/color.h4
-rw-r--r--fpdfsdk/src/javascript/console.cpp2
-rw-r--r--fpdfsdk/src/javascript/console.h2
-rw-r--r--fpdfsdk/src/javascript/global.cpp2
-rw-r--r--fpdfsdk/src/javascript/global.h1
-rw-r--r--fpdfsdk/src/javascript/report.cpp2
-rw-r--r--fpdfsdk/src/javascript/report.h2
-rw-r--r--fpdfsdk/src/javascript/util.cpp3
-rw-r--r--fpdfsdk/src/javascript/util.h3
-rw-r--r--fpdfsdk/src/jsapi/fxjs_v8.cpp7
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp4
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Edit.cpp2
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_ListBox.cpp4
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Note.cpp4
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Signature.cpp7
38 files changed, 103 insertions, 52 deletions
diff --git a/fpdfsdk/src/fpdfdoc_embeddertest.cpp b/fpdfsdk/src/fpdfdoc_embeddertest.cpp
index 0ca6a48ca7..4788773982 100644
--- a/fpdfsdk/src/fpdfdoc_embeddertest.cpp
+++ b/fpdfsdk/src/fpdfdoc_embeddertest.cpp
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <string>
+
#include "core/include/fxcrt/fx_string.h"
#include "public/fpdf_doc.h"
#include "public/fpdfview.h"
diff --git a/fpdfsdk/src/fpdfppo.cpp b/fpdfsdk/src/fpdfppo.cpp
index 3b3d340a93..2f3a23c548 100644
--- a/fpdfsdk/src/fpdfppo.cpp
+++ b/fpdfsdk/src/fpdfppo.cpp
@@ -6,7 +6,9 @@
#include "public/fpdf_ppo.h"
+#include <map>
#include <memory>
+#include <vector>
#include "core/include/fpdfapi/cpdf_document.h"
#include "fpdfsdk/include/fsdk_define.h"
diff --git a/fpdfsdk/src/fpdfsave.cpp b/fpdfsdk/src/fpdfsave.cpp
index f93b52d6b7..0971a4bcd1 100644
--- a/fpdfsdk/src/fpdfsave.cpp
+++ b/fpdfsdk/src/fpdfsave.cpp
@@ -6,6 +6,8 @@
#include "public/fpdf_save.h"
+#include <vector>
+
#include "core/include/fpdfapi/cpdf_document.h"
#include "core/include/fpdfapi/fpdf_parser.h"
#include "core/include/fpdfapi/fpdf_serial.h"
diff --git a/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp b/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp
index e896441263..36064de653 100644
--- a/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp
+++ b/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp
@@ -634,7 +634,7 @@ void CPDFXFA_Document::ExportData(IXFA_Doc* hDoc,
content.GetLength());
CFX_WideStringC data(L"data");
if (pXFADocHander->SavePackage(m_pXFADocView->GetDoc(), data, &fileWrite)) {
- // TODO: Maybe report error.
+ // Ignoring error.
}
} else if (fileType == FXFA_SAVEAS_XDP) {
if (m_pPDFDoc == NULL)
@@ -694,12 +694,11 @@ void CPDFXFA_Document::ExportData(IXFA_Doc* hDoc,
}
}
if (!fileWrite.Flush()) {
- // TODO: Report error.
+ // Ignoring flush error.
}
}
void CPDFXFA_Document::ImportData(IXFA_Doc* hDoc,
const CFX_WideStringC& wsFilePath) {
- // TODO ...
}
void CPDFXFA_Document::GotoURL(IXFA_Doc* hDoc,
@@ -1001,7 +1000,6 @@ FX_BOOL CPDFXFA_Document::_ExportSubmitFile(FPDF_FILEHANDLER* pFileHandler,
pDocHandler->SavePackage(m_pXFADoc, ws, &fileStream);
} else {
// PDF,creator.
- // TODO:
}
}
}
@@ -1192,7 +1190,7 @@ FX_BOOL CPDFXFA_Document::_SubmitData(IXFA_Doc* hDoc, CXFA_Submit submit) {
bsSubject.ReleaseBuffer();
bsMsg.ReleaseBuffer();
} else {
- // http��ftp
+ // HTTP or FTP
CFX_WideString ws;
CFX_ByteString bs = csURL.UTF16LE_Encode();
int len = bs.GetLength() / sizeof(unsigned short);
diff --git a/fpdfsdk/src/fpdfxfa/fpdfxfa_util.cpp b/fpdfsdk/src/fpdfxfa/fpdfxfa_util.cpp
index c2a0db022c..7814d8bd8a 100644
--- a/fpdfsdk/src/fpdfxfa/fpdfxfa_util.cpp
+++ b/fpdfsdk/src/fpdfxfa/fpdfxfa_util.cpp
@@ -5,6 +5,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "fpdfsdk/include/fpdfxfa/fpdfxfa_util.h"
+
+#include <vector>
+
#include "fpdfsdk/include/fsdk_define.h"
#include "fpdfsdk/include/fsdk_mgr.h"
diff --git a/fpdfsdk/src/fsdk_actionhandler.cpp b/fpdfsdk/src/fsdk_actionhandler.cpp
index 496e1131dc..3bdc2c8467 100644
--- a/fpdfsdk/src/fsdk_actionhandler.cpp
+++ b/fpdfsdk/src/fsdk_actionhandler.cpp
@@ -5,6 +5,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "fpdfsdk/include/fsdk_actionhandler.h"
+
+#include <set>
+
#include "fpdfsdk/include/fsdk_define.h"
#include "fpdfsdk/include/fsdk_mgr.h"
#include "fpdfsdk/include/javascript/IJavaScript.h"
diff --git a/fpdfsdk/src/fsdk_annothandler.cpp b/fpdfsdk/src/fsdk_annothandler.cpp
index ee0a4d8d73..57591d0228 100644
--- a/fpdfsdk/src/fsdk_annothandler.cpp
+++ b/fpdfsdk/src/fsdk_annothandler.cpp
@@ -4,11 +4,13 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "fpdfsdk/include/fsdk_annothandler.h"
+
#include <algorithm>
+#include <vector>
#include "core/include/fpdfapi/cpdf_document.h"
#include "fpdfsdk/include/formfiller/FFL_FormFiller.h"
-#include "fpdfsdk/include/fsdk_annothandler.h"
#include "fpdfsdk/include/fsdk_define.h"
#include "fpdfsdk/include/fsdk_mgr.h"
diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp
index e18959f5fd..27dc171890 100644
--- a/fpdfsdk/src/fsdk_baseform.cpp
+++ b/fpdfsdk/src/fsdk_baseform.cpp
@@ -8,6 +8,7 @@
#include <algorithm>
#include <memory>
+#include <vector>
#include "core/include/fpdfapi/cpdf_document.h"
#include "fpdfsdk/include/formfiller/FFL_FormFiller.h"
diff --git a/fpdfsdk/src/fsdk_mgr.cpp b/fpdfsdk/src/fsdk_mgr.cpp
index 1177ddfabc..ed2df4bc83 100644
--- a/fpdfsdk/src/fsdk_mgr.cpp
+++ b/fpdfsdk/src/fsdk_mgr.cpp
@@ -62,7 +62,7 @@ class CFX_SystemHandler : public IFX_SystemHandler {
void OutputSelectedRect(void* pFormFiller, CFX_FloatRect& rect) override;
FX_BOOL IsSelectionImplemented() override;
CFX_WideString GetClipboardText(FX_HWND hWnd) override { return L""; }
- FX_BOOL SetClipboardText(FX_HWND hWnd, CFX_WideString string) override {
+ FX_BOOL SetClipboardText(FX_HWND hWnd, CFX_WideString str) override {
return FALSE;
}
void ClientToScreen(FX_HWND hWnd, int32_t& x, int32_t& y) override {}
@@ -71,7 +71,7 @@ class CFX_SystemHandler : public IFX_SystemHandler {
FX_HMENU CreatePopupMenu() override { return NULL; }
FX_BOOL AppendMenuItem(FX_HMENU hMenu,
int32_t nIDNewItem,
- CFX_WideString string) override {
+ CFX_WideString str) override {
return FALSE;
}
FX_BOOL EnableMenuItem(FX_HMENU hMenu,
diff --git a/fpdfsdk/src/fxedit/fxet_list.cpp b/fpdfsdk/src/fxedit/fxet_list.cpp
index 313cc481b3..cc9696030e 100644
--- a/fpdfsdk/src/fxedit/fxet_list.cpp
+++ b/fpdfsdk/src/fxedit/fxet_list.cpp
@@ -4,9 +4,10 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "fpdfsdk/include/fxedit/fxet_edit.h"
#include "fpdfsdk/include/fxedit/fxet_list.h"
+#include "fpdfsdk/include/fxedit/fxet_edit.h"
+
CFX_ListItem::CFX_ListItem()
: m_pEdit(NULL),
m_bSelected(FALSE),
@@ -592,8 +593,8 @@ CFX_FloatRect CFX_ListCtrl::GetItemRect(int32_t nIndex) const {
return InToOut(CFX_List::GetItemRect(nIndex));
}
-void CFX_ListCtrl::AddString(const FX_WCHAR* string) {
- AddItem(string);
+void CFX_ListCtrl::AddString(const FX_WCHAR* str) {
+ AddItem(str);
ReArrange(GetCount() - 1);
}
diff --git a/fpdfsdk/src/javascript/Document.cpp b/fpdfsdk/src/javascript/Document.cpp
index f688982da5..1c9c1f31f4 100644
--- a/fpdfsdk/src/javascript/Document.cpp
+++ b/fpdfsdk/src/javascript/Document.cpp
@@ -6,8 +6,10 @@
#include "fpdfsdk/src/javascript/Document.h"
+#include <vector>
+
#include "core/include/fpdfapi/cpdf_document.h"
-#include "fpdfsdk/include/fsdk_mgr.h" // For CPDFDoc_Environment.
+#include "fpdfsdk/include/fsdk_mgr.h"
#include "fpdfsdk/include/javascript/IJavaScript.h"
#include "fpdfsdk/src/javascript/Field.h"
#include "fpdfsdk/src/javascript/Icon.h"
@@ -656,8 +658,6 @@ FX_BOOL Document::submitForm(IJS_Context* cc,
return TRUE;
}
-//////////////////////////////////////////////////////////////////////////////////////////////
-
void Document::AttachDoc(CPDFSDK_Document* pDoc) {
m_pDocument = pDoc;
}
diff --git a/fpdfsdk/src/javascript/Document.h b/fpdfsdk/src/javascript/Document.h
index c36893fd87..06c4121510 100644
--- a/fpdfsdk/src/javascript/Document.h
+++ b/fpdfsdk/src/javascript/Document.h
@@ -9,6 +9,7 @@
#include <list>
#include <memory>
+#include <vector>
#include "fpdfsdk/src/javascript/JS_Define.h"
diff --git a/fpdfsdk/src/javascript/Field.cpp b/fpdfsdk/src/javascript/Field.cpp
index 9b6a7facba..35ef8b42da 100644
--- a/fpdfsdk/src/javascript/Field.cpp
+++ b/fpdfsdk/src/javascript/Field.cpp
@@ -8,6 +8,7 @@
#include <algorithm>
#include <memory>
+#include <string>
#include <vector>
#include "fpdfsdk/include/fsdk_mgr.h" // For CPDFDoc_Environment.
diff --git a/fpdfsdk/src/javascript/Field.h b/fpdfsdk/src/javascript/Field.h
index 4fba1ddfa1..49103c8284 100644
--- a/fpdfsdk/src/javascript/Field.h
+++ b/fpdfsdk/src/javascript/Field.h
@@ -7,7 +7,8 @@
#ifndef FPDFSDK_SRC_JAVASCRIPT_FIELD_H_
#define FPDFSDK_SRC_JAVASCRIPT_FIELD_H_
-#include <string> // For std::wstring.
+#include <string>
+#include <vector>
#include "fpdfsdk/include/pdfwindow/PWL_Wnd.h" // For CPWL_Color.
#include "fpdfsdk/src/javascript/JS_Define.h"
diff --git a/fpdfsdk/src/javascript/JS_Define.h b/fpdfsdk/src/javascript/JS_Define.h
index f03d9ec7fc..e16c5a097a 100644
--- a/fpdfsdk/src/javascript/JS_Define.h
+++ b/fpdfsdk/src/javascript/JS_Define.h
@@ -7,6 +7,8 @@
#ifndef FPDFSDK_SRC_JAVASCRIPT_JS_DEFINE_H_
#define FPDFSDK_SRC_JAVASCRIPT_JS_DEFINE_H_
+#include <vector>
+
#include "fpdfsdk/include/jsapi/fxjs_v8.h"
#include "fpdfsdk/src/javascript/JS_Object.h"
#include "fpdfsdk/src/javascript/JS_Value.h"
@@ -15,7 +17,7 @@
struct JSConstSpec {
const wchar_t* pName;
double number;
- const wchar_t* string;
+ const wchar_t* string; // NOLINT
uint8_t t; // 0:double 1:str
};
diff --git a/fpdfsdk/src/javascript/JS_Runtime.h b/fpdfsdk/src/javascript/JS_Runtime.h
index 8215b88994..c7b0009ccb 100644
--- a/fpdfsdk/src/javascript/JS_Runtime.h
+++ b/fpdfsdk/src/javascript/JS_Runtime.h
@@ -8,6 +8,7 @@
#define FPDFSDK_SRC_JAVASCRIPT_JS_RUNTIME_H_
#include <set>
+#include <map>
#include <utility>
#include <vector>
diff --git a/fpdfsdk/src/javascript/JS_Value.cpp b/fpdfsdk/src/javascript/JS_Value.cpp
index cd5f2518cf..70ccdb5e97 100644
--- a/fpdfsdk/src/javascript/JS_Value.cpp
+++ b/fpdfsdk/src/javascript/JS_Value.cpp
@@ -7,9 +7,11 @@
#include "fpdfsdk/src/javascript/JS_Value.h"
#include <time.h>
+
#include <algorithm>
#include <cmath>
#include <limits>
+#include <vector>
#include "fpdfsdk/src/javascript/Document.h"
#include "fpdfsdk/src/javascript/JS_Define.h"
@@ -361,14 +363,14 @@ void CJS_PropValue::StartSetting() {
void CJS_PropValue::StartGetting() {
m_bIsSetting = 0;
}
-void CJS_PropValue::operator<<(CFX_ByteString string) {
+void CJS_PropValue::operator<<(CFX_ByteString str) {
ASSERT(!m_bIsSetting);
- CJS_Value::operator=(string.c_str());
+ CJS_Value::operator=(str.c_str());
}
-void CJS_PropValue::operator>>(CFX_ByteString& string) const {
+void CJS_PropValue::operator>>(CFX_ByteString& str) const {
ASSERT(m_bIsSetting);
- string = CJS_Value::ToCFXByteString();
+ str = CJS_Value::ToCFXByteString();
}
void CJS_PropValue::operator<<(const FX_WCHAR* c_string) {
@@ -794,7 +796,7 @@ int JS_GetSecFromTime(double dt) {
return (int)_Mod(FXSYS_floor((double)(dt / 1000)), 60);
}
-double JS_DateParse(const wchar_t* string) {
+double JS_DateParse(const wchar_t* str) {
v8::Isolate* pIsolate = v8::Isolate::GetCurrent();
v8::Isolate::Scope isolate_scope(pIsolate);
v8::HandleScope scope(pIsolate);
@@ -817,7 +819,7 @@ double JS_DateParse(const wchar_t* string) {
v8::Local<v8::Function> funC = v8::Local<v8::Function>::Cast(v);
const int argc = 1;
- v8::Local<v8::String> timeStr = FXJS_WSToJSString(pIsolate, string);
+ v8::Local<v8::String> timeStr = FXJS_WSToJSString(pIsolate, str);
v8::Local<v8::Value> argv[argc] = {timeStr};
v = funC->Call(context, context->Global(), argc, argv).ToLocalChecked();
if (v->IsNumber()) {
diff --git a/fpdfsdk/src/javascript/JS_Value.h b/fpdfsdk/src/javascript/JS_Value.h
index 6c6a03d265..f6c1c360ca 100644
--- a/fpdfsdk/src/javascript/JS_Value.h
+++ b/fpdfsdk/src/javascript/JS_Value.h
@@ -7,6 +7,8 @@
#ifndef FPDFSDK_SRC_JAVASCRIPT_JS_VALUE_H_
#define FPDFSDK_SRC_JAVASCRIPT_JS_VALUE_H_
+#include <vector>
+
#include "core/include/fxcrt/fx_basic.h"
#include "fpdfsdk/include/jsapi/fxjs_v8.h"
@@ -206,7 +208,7 @@ int JS_GetDayFromTime(double dt);
int JS_GetHourFromTime(double dt);
int JS_GetMinFromTime(double dt);
int JS_GetSecFromTime(double dt);
-double JS_DateParse(const wchar_t* string);
+double JS_DateParse(const wchar_t* str);
double JS_MakeDay(int nYear, int nMonth, int nDay);
double JS_MakeTime(int nHour, int nMin, int nSec, int nMs);
double JS_MakeDate(double day, double time);
diff --git a/fpdfsdk/src/javascript/PublicMethods.cpp b/fpdfsdk/src/javascript/PublicMethods.cpp
index f228072b35..014dea2d6a 100644
--- a/fpdfsdk/src/javascript/PublicMethods.cpp
+++ b/fpdfsdk/src/javascript/PublicMethods.cpp
@@ -7,6 +7,8 @@
#include "fpdfsdk/src/javascript/PublicMethods.h"
#include <algorithm>
+#include <string>
+#include <vector>
#include "core/include/fxcrt/fx_ext.h"
#include "fpdfsdk/include/fsdk_mgr.h" // For CPDFDoc_Environment.
@@ -77,8 +79,8 @@ static const FX_WCHAR* const fullmonths[] = {L"January",
L"November",
L"December"};
-FX_BOOL CJS_PublicMethods::IsNumber(const FX_WCHAR* string) {
- CFX_WideString sTrim = StrTrim(string);
+FX_BOOL CJS_PublicMethods::IsNumber(const FX_WCHAR* str) {
+ CFX_WideString sTrim = StrTrim(str);
const FX_WCHAR* pTrim = sTrim.c_str();
const FX_WCHAR* p = pTrim;
@@ -228,17 +230,17 @@ CJS_Array CJS_PublicMethods::AF_MakeArrayFromList(CJS_Runtime* pRuntime,
return StrArray;
}
-int CJS_PublicMethods::ParseStringInteger(const CFX_WideString& string,
+int CJS_PublicMethods::ParseStringInteger(const CFX_WideString& str,
int nStart,
int& nSkip,
int nMaxStep) {
int nRet = 0;
nSkip = 0;
- for (int i = nStart, sz = string.GetLength(); i < sz; i++) {
+ for (int i = nStart, sz = str.GetLength(); i < sz; i++) {
if (i - nStart > 10)
break;
- FX_WCHAR c = string.GetAt(i);
+ FX_WCHAR c = str.GetAt(i);
if (!FXSYS_iswdigit(c))
break;
@@ -251,14 +253,13 @@ int CJS_PublicMethods::ParseStringInteger(const CFX_WideString& string,
return nRet;
}
-CFX_WideString CJS_PublicMethods::ParseStringString(
- const CFX_WideString& string,
- int nStart,
- int& nSkip) {
+CFX_WideString CJS_PublicMethods::ParseStringString(const CFX_WideString& str,
+ int nStart,
+ int& nSkip) {
CFX_WideString swRet;
nSkip = 0;
- for (int i = nStart, sz = string.GetLength(); i < sz; i++) {
- FX_WCHAR c = string.GetAt(i);
+ for (int i = nStart, sz = str.GetLength(); i < sz; i++) {
+ FX_WCHAR c = str.GetAt(i);
if (!FXSYS_iswdigit(c))
break;
diff --git a/fpdfsdk/src/javascript/PublicMethods.h b/fpdfsdk/src/javascript/PublicMethods.h
index aa9be94ec7..d0c81e03e3 100644
--- a/fpdfsdk/src/javascript/PublicMethods.h
+++ b/fpdfsdk/src/javascript/PublicMethods.h
@@ -7,6 +7,9 @@
#ifndef FPDFSDK_SRC_JAVASCRIPT_PUBLICMETHODS_H_
#define FPDFSDK_SRC_JAVASCRIPT_PUBLICMETHODS_H_
+#include <string>
+#include <vector>
+
#include "fpdfsdk/src/javascript/JS_Define.h"
class CJS_PublicMethods : public CJS_Object {
diff --git a/fpdfsdk/src/javascript/app.cpp b/fpdfsdk/src/javascript/app.cpp
index a9227a7bdb..767555ff3b 100644
--- a/fpdfsdk/src/javascript/app.cpp
+++ b/fpdfsdk/src/javascript/app.cpp
@@ -7,8 +7,9 @@
#include "fpdfsdk/src/javascript/app.h"
#include <memory>
+#include <vector>
-#include "fpdfsdk/include/fsdk_mgr.h" // For CPDFDoc_Environment.
+#include "fpdfsdk/include/fsdk_mgr.h"
#include "fpdfsdk/include/javascript/IJavaScript.h"
#include "fpdfsdk/src/javascript/Document.h"
#include "fpdfsdk/src/javascript/JS_Context.h"
diff --git a/fpdfsdk/src/javascript/app.h b/fpdfsdk/src/javascript/app.h
index 0b3e50e63d..faebcbd5ce 100644
--- a/fpdfsdk/src/javascript/app.h
+++ b/fpdfsdk/src/javascript/app.h
@@ -7,12 +7,11 @@
#ifndef FPDFSDK_SRC_JAVASCRIPT_APP_H_
#define FPDFSDK_SRC_JAVASCRIPT_APP_H_
+#include <vector>
+
#include "fpdfsdk/src/javascript/JS_Define.h"
class CJS_Runtime;
-
-/* ---------------------------- TimerObj ---------------------------- */
-
class CJS_Timer;
class TimerObj : public CJS_EmbedObj {
diff --git a/fpdfsdk/src/javascript/color.cpp b/fpdfsdk/src/javascript/color.cpp
index 5c02ca28da..4339b4eccf 100644
--- a/fpdfsdk/src/javascript/color.cpp
+++ b/fpdfsdk/src/javascript/color.cpp
@@ -6,6 +6,8 @@
#include "fpdfsdk/src/javascript/color.h"
+#include <vector>
+
#include "fpdfsdk/include/javascript/IJavaScript.h"
#include "fpdfsdk/src/javascript/JS_Context.h"
#include "fpdfsdk/src/javascript/JS_Define.h"
diff --git a/fpdfsdk/src/javascript/color.h b/fpdfsdk/src/javascript/color.h
index 20f5244a58..616337414d 100644
--- a/fpdfsdk/src/javascript/color.h
+++ b/fpdfsdk/src/javascript/color.h
@@ -7,7 +7,9 @@
#ifndef FPDFSDK_SRC_JAVASCRIPT_COLOR_H_
#define FPDFSDK_SRC_JAVASCRIPT_COLOR_H_
-#include "fpdfsdk/include/pdfwindow/PWL_Wnd.h" // For CPWL_Color.
+#include <vector>
+
+#include "fpdfsdk/include/pdfwindow/PWL_Wnd.h"
#include "fpdfsdk/src/javascript/JS_Define.h"
class color : public CJS_EmbedObj {
diff --git a/fpdfsdk/src/javascript/console.cpp b/fpdfsdk/src/javascript/console.cpp
index 2f56c1e090..8beb083f1e 100644
--- a/fpdfsdk/src/javascript/console.cpp
+++ b/fpdfsdk/src/javascript/console.cpp
@@ -6,6 +6,8 @@
#include "fpdfsdk/src/javascript/console.h"
+#include <vector>
+
#include "fpdfsdk/include/javascript/IJavaScript.h"
#include "fpdfsdk/src/javascript/JS_Context.h"
#include "fpdfsdk/src/javascript/JS_Define.h"
diff --git a/fpdfsdk/src/javascript/console.h b/fpdfsdk/src/javascript/console.h
index a810184b41..651899bf4c 100644
--- a/fpdfsdk/src/javascript/console.h
+++ b/fpdfsdk/src/javascript/console.h
@@ -7,6 +7,8 @@
#ifndef FPDFSDK_SRC_JAVASCRIPT_CONSOLE_H_
#define FPDFSDK_SRC_JAVASCRIPT_CONSOLE_H_
+#include <vector>
+
#include "fpdfsdk/src/javascript/JS_Define.h"
class console : public CJS_EmbedObj {
diff --git a/fpdfsdk/src/javascript/global.cpp b/fpdfsdk/src/javascript/global.cpp
index fdd67553fc..234e132d46 100644
--- a/fpdfsdk/src/javascript/global.cpp
+++ b/fpdfsdk/src/javascript/global.cpp
@@ -6,6 +6,8 @@
#include "fpdfsdk/src/javascript/global.h"
+#include <vector>
+
#include "core/include/fxcrt/fx_ext.h"
#include "fpdfsdk/include/javascript/IJavaScript.h"
#include "fpdfsdk/src/javascript/JS_Context.h"
diff --git a/fpdfsdk/src/javascript/global.h b/fpdfsdk/src/javascript/global.h
index c2fb076b8c..e8172e691e 100644
--- a/fpdfsdk/src/javascript/global.h
+++ b/fpdfsdk/src/javascript/global.h
@@ -8,6 +8,7 @@
#define FPDFSDK_SRC_JAVASCRIPT_GLOBAL_H_
#include <map>
+#include <vector>
#include "fpdfsdk/src/javascript/JS_Define.h"
diff --git a/fpdfsdk/src/javascript/report.cpp b/fpdfsdk/src/javascript/report.cpp
index 952ed21a20..8374f3c2c8 100644
--- a/fpdfsdk/src/javascript/report.cpp
+++ b/fpdfsdk/src/javascript/report.cpp
@@ -6,6 +6,8 @@
#include "fpdfsdk/src/javascript/report.h"
+#include <vector>
+
#include "fpdfsdk/include/javascript/IJavaScript.h"
#include "fpdfsdk/src/javascript/JS_Define.h"
#include "fpdfsdk/src/javascript/JS_Object.h"
diff --git a/fpdfsdk/src/javascript/report.h b/fpdfsdk/src/javascript/report.h
index dc43912cb1..55d74648fc 100644
--- a/fpdfsdk/src/javascript/report.h
+++ b/fpdfsdk/src/javascript/report.h
@@ -7,6 +7,8 @@
#ifndef FPDFSDK_SRC_JAVASCRIPT_REPORT_H_
#define FPDFSDK_SRC_JAVASCRIPT_REPORT_H_
+#include <vector>
+
#include "fpdfsdk/src/javascript/JS_Define.h"
class Report : public CJS_EmbedObj {
diff --git a/fpdfsdk/src/javascript/util.cpp b/fpdfsdk/src/javascript/util.cpp
index c9149be570..52a93625b9 100644
--- a/fpdfsdk/src/javascript/util.cpp
+++ b/fpdfsdk/src/javascript/util.cpp
@@ -8,6 +8,9 @@
#include <time.h>
+#include <string>
+#include <vector>
+
#include "core/include/fxcrt/fx_ext.h"
#include "fpdfsdk/include/javascript/IJavaScript.h"
#include "fpdfsdk/src/javascript/JS_Context.h"
diff --git a/fpdfsdk/src/javascript/util.h b/fpdfsdk/src/javascript/util.h
index 9441b11b13..6e3a5d2901 100644
--- a/fpdfsdk/src/javascript/util.h
+++ b/fpdfsdk/src/javascript/util.h
@@ -7,7 +7,8 @@
#ifndef FPDFSDK_SRC_JAVASCRIPT_UTIL_H_
#define FPDFSDK_SRC_JAVASCRIPT_UTIL_H_
-#include <string> // For std::wstring.
+#include <string>
+#include <vector>
#include "fpdfsdk/src/javascript/JS_Define.h"
diff --git a/fpdfsdk/src/jsapi/fxjs_v8.cpp b/fpdfsdk/src/jsapi/fxjs_v8.cpp
index 5631ab6258..86f6ced198 100644
--- a/fpdfsdk/src/jsapi/fxjs_v8.cpp
+++ b/fpdfsdk/src/jsapi/fxjs_v8.cpp
@@ -6,6 +6,8 @@
#include "fpdfsdk/include/jsapi/fxjs_v8.h"
+#include <vector>
+
#include "core/include/fxcrt/fx_basic.h"
const wchar_t kFXJSValueNameString[] = L"string";
@@ -745,9 +747,8 @@ v8::Local<v8::Value> FXJS_NewObject2(v8::Isolate* pIsolate,
return pObj->Clone();
}
-v8::Local<v8::Value> FXJS_NewString(v8::Isolate* pIsolate,
- const wchar_t* string) {
- return FXJS_WSToJSString(pIsolate, string);
+v8::Local<v8::Value> FXJS_NewString(v8::Isolate* pIsolate, const wchar_t* str) {
+ return FXJS_WSToJSString(pIsolate, str);
}
v8::Local<v8::Value> FXJS_NewNull() {
diff --git a/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp b/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp
index bdc6724f65..6edd6bdd85 100644
--- a/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp
@@ -239,9 +239,9 @@ void CPWL_ComboBox::SetText(const FX_WCHAR* text) {
m_pEdit->SetText(text);
}
-void CPWL_ComboBox::AddString(const FX_WCHAR* string) {
+void CPWL_ComboBox::AddString(const FX_WCHAR* str) {
if (m_pList)
- m_pList->AddString(string);
+ m_pList->AddString(str);
}
int32_t CPWL_ComboBox::GetSelect() const {
diff --git a/fpdfsdk/src/pdfwindow/PWL_Edit.cpp b/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
index 0b3887b413..c4a5bf03fd 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
@@ -6,6 +6,8 @@
#include "fpdfsdk/include/pdfwindow/PWL_Edit.h"
+#include <vector>
+
#include "core/include/fxcrt/fx_safe_types.h"
#include "core/include/fxcrt/fx_xml.h"
#include "fpdfsdk/include/pdfwindow/PWL_Caret.h"
diff --git a/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp b/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp
index c8e738a7ca..2c0b79d2f1 100644
--- a/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp
@@ -391,9 +391,9 @@ CFX_FloatRect CPWL_ListBox::GetFocusRect() const {
return CPWL_Wnd::GetFocusRect();
}
-void CPWL_ListBox::AddString(const FX_WCHAR* string) {
+void CPWL_ListBox::AddString(const FX_WCHAR* str) {
if (m_pList) {
- m_pList->AddString(string);
+ m_pList->AddString(str);
}
}
diff --git a/fpdfsdk/src/pdfwindow/PWL_Note.cpp b/fpdfsdk/src/pdfwindow/PWL_Note.cpp
index 1933d564f4..7ba6f6ad66 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Note.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Note.cpp
@@ -1507,6 +1507,6 @@ CFX_WideString CPWL_Note::GetReplyString() const {
return m_sReplyString;
}
-void CPWL_Note::SetReplyString(const CFX_WideString& string) {
- m_sReplyString = string;
+void CPWL_Note::SetReplyString(const CFX_WideString& str) {
+ m_sReplyString = str;
}
diff --git a/fpdfsdk/src/pdfwindow/PWL_Signature.cpp b/fpdfsdk/src/pdfwindow/PWL_Signature.cpp
index 6b3940de28..ffb4461878 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Signature.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Signature.cpp
@@ -4,9 +4,10 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "fpdfsdk/include/pdfwindow/PWL_Signature.h"
+
#include "fpdfsdk/include/pdfwindow/PWL_Icon.h"
#include "fpdfsdk/include/pdfwindow/PWL_Label.h"
-#include "fpdfsdk/include/pdfwindow/PWL_Signature.h"
#include "fpdfsdk/include/pdfwindow/PWL_Utils.h"
#include "fpdfsdk/include/pdfwindow/PWL_Wnd.h"
@@ -86,8 +87,8 @@ void CPWL_Signature::SetText(const FX_WCHAR* sText) {
RePosChildWnd();
}
-void CPWL_Signature::SetDescription(const FX_WCHAR* string) {
- m_pDescription->SetText(string);
+void CPWL_Signature::SetDescription(const FX_WCHAR* str) {
+ m_pDescription->SetText(str);
RePosChildWnd();
}