summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--PRESUBMIT.py18
-rw-r--r--core/include/fpdfapi/fpdf_objects.h2
-rw-r--r--core/include/fxcrt/fx_system.h7
-rw-r--r--core/include/fxge/fx_ge.h2
-rw-r--r--core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp8
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp6
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp2
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp2
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp2
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_objects_unittest.cpp1
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_unittest.cpp3
-rw-r--r--core/src/fpdfdoc/doc_action.cpp2
-rw-r--r--core/src/fpdfdoc/doc_form.cpp3
-rw-r--r--core/src/fpdfdoc/doc_link.cpp2
-rw-r--r--core/src/fpdfdoc/doc_tagged.cpp2
-rw-r--r--core/src/fpdfdoc/doc_utils.cpp1
-rw-r--r--core/src/fpdftext/fpdf_text_int.cpp1
-rw-r--r--core/src/fxcodec/codec/codec_int.h1
-rw-r--r--core/src/fxcodec/codec/fx_codec_jbig.cpp2
-rw-r--r--core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp2
-rw-r--r--core/src/fxcrt/fx_basic_bstring.cpp22
-rw-r--r--core/src/fxcrt/fx_basic_gcc.cpp24
-rw-r--r--core/src/fxcrt/fx_basic_wstring.cpp15
-rw-r--r--core/src/fxcrt/fx_system_unittest.cpp1
-rw-r--r--core/src/fxcrt/fx_xml_parser.cpp2
-rw-r--r--core/src/fxge/win32/fx_win32_gdipext.cpp7
-rw-r--r--core/src/fxge/win32/fx_win32_print.cpp6
-rw-r--r--core/src/fxge/win32/win32_int.h2
-rw-r--r--fpdfsdk/include/formfiller/FFL_FormFiller.h2
-rw-r--r--fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h24
-rw-r--r--fpdfsdk/include/fsdk_annothandler.h1
-rw-r--r--fpdfsdk/include/fx_systemhandler.h4
-rw-r--r--fpdfsdk/include/fxedit/fx_edit.h2
-rw-r--r--fpdfsdk/include/fxedit/fxet_list.h4
-rw-r--r--fpdfsdk/include/jsapi/fxjs_v8.h3
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_ComboBox.h2
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_ListBox.h2
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Note.h2
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Signature.h2
-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
-rw-r--r--public/fpdf_dataavail.h4
-rw-r--r--public/fpdf_doc.h2
-rw-r--r--public/fpdf_formfill.h30
-rw-r--r--public/fpdfview.h13
-rw-r--r--testing/test_support.cpp2
-rw-r--r--testing/utils/path_service.cpp2
-rw-r--r--xfa/src/fdp/src/css/fde_csscache.h2
-rw-r--r--xfa/src/fdp/src/css/fde_cssstyleselector.cpp2
-rw-r--r--xfa/src/fgas/src/crt/fx_algorithm.cpp10
-rw-r--r--xfa/src/fwl/basewidget/fwl_editimp.cpp1
-rw-r--r--xfa/src/fwl/lightwidget/edit.cpp1
-rw-r--r--xfa/src/fxbarcode/common/BC_WhiteRectangleDetector.cpp3
-rw-r--r--xfa/src/fxbarcode/common/BC_WhiteRectangleDetector.h5
-rw-r--r--xfa/src/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.h22
-rw-r--r--xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.h3
-rw-r--r--xfa/src/fxbarcode/oned/BC_OneDReader.cpp3
-rw-r--r--xfa/src/fxbarcode/oned/BC_OneDReader.h5
-rw-r--r--xfa/src/fxbarcode/oned/BC_OneDimReader.cpp2
-rw-r--r--xfa/src/fxbarcode/oned/BC_OneDimReader.h14
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.cpp1
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.h10
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.h4
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedCode128Reader.cpp18
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedCode128Reader.h38
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedCode128Writer.h10
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedCode39Reader.h4
-rw-r--r--xfa/src/fxbarcode/oned/BC_OnedEAN13Reader.h2
-rw-r--r--xfa/src/fxbarcode/qrcode/BC_QRCoder.h2
-rw-r--r--xfa/src/fxbarcode/qrcode/BC_QRCoderEncoder.h2
-rw-r--r--xfa/src/fxbarcode/qrcode/BC_QRCoderFormatInformation.h6
-rw-r--r--xfa/src/fxbarcode/qrcode/BC_QRCoderMatrixUtil.h18
-rw-r--r--xfa/src/fxbarcode/qrcode/BC_QRCoderVersion.h2
-rw-r--r--xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.h2
-rw-r--r--xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.h8
-rw-r--r--xfa/src/fxfa/app/xfa_fftextedit.cpp2
-rw-r--r--xfa/src/fxfa/app/xfa_fftextedit.h2
-rw-r--r--xfa/src/fxfa/app/xfa_ffwidget.cpp4
-rw-r--r--xfa/src/fxfa/app/xfa_ffwidgethandler.cpp2
115 files changed, 365 insertions, 249 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 7c8f8f439b..71d6b6f7b3 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -9,24 +9,28 @@ for more details about the presubmit API built into depot_tools.
"""
LINT_FILTERS = [
+ # Rvalue ref checks are unreliable.
'-build/c++11',
+ # Need to fix header names not matching cpp names.
'-build/include',
+ # Need to fix header names not matching cpp names.
'-build/include_order',
- '-build/include_what_you_use',
- '-build/namespaces',
- '-build/storage_class',
+ # Too many to fix at the moment.
'-readability/casting',
+ # Need to refactor large methods to fix.
'-readability/fn_size',
- '-readability/todo',
- '-readability/utf8',
- '-runtime/arrays',
+ # Need to fix errors when making methods explicit.
'-runtime/explicit',
+ # Lots of usage to fix first.
'-runtime/int',
+ # Need to fix two snprintf TODOs
'-runtime/printf',
+ # Lots of non-const references need to be fixed
'-runtime/references',
+ # We are not thread safe, so this will never pass.
'-runtime/threadsafe_fn',
+ # Figure out how to deal with #defines that git cl format creates.
'-whitespace/indent',
- '-whitespace/line_length',
]
def CheckChangeOnUpload(input_api, output_api):
diff --git a/core/include/fpdfapi/fpdf_objects.h b/core/include/fpdfapi/fpdf_objects.h
index 58d98e5436..a6fa056e13 100644
--- a/core/include/fpdfapi/fpdf_objects.h
+++ b/core/include/fpdfapi/fpdf_objects.h
@@ -337,7 +337,7 @@ class CPDF_Dictionary : public CPDF_Object {
// Set* functions invalidate iterators for the element with the key |key|.
void SetAt(const CFX_ByteStringC& key, CPDF_Object* pObj);
void SetAtName(const CFX_ByteStringC& key, const CFX_ByteString& name);
- void SetAtString(const CFX_ByteStringC& key, const CFX_ByteString& string);
+ void SetAtString(const CFX_ByteStringC& key, const CFX_ByteString& str);
void SetAtInteger(const CFX_ByteStringC& key, int i);
void SetAtNumber(const CFX_ByteStringC& key, FX_FLOAT f);
void SetAtReference(const CFX_ByteStringC& key,
diff --git a/core/include/fxcrt/fx_system.h b/core/include/fxcrt/fx_system.h
index 462fb3babf..76c413e7e3 100644
--- a/core/include/fxcrt/fx_system.h
+++ b/core/include/fxcrt/fx_system.h
@@ -157,9 +157,12 @@ FXSYS_FILE* FXSYS_wfopen(const FX_WCHAR* filename, const FX_WCHAR* mode);
#ifdef __cplusplus
} // extern "C"
+
#include "third_party/base/numerics/safe_conversions.h"
+
#define FXSYS_strlen(ptr) pdfium::base::checked_cast<FX_STRSIZE>(strlen(ptr))
#define FXSYS_wcslen(ptr) pdfium::base::checked_cast<FX_STRSIZE>(wcslen(ptr))
+
extern "C" {
#else
#define FXSYS_strlen(ptr) ((FX_STRSIZE)strlen(ptr))
@@ -206,7 +209,7 @@ extern "C" {
#define FXSYS_GetModuleFileName GetModuleFileName
#else
int FXSYS_GetACP(void);
-char* FXSYS_itoa(int value, char* string, int radix);
+char* FXSYS_itoa(int value, char* str, int radix);
int FXSYS_WideCharToMultiByte(FX_DWORD codepage,
FX_DWORD dwFlags,
const wchar_t* wstr,
@@ -229,7 +232,7 @@ FX_DWORD FXSYS_GetModuleFileName(void* hModule, char* buf, FX_DWORD bufsize);
char* FXSYS_strlwr(char* str);
char* FXSYS_strupr(char* str);
int FXSYS_stricmp(const char*, const char*);
-int FXSYS_wcsicmp(const wchar_t* string1, const wchar_t* string2);
+int FXSYS_wcsicmp(const wchar_t* str1, const wchar_t* str2);
wchar_t* FXSYS_wcslwr(wchar_t* str);
wchar_t* FXSYS_wcsupr(wchar_t* str);
#endif // _FXM_PLATFORM == _FXM_PLATFORM_WINDOWS_
diff --git a/core/include/fxge/fx_ge.h b/core/include/fxge/fx_ge.h
index c5d409c41c..fc9119b123 100644
--- a/core/include/fxge/fx_ge.h
+++ b/core/include/fxge/fx_ge.h
@@ -591,7 +591,7 @@ class IFX_RenderDeviceDriver {
class IFX_PSOutput {
public:
virtual void Release() = 0;
- virtual void OutputPS(const FX_CHAR* string, int len) = 0;
+ virtual void OutputPS(const FX_CHAR* str, int len) = 0;
protected:
virtual ~IFX_PSOutput() {}
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
index 8b1571a496..df9c13714d 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
@@ -771,10 +771,12 @@ CPDF_Font* CPDF_Document::AddMacFont(CTFontRef pFont,
pFontDesc->SetAtInteger("CapHeight", capheight);
CGFloat fStemV = 0;
int16_t min_width = SHRT_MAX;
+
static const UniChar stem_chars[] = {'i', 'I', '!', '1'};
- const size_t count = sizeof(stem_chars) / sizeof(stem_chars[0]);
- CGGlyph glyphs[count];
- CGRect boundingRects[count];
+ CGGlyph glyphs[FX_ArraySize(stem_chars)];
+ CGRect boundingRects[FX_ArraySize(stem_chars)];
+
+ const size_t count = FX_ArraySize(stem_chars);
if (CTFontGetGlyphsForCharacters(font, stem_chars, glyphs, count)) {
CTFontGetBoundingRectsForGlyphs(font, kCTFontHorizontalOrientation, glyphs,
boundingRects, count);
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp
index a8ae866f81..f428bf89a1 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp
@@ -120,7 +120,7 @@ class CPDF_PSEngine {
CPDF_PSEngine();
~CPDF_PSEngine();
- FX_BOOL Parse(const FX_CHAR* string, int size);
+ FX_BOOL Parse(const FX_CHAR* str, int size);
FX_BOOL Execute() { return m_MainProc.Execute(this); }
FX_BOOL DoOperator(PDF_PSOP op);
void Reset() { m_StackCount = 0; }
@@ -207,8 +207,8 @@ const struct PDF_PSOpName {
{"dup", PSOP_DUP}, {"copy", PSOP_COPY},
{"index", PSOP_INDEX}, {"roll", PSOP_ROLL}};
-FX_BOOL CPDF_PSEngine::Parse(const FX_CHAR* string, int size) {
- CPDF_SimpleParser parser((uint8_t*)string, size);
+FX_BOOL CPDF_PSEngine::Parse(const FX_CHAR* str, int size) {
+ CPDF_SimpleParser parser((uint8_t*)str, size);
CFX_ByteStringC word = parser.GetWord();
if (word != "{") {
return FALSE;
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
index 7114f764ac..2dffc09f9f 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
@@ -6,6 +6,8 @@
#include "core/src/fpdfapi/fpdf_page/pageint.h"
+#include <vector>
+
#include "core/include/fpdfapi/cpdf_document.h"
#include "core/include/fpdfapi/fpdf_module.h"
#include "core/include/fpdfapi/fpdf_page.h"
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp
index 0287b4fed3..f7c3f7d8d3 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp
@@ -6,6 +6,8 @@
#include "core/src/fpdfapi/fpdf_page/pageint.h"
+#include <algorithm>
+
#include "core/include/fpdfapi/cpdf_document.h"
#include "core/include/fpdfapi/fpdf_page.h"
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
index 0b7a841cd4..4fb471713b 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
@@ -6,6 +6,8 @@
#include <limits.h>
+#include <vector>
+
#include "core/include/fpdfapi/fpdf_module.h"
#include "core/include/fpdfapi/fpdf_parser.h"
#include "core/include/fxcodec/fx_codec.h"
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects_unittest.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects_unittest.cpp
index d2c30fa6ae..a377a92e44 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects_unittest.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects_unittest.cpp
@@ -5,6 +5,7 @@
#include "core/include/fpdfapi/fpdf_objects.h"
#include <memory>
+#include <string>
#include <vector>
#include "core/include/fxcrt/fx_basic.h"
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_unittest.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_unittest.cpp
index 294a99675d..68068cb522 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_unittest.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_unittest.cpp
@@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <limits>
+#include <string>
+
#include "core/include/fpdfapi/fpdf_parser.h"
#include "core/include/fxcrt/fx_stream.h"
#include "core/src/fpdfapi/fpdf_parser/cpdf_syntax_parser.h"
diff --git a/core/src/fpdfdoc/doc_action.cpp b/core/src/fpdfdoc/doc_action.cpp
index 9a0ba57951..12ec4c1907 100644
--- a/core/src/fpdfdoc/doc_action.cpp
+++ b/core/src/fpdfdoc/doc_action.cpp
@@ -4,6 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include <vector>
+
#include "core/include/fpdfapi/cpdf_document.h"
#include "core/include/fpdfdoc/fpdf_doc.h"
diff --git a/core/src/fpdfdoc/doc_form.cpp b/core/src/fpdfdoc/doc_form.cpp
index 8080dc7597..7469cfd28f 100644
--- a/core/src/fpdfdoc/doc_form.cpp
+++ b/core/src/fpdfdoc/doc_form.cpp
@@ -4,6 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include <vector>
+
#include "core/include/fpdfapi/cpdf_document.h"
#include "core/include/fpdfdoc/fpdf_doc.h"
#include "core/src/fpdfdoc/doc_utils.h"
@@ -385,6 +387,7 @@ static FX_BOOL RetrieveSpecificFont(uint8_t charSet,
lf.lfCharSet = charSet;
lf.lfPitchAndFamily = pitchAndFamily;
if (pcsFontName) {
+ // TODO(dsinclair): Should this be strncpy?
strcpy(lf.lfFaceName, pcsFontName);
}
return RetrieveSpecificFont(lf);
diff --git a/core/src/fpdfdoc/doc_link.cpp b/core/src/fpdfdoc/doc_link.cpp
index 7da29e0954..d2fe67df43 100644
--- a/core/src/fpdfdoc/doc_link.cpp
+++ b/core/src/fpdfdoc/doc_link.cpp
@@ -6,6 +6,8 @@
#include "core/include/fpdfdoc/fpdf_doc.h"
+#include <vector>
+
CPDF_LinkList::CPDF_LinkList() {
}
diff --git a/core/src/fpdfdoc/doc_tagged.cpp b/core/src/fpdfdoc/doc_tagged.cpp
index d4ce4a4b31..6eb1c98592 100644
--- a/core/src/fpdfdoc/doc_tagged.cpp
+++ b/core/src/fpdfdoc/doc_tagged.cpp
@@ -4,6 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include <map>
+
#include "core/include/fpdfapi/cpdf_document.h"
#include "core/include/fpdfapi/fpdf_page.h"
#include "core/include/fpdfapi/fpdf_parser.h"
diff --git a/core/src/fpdfdoc/doc_utils.cpp b/core/src/fpdfdoc/doc_utils.cpp
index bc09c9a2c4..11359c9129 100644
--- a/core/src/fpdfdoc/doc_utils.cpp
+++ b/core/src/fpdfdoc/doc_utils.cpp
@@ -5,6 +5,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include <algorithm>
+#include <vector>
#include "core/include/fpdfapi/cpdf_document.h"
#include "core/include/fpdfdoc/fpdf_doc.h"
diff --git a/core/src/fpdftext/fpdf_text_int.cpp b/core/src/fpdftext/fpdf_text_int.cpp
index 4a0aae501c..75677332ec 100644
--- a/core/src/fpdftext/fpdf_text_int.cpp
+++ b/core/src/fpdftext/fpdf_text_int.cpp
@@ -10,6 +10,7 @@
#include <cctype>
#include <cwctype>
#include <memory>
+#include <utility>
#include <vector>
#include "core/include/fpdfapi/fpdf_module.h"
diff --git a/core/src/fxcodec/codec/codec_int.h b/core/src/fxcodec/codec/codec_int.h
index 707088e1a9..bde3daeaea 100644
--- a/core/src/fxcodec/codec/codec_int.h
+++ b/core/src/fxcodec/codec/codec_int.h
@@ -12,6 +12,7 @@
#include <list>
#include <map>
#include <memory>
+#include <vector>
#include "core/include/fxcodec/fx_codec.h"
#include "core/src/fxcodec/jbig2/JBig2_Context.h"
diff --git a/core/src/fxcodec/codec/fx_codec_jbig.cpp b/core/src/fxcodec/codec/fx_codec_jbig.cpp
index 0e39e19bc9..44e30aa953 100644
--- a/core/src/fxcodec/codec/fx_codec_jbig.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jbig.cpp
@@ -4,6 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include <list>
+
#include "core/include/fxcodec/fx_codec.h"
#include "core/src/fxcodec/codec/codec_int.h"
diff --git a/core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp b/core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp
index b3f9911141..2fac8df5a9 100644
--- a/core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp
@@ -6,6 +6,8 @@
#include "core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.h"
+#include <vector>
+
#include "core/include/fxcrt/fx_basic.h"
namespace {
diff --git a/core/src/fxcrt/fx_basic_bstring.cpp b/core/src/fxcrt/fx_basic_bstring.cpp
index 8b4442e823..5d38d57757 100644
--- a/core/src/fxcrt/fx_basic_bstring.cpp
+++ b/core/src/fxcrt/fx_basic_bstring.cpp
@@ -4,7 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include <stddef.h> // For offsetof().
+#include <stddef.h>
+
#include <cctype>
#include "core/include/fxcrt/fx_basic.h"
@@ -22,15 +23,15 @@ static int _Buffer_itoa(char* buf, int i, FX_DWORD flags) {
u = -i;
}
int base = 10;
- const FX_CHAR* string = "0123456789abcdef";
+ const FX_CHAR* str = "0123456789abcdef";
if (flags & FXFORMAT_HEX) {
base = 16;
if (flags & FXFORMAT_CAPITAL) {
- string = "0123456789ABCDEF";
+ str = "0123456789ABCDEF";
}
}
while (u != 0) {
- buf1[buf_pos--] = string[u % base];
+ buf1[buf_pos--] = str[u % base];
u = u / base;
}
if ((flags & FXFORMAT_SIGNED) && i < 0) {
@@ -202,19 +203,18 @@ const CFX_ByteString& CFX_ByteString::operator+=(char ch) {
ConcatInPlace(1, &ch);
return *this;
}
-const CFX_ByteString& CFX_ByteString::operator+=(const CFX_ByteString& string) {
- if (!string.m_pData) {
+const CFX_ByteString& CFX_ByteString::operator+=(const CFX_ByteString& str) {
+ if (!str.m_pData) {
return *this;
}
- ConcatInPlace(string.m_pData->m_nDataLength, string.m_pData->m_String);
+ ConcatInPlace(str.m_pData->m_nDataLength, str.m_pData->m_String);
return *this;
}
-const CFX_ByteString& CFX_ByteString::operator+=(
- const CFX_ByteStringC& string) {
- if (string.IsEmpty()) {
+const CFX_ByteString& CFX_ByteString::operator+=(const CFX_ByteStringC& str) {
+ if (str.IsEmpty()) {
return *this;
}
- ConcatInPlace(string.GetLength(), string.GetCStr());
+ ConcatInPlace(str.GetLength(), str.GetCStr());
return *this;
}
bool CFX_ByteString::Equal(const char* ptr) const {
diff --git a/core/src/fxcrt/fx_basic_gcc.cpp b/core/src/fxcrt/fx_basic_gcc.cpp
index e2ec939e7d..2c9c54c8b6 100644
--- a/core/src/fxcrt/fx_basic_gcc.cpp
+++ b/core/src/fxcrt/fx_basic_gcc.cpp
@@ -33,20 +33,20 @@ IntType FXSYS_StrToInt(const CharType* str) {
}
template <typename T, typename UT, typename STR_T>
-STR_T FXSYS_IntToStr(T value, STR_T string, int radix) {
+STR_T FXSYS_IntToStr(T value, STR_T str, int radix) {
if (radix < 2 || radix > 16) {
- string[0] = 0;
- return string;
+ str[0] = 0;
+ return str;
}
if (value == 0) {
- string[0] = '0';
- string[1] = 0;
- return string;
+ str[0] = '0';
+ str[1] = 0;
+ return str;
}
int i = 0;
UT uvalue;
if (value < 0) {
- string[i++] = '-';
+ str[i++] = '-';
// Standard trick to avoid undefined behaviour when negating INT_MIN.
uvalue = static_cast<UT>(-(value + 1)) + 1;
} else {
@@ -59,11 +59,11 @@ STR_T FXSYS_IntToStr(T value, STR_T string, int radix) {
order = order / radix;
}
for (int d = digits - 1; d > -1; d--) {
- string[d + i] = "0123456789abcdef"[uvalue % radix];
+ str[d + i] = "0123456789abcdef"[uvalue % radix];
uvalue /= radix;
}
- string[digits + i] = 0;
- return string;
+ str[digits + i] = 0;
+ return str;
}
#ifdef __cplusplus
@@ -191,8 +191,8 @@ int FXSYS_wcsicmp(const FX_WCHAR* dst, const FX_WCHAR* src) {
} while (f && (f == l));
return (f - l);
}
-char* FXSYS_itoa(int value, char* string, int radix) {
- return FXSYS_IntToStr<int32_t, uint32_t, FX_CHAR*>(value, string, radix);
+char* FXSYS_itoa(int value, char* str, int radix) {
+ return FXSYS_IntToStr<int32_t, uint32_t, FX_CHAR*>(value, str, radix);
}
#ifdef __cplusplus
}
diff --git a/core/src/fxcrt/fx_basic_wstring.cpp b/core/src/fxcrt/fx_basic_wstring.cpp
index 8df72466e8..11a840a806 100644
--- a/core/src/fxcrt/fx_basic_wstring.cpp
+++ b/core/src/fxcrt/fx_basic_wstring.cpp
@@ -4,7 +4,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include <stddef.h> // For offsetof().
+#include <stddef.h>
#include <algorithm>
#include <cctype>
@@ -184,19 +184,18 @@ const CFX_WideString& CFX_WideString::operator+=(const FX_WCHAR* lpsz) {
}
return *this;
}
-const CFX_WideString& CFX_WideString::operator+=(const CFX_WideString& string) {
- if (!string.m_pData) {
+const CFX_WideString& CFX_WideString::operator+=(const CFX_WideString& str) {
+ if (!str.m_pData) {
return *this;
}
- ConcatInPlace(string.m_pData->m_nDataLength, string.m_pData->m_String);
+ ConcatInPlace(str.m_pData->m_nDataLength, str.m_pData->m_String);
return *this;
}
-const CFX_WideString& CFX_WideString::operator+=(
- const CFX_WideStringC& string) {
- if (string.IsEmpty()) {
+const CFX_WideString& CFX_WideString::operator+=(const CFX_WideStringC& str) {
+ if (str.IsEmpty()) {
return *this;
}
- ConcatInPlace(string.GetLength(), string.GetPtr());
+ ConcatInPlace(str.GetLength(), str.GetPtr());
return *this;
}
bool CFX_WideString::Equal(const wchar_t* ptr) const {
diff --git a/core/src/fxcrt/fx_system_unittest.cpp b/core/src/fxcrt/fx_system_unittest.cpp
index 4a07a77ad2..f877eb2aa5 100644
--- a/core/src/fxcrt/fx_system_unittest.cpp
+++ b/core/src/fxcrt/fx_system_unittest.cpp
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <limits>
#include <string>
#include "core/include/fxcrt/fx_system.h"
diff --git a/core/src/fxcrt/fx_xml_parser.cpp b/core/src/fxcrt/fx_xml_parser.cpp
index 59c3de444e..da2b26b5b8 100644
--- a/core/src/fxcrt/fx_xml_parser.cpp
+++ b/core/src/fxcrt/fx_xml_parser.cpp
@@ -6,6 +6,8 @@
#include "core/src/fxcrt/xml_int.h"
+#include <vector>
+
#include "core/include/fxcrt/fx_ext.h"
#include "core/include/fxcrt/fx_xml.h"
#include "third_party/base/stl_util.h"
diff --git a/core/src/fxge/win32/fx_win32_gdipext.cpp b/core/src/fxge/win32/fx_win32_gdipext.cpp
index 629f3235ed..aba67dacfe 100644
--- a/core/src/fxge/win32/fx_win32_gdipext.cpp
+++ b/core/src/fxge/win32/fx_win32_gdipext.cpp
@@ -16,11 +16,12 @@ using std::max;
} // namespace Gdiplus
#include <gdiplus.h>
+
#include "core/include/fxge/fx_ge_win32.h"
#include "core/src/fxge/win32/win32_int.h"
-using namespace Gdiplus;
-using namespace Gdiplus::DllExports;
+using namespace Gdiplus; // NOLINT
+using namespace Gdiplus::DllExports; // NOLINT
#define GdiFillType2Gdip(fill_type) \
(fill_type == ALTERNATE ? FillModeAlternate : FillModeWinding)
@@ -420,7 +421,7 @@ typedef GpStatus(WINGDIPAPI* FuncType_GdipDrawImageRectI)(GpGraphics* graphics,
INT height);
typedef GpStatus(WINGDIPAPI* FuncType_GdipDrawString)(
GpGraphics* graphics,
- GDIPCONST WCHAR* string,
+ GDIPCONST WCHAR* str,
INT length,
GDIPCONST GpFont* font,
GDIPCONST RectF* layoutRect,
diff --git a/core/src/fxge/win32/fx_win32_print.cpp b/core/src/fxge/win32/fx_win32_print.cpp
index 6c262d83dc..acd73d1427 100644
--- a/core/src/fxge/win32/fx_win32_print.cpp
+++ b/core/src/fxge/win32/fx_win32_print.cpp
@@ -287,15 +287,15 @@ CPSOutput::~CPSOutput() {
void CPSOutput::Init() {
m_pBuf = FX_Alloc(FX_CHAR, 1026);
}
-void CPSOutput::OutputPS(const FX_CHAR* string, int len) {
+void CPSOutput::OutputPS(const FX_CHAR* str, int len) {
if (len < 0) {
- len = (int)FXSYS_strlen(string);
+ len = (int)FXSYS_strlen(str);
}
int sent_len = 0;
while (len > 0) {
int send_len = len > 1024 ? 1024 : len;
*(FX_WORD*)m_pBuf = send_len;
- FXSYS_memcpy(m_pBuf + 2, string + sent_len, send_len);
+ FXSYS_memcpy(m_pBuf + 2, str + sent_len, send_len);
ExtEscape(m_hDC, PASSTHROUGH, send_len + 2, m_pBuf, 0, NULL);
sent_len += send_len;
len -= send_len;
diff --git a/core/src/fxge/win32/win32_int.h b/core/src/fxge/win32/win32_int.h
index 97da0ac15c..233fe367f5 100644
--- a/core/src/fxge/win32/win32_int.h
+++ b/core/src/fxge/win32/win32_int.h
@@ -277,7 +277,7 @@ class CPSOutput : public IFX_PSOutput {
// IFX_PSOutput
void Release() override { delete this; }
- void OutputPS(const FX_CHAR* string, int len) override;
+ void OutputPS(const FX_CHAR* str, int len) override;
void Init();
diff --git a/fpdfsdk/include/formfiller/FFL_FormFiller.h b/fpdfsdk/include/formfiller/FFL_FormFiller.h
index 3ad1e9d8c4..f15d40c7a3 100644
--- a/fpdfsdk/include/formfiller/FFL_FormFiller.h
+++ b/fpdfsdk/include/formfiller/FFL_FormFiller.h
@@ -7,6 +7,8 @@
#ifndef FPDFSDK_INCLUDE_FORMFILLER_FFL_FORMFILLER_H_
#define FPDFSDK_INCLUDE_FORMFILLER_FFL_FORMFILLER_H_
+#include <map>
+
#include "fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h"
#include "fpdfsdk/include/formfiller/FFL_IFormFiller.h"
#include "fpdfsdk/include/fsdk_baseform.h"
diff --git a/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h b/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h
index fa2c8a2752..2bc579c1da 100644
--- a/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h
+++ b/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h
@@ -114,23 +114,17 @@ class CPDFXFA_Document : public IXFA_DocProvider {
return 0;
}
- // SignaturePseudoModel method
- // TODO:
- virtual int32_t Verify(
- IXFA_Doc* hDoc,
- CXFA_Node* pSigNode,
- FX_BOOL
- bUsed = TRUE /*, SecurityHandler* pHandler, SignatureInfo &info*/) {
+ virtual int32_t Verify(IXFA_Doc* hDoc,
+ CXFA_Node* pSigNode,
+ FX_BOOL bUsed = TRUE) {
return 0;
}
- virtual FX_BOOL Sign(
- IXFA_Doc* hDoc,
- CXFA_NodeList* pNodeList,
- const CFX_WideStringC& wsExpression,
- const CFX_WideStringC& wsXMLIdent,
- const CFX_WideStringC& wsValue = FX_WSTRC(L"open"),
- FX_BOOL
- bUsed = TRUE /*, SecurityHandler* pHandler = NULL, SignatureInfo &info*/) {
+ virtual FX_BOOL Sign(IXFA_Doc* hDoc,
+ CXFA_NodeList* pNodeList,
+ const CFX_WideStringC& wsExpression,
+ const CFX_WideStringC& wsXMLIdent,
+ const CFX_WideStringC& wsValue = FX_WSTRC(L"open"),
+ FX_BOOL bUsed = TRUE) {
return 0;
}
virtual CXFA_NodeList* Enumerate(IXFA_Doc* hDoc) { return 0; }
diff --git a/fpdfsdk/include/fsdk_annothandler.h b/fpdfsdk/include/fsdk_annothandler.h
index 407e94d236..703525dd0f 100644
--- a/fpdfsdk/include/fsdk_annothandler.h
+++ b/fpdfsdk/include/fsdk_annothandler.h
@@ -11,6 +11,7 @@
#include <vector>
#include "core/include/fxcrt/fx_basic.h"
+#include "xfa/include/fxfa/fxfa.h"
#ifdef PDF_ENABLE_XFA
#define FSDK_XFAWIDGET_TYPENAME "XFAWidget"
diff --git a/fpdfsdk/include/fx_systemhandler.h b/fpdfsdk/include/fx_systemhandler.h
index 4f64145844..bfd1ce188c 100644
--- a/fpdfsdk/include/fx_systemhandler.h
+++ b/fpdfsdk/include/fx_systemhandler.h
@@ -55,7 +55,7 @@ class IFX_SystemHandler {
virtual FX_BOOL IsSelectionImplemented() = 0;
virtual CFX_WideString GetClipboardText(FX_HWND hWnd) = 0;
- virtual FX_BOOL SetClipboardText(FX_HWND hWnd, CFX_WideString string) = 0;
+ virtual FX_BOOL SetClipboardText(FX_HWND hWnd, CFX_WideString str) = 0;
virtual void ClientToScreen(FX_HWND hWnd, int32_t& x, int32_t& y) = 0;
virtual void ScreenToClient(FX_HWND hWnd, int32_t& x, int32_t& y) = 0;
@@ -73,7 +73,7 @@ class IFX_SystemHandler {
virtual FX_HMENU CreatePopupMenu() = 0;
virtual FX_BOOL AppendMenuItem(FX_HMENU hMenu,
int32_t nIDNewItem,
- CFX_WideString string) = 0;
+ CFX_WideString str) = 0;
virtual FX_BOOL EnableMenuItem(FX_HMENU hMenu,
int32_t nIDItem,
FX_BOOL bEnabled) = 0;
diff --git a/fpdfsdk/include/fxedit/fx_edit.h b/fpdfsdk/include/fxedit/fx_edit.h
index 089eecc1d9..d04b45d587 100644
--- a/fpdfsdk/include/fxedit/fx_edit.h
+++ b/fpdfsdk/include/fxedit/fx_edit.h
@@ -542,7 +542,7 @@ class IFX_List {
virtual int32_t GetItemIndex(const CFX_FloatPoint& point) const = 0;
virtual int32_t GetFirstSelected() const = 0;
- virtual void AddString(const FX_WCHAR* string) = 0;
+ virtual void AddString(const FX_WCHAR* str) = 0;
virtual void SetTopItem(int32_t nIndex) = 0;
virtual void Select(int32_t nItemIndex) = 0;
virtual void SetCaret(int32_t nItemIndex) = 0;
diff --git a/fpdfsdk/include/fxedit/fxet_list.h b/fpdfsdk/include/fxedit/fxet_list.h
index a02cd8a45e..4f1274c1aa 100644
--- a/fpdfsdk/include/fxedit/fxet_list.h
+++ b/fpdfsdk/include/fxedit/fxet_list.h
@@ -7,7 +7,7 @@
#ifndef FPDFSDK_INCLUDE_FXEDIT_FXET_LIST_H_
#define FPDFSDK_INCLUDE_FXEDIT_FXET_LIST_H_
-#include "core/include/fpdfapi/fpdf_parser.h" // For CFX_FloatPoint.
+#include "core/include/fpdfapi/fpdf_parser.h"
#include "fpdfsdk/include/fxedit/fx_edit.h"
class IFX_Edit;
@@ -307,7 +307,7 @@ class CFX_ListCtrl : public CFX_List {
int32_t GetTopItem() const override;
CFX_FloatRect GetContentRect() const override;
int32_t GetItemIndex(const CFX_FloatPoint& point) const override;
- void AddString(const FX_WCHAR* string) override;
+ void AddString(const FX_WCHAR* str) override;
void SetTopItem(int32_t nIndex) override;
void Select(int32_t nItemIndex) override;
void SetCaret(int32_t nItemIndex) override;
diff --git a/fpdfsdk/include/jsapi/fxjs_v8.h b/fpdfsdk/include/jsapi/fxjs_v8.h
index 64fa01bd44..dccb261b06 100644
--- a/fpdfsdk/include/jsapi/fxjs_v8.h
+++ b/fpdfsdk/include/jsapi/fxjs_v8.h
@@ -286,8 +286,7 @@ v8::Local<v8::Value> FXJS_NewObject(v8::Isolate* pIsolate,
v8::Local<v8::Object> pObj);
v8::Local<v8::Value> FXJS_NewObject2(v8::Isolate* pIsolate,
v8::Local<v8::Array> pObj);
-v8::Local<v8::Value> FXJS_NewString(v8::Isolate* pIsolate,
- const wchar_t* string);
+v8::Local<v8::Value> FXJS_NewString(v8::Isolate* pIsolate, const wchar_t* str);
v8::Local<v8::Value> FXJS_NewNull();
v8::Local<v8::Value> FXJS_NewDate(v8::Isolate* pIsolate, double d);
diff --git a/fpdfsdk/include/pdfwindow/PWL_ComboBox.h b/fpdfsdk/include/pdfwindow/PWL_ComboBox.h
index e5383009b9..b08e954947 100644
--- a/fpdfsdk/include/pdfwindow/PWL_ComboBox.h
+++ b/fpdfsdk/include/pdfwindow/PWL_ComboBox.h
@@ -71,7 +71,7 @@ class CPWL_ComboBox : public CPWL_Wnd {
CFX_WideString GetText() const;
void SetText(const FX_WCHAR* text);
- void AddString(const FX_WCHAR* string);
+ void AddString(const FX_WCHAR* str);
int32_t GetSelect() const;
void SetSelect(int32_t nItemIndex);
diff --git a/fpdfsdk/include/pdfwindow/PWL_ListBox.h b/fpdfsdk/include/pdfwindow/PWL_ListBox.h
index ced4e73d03..e12d727d58 100644
--- a/fpdfsdk/include/pdfwindow/PWL_ListBox.h
+++ b/fpdfsdk/include/pdfwindow/PWL_ListBox.h
@@ -81,7 +81,7 @@ class CPWL_ListBox : public CPWL_Wnd {
void OnNotifySelChanged(FX_BOOL bKeyDown, FX_BOOL& bExit, FX_DWORD nFlag);
- void AddString(const FX_WCHAR* string);
+ void AddString(const FX_WCHAR* str);
void SetTopVisibleIndex(int32_t nItemIndex);
void ScrollToListItem(int32_t nItemIndex);
void ResetContent();
diff --git a/fpdfsdk/include/pdfwindow/PWL_Note.h b/fpdfsdk/include/pdfwindow/PWL_Note.h
index 8087585cee..cb04aaebad 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Note.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Note.h
@@ -305,7 +305,7 @@ class CPWL_Note : public CPWL_NoteItem {
void EnableModify(FX_BOOL bEnabled);
CFX_WideString GetReplyString() const;
- void SetReplyString(const CFX_WideString& string);
+ void SetReplyString(const CFX_WideString& str);
// CPWL_NoteItem
void SetSubjectName(const CFX_WideString& sName) override;
diff --git a/fpdfsdk/include/pdfwindow/PWL_Signature.h b/fpdfsdk/include/pdfwindow/PWL_Signature.h
index 1f2fa733b2..209782a0b8 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Signature.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Signature.h
@@ -38,7 +38,7 @@ class CPWL_Signature : public CPWL_Wnd {
~CPWL_Signature() override;
void SetText(const FX_WCHAR* sText);
- void SetDescription(const FX_WCHAR* string);
+ void SetDescription(const FX_WCHAR* str);
void SetImage(CFX_DIBSource* pImage);
void SetImageStream(CPDF_Stream* pStream, const FX_CHAR* sImageAlias);
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();
}
diff --git a/public/fpdf_dataavail.h b/public/fpdf_dataavail.h
index 0f8ff7d6d7..fc23337840 100644
--- a/public/fpdf_dataavail.h
+++ b/public/fpdf_dataavail.h
@@ -55,7 +55,9 @@ typedef struct _FX_FILEAVAIL {
* Comments:
* Called by Foxit SDK to check whether the data section is ready.
*/
- FPDF_BOOL (*IsDataAvail)(struct _FX_FILEAVAIL* pThis, size_t offset, size_t size);
+ FPDF_BOOL (*IsDataAvail)(struct _FX_FILEAVAIL* pThis,
+ size_t offset,
+ size_t size);
} FX_FILEAVAIL;
typedef void* FPDF_AVAIL;
diff --git a/public/fpdf_doc.h b/public/fpdf_doc.h
index de05eb3a59..eae7c95e49 100644
--- a/public/fpdf_doc.h
+++ b/public/fpdf_doc.h
@@ -272,7 +272,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFLink_Enumerate(FPDF_PAGE page,
FPDF_LINK* linkAnnot);
// Function: FPDFLink_GetAnnotRect
-// Get the annotation rectangle. (Specified by the ˇ°Rectˇ± entry of
+// Get the annotation rectangle. (Specified by the |Rect| entry of
// annotation dictionary).
// Parameters:
// linkAnnot[in] - Handle to the link annotation.
diff --git a/public/fpdf_formfill.h b/public/fpdf_formfill.h
index 31117538e2..3aeccb92f3 100644
--- a/public/fpdf_formfill.h
+++ b/public/fpdf_formfill.h
@@ -577,7 +577,9 @@ typedef struct _FPDF_FORMFILLINFO {
* To successfully run the javascript action, implementation need to load
* the page for SDK.
* */
- FPDF_PAGE (*FFI_GetPage)(struct _FPDF_FORMFILLINFO* pThis, FPDF_DOCUMENT document, int nPageIndex);
+ FPDF_PAGE (*FFI_GetPage)(struct _FPDF_FORMFILLINFO* pThis,
+ FPDF_DOCUMENT document,
+ int nPageIndex);
/**
* Method: FFI_GetCurrentPage
@@ -593,7 +595,8 @@ typedef struct _FPDF_FORMFILLINFO {
* Return value:
* Handle to the page. Returned by FPDF_LoadPage function.
* */
- FPDF_PAGE (*FFI_GetCurrentPage)(struct _FPDF_FORMFILLINFO* pThis, FPDF_DOCUMENT document);
+ FPDF_PAGE (*FFI_GetCurrentPage)(struct _FPDF_FORMFILLINFO* pThis,
+ FPDF_DOCUMENT document);
/**
* Method: FFI_GetRotation
@@ -857,7 +860,12 @@ typedef struct _FPDF_FORMFILLINFO {
* Return value:
* TRUE indicates success; otherwise false.
**/
- FPDF_BOOL (*FFI_PopupMenu)(struct _FPDF_FORMFILLINFO* pThis, FPDF_PAGE page, FPDF_WIDGET hWidget, int menuFlag, float x, float y);
+ FPDF_BOOL (*FFI_PopupMenu)(struct _FPDF_FORMFILLINFO* pThis,
+ FPDF_PAGE page,
+ FPDF_WIDGET hWidget,
+ int menuFlag,
+ float x,
+ float y);
/**
* Method: FFI_OpenFile
@@ -988,7 +996,8 @@ typedef struct _FPDF_FORMFILLINFO {
* Return value:
* The handle to FPDF_FILEHANDLER.
**/
- FPDF_LPFILEHANDLER (*FFI_DownloadFromURL)(struct _FPDF_FORMFILLINFO* pThis, FPDF_WIDESTRING URL);
+ FPDF_LPFILEHANDLER (*FFI_DownloadFromURL)(struct _FPDF_FORMFILLINFO* pThis,
+ FPDF_WIDESTRING URL);
/**
* Method: FFI_PostRequestURL
* This method will post the request to the server URL.
@@ -1010,7 +1019,13 @@ typedef struct _FPDF_FORMFILLINFO {
* Return value:
* TRUE indicates success, otherwise FALSE.
**/
- FPDF_BOOL (*FFI_PostRequestURL)(struct _FPDF_FORMFILLINFO* pThis, FPDF_WIDESTRING wsURL, FPDF_WIDESTRING wsData, FPDF_WIDESTRING wsContentType, FPDF_WIDESTRING wsEncode, FPDF_WIDESTRING wsHeader, FPDF_BSTR* respone);
+ FPDF_BOOL (*FFI_PostRequestURL)(struct _FPDF_FORMFILLINFO* pThis,
+ FPDF_WIDESTRING wsURL,
+ FPDF_WIDESTRING wsData,
+ FPDF_WIDESTRING wsContentType,
+ FPDF_WIDESTRING wsEncode,
+ FPDF_WIDESTRING wsHeader,
+ FPDF_BSTR* respone);
/**
* Method: FFI_PutRequestURL
@@ -1028,7 +1043,10 @@ typedef struct _FPDF_FORMFILLINFO {
* Return value:
* TRUE indicates success, otherwise FALSE.
**/
- FPDF_BOOL (*FFI_PutRequestURL)(struct _FPDF_FORMFILLINFO* pThis, FPDF_WIDESTRING wsURL, FPDF_WIDESTRING wsData, FPDF_WIDESTRING wsEncode);
+ FPDF_BOOL (*FFI_PutRequestURL)(struct _FPDF_FORMFILLINFO* pThis,
+ FPDF_WIDESTRING wsURL,
+ FPDF_WIDESTRING wsData,
+ FPDF_WIDESTRING wsEncode);
#endif // PDF_ENABLE_XFA
} FPDF_FORMFILLINFO;
diff --git a/public/fpdfview.h b/public/fpdfview.h
index 2401affb17..68d0b1ad83 100644
--- a/public/fpdfview.h
+++ b/public/fpdfview.h
@@ -15,7 +15,8 @@
#endif
#ifdef PDF_ENABLE_XFA
-// TODO: remove the #define when XFA is officially in pdfium
+// PDF_USE_XFA is set in confirmation that this version of PDFium can support
+// XFA forms as requested by the PDF_ENABLE_XFA setting.
#define PDF_USE_XFA
#endif // PDF_ENABLE_XFA
@@ -313,7 +314,10 @@ typedef struct _FPDF_FILEHANDLER {
*
* @return 0 for success, other value for failure.
*/
- FPDF_RESULT (*ReadBlock)(FPDF_LPVOID clientData, FPDF_DWORD offset, FPDF_LPVOID buffer, FPDF_DWORD size);
+ FPDF_RESULT (*ReadBlock)(FPDF_LPVOID clientData,
+ FPDF_DWORD offset,
+ FPDF_LPVOID buffer,
+ FPDF_DWORD size);
/**
* @brief Callback function to write data into the current file stream.
*
@@ -327,7 +331,10 @@ typedef struct _FPDF_FILEHANDLER {
*
* @return 0 for success, other value for failure.
*/
- FPDF_RESULT (*WriteBlock)(FPDF_LPVOID clientData, FPDF_DWORD offset, FPDF_LPCVOID buffer, FPDF_DWORD size);
+ FPDF_RESULT (*WriteBlock)(FPDF_LPVOID clientData,
+ FPDF_DWORD offset,
+ FPDF_LPCVOID buffer,
+ FPDF_DWORD size);
/**
* @brief Callback function to flush all internal accessing buffers.
*
diff --git a/testing/test_support.cpp b/testing/test_support.cpp
index da5ea7e9ee..1ccd32f084 100644
--- a/testing/test_support.cpp
+++ b/testing/test_support.cpp
@@ -7,6 +7,8 @@
#include <stdio.h>
#include <string.h>
+#include <string>
+
#include "testing/utils/path_service.h"
#ifdef PDF_ENABLE_V8
diff --git a/testing/utils/path_service.cpp b/testing/utils/path_service.cpp
index 1501a2da68..c5a461315c 100644
--- a/testing/utils/path_service.cpp
+++ b/testing/utils/path_service.cpp
@@ -13,6 +13,8 @@
#include <unistd.h>
#endif // _WIN32
+#include <string>
+
#include "core/include/fxcrt/fx_system.h"
// static
diff --git a/xfa/src/fdp/src/css/fde_csscache.h b/xfa/src/fdp/src/css/fde_csscache.h
index 9e13d50087..dad87e96f7 100644
--- a/xfa/src/fdp/src/css/fde_csscache.h
+++ b/xfa/src/fdp/src/css/fde_csscache.h
@@ -7,6 +7,8 @@
#ifndef XFA_SRC_FDP_SRC_CSS_FDE_CSSCACHE_H_
#define XFA_SRC_FDP_SRC_CSS_FDE_CSSCACHE_H_
+#include <map>
+
#include "xfa/src/fdp/include/fde_css.h"
#include "xfa/src/fgas/include/fx_mem.h"
diff --git a/xfa/src/fdp/src/css/fde_cssstyleselector.cpp b/xfa/src/fdp/src/css/fde_cssstyleselector.cpp
index 68bb570769..7fd9dee835 100644
--- a/xfa/src/fdp/src/css/fde_cssstyleselector.cpp
+++ b/xfa/src/fdp/src/css/fde_cssstyleselector.cpp
@@ -6,6 +6,8 @@
#include "xfa/src/fdp/src/css/fde_cssstyleselector.h"
+#include <algorithm>
+
#include "xfa/src/fdp/src/css/fde_csscache.h"
#include "xfa/src/fdp/src/css/fde_cssdeclaration.h"
diff --git a/xfa/src/fgas/src/crt/fx_algorithm.cpp b/xfa/src/fgas/src/crt/fx_algorithm.cpp
index 3d1f58a9e7..7de22b73fa 100644
--- a/xfa/src/fgas/src/crt/fx_algorithm.cpp
+++ b/xfa/src/fgas/src/crt/fx_algorithm.cpp
@@ -10,7 +10,7 @@
extern "C" {
#endif
-const static FX_CHAR g_FXBase64EncoderMap[64] = {
+static const FX_CHAR g_FXBase64EncoderMap[64] = {
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
@@ -87,7 +87,8 @@ int32_t FX_Base64EncodeA(const uint8_t* pSrc, int32_t iSrcLen, FX_CHAR* pDst) {
}
return pDstEnd - pDst;
}
-const static uint8_t g_FXBase64DecoderMap[256] = {
+
+static const uint8_t g_FXBase64DecoderMap[256] = {
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
@@ -254,7 +255,8 @@ int32_t FX_Base64DecodeW(const FX_WCHAR* pSrc, int32_t iSrcLen, uint8_t* pDst) {
}
return pDstEnd - pDst;
}
-const static uint8_t g_FXHex2DecMap[256] = {
+
+static const uint8_t g_FXHex2DecMap[256] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0,
@@ -298,5 +300,5 @@ int32_t FX_SeparateStringW(const FX_WCHAR* pStr,
return pieces.GetSize();
}
#ifdef __cplusplus
-};
+}
#endif
diff --git a/xfa/src/fwl/basewidget/fwl_editimp.cpp b/xfa/src/fwl/basewidget/fwl_editimp.cpp
index 5afaee1357..d60bc11aa5 100644
--- a/xfa/src/fwl/basewidget/fwl_editimp.cpp
+++ b/xfa/src/fwl/basewidget/fwl_editimp.cpp
@@ -7,6 +7,7 @@
#include "xfa/src/fwl/basewidget/fwl_editimp.h"
#include <algorithm>
+#include <vector>
#include "xfa/include/fwl/basewidget/fwl_caret.h"
#include "xfa/include/fwl/basewidget/fwl_datetimepicker.h"
diff --git a/xfa/src/fwl/lightwidget/edit.cpp b/xfa/src/fwl/lightwidget/edit.cpp
index cf87ae031d..303943a8f6 100644
--- a/xfa/src/fwl/lightwidget/edit.cpp
+++ b/xfa/src/fwl/lightwidget/edit.cpp
@@ -7,6 +7,7 @@
#include "xfa/include/fwl/lightwidget/edit.h"
#include <memory>
+#include <vector>
#include "xfa/include/fwl/basewidget/fwl_edit.h"
diff --git a/xfa/src/fxbarcode/common/BC_WhiteRectangleDetector.cpp b/xfa/src/fxbarcode/common/BC_WhiteRectangleDetector.cpp
index cc1b435f00..4e33691e08 100644
--- a/xfa/src/fxbarcode/common/BC_WhiteRectangleDetector.cpp
+++ b/xfa/src/fxbarcode/common/BC_WhiteRectangleDetector.cpp
@@ -28,9 +28,6 @@
#include "xfa/src/fxbarcode/common/BC_CommonBitMatrix.h"
#include "xfa/src/fxbarcode/utils.h"
-const int32_t CBC_WhiteRectangleDetector::INIT_SIZE = 30;
-const int32_t CBC_WhiteRectangleDetector::CORR = 1;
-
CBC_WhiteRectangleDetector::CBC_WhiteRectangleDetector(
CBC_CommonBitMatrix* image) {
m_image = image;
diff --git a/xfa/src/fxbarcode/common/BC_WhiteRectangleDetector.h b/xfa/src/fxbarcode/common/BC_WhiteRectangleDetector.h
index ccd6a84a0d..4af04ac1fc 100644
--- a/xfa/src/fxbarcode/common/BC_WhiteRectangleDetector.h
+++ b/xfa/src/fxbarcode/common/BC_WhiteRectangleDetector.h
@@ -38,8 +38,9 @@ class CBC_WhiteRectangleDetector {
int32_t b,
int32_t fixed,
FX_BOOL horizontal);
- const static int32_t INIT_SIZE;
- const static int32_t CORR;
+
+ static const int32_t INIT_SIZE = 30;
+ static const int32_t CORR = 1;
CBC_CommonBitMatrix* m_image;
int32_t m_height;
diff --git a/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.h b/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.h
index ba23976842..eba1828d19 100644
--- a/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.h
+++ b/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.h
@@ -41,18 +41,18 @@ class CBC_DataMatrixDecodedBitStreamParser {
static uint8_t Unrandomize255State(int32_t randomizedBase256Codeword,
int32_t base256CodewordPosition);
- const static FX_CHAR C40_BASIC_SET_CHARS[];
- const static FX_CHAR C40_SHIFT2_SET_CHARS[];
+ static const FX_CHAR C40_BASIC_SET_CHARS[];
+ static const FX_CHAR C40_SHIFT2_SET_CHARS[];
- const static FX_CHAR TEXT_BASIC_SET_CHARS[];
- const static FX_CHAR TEXT_SHIFT3_SET_CHARS[];
- const static int32_t PAD_ENCODE;
- const static int32_t ASCII_ENCODE;
- const static int32_t C40_ENCODE;
- const static int32_t TEXT_ENCODE;
- const static int32_t ANSIX12_ENCODE;
- const static int32_t EDIFACT_ENCODE;
- const static int32_t BASE256_ENCODE;
+ static const FX_CHAR TEXT_BASIC_SET_CHARS[];
+ static const FX_CHAR TEXT_SHIFT3_SET_CHARS[];
+ static const int32_t PAD_ENCODE;
+ static const int32_t ASCII_ENCODE;
+ static const int32_t C40_ENCODE;
+ static const int32_t TEXT_ENCODE;
+ static const int32_t ANSIX12_ENCODE;
+ static const int32_t EDIFACT_ENCODE;
+ static const int32_t BASE256_ENCODE;
};
#endif // XFA_SRC_FXBARCODE_DATAMATRIX_BC_DATAMATRIXDECODEDBITSTREAMPARSER_H_
diff --git a/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.h b/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.h
index 123f75101b..34cbcb9418 100644
--- a/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.h
+++ b/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.h
@@ -69,9 +69,10 @@ class CBC_DataMatrixDetector {
virtual void Init(int32_t& e);
private:
+ static const int32_t INTEGERS[5];
+
CBC_CommonBitMatrix* m_image;
CBC_WhiteRectangleDetector* m_rectangleDetector;
- const static int32_t INTEGERS[5];
};
#endif // XFA_SRC_FXBARCODE_DATAMATRIX_BC_DATAMATRIXDETECTOR_H_
diff --git a/xfa/src/fxbarcode/oned/BC_OneDReader.cpp b/xfa/src/fxbarcode/oned/BC_OneDReader.cpp
index 76d05042da..9ecb20e671 100644
--- a/xfa/src/fxbarcode/oned/BC_OneDReader.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OneDReader.cpp
@@ -29,9 +29,6 @@
#include "xfa/src/fxbarcode/oned/BC_OneDReader.h"
#include "xfa/src/fxbarcode/utils.h"
-const int32_t CBC_OneDReader::INTEGER_MATH_SHIFT = 8;
-const int32_t CBC_OneDReader::PATTERN_MATCH_RESULT_SCALE_FACTOR = 1 << 8;
-
CBC_OneDReader::CBC_OneDReader() {}
CBC_OneDReader::~CBC_OneDReader() {}
CFX_ByteString CBC_OneDReader::Decode(CBC_BinaryBitmap* image, int32_t& e) {
diff --git a/xfa/src/fxbarcode/oned/BC_OneDReader.h b/xfa/src/fxbarcode/oned/BC_OneDReader.h
index 27a1a3d7ee..bcd7cbc8b5 100644
--- a/xfa/src/fxbarcode/oned/BC_OneDReader.h
+++ b/xfa/src/fxbarcode/oned/BC_OneDReader.h
@@ -31,8 +31,9 @@ class CBC_OneDReader : public CBC_Reader {
CFX_ByteString DeDecode(CBC_BinaryBitmap* image, int32_t hints, int32_t& e);
protected:
- const static int32_t INTEGER_MATH_SHIFT;
- const static int32_t PATTERN_MATCH_RESULT_SCALE_FACTOR;
+ static const int32_t INTEGER_MATH_SHIFT = 8;
+ static const int32_t PATTERN_MATCH_RESULT_SCALE_FACTOR = 1 << 8;
+
void RecordPattern(CBC_CommonBitArray* row,
int32_t start,
CFX_Int32Array* counters,
diff --git a/xfa/src/fxbarcode/oned/BC_OneDimReader.cpp b/xfa/src/fxbarcode/oned/BC_OneDimReader.cpp
index da1f47bfe8..07b8657189 100644
--- a/xfa/src/fxbarcode/oned/BC_OneDimReader.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OneDimReader.cpp
@@ -29,8 +29,6 @@
#include "xfa/src/fxbarcode/oned/BC_OneDReader.h"
#include "xfa/src/fxbarcode/utils.h"
-const int32_t CBC_OneDimReader::MAX_AVG_VARIANCE = (int32_t)(256 * 0.48f);
-const int32_t CBC_OneDimReader::MAX_INDIVIDUAL_VARIANCE = (int32_t)(256 * 0.7f);
const int32_t CBC_OneDimReader::START_END_PATTERN[3] = {1, 1, 1};
const int32_t CBC_OneDimReader::MIDDLE_PATTERN[5] = {1, 1, 1, 1, 1};
const int32_t CBC_OneDimReader::L_PATTERNS[10][4] = {
diff --git a/xfa/src/fxbarcode/oned/BC_OneDimReader.h b/xfa/src/fxbarcode/oned/BC_OneDimReader.h
index 3374bec63a..9e5789afb9 100644
--- a/xfa/src/fxbarcode/oned/BC_OneDimReader.h
+++ b/xfa/src/fxbarcode/oned/BC_OneDimReader.h
@@ -14,18 +14,20 @@ class CBC_CommonBitArray;
class CBC_OneDimReader : public CBC_OneDReader {
private:
- const static int32_t MAX_AVG_VARIANCE;
- const static int32_t MAX_INDIVIDUAL_VARIANCE;
+ static const int32_t MAX_AVG_VARIANCE = (int32_t)(256 * 0.48f);
+ static const int32_t MAX_INDIVIDUAL_VARIANCE = (int32_t)(256 * 0.7f);
FX_BOOL CheckStandardUPCEANChecksum(CFX_ByteString& s, int32_t& e);
public:
- const static int32_t START_END_PATTERN[3];
- const static int32_t MIDDLE_PATTERN[5];
- const static int32_t L_PATTERNS[10][4];
- const static int32_t L_AND_G_PATTERNS[20][4];
+ static const int32_t START_END_PATTERN[3];
+ static const int32_t MIDDLE_PATTERN[5];
+ static const int32_t L_PATTERNS[10][4];
+ static const int32_t L_AND_G_PATTERNS[20][4];
+
CBC_OneDimReader();
virtual ~CBC_OneDimReader();
+
CFX_ByteString DecodeRow(int32_t rowNumber,
CBC_CommonBitArray* row,
int32_t hints,
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.cpp b/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.cpp
index 3cbad1eade..5d2d447efc 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.cpp
@@ -38,7 +38,6 @@ const int32_t CBC_OnedCodaBarReader::CHARACTER_ENCODINGS[22] = {
0x003, 0x006, 0x009, 0x060, 0x012, 0x042, 0x021, 0x024,
0x030, 0x048, 0x00c, 0x018, 0x045, 0x051, 0x054, 0x015,
0x01A, 0x029, 0x00B, 0x00E, 0x01A, 0x029};
-const int32_t CBC_OnedCodaBarReader::minCharacterLength = 3;
const FX_CHAR CBC_OnedCodaBarReader::STARTEND_ENCODING[8] = {
'E', '*', 'A', 'B', 'C', 'D', 'T', 'N'};
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.h b/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.h
index cbb47fb554..49c136f4fd 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.h
+++ b/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.h
@@ -24,13 +24,13 @@ class CBC_OnedCodaBarReader : public CBC_OneDReader {
CFX_Int32Array* FindAsteriskPattern(CBC_CommonBitArray* row, int32_t& e);
FX_BOOL ArrayContains(const FX_CHAR array[], FX_CHAR key);
FX_CHAR ToNarrowWidePattern(CFX_Int32Array* counter);
- static const FX_CHAR* ALPHABET_STRING;
-
- const static int32_t CHARACTER_ENCODINGS[22];
- const static int32_t minCharacterLength;
+ static const FX_CHAR* ALPHABET_STRING;
+ static const int32_t CHARACTER_ENCODINGS[22];
- const static FX_CHAR STARTEND_ENCODING[8];
+ private:
+ static const int32_t minCharacterLength = 3;
+ static const FX_CHAR STARTEND_ENCODING[8];
};
#endif // XFA_SRC_FXBARCODE_ONED_BC_ONEDCODABARREADER_H_
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.h b/xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.h
index 3671821bce..8f9ca5883d 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.h
+++ b/xfa/src/fxbarcode/oned/BC_OnedCodaBarWriter.h
@@ -44,8 +44,8 @@ class CBC_OnedCodaBarWriter : public CBC_OneDimWriter {
int32_t codeLength,
FX_BOOL isDevice,
int32_t& e);
- const static FX_CHAR START_END_CHARS[];
- const static FX_CHAR CONTENT_CHARS[];
+ static const FX_CHAR START_END_CHARS[];
+ static const FX_CHAR CONTENT_CHARS[];
FX_CHAR m_chStart;
FX_CHAR m_chEnd;
int32_t m_iWideNarrRatio;
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCode128Reader.cpp b/xfa/src/fxbarcode/oned/BC_OnedCode128Reader.cpp
index 33be8c57d7..41a6ad1d05 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedCode128Reader.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OnedCode128Reader.cpp
@@ -65,22 +65,7 @@ const int32_t CBC_OnedCode128Reader::CODE_PATTERNS[107][7] = {
{1, 1, 3, 1, 4, 1, 0}, {1, 1, 4, 1, 3, 1, 0}, {3, 1, 1, 1, 4, 1, 0},
{4, 1, 1, 1, 3, 1, 0}, {2, 1, 1, 4, 1, 2, 0}, {2, 1, 1, 2, 1, 4, 0},
{2, 1, 1, 2, 3, 2, 0}, {2, 3, 3, 1, 1, 1, 2}};
-const int32_t CBC_OnedCode128Reader::MAX_AVG_VARIANCE = (int32_t)(256 * 0.25f);
-const int32_t CBC_OnedCode128Reader::MAX_INDIVIDUAL_VARIANCE =
- (int32_t)(256 * 0.7f);
-const int32_t CBC_OnedCode128Reader::CODE_SHIFT = 98;
-const int32_t CBC_OnedCode128Reader::CODE_CODE_C = 99;
-const int32_t CBC_OnedCode128Reader::CODE_CODE_B = 100;
-const int32_t CBC_OnedCode128Reader::CODE_CODE_A = 101;
-const int32_t CBC_OnedCode128Reader::CODE_FNC_1 = 102;
-const int32_t CBC_OnedCode128Reader::CODE_FNC_2 = 97;
-const int32_t CBC_OnedCode128Reader::CODE_FNC_3 = 96;
-const int32_t CBC_OnedCode128Reader::CODE_FNC_4_A = 101;
-const int32_t CBC_OnedCode128Reader::CODE_FNC_4_B = 100;
-const int32_t CBC_OnedCode128Reader::CODE_START_A = 103;
-const int32_t CBC_OnedCode128Reader::CODE_START_B = 104;
-const int32_t CBC_OnedCode128Reader::CODE_START_C = 105;
-const int32_t CBC_OnedCode128Reader::CODE_STOP = 106;
+
CBC_OnedCode128Reader::CBC_OnedCode128Reader() {}
CBC_OnedCode128Reader::~CBC_OnedCode128Reader() {}
CFX_Int32Array* CBC_OnedCode128Reader::FindStartPattern(CBC_CommonBitArray* row,
@@ -306,6 +291,7 @@ CFX_ByteString CBC_OnedCode128Reader::DecodeRow(int32_t rowNumber,
result += '0';
}
FX_CHAR temp[128];
+ // TODO(dsinclair): Should this be snprintf?
sprintf(temp, "%d", code);
result += temp;
} else {
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCode128Reader.h b/xfa/src/fxbarcode/oned/BC_OnedCode128Reader.h
index a99c0e89f8..1d2c6a1ce0 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedCode128Reader.h
+++ b/xfa/src/fxbarcode/oned/BC_OnedCode128Reader.h
@@ -17,26 +17,28 @@ class CBC_OnedCode128Reader : public CBC_OneDReader {
CBC_CommonBitArray* row,
int32_t hints,
int32_t& e);
- const static int32_t CODE_PATTERNS[107][7];
- const static int32_t MAX_AVG_VARIANCE;
- const static int32_t MAX_INDIVIDUAL_VARIANCE;
-
- const static int32_t CODE_SHIFT;
- const static int32_t CODE_CODE_C;
- const static int32_t CODE_CODE_B;
- const static int32_t CODE_CODE_A;
- const static int32_t CODE_FNC_1;
- const static int32_t CODE_FNC_2;
- const static int32_t CODE_FNC_3;
- const static int32_t CODE_FNC_4_A;
- const static int32_t CODE_FNC_4_B;
-
- const static int32_t CODE_START_A;
- const static int32_t CODE_START_B;
- const static int32_t CODE_START_C;
- const static int32_t CODE_STOP;
+
+ static const int32_t CODE_PATTERNS[107][7];
private:
+ static const int32_t MAX_AVG_VARIANCE = (int32_t)(256 * 0.25f);
+ static const int32_t MAX_INDIVIDUAL_VARIANCE = (int32_t)(256 * 0.7f);
+
+ static const int32_t CODE_SHIFT = 98;
+ static const int32_t CODE_CODE_C = 99;
+ static const int32_t CODE_CODE_B = 100;
+ static const int32_t CODE_CODE_A = 101;
+ static const int32_t CODE_FNC_1 = 102;
+ static const int32_t CODE_FNC_2 = 97;
+ static const int32_t CODE_FNC_3 = 96;
+ static const int32_t CODE_FNC_4_A = 101;
+ static const int32_t CODE_FNC_4_B = 100;
+
+ static const int32_t CODE_START_A = 103;
+ static const int32_t CODE_START_B = 104;
+ static const int32_t CODE_START_C = 105;
+ static const int32_t CODE_STOP = 106;
+
CFX_Int32Array* FindStartPattern(CBC_CommonBitArray* row, int32_t& e);
int32_t DecodeCode(CBC_CommonBitArray* row,
CFX_Int32Array* counters,
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCode128Writer.h b/xfa/src/fxbarcode/oned/BC_OnedCode128Writer.h
index 333d3c563b..1fbb02832b 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedCode128Writer.h
+++ b/xfa/src/fxbarcode/oned/BC_OnedCode128Writer.h
@@ -39,11 +39,11 @@ class CBC_OnedCode128Writer : public CBC_OneDimWriter {
int32_t Encode128B(const CFX_ByteString& contents, CFX_PtrArray& patterns);
int32_t Encode128C(const CFX_ByteString& contents, CFX_PtrArray& patterns);
BC_TYPE m_codeFormat;
- const static int32_t CODE_START_B;
- const static int32_t CODE_START_C;
- const static int32_t CODE_CODE_B;
- const static int32_t CODE_CODE_C;
- const static int32_t CODE_STOP;
+ static const int32_t CODE_START_B;
+ static const int32_t CODE_START_C;
+ static const int32_t CODE_CODE_B;
+ static const int32_t CODE_CODE_C;
+ static const int32_t CODE_STOP;
};
#endif // XFA_SRC_FXBARCODE_ONED_BC_ONEDCODE128WRITER_H_
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.h b/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.h
index b3fa803cd7..b5573b1bdf 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.h
+++ b/xfa/src/fxbarcode/oned/BC_OnedCode39Reader.h
@@ -13,8 +13,8 @@ class CBC_OnedCode39Reader : public CBC_OneDReader {
public:
static const FX_CHAR* ALPHABET_STRING;
static const FX_CHAR* CHECKSUM_STRING;
- const static int32_t CHARACTER_ENCODINGS[44];
- const static int32_t ASTERISK_ENCODING;
+ static const int32_t CHARACTER_ENCODINGS[44];
+ static const int32_t ASTERISK_ENCODING;
CBC_OnedCode39Reader();
CBC_OnedCode39Reader(FX_BOOL usingCheckDigit);
CBC_OnedCode39Reader(FX_BOOL usingCheckDigit, FX_BOOL extendedMode);
diff --git a/xfa/src/fxbarcode/oned/BC_OnedEAN13Reader.h b/xfa/src/fxbarcode/oned/BC_OnedEAN13Reader.h
index cf9e647c85..795cc2fbde 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedEAN13Reader.h
+++ b/xfa/src/fxbarcode/oned/BC_OnedEAN13Reader.h
@@ -11,7 +11,7 @@ class CBC_CommonBitArray;
class CBC_OnedEAN13Reader;
class CBC_OnedEAN13Reader : public CBC_OneDimReader {
public:
- const static int32_t FIRST_DIGIT_ENCODINGS[10];
+ static const int32_t FIRST_DIGIT_ENCODINGS[10];
CBC_OnedEAN13Reader();
virtual ~CBC_OnedEAN13Reader();
diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoder.h b/xfa/src/fxbarcode/qrcode/BC_QRCoder.h
index e7087b33d7..6a44b53a6d 100644
--- a/xfa/src/fxbarcode/qrcode/BC_QRCoder.h
+++ b/xfa/src/fxbarcode/qrcode/BC_QRCoder.h
@@ -25,7 +25,7 @@ class CBC_QRCoder {
CBC_CommonByteMatrix* m_matrix;
public:
- const static int32_t NUM_MASK_PATTERNS;
+ static const int32_t NUM_MASK_PATTERNS;
CBC_QRCoder();
virtual ~CBC_QRCoder();
CBC_QRCoderMode* GetMode();
diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoderEncoder.h b/xfa/src/fxbarcode/qrcode/BC_QRCoderEncoder.h
index 70dad949c6..f1b6504b2f 100644
--- a/xfa/src/fxbarcode/qrcode/BC_QRCoderEncoder.h
+++ b/xfa/src/fxbarcode/qrcode/BC_QRCoderEncoder.h
@@ -19,7 +19,7 @@ class CBC_CommonByteMatrix;
class CBC_QRCoderEncoder {
private:
- const static int32_t m_alphaNumbericTable[96];
+ static const int32_t m_alphaNumbericTable[96];
public:
CBC_QRCoderEncoder();
diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoderFormatInformation.h b/xfa/src/fxbarcode/qrcode/BC_QRCoderFormatInformation.h
index 4d6402a20b..61870d788d 100644
--- a/xfa/src/fxbarcode/qrcode/BC_QRCoderFormatInformation.h
+++ b/xfa/src/fxbarcode/qrcode/BC_QRCoderFormatInformation.h
@@ -10,9 +10,9 @@
class CBC_QRCoderErrorCorrectionLevel;
class CBC_QRCoderFormatInformation {
private:
- const static int32_t FORMAT_INFO_MASK_QR;
- const static int32_t FORMAT_INFO_DECODE_LOOKUP[32][2];
- const static int32_t BITS_SET_IN_HALF_BYTE[16];
+ static const int32_t FORMAT_INFO_MASK_QR;
+ static const int32_t FORMAT_INFO_DECODE_LOOKUP[32][2];
+ static const int32_t BITS_SET_IN_HALF_BYTE[16];
CBC_QRCoderErrorCorrectionLevel* m_errorCorrectLevl;
uint8_t m_dataMask;
diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoderMatrixUtil.h b/xfa/src/fxbarcode/qrcode/BC_QRCoderMatrixUtil.h
index be38c8a4ff..6676b8389d 100644
--- a/xfa/src/fxbarcode/qrcode/BC_QRCoderMatrixUtil.h
+++ b/xfa/src/fxbarcode/qrcode/BC_QRCoderMatrixUtil.h
@@ -12,15 +12,15 @@ class CBC_QRCoderErrorCorrectionLevel;
class CBC_QRCoderBitVector;
class CBC_QRCoderMatrixUtil {
private:
- const static int32_t POSITION_DETECTION_PATTERN[7][7];
- const static int32_t VERTICAL_SEPARATION_PATTERN[7][1];
- const static int32_t HORIZONTAL_SEPARATION_PATTERN[1][8];
- const static int32_t POSITION_ADJUSTMENT_PATTERN[5][5];
- const static int32_t POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[40][7];
- const static int32_t TYPE_INFO_COORDINATES[15][2];
- const static int32_t VERSION_INFO_POLY;
- const static int32_t TYPE_INFO_POLY;
- const static int32_t TYPE_INFO_MASK_PATTERN;
+ static const int32_t POSITION_DETECTION_PATTERN[7][7];
+ static const int32_t VERTICAL_SEPARATION_PATTERN[7][1];
+ static const int32_t HORIZONTAL_SEPARATION_PATTERN[1][8];
+ static const int32_t POSITION_ADJUSTMENT_PATTERN[5][5];
+ static const int32_t POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[40][7];
+ static const int32_t TYPE_INFO_COORDINATES[15][2];
+ static const int32_t VERSION_INFO_POLY;
+ static const int32_t TYPE_INFO_POLY;
+ static const int32_t TYPE_INFO_MASK_PATTERN;
public:
CBC_QRCoderMatrixUtil();
diff --git a/xfa/src/fxbarcode/qrcode/BC_QRCoderVersion.h b/xfa/src/fxbarcode/qrcode/BC_QRCoderVersion.h
index 755a7345dc..ceb6f91930 100644
--- a/xfa/src/fxbarcode/qrcode/BC_QRCoderVersion.h
+++ b/xfa/src/fxbarcode/qrcode/BC_QRCoderVersion.h
@@ -15,7 +15,7 @@ class CBC_QRCoderErrorCorrectionLevel;
class CBC_QRCoderVersion {
private:
- const static int32_t VERSION_DECODE_INFO[34];
+ static const int32_t VERSION_DECODE_INFO[34];
static CFX_PtrArray* VERSION;
int32_t m_versionNumber;
int32_t m_totalCodeWords;
diff --git a/xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.h b/xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.h
index c014e4dec7..ca64ab0fb0 100644
--- a/xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.h
+++ b/xfa/src/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.h
@@ -14,7 +14,7 @@ class CBC_QRCoderVersion;
class CBC_CommonCharacterSetECI;
class CBC_QRDecodedBitStreamParser {
private:
- const static FX_CHAR ALPHANUMERIC_CHARS[45];
+ static const FX_CHAR ALPHANUMERIC_CHARS[45];
static const FX_CHAR* UTF_8;
CBC_QRDecodedBitStreamParser();
diff --git a/xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.h b/xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.h
index aa731b6cdb..b7640491f0 100644
--- a/xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.h
+++ b/xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.h
@@ -16,10 +16,10 @@ class CBC_QRFinderPatternInfo;
class CBC_QRFinderPatternFinder {
private:
- const static int32_t CENTER_QUORUM;
- const static int32_t MIN_SKIP;
- const static int32_t MAX_MODULES;
- const static int32_t INTEGER_MATH_SHIFT;
+ static const int32_t CENTER_QUORUM;
+ static const int32_t MIN_SKIP;
+ static const int32_t MAX_MODULES;
+ static const int32_t INTEGER_MATH_SHIFT;
FX_BOOL m_hasSkipped;
CBC_CommonBitMatrix* m_image;
CFX_Int32Array m_crossCheckStateCount;
diff --git a/xfa/src/fxfa/app/xfa_fftextedit.cpp b/xfa/src/fxfa/app/xfa_fftextedit.cpp
index 5457324d9d..f828939327 100644
--- a/xfa/src/fxfa/app/xfa_fftextedit.cpp
+++ b/xfa/src/fxfa/app/xfa_fftextedit.cpp
@@ -6,6 +6,8 @@
#include "xfa/src/fxfa/app/xfa_fftextedit.h"
+#include <vector>
+
#include "xfa/include/fwl/basewidget/fwl_datetimepicker.h"
#include "xfa/include/fwl/basewidget/fwl_edit.h"
#include "xfa/include/fwl/lightwidget/datetimepicker.h"
diff --git a/xfa/src/fxfa/app/xfa_fftextedit.h b/xfa/src/fxfa/app/xfa_fftextedit.h
index f961e5a4da..a87300dec0 100644
--- a/xfa/src/fxfa/app/xfa_fftextedit.h
+++ b/xfa/src/fxfa/app/xfa_fftextedit.h
@@ -7,6 +7,8 @@
#ifndef XFA_SRC_FXFA_APP_XFA_FFTEXTEDIT_H_
#define XFA_SRC_FXFA_APP_XFA_FFTEXTEDIT_H_
+#include <vector>
+
#include "xfa/src/fxfa/app/xfa_fffield.h"
class CXFA_FFTextEdit : public CXFA_FFField {
diff --git a/xfa/src/fxfa/app/xfa_ffwidget.cpp b/xfa/src/fxfa/app/xfa_ffwidget.cpp
index 7afa6fa12b..cc947b0ad4 100644
--- a/xfa/src/fxfa/app/xfa_ffwidget.cpp
+++ b/xfa/src/fxfa/app/xfa_ffwidget.cpp
@@ -825,7 +825,8 @@ void XFA_DrawImage(CFX_Graphics* pGS,
}
pRenderDevice->RestoreState();
}
-const static uint8_t g_inv_base64[128] = {
+
+static const uint8_t g_inv_base64[128] = {
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 62, 255,
@@ -836,6 +837,7 @@ const static uint8_t g_inv_base64[128] = {
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
49, 50, 51, 255, 255, 255, 255, 255,
};
+
static uint8_t* XFA_RemoveBase64Whitespace(const uint8_t* pStr, int32_t iLen) {
uint8_t* pCP;
int32_t i = 0, j = 0;
diff --git a/xfa/src/fxfa/app/xfa_ffwidgethandler.cpp b/xfa/src/fxfa/app/xfa_ffwidgethandler.cpp
index 62f21fa644..bea7586180 100644
--- a/xfa/src/fxfa/app/xfa_ffwidgethandler.cpp
+++ b/xfa/src/fxfa/app/xfa_ffwidgethandler.cpp
@@ -6,6 +6,8 @@
#include "xfa/src/fxfa/app/xfa_ffwidgethandler.h"
+#include <vector>
+
#include "xfa/src/fxfa/app/xfa_ffchoicelist.h"
#include "xfa/src/fxfa/app/xfa_ffdoc.h"
#include "xfa/src/fxfa/app/xfa_ffdocview.h"