summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/include/fdrm/fx_crypt.h2
-rw-r--r--core/include/fpdfapi/fpdf_module.h3
-rw-r--r--core/include/fpdfapi/fpdf_objects.h3
-rw-r--r--core/include/fpdfapi/fpdf_parser.h2
-rw-r--r--core/include/fpdfapi/fpdfapi.h1
-rw-r--r--core/include/fpdfdoc/fpdf_ap.h1
-rw-r--r--core/include/fpdfdoc/fpdf_vt.h1
-rw-r--r--core/include/fpdftext/fpdf_text.h4
-rw-r--r--core/include/fxcodec/fx_codec.h2
-rw-r--r--core/include/fxcodec/fx_codec_provider.h3
-rw-r--r--core/include/fxcrt/fx_ext.h7
-rw-r--r--core/include/fxcrt/fx_stream.h1
-rw-r--r--core/include/fxge/fpf.h2
-rw-r--r--core/include/fxge/fx_dib.h3
-rw-r--r--core/include/fxge/fx_font.h2
-rw-r--r--core/src/fdrm/crypto/fx_crypt.cpp2
-rw-r--r--core/src/fdrm/crypto/fx_crypt_aes.cpp1
-rw-r--r--core/src/fdrm/crypto/fx_crypt_sha.cpp1
-rw-r--r--core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp2
-rw-r--r--core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp2
-rw-r--r--core/src/fpdfapi/fpdf_render/fpdf_render.cpp6
-rw-r--r--core/src/fpdfdoc/doc_form.cpp1
-rw-r--r--core/src/fpdfdoc/doc_link.cpp1
-rw-r--r--core/src/fpdftext/fpdf_text.cpp5
-rw-r--r--core/src/fpdftext/fpdf_text_int.cpp2
-rw-r--r--core/src/fpdftext/fpdf_text_search.cpp1
-rw-r--r--core/src/fpdftext/unicodenormalization.cpp3
-rw-r--r--core/src/fxcodec/codec/fx_codec_jbig.cpp1
-rw-r--r--core/src/fxcodec/jbig2/JBig2_Context.h9
-rw-r--r--core/src/fxcodec/jbig2/JBig2_GeneralDecoder.h11
-rw-r--r--core/src/fxcodec/jbig2/JBig2_Image.cpp1
-rw-r--r--core/src/fxcrt/extension.h1
-rw-r--r--core/src/fxcrt/fx_arabic.cpp3
-rw-r--r--core/src/fxcrt/fx_arabic.h6
-rw-r--r--core/src/fxcrt/fx_basic_bstring_unittest.cpp4
-rw-r--r--core/src/fxcrt/fx_basic_coords.cpp3
-rw-r--r--core/src/fxcrt/fx_basic_gcc.cpp3
-rw-r--r--core/src/fxcrt/fx_basic_maps.cpp3
-rw-r--r--core/src/fxcrt/fx_basic_plex.cpp3
-rw-r--r--core/src/fxcrt/fx_extension.cpp2
-rw-r--r--core/src/fxcrt/fx_ucddata.cpp3
-rw-r--r--core/src/fxcrt/fx_unicode.cpp3
-rw-r--r--core/src/fxcrt/fxcrt_platforms.cpp3
-rw-r--r--core/src/fxcrt/fxcrt_posix.cpp3
-rw-r--r--core/src/fxcrt/fxcrt_windows.cpp3
-rw-r--r--core/src/fxcrt/plex.h2
-rw-r--r--core/src/fxcrt/xml_int.h2
-rw-r--r--core/src/fxge/android/fx_fpf.h1
-rw-r--r--core/src/fxge/apple/fx_apple_platform.cpp2
-rw-r--r--core/src/fxge/ge/fx_ge_path.cpp2
-rw-r--r--fpdfsdk/include/formfiller/FFL_Utils.h13
-rw-r--r--fpdfsdk/include/formfiller/FormFiller.h1
-rw-r--r--fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h2
-rw-r--r--fpdfsdk/include/fsdk_define.h17
-rw-r--r--fpdfsdk/include/fsdk_mgr.h4
-rw-r--r--fpdfsdk/include/javascript/IJavaScript.h3
-rw-r--r--fpdfsdk/include/javascript/JavaScript.h2
-rw-r--r--fpdfsdk/include/javascript/resource.h2
-rw-r--r--fpdfsdk/include/pdfwindow/PDFWindow.h1
-rw-r--r--fpdfsdk/src/fpdf_ext.cpp1
-rw-r--r--fpdfsdk/src/fpdf_searchex.cpp12
-rw-r--r--fpdfsdk/src/fpdftext.cpp3
-rw-r--r--fpdfsdk/src/fpdfview.cpp3
-rw-r--r--fpdfsdk/src/javascript/JS_GlobalData.cpp1
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Edit.cpp1
-rw-r--r--testing/embedder_test.cpp1
-rw-r--r--testing/embedder_test.h1
-rw-r--r--testing/fx_string_testhelpers.h2
-rw-r--r--xfa/include/fxfa/fxfa_basic.h3
-rw-r--r--xfa/src/fgas/include/fx_tbk.h3
-rw-r--r--xfa/src/fgas/src/layout/fx_rtfbreak.h3
-rw-r--r--xfa/src/fgas/src/layout/fx_textbreak.cpp2
-rw-r--r--xfa/src/fgas/src/layout/fx_textbreak.h6
-rw-r--r--xfa/src/fgas/src/localization/fx_locale.cpp2
-rw-r--r--xfa/src/fgas/src/localization/fx_localemgr.cpp2
-rw-r--r--xfa/src/fxfa/src/parser/xfa_locale.cpp2
-rw-r--r--xfa/src/fxfa/src/parser/xfa_localemgr.cpp2
77 files changed, 137 insertions, 96 deletions
diff --git a/core/include/fdrm/fx_crypt.h b/core/include/fdrm/fx_crypt.h
index af72fcf470..f820999b28 100644
--- a/core/include/fdrm/fx_crypt.h
+++ b/core/include/fdrm/fx_crypt.h
@@ -7,7 +7,7 @@
#ifndef CORE_INCLUDE_FDRM_FX_CRYPT_H_
#define CORE_INCLUDE_FDRM_FX_CRYPT_H_
-#include "../fxcrt/fx_basic.h"
+#include "../fxcrt/fx_system.h"
#ifdef __cplusplus
extern "C" {
diff --git a/core/include/fpdfapi/fpdf_module.h b/core/include/fpdfapi/fpdf_module.h
index 31bdb45231..65e4117a54 100644
--- a/core/include/fpdfapi/fpdf_module.h
+++ b/core/include/fpdfapi/fpdf_module.h
@@ -7,7 +7,8 @@
#ifndef CORE_INCLUDE_FPDFAPI_FPDF_MODULE_H_
#define CORE_INCLUDE_FPDFAPI_FPDF_MODULE_H_
-#include "../fxcrt/fx_ext.h"
+#include "../fxcrt/fx_coordinates.h"
+#include "../fxcrt/fx_system.h"
class CCodec_ModuleMgr;
class CFX_AffineMatrix;
diff --git a/core/include/fpdfapi/fpdf_objects.h b/core/include/fpdfapi/fpdf_objects.h
index 9640420aa5..e6336f6511 100644
--- a/core/include/fpdfapi/fpdf_objects.h
+++ b/core/include/fpdfapi/fpdf_objects.h
@@ -7,7 +7,8 @@
#ifndef CORE_INCLUDE_FPDFAPI_FPDF_OBJECTS_H_
#define CORE_INCLUDE_FPDFAPI_FPDF_OBJECTS_H_
-#include "../fxcrt/fx_ext.h"
+#include "../fxcrt/fx_coordinates.h"
+#include "../fxcrt/fx_system.h"
class CPDF_Array;
class CPDF_Boolean;
diff --git a/core/include/fpdfapi/fpdf_parser.h b/core/include/fpdfapi/fpdf_parser.h
index a5020ebd2c..a856433a08 100644
--- a/core/include/fpdfapi/fpdf_parser.h
+++ b/core/include/fpdfapi/fpdf_parser.h
@@ -7,7 +7,7 @@
#ifndef CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_
#define CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_
-#include "../fxcrt/fx_ext.h"
+#include "../fxcrt/fx_system.h"
#include "fpdf_objects.h"
class CPDF_Document;
diff --git a/core/include/fpdfapi/fpdfapi.h b/core/include/fpdfapi/fpdfapi.h
index 00a0bb9952..c2938a5dc4 100644
--- a/core/include/fpdfapi/fpdfapi.h
+++ b/core/include/fpdfapi/fpdfapi.h
@@ -7,7 +7,6 @@
#ifndef CORE_INCLUDE_FPDFAPI_FPDFAPI_H_
#define CORE_INCLUDE_FPDFAPI_FPDFAPI_H_
-#include "../fxcrt/fx_basic.h"
#include "../fxge/fx_ge.h"
#include "fpdf_module.h"
#include "fpdf_pageobj.h"
diff --git a/core/include/fpdfdoc/fpdf_ap.h b/core/include/fpdfdoc/fpdf_ap.h
index 3385e58b81..7cfaed4685 100644
--- a/core/include/fpdfdoc/fpdf_ap.h
+++ b/core/include/fpdfdoc/fpdf_ap.h
@@ -7,7 +7,6 @@
#ifndef CORE_INCLUDE_FPDFDOC_FPDF_AP_H_
#define CORE_INCLUDE_FPDFDOC_FPDF_AP_H_
-#include "../fxcrt/fx_basic.h"
#include "../fpdfapi/fpdf_parser.h"
#include "fpdf_vt.h"
diff --git a/core/include/fpdfdoc/fpdf_vt.h b/core/include/fpdfdoc/fpdf_vt.h
index 3f14a46c98..4baba41348 100644
--- a/core/include/fpdfdoc/fpdf_vt.h
+++ b/core/include/fpdfdoc/fpdf_vt.h
@@ -8,7 +8,6 @@
#define CORE_INCLUDE_FPDFDOC_FPDF_VT_H_
#include "../fpdfapi/fpdf_parser.h"
-#include "../fxcrt/fx_basic.h"
#include "../fxge/fx_dib.h"
class IPDF_VariableText;
diff --git a/core/include/fpdftext/fpdf_text.h b/core/include/fpdftext/fpdf_text.h
index e0b5eb8929..ad5888eb78 100644
--- a/core/include/fpdftext/fpdf_text.h
+++ b/core/include/fpdftext/fpdf_text.h
@@ -7,11 +7,11 @@
#ifndef CORE_INCLUDE_FPDFTEXT_FPDF_TEXT_H_
#define CORE_INCLUDE_FPDFTEXT_FPDF_TEXT_H_
-#include "../fpdfapi/fpdf_page.h"
-#include "../fpdfapi/fpdf_pageobj.h"
#include "../fpdfapi/fpdf_parser.h"
+class CPDF_Page;
class CPDF_PageObjects;
+class CPDF_TextObject;
class IPDF_LinkExtract;
class IPDF_ReflowedPage;
class IPDF_TextPage;
diff --git a/core/include/fxcodec/fx_codec.h b/core/include/fxcodec/fx_codec.h
index 218999a1ad..5b0092a6ff 100644
--- a/core/include/fxcodec/fx_codec.h
+++ b/core/include/fxcodec/fx_codec.h
@@ -9,7 +9,7 @@
#include "../../../third_party/base/nonstd_unique_ptr.h"
#include "../fxcrt/fx_basic.h"
-#include "../fxcrt/fx_ext.h"
+#include "../fxcrt/fx_coordinates.h"
#include "fx_codec_def.h"
#include "fx_codec_provider.h"
diff --git a/core/include/fxcodec/fx_codec_provider.h b/core/include/fxcodec/fx_codec_provider.h
index 2020f8738f..a465fe2460 100644
--- a/core/include/fxcodec/fx_codec_provider.h
+++ b/core/include/fxcodec/fx_codec_provider.h
@@ -7,7 +7,10 @@
#ifndef CORE_INCLUDE_FXCODEC_FX_CODEC_PROVIDER_H_
#define CORE_INCLUDE_FXCODEC_FX_CODEC_PROVIDER_H_
+#include "../fxcrt/fx_system.h"
+
class CFX_DIBAttribute;
+
class IFX_JpegProvider
{
public:
diff --git a/core/include/fxcrt/fx_ext.h b/core/include/fxcrt/fx_ext.h
index 308f28bbfe..55e522ad1a 100644
--- a/core/include/fxcrt/fx_ext.h
+++ b/core/include/fxcrt/fx_ext.h
@@ -7,11 +7,8 @@
#ifndef CORE_INCLUDE_FXCRT_FX_EXT_H_
#define CORE_INCLUDE_FXCRT_FX_EXT_H_
-#include "fx_arb.h"
-#include "fx_basic.h"
-#include "fx_coordinates.h"
-#include "fx_ucd.h"
-#include "fx_xml.h"
+#include "fx_string.h"
+#include "fx_system.h"
#ifdef __cplusplus
extern "C" {
diff --git a/core/include/fxcrt/fx_stream.h b/core/include/fxcrt/fx_stream.h
index 836cd272ae..405d5d0148 100644
--- a/core/include/fxcrt/fx_stream.h
+++ b/core/include/fxcrt/fx_stream.h
@@ -7,7 +7,6 @@
#ifndef CORE_INCLUDE_FXCRT_FX_STREAM_H_
#define CORE_INCLUDE_FXCRT_FX_STREAM_H_
-#include "fx_memory.h"
#include "fx_string.h"
void* FX_OpenFolder(const FX_CHAR* path);
diff --git a/core/include/fxge/fpf.h b/core/include/fxge/fpf.h
index 9ff294ebcb..fb9bf4d111 100644
--- a/core/include/fxge/fpf.h
+++ b/core/include/fxge/fpf.h
@@ -7,6 +7,8 @@
#ifndef CORE_INCLUDE_FXGE_FPF_H_
#define CORE_INCLUDE_FXGE_FPF_H_
+#include "../fxcrt/fx_coordinates.h"
+
class IFPF_DeviceModule;
class IFPF_FontMgr;
class IFPF_Font;
diff --git a/core/include/fxge/fx_dib.h b/core/include/fxge/fx_dib.h
index 290c30a678..5b8ee44369 100644
--- a/core/include/fxge/fx_dib.h
+++ b/core/include/fxge/fx_dib.h
@@ -7,7 +7,8 @@
#ifndef CORE_INCLUDE_FXGE_FX_DIB_H_
#define CORE_INCLUDE_FXGE_FX_DIB_H_
-#include "../fxcrt/fx_ext.h"
+#include "../fxcrt/fx_basic.h"
+#include "../fxcrt/fx_coordinates.h"
enum FXDIB_Format {
FXDIB_Invalid = 0,
diff --git a/core/include/fxge/fx_font.h b/core/include/fxge/fx_font.h
index 80dd1a4f13..40822936e5 100644
--- a/core/include/fxge/fx_font.h
+++ b/core/include/fxge/fx_font.h
@@ -7,7 +7,7 @@
#ifndef CORE_INCLUDE_FXGE_FX_FONT_H_
#define CORE_INCLUDE_FXGE_FX_FONT_H_
-#include "../fxcrt/fx_ext.h"
+#include "../fxcrt/fx_system.h"
#include "fx_dib.h"
typedef struct FT_FaceRec_* FXFT_Face;
diff --git a/core/src/fdrm/crypto/fx_crypt.cpp b/core/src/fdrm/crypto/fx_crypt.cpp
index 2076cbbccc..83a420ad38 100644
--- a/core/src/fdrm/crypto/fx_crypt.cpp
+++ b/core/src/fdrm/crypto/fx_crypt.cpp
@@ -5,8 +5,6 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "../../../include/fdrm/fx_crypt.h"
-#include "../../../include/fxcrt/fx_basic.h"
-#include "../../../include/fxcrt/fx_safe_types.h"
#ifdef __cplusplus
extern "C" {
diff --git a/core/src/fdrm/crypto/fx_crypt_aes.cpp b/core/src/fdrm/crypto/fx_crypt_aes.cpp
index 7b5064fd9e..4bd87105aa 100644
--- a/core/src/fdrm/crypto/fx_crypt_aes.cpp
+++ b/core/src/fdrm/crypto/fx_crypt_aes.cpp
@@ -4,7 +4,6 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../../../include/fxcrt/fx_basic.h"
#include "../../../include/fdrm/fx_crypt.h"
#ifdef __cplusplus
extern "C" {
diff --git a/core/src/fdrm/crypto/fx_crypt_sha.cpp b/core/src/fdrm/crypto/fx_crypt_sha.cpp
index 012cbdb29b..b22348a03c 100644
--- a/core/src/fdrm/crypto/fx_crypt_sha.cpp
+++ b/core/src/fdrm/crypto/fx_crypt_sha.cpp
@@ -4,7 +4,6 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../../../include/fxcrt/fx_basic.h"
#include "../../../include/fdrm/fx_crypt.h"
#ifdef __cplusplus
extern "C" {
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
index 948908e5eb..65f78dab13 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
@@ -7,8 +7,8 @@
#include "../../../include/fpdfapi/fpdf_page.h"
#include "../../../include/fpdfapi/fpdf_serial.h"
#include "../../../include/fpdfapi/fpdf_module.h"
-#include "../../../include/fxcodec/fx_codec.h"
#include "../fpdf_page/pageint.h"
+
CFX_ByteTextBuf& operator << (CFX_ByteTextBuf& ar, CFX_AffineMatrix& matrix)
{
ar << matrix.a << " " << matrix.b << " " << matrix.c << " " << matrix.d << " " << matrix.e << " " << matrix.f;
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
index 93531de1ad..b7eb05f452 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
@@ -4,8 +4,10 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "../../../include/fxcrt/fx_ext.h"
#include "../../../include/fpdfapi/fpdf_serial.h"
#include "editint.h"
+
#define PDF_OBJECTSTREAM_MAXLENGTH (256 * 1024)
#define PDF_XREFSTREAM_MAXSIZE 10000
extern void FlateEncode(const uint8_t* src_buf, FX_DWORD src_data, uint8_t*& dest_buf, FX_DWORD& dest_size);
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render.cpp
index 01bec5bcb7..608e124118 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render.cpp
@@ -4,12 +4,12 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../../../include/fpdfapi/fpdf_render.h"
#include "../../../include/fpdfapi/fpdf_module.h"
-#include "../fpdf_page/pageint.h"
+#include "../../../include/fpdfapi/fpdf_render.h"
#include "../../../include/fxge/fx_ge.h"
-#include "../../../include/fxcodec/fx_codec.h"
+#include "../fpdf_page/pageint.h"
#include "render_int.h"
+
CPDF_DocRenderData::CPDF_DocRenderData(CPDF_Document* pPDFDoc)
: m_pPDFDoc(pPDFDoc)
, m_pFontCache(NULL)
diff --git a/core/src/fpdfdoc/doc_form.cpp b/core/src/fpdfdoc/doc_form.cpp
index 916973eeca..3740f41510 100644
--- a/core/src/fpdfdoc/doc_form.cpp
+++ b/core/src/fpdfdoc/doc_form.cpp
@@ -5,7 +5,6 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "../../include/fpdfdoc/fpdf_doc.h"
-#include "../../include/fxcrt/fx_xml.h"
#include "doc_utils.h"
const int nMaxRecursion = 32;
diff --git a/core/src/fpdfdoc/doc_link.cpp b/core/src/fpdfdoc/doc_link.cpp
index 56c3ed2e37..fdae96ac2e 100644
--- a/core/src/fpdfdoc/doc_link.cpp
+++ b/core/src/fpdfdoc/doc_link.cpp
@@ -5,7 +5,6 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "../../include/fpdfdoc/fpdf_doc.h"
-#include "../../include/fxcrt/fx_safe_types.h"
CPDF_LinkList::~CPDF_LinkList()
{
diff --git a/core/src/fpdftext/fpdf_text.cpp b/core/src/fpdftext/fpdf_text.cpp
index 8d32c11ba6..80a39acac9 100644
--- a/core/src/fpdftext/fpdf_text.cpp
+++ b/core/src/fpdftext/fpdf_text.cpp
@@ -8,8 +8,11 @@
#include "../../include/fpdfapi/fpdf_page.h"
#include "../../include/fpdfapi/fpdf_pageobj.h"
#include "../../include/fpdftext/fpdf_text.h"
-#include "txtproc.h"
+#include "../../include/fxcrt/fx_arb.h"
+#include "../../include/fxcrt/fx_ucd.h"
#include "text_int.h"
+#include "txtproc.h"
+
extern const FX_CHAR* FCS_GetAltStr(FX_WCHAR);
CFX_ByteString CharFromUnicodeAlt(FX_WCHAR unicode, int destcp, const FX_CHAR* defchar)
{
diff --git a/core/src/fpdftext/fpdf_text_int.cpp b/core/src/fpdftext/fpdf_text_int.cpp
index 84edf812d7..ab6cae19c2 100644
--- a/core/src/fpdftext/fpdf_text_int.cpp
+++ b/core/src/fpdftext/fpdf_text_int.cpp
@@ -13,6 +13,8 @@
#include "../../include/fpdfapi/fpdf_pageobj.h"
#include "../../include/fpdfapi/fpdf_resource.h"
#include "../../include/fpdftext/fpdf_text.h"
+#include "../../include/fxcrt/fx_arb.h"
+#include "../../include/fxcrt/fx_ucd.h"
#include "text_int.h"
namespace {
diff --git a/core/src/fpdftext/fpdf_text_search.cpp b/core/src/fpdftext/fpdf_text_search.cpp
index 07f493ea98..21a2564ae6 100644
--- a/core/src/fpdftext/fpdf_text_search.cpp
+++ b/core/src/fpdftext/fpdf_text_search.cpp
@@ -5,7 +5,6 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "../../include/fpdfapi/fpdf_pageobj.h"
-#include "../../include/fpdftext/fpdf_text.h"
#include "../../include/fpdfapi/fpdf_page.h"
class CPDF_TextStream
{
diff --git a/core/src/fpdftext/unicodenormalization.cpp b/core/src/fpdftext/unicodenormalization.cpp
index fa3d8120f9..468900c7d8 100644
--- a/core/src/fpdftext/unicodenormalization.cpp
+++ b/core/src/fpdftext/unicodenormalization.cpp
@@ -4,7 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../../include/fpdftext/fpdf_text.h"
+#include "../../include/fxcrt/fx_string.h"
+
extern const FX_WCHAR g_UnicodeData_Normalization[];
extern const FX_WCHAR g_UnicodeData_Normalization_Map1[];
extern const FX_WCHAR g_UnicodeData_Normalization_Map2[];
diff --git a/core/src/fxcodec/codec/fx_codec_jbig.cpp b/core/src/fxcodec/codec/fx_codec_jbig.cpp
index d9532202ff..7a69a24d40 100644
--- a/core/src/fxcodec/codec/fx_codec_jbig.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jbig.cpp
@@ -6,6 +6,7 @@
#include "../../../include/fxcodec/fx_codec.h"
#include "codec_int.h"
+
CCodec_Jbig2Context::CCodec_Jbig2Context()
{
FXSYS_memset(this, 0, sizeof(CCodec_Jbig2Context));
diff --git a/core/src/fxcodec/jbig2/JBig2_Context.h b/core/src/fxcodec/jbig2/JBig2_Context.h
index b12853accf..6e47a8a912 100644
--- a/core/src/fxcodec/jbig2/JBig2_Context.h
+++ b/core/src/fxcodec/jbig2/JBig2_Context.h
@@ -1,19 +1,22 @@
// Copyright 2014 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-
+
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#ifndef _JBIG2_CONTEXT_H_
#define _JBIG2_CONTEXT_H_
+
+#include <list>
+#include <utility>
+
#include "JBig2_Module.h"
#include "JBig2_List.h"
#include "JBig2_Segment.h"
#include "JBig2_Page.h"
#include "JBig2_GeneralDecoder.h"
#include "../../../include/fxcodec/fx_codec_def.h"
-#include "../../../include/fxcrt/fx_basic.h"
-#include <utility>
+
typedef std::pair<uint8_t*, CJBig2_SymbolDict*> CJBig2_CachePair;
typedef enum {
JBIG2_OUT_OF_PAGE = 0,
diff --git a/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.h b/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.h
index 45e2940d3a..2bd2ceac95 100644
--- a/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.h
+++ b/core/src/fxcodec/jbig2/JBig2_GeneralDecoder.h
@@ -1,18 +1,19 @@
// Copyright 2014 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-
+
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#ifndef _JBIG2_GENERAL_DECODER_H_
#define _JBIG2_GENERAL_DECODER_H_
+
#include "../../../include/fxcodec/fx_codec_def.h"
-#include "../../../include/fxcrt/fx_basic.h"
-#include "JBig2_Define.h"
-#include "JBig2_SymbolDict.h"
+#include "../../../include/fxcrt/fx_coordinates.h"
#include "JBig2_ArithDecoder.h"
#include "JBig2_ArithIntDecoder.h"
-#include "../../../include/fxcrt/fx_coordinates.h"
+#include "JBig2_Define.h"
+#include "JBig2_SymbolDict.h"
+
class CJBig2_HuffmanTable;
class CJBig2_Image;
class CJBig2_PatternDict;
diff --git a/core/src/fxcodec/jbig2/JBig2_Image.cpp b/core/src/fxcodec/jbig2/JBig2_Image.cpp
index 044ccf7410..9ef4464ef0 100644
--- a/core/src/fxcodec/jbig2/JBig2_Image.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_Image.cpp
@@ -6,7 +6,6 @@
#include <limits.h>
-#include "../../../include/fxcrt/fx_basic.h"
#include "../../../include/fxcrt/fx_coordinates.h"
#include "../../../include/fxcrt/fx_safe_types.h"
#include "JBig2_Image.h"
diff --git a/core/src/fxcrt/extension.h b/core/src/fxcrt/extension.h
index 2c084eca2f..09a4f67623 100644
--- a/core/src/fxcrt/extension.h
+++ b/core/src/fxcrt/extension.h
@@ -7,6 +7,7 @@
#ifndef CORE_SRC_FXCRT_EXTENSION_H_
#define CORE_SRC_FXCRT_EXTENSION_H_
+#include "../../include/fxcrt/fx_basic.h"
#include "../../include/fxcrt/fx_safe_types.h"
class IFXCRT_FileAccess
diff --git a/core/src/fxcrt/fx_arabic.cpp b/core/src/fxcrt/fx_arabic.cpp
index fc2ec4158d..95259c71b8 100644
--- a/core/src/fxcrt/fx_arabic.cpp
+++ b/core/src/fxcrt/fx_arabic.cpp
@@ -4,8 +4,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../../include/fxcrt/fx_ext.h"
+#include "../../include/fxcrt/fx_ucd.h"
#include "fx_arabic.h"
+
extern const FX_DWORD gs_FX_TextLayout_CodeProperties[65536];
#ifdef __cplusplus
extern "C" {
diff --git a/core/src/fxcrt/fx_arabic.h b/core/src/fxcrt/fx_arabic.h
index 16938325ec..216547506a 100644
--- a/core/src/fxcrt/fx_arabic.h
+++ b/core/src/fxcrt/fx_arabic.h
@@ -7,10 +7,8 @@
#ifndef CORE_SRC_FXCRT_FX_ARABIC_H_
#define CORE_SRC_FXCRT_FX_ARABIC_H_
-typedef struct _FX_ARABICCHARRANGE {
- FX_WCHAR wStart;
- FX_WCHAR wEnd;
-} FX_ARABICCHARRANGE;
+#include "../../include/fxcrt/fx_arb.h"
+
class CFX_ArabicChar : public IFX_ArabicChar
{
public:
diff --git a/core/src/fxcrt/fx_basic_bstring_unittest.cpp b/core/src/fxcrt/fx_basic_bstring_unittest.cpp
index 9d8f376544..f865602b08 100644
--- a/core/src/fxcrt/fx_basic_bstring_unittest.cpp
+++ b/core/src/fxcrt/fx_basic_bstring_unittest.cpp
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "testing/gtest/include/gtest/gtest.h"
#include "../../../testing/fx_string_testhelpers.h"
-#include "../../include/fxcrt/fx_basic.h"
+#include "../../include/fxcrt/fx_string.h"
+#include "testing/gtest/include/gtest/gtest.h"
TEST(fxcrt, ByteStringOperatorSubscript) {
// CFX_ByteString includes the NUL terminator for non-empty strings.
diff --git a/core/src/fxcrt/fx_basic_coords.cpp b/core/src/fxcrt/fx_basic_coords.cpp
index 67e2032700..2e830809b8 100644
--- a/core/src/fxcrt/fx_basic_coords.cpp
+++ b/core/src/fxcrt/fx_basic_coords.cpp
@@ -5,7 +5,10 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include <limits.h>
+
+#include "../../include/fxcrt/fx_coordinates.h"
#include "../../include/fxcrt/fx_ext.h"
+
void FX_RECT::Normalize()
{
if (left > right) {
diff --git a/core/src/fxcrt/fx_basic_gcc.cpp b/core/src/fxcrt/fx_basic_gcc.cpp
index b5a81ad5a9..e4416e95b5 100644
--- a/core/src/fxcrt/fx_basic_gcc.cpp
+++ b/core/src/fxcrt/fx_basic_gcc.cpp
@@ -5,7 +5,10 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include <limits>
+
#include "../../include/fxcrt/fx_ext.h"
+#include "../../include/fxcrt/fx_string.h"
+
template <class T, class STR_T>
T FXSYS_StrToInt(STR_T str)
{
diff --git a/core/src/fxcrt/fx_basic_maps.cpp b/core/src/fxcrt/fx_basic_maps.cpp
index 8a886f88ea..e34acb088d 100644
--- a/core/src/fxcrt/fx_basic_maps.cpp
+++ b/core/src/fxcrt/fx_basic_maps.cpp
@@ -4,8 +4,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../../include/fxcrt/fx_ext.h"
+#include "../../include/fxcrt/fx_basic.h"
#include "plex.h"
+
static void ConstructElement(CFX_ByteString* pNewData)
{
new (pNewData) CFX_ByteString();
diff --git a/core/src/fxcrt/fx_basic_plex.cpp b/core/src/fxcrt/fx_basic_plex.cpp
index 802429600a..c9088bc93d 100644
--- a/core/src/fxcrt/fx_basic_plex.cpp
+++ b/core/src/fxcrt/fx_basic_plex.cpp
@@ -4,8 +4,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../../include/fxcrt/fx_basic.h"
+#include "../../include/fxcrt/fx_memory.h"
#include "plex.h"
+
CFX_Plex* CFX_Plex::Create(CFX_Plex*& pHead, FX_DWORD nMax, FX_DWORD cbElement)
{
CFX_Plex* p = (CFX_Plex*)FX_Alloc(uint8_t, sizeof(CFX_Plex) + nMax * cbElement);
diff --git a/core/src/fxcrt/fx_extension.cpp b/core/src/fxcrt/fx_extension.cpp
index 53ccc5adca..9a165fda93 100644
--- a/core/src/fxcrt/fx_extension.cpp
+++ b/core/src/fxcrt/fx_extension.cpp
@@ -4,6 +4,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "../../include/fxcrt/fx_basic.h"
#include "../../include/fxcrt/fx_ext.h"
#include "extension.h"
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
@@ -11,6 +12,7 @@
#else
#include <ctime>
#endif
+
FX_HFILE FX_File_Open(const CFX_ByteStringC& fileName, FX_DWORD dwMode)
{
IFXCRT_FileAccess* pFA = FXCRT_FileAccess_Create();
diff --git a/core/src/fxcrt/fx_ucddata.cpp b/core/src/fxcrt/fx_ucddata.cpp
index d3ea5cc3be..e632769988 100644
--- a/core/src/fxcrt/fx_ucddata.cpp
+++ b/core/src/fxcrt/fx_ucddata.cpp
@@ -4,7 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../../include/fxcrt/fx_ext.h"
+#include "../../include/fxcrt/fx_system.h"
+
extern const FX_DWORD gs_FX_TextLayout_CodeProperties[65536] = {
0xfffe9a93, 0xfffe9a93, 0xfffe9a93, 0xfffe9a93, 0xfffe9a93, 0xfffe9a93, 0xfffe9a93, 0xfffe9a93, 0xfffe9a93, 0xfffe8ae5, 0xfffe9b5c, 0xfffe9ada, 0xfffe9b1a, 0xfffe9b5b, 0xfffe9a93, 0xfffe9a93,
0xfffe9a93, 0xfffe9a93, 0xfffe9a93, 0xfffe9a93, 0xfffe9a93, 0xfffe9a93, 0xfffe9a93, 0xfffe9a93, 0xfffe9a93, 0xfffe9a93, 0xfffe9a93, 0xfffe9a93, 0xfffe9b53, 0xfffe9b53, 0xfffe9b53, 0xfffe9ad3,
diff --git a/core/src/fxcrt/fx_unicode.cpp b/core/src/fxcrt/fx_unicode.cpp
index 08a7443289..d66a58a9b3 100644
--- a/core/src/fxcrt/fx_unicode.cpp
+++ b/core/src/fxcrt/fx_unicode.cpp
@@ -4,7 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../../include/fxcrt/fx_ext.h"
+#include "../../include/fxcrt/fx_ucd.h"
+
extern const FX_DWORD gs_FX_TextLayout_CodeProperties[65536];
extern const FX_WCHAR gs_FX_TextLayout_VerticalMirror[64];
extern const FX_WCHAR gs_FX_TextLayout_BidiMirror[512];
diff --git a/core/src/fxcrt/fxcrt_platforms.cpp b/core/src/fxcrt/fxcrt_platforms.cpp
index cdf24e1fea..617244bc6a 100644
--- a/core/src/fxcrt/fxcrt_platforms.cpp
+++ b/core/src/fxcrt/fxcrt_platforms.cpp
@@ -4,8 +4,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../../include/fxcrt/fx_ext.h"
+#include "../../include/fxcrt/fx_basic.h"
#include "fxcrt_platforms.h"
+
#if (_FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ && _FXM_PLATFORM_ != _FXM_PLATFORM_LINUX_ && _FXM_PLATFORM_ != _FXM_PLATFORM_APPLE_ && _FXM_PLATFORM_ != _FXM_PLATFORM_ANDROID_)
IFXCRT_FileAccess* FXCRT_FileAccess_Create()
{
diff --git a/core/src/fxcrt/fxcrt_posix.cpp b/core/src/fxcrt/fxcrt_posix.cpp
index 00c9278525..70df9e8e84 100644
--- a/core/src/fxcrt/fxcrt_posix.cpp
+++ b/core/src/fxcrt/fxcrt_posix.cpp
@@ -4,8 +4,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../../include/fxcrt/fx_ext.h"
+#include "../../include/fxcrt/fx_basic.h"
#include "fxcrt_posix.h"
+
#if _FXM_PLATFORM_ == _FXM_PLATFORM_LINUX_ || _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ || _FXM_PLATFORM_ == _FXM_PLATFORM_ANDROID_
IFXCRT_FileAccess* FXCRT_FileAccess_Create()
{
diff --git a/core/src/fxcrt/fxcrt_windows.cpp b/core/src/fxcrt/fxcrt_windows.cpp
index ac9c60185d..e3dff04413 100644
--- a/core/src/fxcrt/fxcrt_windows.cpp
+++ b/core/src/fxcrt/fxcrt_windows.cpp
@@ -4,8 +4,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../../include/fxcrt/fx_ext.h"
+#include "../../include/fxcrt/fx_string.h"
#include "fxcrt_windows.h"
+
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
FX_BOOL FX_File_Exist(const CFX_ByteStringC& fileName)
{
diff --git a/core/src/fxcrt/plex.h b/core/src/fxcrt/plex.h
index a4ac4f7c48..baf27f5368 100644
--- a/core/src/fxcrt/plex.h
+++ b/core/src/fxcrt/plex.h
@@ -6,6 +6,8 @@
#ifndef CORE_SRC_FXCRT_PLEX_H_
#define CORE_SRC_FXCRT_PLEX_H_
+#include "../../include/fxcrt/fx_system.h"
+
struct CFX_Plex {
CFX_Plex* pNext;
void* data()
diff --git a/core/src/fxcrt/xml_int.h b/core/src/fxcrt/xml_int.h
index 9469a758cb..109c7a43d2 100644
--- a/core/src/fxcrt/xml_int.h
+++ b/core/src/fxcrt/xml_int.h
@@ -7,6 +7,8 @@
#ifndef CORE_SRC_FXCRT_XML_INT_H_
#define CORE_SRC_FXCRT_XML_INT_H_
+#include "../../include/fxcrt/fx_stream.h"
+
class CXML_DataBufAcc : public IFX_BufferRead
{
public:
diff --git a/core/src/fxge/android/fx_fpf.h b/core/src/fxge/android/fx_fpf.h
index caf3a9f909..a484c1e076 100644
--- a/core/src/fxge/android/fx_fpf.h
+++ b/core/src/fxge/android/fx_fpf.h
@@ -7,7 +7,6 @@
#ifndef CORE_SRC_FXGE_ANDROID_FX_FPF_H_
#define CORE_SRC_FXGE_ANDROID_FX_FPF_H_
-#include "../../../include/fxcrt/fx_ext.h"
#include "../../../include/fxge/fpf.h"
#include "../../../include/fxge/fx_freetype.h"
#include "../../../include/fxge/fx_ge.h"
diff --git a/core/src/fxge/apple/fx_apple_platform.cpp b/core/src/fxge/apple/fx_apple_platform.cpp
index 176526b83b..9db807c3af 100644
--- a/core/src/fxge/apple/fx_apple_platform.cpp
+++ b/core/src/fxge/apple/fx_apple_platform.cpp
@@ -4,7 +4,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../../../include/fxcrt/fx_ext.h"
+#include "../../../include/fxcrt/fx_system.h"
#include "../../../include/fxge/fx_ge.h"
#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
diff --git a/core/src/fxge/ge/fx_ge_path.cpp b/core/src/fxge/ge/fx_ge_path.cpp
index 96f5762852..ea1d80390b 100644
--- a/core/src/fxge/ge/fx_ge_path.cpp
+++ b/core/src/fxge/ge/fx_ge_path.cpp
@@ -5,7 +5,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "../../../../third_party/base/numerics/safe_math.h"
-#include "../../../include/fxcrt/fx_basic.h"
+#include "../../../include/fxcrt/fx_system.h"
#include "../../../include/fxge/fx_ge.h"
CFX_ClipRgn::CFX_ClipRgn(int width, int height)
diff --git a/fpdfsdk/include/formfiller/FFL_Utils.h b/fpdfsdk/include/formfiller/FFL_Utils.h
index de9afafb56..fe025eca4b 100644
--- a/fpdfsdk/include/formfiller/FFL_Utils.h
+++ b/fpdfsdk/include/formfiller/FFL_Utils.h
@@ -8,17 +8,16 @@
#define FPDFSDK_INCLUDE_FORMFILLER_FFL_UTILS_H_
#include "../../../core/include/fpdfapi/fpdf_parser.h"
-#include "../../../core/include/fxcrt/fx_memory.h"
-
-#define FFL_BASE_USERUNIT (1.0f / 72.0f)
class CFFL_Utils
{
public:
- static CPDF_Rect MaxRect(const CPDF_Rect & rect1,const CPDF_Rect & rect2);
- static CPDF_Rect InflateRect(const CPDF_Rect & crRect, const FX_FLOAT & fSize);
- static CPDF_Rect DeflateRect(const CPDF_Rect & crRect, const FX_FLOAT & fSize);
- static FX_BOOL TraceObject(CPDF_Object* pObj);
+ static CPDF_Rect MaxRect(const CPDF_Rect& rect1,const CPDF_Rect& rect2);
+ static CPDF_Rect InflateRect(const CPDF_Rect& crRect,
+ const FX_FLOAT& fSize);
+ static CPDF_Rect DeflateRect(const CPDF_Rect& crRect,
+ const FX_FLOAT& fSize);
+ static FX_BOOL TraceObject(CPDF_Object* pObj);
};
#endif // FPDFSDK_INCLUDE_FORMFILLER_FFL_UTILS_H_
diff --git a/fpdfsdk/include/formfiller/FormFiller.h b/fpdfsdk/include/formfiller/FormFiller.h
index fdca1ff940..90351f5527 100644
--- a/fpdfsdk/include/formfiller/FormFiller.h
+++ b/fpdfsdk/include/formfiller/FormFiller.h
@@ -10,7 +10,6 @@
#include "../../../core/include/fpdfapi/fpdf_module.h"
#include "../../../core/include/fpdfdoc/fpdf_doc.h"
#include "../../../core/include/fpdfdoc/fpdf_vt.h"
-#include "../../../core/include/fxcrt/fx_xml.h"
#include "../fsdk_mgr.h"
#include "../fxedit/fx_edit.h"
#include "../pdfwindow/IPDFWindow.h"
diff --git a/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h b/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h
index cc871badb2..f8d691ebfa 100644
--- a/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h
+++ b/fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h
@@ -7,6 +7,8 @@
#ifndef FPDFXFA_DOC_H_
#define FPDFXFA_DOC_H_
+#include "../../../xfa/include/fxfa/fxfa.h"
+
class CPDFXFA_App;
class CPDFXFA_Document;
class CPDFXFA_Page;
diff --git a/fpdfsdk/include/fsdk_define.h b/fpdfsdk/include/fsdk_define.h
index 5c0e88a44a..bbf75e5690 100644
--- a/fpdfsdk/include/fsdk_define.h
+++ b/fpdfsdk/include/fsdk_define.h
@@ -12,30 +12,19 @@
#include <math.h>
#endif
+#include "../../core/include/fpdfapi/fpdf_module.h"
+#include "../../core/include/fpdfapi/fpdf_pageobj.h"
#include "../../core/include/fpdfapi/fpdf_parser.h"
-#include "../../core/include/fpdfapi/fpdfapi.h"
#include "../../core/include/fpdfapi/fpdf_parser.h"
-#include "../../core/include/fpdfapi/fpdf_module.h"
#include "../../core/include/fpdfapi/fpdf_render.h"
-#include "../../core/include/fpdfapi/fpdf_pageobj.h"
#include "../../core/include/fpdfapi/fpdf_serial.h"
-
-#include "../../core/include/fpdftext/fpdf_text.h"
-
-#include "../../core/include/fxge/fx_ge_win32.h"
-#include "../../core/include/fxge/fx_ge.h"
-
-#include "../../core/include/fxcodec/fx_codec.h"
-
+#include "../../core/include/fpdfapi/fpdfapi.h"
#include "../../core/include/fpdfdoc/fpdf_doc.h"
#include "../../core/include/fpdfdoc/fpdf_vt.h"
-
-#include "../../core/include/fxcrt/fx_xml.h"
#include "../../xfa/include/fxbarcode/BC_BarCode.h"
#include "../../xfa/include/fxjse/fxjse.h"
#include "../../xfa/include/fxgraphics/fx_graphics.h"
#include "../../xfa/include/fxfa/fxfa.h"
-
#include "../../xfa/include/fwl/core/fwl_error.h"
#include "../../xfa/include/fwl/core/fwl_timer.h"
#include "../../xfa/include/fwl/adapter/fwl_adaptertimermgr.h"
diff --git a/fpdfsdk/include/fsdk_mgr.h b/fpdfsdk/include/fsdk_mgr.h
index 4d7b80012d..c3fb88edfc 100644
--- a/fpdfsdk/include/fsdk_mgr.h
+++ b/fpdfsdk/include/fsdk_mgr.h
@@ -7,6 +7,7 @@
#ifndef FPDFSDK_INCLUDE_FSDK_MGR_H_
#define FPDFSDK_INCLUDE_FSDK_MGR_H_
+#include "../../core/include/fpdftext/fpdf_text.h"
#include "../../public/fpdf_formfill.h"
#include "../../public/fpdf_fwlevent.h" // cross platform keycode and events define.
#include "fsdk_common.h"
@@ -18,6 +19,7 @@
#include "fsdk_baseform.h"
#include "fsdk_annothandler.h"
#include "fsdk_actionhandler.h"
+#include "javascript/IJavaScript.h"
class CPDFSDK_Document;
class CPDFSDK_PageView;
@@ -28,8 +30,6 @@ class IFX_SystemHandler;
class CPDFSDK_ActionHandler;
class CJS_RuntimeFactory;
-#include "javascript/IJavaScript.h"
-
class CPDFDoc_Environment final
{
public:
diff --git a/fpdfsdk/include/javascript/IJavaScript.h b/fpdfsdk/include/javascript/IJavaScript.h
index a8bdd65468..1d9396fb79 100644
--- a/fpdfsdk/include/javascript/IJavaScript.h
+++ b/fpdfsdk/include/javascript/IJavaScript.h
@@ -7,7 +7,8 @@
#ifndef FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_
#define FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_
-#include "../../../core/include/fxcrt/fx_basic.h"
+#include "../../../core/include/fxcrt/fx_string.h"
+#include "../../../core/include/fxcrt/fx_system.h"
#include "../../../xfa/include/fxjse/fxjse.h"
class CPDF_Bookmark;
diff --git a/fpdfsdk/include/javascript/JavaScript.h b/fpdfsdk/include/javascript/JavaScript.h
index d96c6cac42..28239efc6a 100644
--- a/fpdfsdk/include/javascript/JavaScript.h
+++ b/fpdfsdk/include/javascript/JavaScript.h
@@ -10,13 +10,11 @@
#include <string>
#include <vector>
-#include "../../../core/include/fdrm/fx_crypt.h"
#include "../../../core/include/fpdfapi/fpdf_module.h"
#include "../../../core/include/fpdfapi/fpdf_pageobj.h"
#include "../../../core/include/fpdfapi/fpdf_serial.h"
#include "../../../core/include/fpdfdoc/fpdf_doc.h"
#include "../../../core/include/fpdfdoc/fpdf_vt.h"
-#include "../../../core/include/fxcrt/fx_xml.h"
#include "../fsdk_mgr.h"
#include "../fx_systemhandler.h"
#include "../fxedit/fx_edit.h"
diff --git a/fpdfsdk/include/javascript/resource.h b/fpdfsdk/include/javascript/resource.h
index 88011f2bb0..433785984d 100644
--- a/fpdfsdk/include/javascript/resource.h
+++ b/fpdfsdk/include/javascript/resource.h
@@ -7,7 +7,7 @@
#ifndef FPDFSDK_INCLUDE_JAVASCRIPT_RESOURCE_H_
#define FPDFSDK_INCLUDE_JAVASCRIPT_RESOURCE_H_
-#include "../../../core/include/fxcrt/fx_basic.h" // For CFX_WideString.
+#include "../../../core/include/fxcrt/fx_string.h" // For CFX_WideString.
#include "../fsdk_define.h" // For FX_UINT.
class CJS_Context;
diff --git a/fpdfsdk/include/pdfwindow/PDFWindow.h b/fpdfsdk/include/pdfwindow/PDFWindow.h
index 3cd1e02878..2abb38cd68 100644
--- a/fpdfsdk/include/pdfwindow/PDFWindow.h
+++ b/fpdfsdk/include/pdfwindow/PDFWindow.h
@@ -10,7 +10,6 @@
#include "../../../core/include/fpdfapi/fpdf_module.h"
#include "../../../core/include/fpdfdoc/fpdf_doc.h"
#include "../../../core/include/fpdfdoc/fpdf_vt.h"
-#include "../../../core/include/fxcrt/fx_xml.h"
#include "../../../public/fpdf_fwlevent.h"
#include "../fx_systemhandler.h"
#include "../fxedit/fx_edit.h"
diff --git a/fpdfsdk/src/fpdf_ext.cpp b/fpdfsdk/src/fpdf_ext.cpp
index f40023b9cc..d0036e6a1e 100644
--- a/fpdfsdk/src/fpdf_ext.cpp
+++ b/fpdfsdk/src/fpdf_ext.cpp
@@ -4,6 +4,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "../../core/include/fxcrt/fx_xml.h"
#include "../../public/fpdf_ext.h"
#include "../include/fsdk_define.h"
#include "../include/fpdfxfa/fpdfxfa_doc.h"
diff --git a/fpdfsdk/src/fpdf_searchex.cpp b/fpdfsdk/src/fpdf_searchex.cpp
index d63f8fff46..e012d30590 100644
--- a/fpdfsdk/src/fpdf_searchex.cpp
+++ b/fpdfsdk/src/fpdf_searchex.cpp
@@ -5,10 +5,14 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "../../public/fpdf_searchex.h"
-#include "../include/fsdk_define.h"
-DLLEXPORT int STDCALL FPDFText_GetCharIndexFromTextIndex(FPDF_TEXTPAGE text_page, int nTextIndex)
+#include "../../core/include/fpdftext/fpdf_text.h"
+
+DLLEXPORT int STDCALL FPDFText_GetCharIndexFromTextIndex(
+ FPDF_TEXTPAGE text_page,
+ int nTextIndex)
{
- if(!text_page) return -1;
- return ((IPDF_TextPage*)text_page)->CharIndexFromTextIndex(nTextIndex);
+ if (!text_page)
+ return -1;
+ return ((IPDF_TextPage*)text_page)->CharIndexFromTextIndex(nTextIndex);
}
diff --git a/fpdfsdk/src/fpdftext.cpp b/fpdfsdk/src/fpdftext.cpp
index 610050ff59..acfc79238a 100644
--- a/fpdfsdk/src/fpdftext.cpp
+++ b/fpdfsdk/src/fpdftext.cpp
@@ -4,8 +4,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "../../core/include/fpdfdoc/fpdf_doc.h"
+#include "../../core/include/fpdftext/fpdf_text.h"
#include "../../public/fpdf_text.h"
-#include "../include/fsdk_define.h"
#include "../include/fpdfxfa/fpdfxfa_doc.h"
#include "../include/fpdfxfa/fpdfxfa_page.h"
diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp
index 227843ec5c..4e6ffb0000 100644
--- a/fpdfsdk/src/fpdfview.cpp
+++ b/fpdfsdk/src/fpdfview.cpp
@@ -4,7 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
+#include "../../core/include/fpdfapi/fpdf_module.h"
+#include "../../core/include/fxcodec/fx_codec.h"
#include "../../core/include/fxcrt/fx_safe_types.h"
#include "../../public/fpdf_ext.h"
#include "../../public/fpdf_formfill.h"
diff --git a/fpdfsdk/src/javascript/JS_GlobalData.cpp b/fpdfsdk/src/javascript/JS_GlobalData.cpp
index e17f305d36..2b925a18f6 100644
--- a/fpdfsdk/src/javascript/JS_GlobalData.cpp
+++ b/fpdfsdk/src/javascript/JS_GlobalData.cpp
@@ -4,6 +4,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "../../../core/include/fdrm/fx_crypt.h"
#include "../../include/javascript/JavaScript.h"
#include "../../include/javascript/IJavaScript.h"
#include "../../include/javascript/JS_GlobalData.h"
diff --git a/fpdfsdk/src/pdfwindow/PWL_Edit.cpp b/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
index 627e7a85d9..58d8a79da1 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Edit.cpp
@@ -5,6 +5,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "../../../core/include/fxcrt/fx_safe_types.h"
+#include "../../../core/include/fxcrt/fx_xml.h"
#include "../../include/pdfwindow/PDFWindow.h"
#include "../../include/pdfwindow/PWL_Caret.h"
#include "../../include/pdfwindow/PWL_Edit.h"
diff --git a/testing/embedder_test.cpp b/testing/embedder_test.cpp
index 1003cb5187..1f3f6ef542 100644
--- a/testing/embedder_test.cpp
+++ b/testing/embedder_test.cpp
@@ -14,7 +14,6 @@
#include <utility>
#include <vector>
-#include "../core/include/fxcrt/fx_system.h"
#include "../public/fpdf_text.h"
#include "../public/fpdfview.h"
#include "testing/gmock/include/gmock/gmock.h"
diff --git a/testing/embedder_test.h b/testing/embedder_test.h
index b0834ddecd..0ac68d54e1 100644
--- a/testing/embedder_test.h
+++ b/testing/embedder_test.h
@@ -7,7 +7,6 @@
#include <string>
-#include "../core/include/fxcrt/fx_system.h"
#include "../public/fpdf_dataavail.h"
#include "../public/fpdf_ext.h"
#include "../public/fpdf_formfill.h"
diff --git a/testing/fx_string_testhelpers.h b/testing/fx_string_testhelpers.h
index 7d0668817c..13b4afb2ec 100644
--- a/testing/fx_string_testhelpers.h
+++ b/testing/fx_string_testhelpers.h
@@ -7,7 +7,7 @@
#include <ostream>
-#include "../core/include/fxcrt/fx_basic.h"
+#include "../core/include/fxcrt/fx_string.h"
// Output stream operator so GTEST macros work with FX strings.
std::ostream& operator<<(std::ostream& out, const CFX_ByteStringC& str);
diff --git a/xfa/include/fxfa/fxfa_basic.h b/xfa/include/fxfa/fxfa_basic.h
index 7b635e01e4..1331402766 100644
--- a/xfa/include/fxfa/fxfa_basic.h
+++ b/xfa/include/fxfa/fxfa_basic.h
@@ -6,6 +6,9 @@
#ifndef _FXFA_BASIC_H
#define _FXFA_BASIC_H
+
+#include "../fxjse/fxjse.h"
+
class CXFA_Measurement;
#define XFA_HASHCODE_Xfa 0xc56b9ff
#define XFA_HASHCODE_Config 0x4e1e39b6
diff --git a/xfa/src/fgas/include/fx_tbk.h b/xfa/src/fgas/include/fx_tbk.h
index 2eaca3922c..eef2db4a69 100644
--- a/xfa/src/fgas/include/fx_tbk.h
+++ b/xfa/src/fgas/include/fx_tbk.h
@@ -6,6 +6,9 @@
#ifndef _FX_TEXTBREAK
#define _FX_TEXTBREAK
+
+#include "../../../../core/include/fxcrt/fx_ucd.h"
+
class IFX_Font;
class CFX_Char;
class IFX_TxtAccess;
diff --git a/xfa/src/fgas/src/layout/fx_rtfbreak.h b/xfa/src/fgas/src/layout/fx_rtfbreak.h
index 394d433412..09302dfedd 100644
--- a/xfa/src/fgas/src/layout/fx_rtfbreak.h
+++ b/xfa/src/fgas/src/layout/fx_rtfbreak.h
@@ -6,6 +6,9 @@
#ifndef _FX_RTFBREAK_IMP
#define _FX_RTFBREAK_IMP
+
+#include "../../../../../core/include/fxcrt/fx_arb.h"
+
class CFX_RTFLine;
class CFX_RTFBreak;
class CFX_RTFLine
diff --git a/xfa/src/fgas/src/layout/fx_textbreak.cpp b/xfa/src/fgas/src/layout/fx_textbreak.cpp
index 7a740f5212..f483b87dec 100644
--- a/xfa/src/fgas/src/layout/fx_textbreak.cpp
+++ b/xfa/src/fgas/src/layout/fx_textbreak.cpp
@@ -4,9 +4,11 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "../../../../../core/include/fxcrt/fx_arb.h"
#include "../fgas_base.h"
#include "fx_unicode.h"
#include "fx_textbreak.h"
+
extern const FX_DWORD gs_FX_TextLayout_CodeProperties[65536];
extern const FX_WCHAR gs_FX_TextLayout_VerticalMirror[64];
extern const FX_WCHAR gs_FX_TextLayout_BidiMirror[512];
diff --git a/xfa/src/fgas/src/layout/fx_textbreak.h b/xfa/src/fgas/src/layout/fx_textbreak.h
index 310be133c1..5020f0a58c 100644
--- a/xfa/src/fgas/src/layout/fx_textbreak.h
+++ b/xfa/src/fgas/src/layout/fx_textbreak.h
@@ -6,8 +6,12 @@
#ifndef _FX_TEXTBREAK_IMP
#define _FX_TEXTBREAK_IMP
-class CFX_TxtLine;
+
+#include "../../../../../core/include/fxcrt/fx_memory.h"
+
+class IFX_ArabicChar;
class CFX_Txtbreak;
+
class CFX_TxtLine
{
public:
diff --git a/xfa/src/fgas/src/localization/fx_locale.cpp b/xfa/src/fgas/src/localization/fx_locale.cpp
index 1ab98a2f5f..a7625ea1a1 100644
--- a/xfa/src/fgas/src/localization/fx_locale.cpp
+++ b/xfa/src/fgas/src/localization/fx_locale.cpp
@@ -4,8 +4,10 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "../../../../../core/include/fxcrt/fx_xml.h"
#include "../fgas_base.h"
#include "fx_localeimp.h"
+
#define FX_LOCALECATEGORY_DateHash 0xbde9abde
#define FX_LOCALECATEGORY_TimeHash 0x2d71b00f
#define FX_LOCALECATEGORY_DateTimeHash 0x158c72ed
diff --git a/xfa/src/fgas/src/localization/fx_localemgr.cpp b/xfa/src/fgas/src/localization/fx_localemgr.cpp
index ebdd4b89a9..953f00000c 100644
--- a/xfa/src/fgas/src/localization/fx_localemgr.cpp
+++ b/xfa/src/fgas/src/localization/fx_localemgr.cpp
@@ -4,8 +4,10 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "../../../../../core/include/fxcrt/fx_xml.h"
#include "../fgas_base.h"
#include "fx_localemgr.h"
+
IFX_LocaleMgr* FX_LocaleMgr_Create(const FX_WCHAR* pszLocalPath, FX_WORD wDefaultLCID)
{
void* pPathHandle = FX_OpenFolder(pszLocalPath);
diff --git a/xfa/src/fxfa/src/parser/xfa_locale.cpp b/xfa/src/fxfa/src/parser/xfa_locale.cpp
index 08b88c1fb1..6c110381e4 100644
--- a/xfa/src/fxfa/src/parser/xfa_locale.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_locale.cpp
@@ -4,6 +4,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "../../../../../core/include/fxcrt/fx_xml.h"
#include "../../../foxitlib.h"
#include "../common/xfa_utils.h"
#include "../common/xfa_object.h"
@@ -17,6 +18,7 @@
#include "../common/xfa_fm2jsapi.h"
#include "xfa_debug_parser.h"
#include "xfa_locale.h"
+
static const FX_WCHAR* g_FX_Percent = L"z,zzz,zzz,zzz,zzz,zzz%";
static const FX_WCHAR* g_FX_Currency = L"$z,zzz,zzz,zzz,zzz,zz9.99";
static const FX_WCHAR* g_FX_Decimal = L"z,zzz,zzz,zzz,zzz,zz9.zzz";
diff --git a/xfa/src/fxfa/src/parser/xfa_localemgr.cpp b/xfa/src/fxfa/src/parser/xfa_localemgr.cpp
index ae5eab9d9c..f864bc2ac0 100644
--- a/xfa/src/fxfa/src/parser/xfa_localemgr.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_localemgr.cpp
@@ -4,6 +4,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "../../../../../core/include/fxcrt/fx_xml.h"
#include "../../../foxitlib.h"
#include "../common/xfa_utils.h"
#include "../common/xfa_object.h"
@@ -17,6 +18,7 @@
#include "../common/xfa_fm2jsapi.h"
#include "xfa_debug_parser.h"
#include "xfa_locale.h"
+
const uint8_t g_enUS_Locale[] = {
0x78, 0x9C, 0x95, 0x56, 0xD1, 0x6E, 0x9B, 0x30, 0x14, 0x7D, 0x9F, 0xB4, 0x7F, 0x40, 0xD6, 0x2A, 0xB5, 0x52, 0x56, 0x6F,
0x8F, 0xA9, 0x88, 0xA5, 0x6C, 0x24, 0x9B, 0x3A, 0xD1, 0x55, 0x22, 0x55, 0xB5, 0xBE, 0x4C, 0x0E, 0xDC, 0x05, 0x34, 0xB0,