summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2016-02-25 16:37:22 -0500
committerDan Sinclair <dsinclair@chromium.org>2016-02-25 16:37:22 -0500
commit32982d3531f15561271b7d67062c8b3e21bd3af9 (patch)
treec0da635b3ff73178790afad047d4ec7aac4e77dd
parent5870b76eab54b30491e1dc35ce09a308462af29a (diff)
downloadpdfium-32982d3531f15561271b7d67062c8b3e21bd3af9.tar.xz
Remove fgas.h and IWYU.
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1740863002 .
-rw-r--r--BUILD.gn1
-rw-r--r--xfa.gyp1
-rw-r--r--xfa/src/fdp/src/css/fde_cssdatatable.cpp4
-rw-r--r--xfa/src/fdp/src/css/fde_cssdeclaration.cpp4
-rw-r--r--xfa/src/fdp/src/css/fde_cssstylesheet.cpp4
-rw-r--r--xfa/src/fdp/src/css/fde_csssyntax.cpp8
-rw-r--r--xfa/src/fdp/src/css/fde_csssyntax.h7
-rw-r--r--xfa/src/fdp/src/xml/fde_xml_imp.cpp5
-rw-r--r--xfa/src/fgas/include/fgas.h28
-rw-r--r--xfa/src/fgas/include/fx_locale.h4
-rw-r--r--xfa/src/fgas/include/fx_sax.h7
-rw-r--r--xfa/src/fgas/include/fx_sys.h2
-rw-r--r--xfa/src/fgas/src/crt/fx_codepage.cpp3
-rw-r--r--xfa/src/fgas/src/crt/fx_encode.cpp2
-rw-r--r--xfa/src/fgas/src/crt/fx_stream.cpp6
-rw-r--r--xfa/src/fgas/src/fgas_base.h1
-rw-r--r--xfa/src/fgas/src/font/fx_gefont.cpp4
-rw-r--r--xfa/src/fgas/src/font/fx_gefont.h7
-rw-r--r--xfa/src/fgas/src/font/fx_stdfontmgr.cpp4
-rw-r--r--xfa/src/fgas/src/font/fx_stdfontmgr.h9
-rw-r--r--xfa/src/fgas/src/layout/fx_linebreak.cpp1
-rw-r--r--xfa/src/fgas/src/layout/fx_rtfbreak.h1
-rw-r--r--xfa/src/fgas/src/localization/fx_datetime.cpp2
-rw-r--r--xfa/src/fgas/src/localization/fx_localeimp.h4
-rw-r--r--xfa/src/fgas/src/localization/fx_localemgr.h2
-rw-r--r--xfa/src/fgas/src/xml/fx_sax_imp.h6
-rw-r--r--xfa/src/foxitlib.h1
-rw-r--r--xfa/src/fxfa/src/app/xfa_checksum.cpp4
-rw-r--r--xfa/src/fxfa/src/app/xfa_checksum.h5
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffdoc.cpp1
-rw-r--r--xfa/src/fxfa/src/app/xfa_fwltheme.cpp4
-rw-r--r--xfa/src/fxfa/src/app/xfa_fwltheme.h1
-rw-r--r--xfa/src/fxfa/src/app/xfa_textlayout.cpp5
-rw-r--r--xfa/src/fxfa/src/parser/xfa_basic_imp.cpp3
-rw-r--r--xfa/src/fxfa/src/parser/xfa_document_serialize.cpp5
-rw-r--r--xfa/src/fxfa/src/parser/xfa_document_serialize.h3
-rw-r--r--xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp5
-rw-r--r--xfa/src/fxfa/src/parser/xfa_layout_itemlayout.h6
-rw-r--r--xfa/src/fxfa/src/parser/xfa_object_imp.cpp3
-rw-r--r--xfa/src/fxfa/src/parser/xfa_parser_imp.cpp5
-rw-r--r--xfa/src/fxfa/src/parser/xfa_parser_imp.h6
41 files changed, 130 insertions, 54 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 5caf471a8f..3ebd9ef034 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -899,7 +899,6 @@ if (pdf_enable_xfa) {
"xfa/src/fee/src/fx_wordbreak/fx_wordbreak_impl.cpp",
"xfa/src/fee/src/fx_wordbreak/fx_wordbreak_impl.h",
"xfa/src/fee/src/fx_wordbreak/fx_wordbreakdata.cpp",
- "xfa/src/fgas/include/fgas.h",
"xfa/src/fgas/include/fx_alg.h",
"xfa/src/fgas/include/fx_cpg.h",
"xfa/src/fgas/include/fx_datetime.h",
diff --git a/xfa.gyp b/xfa.gyp
index ba84c97187..d9c1b0da40 100644
--- a/xfa.gyp
+++ b/xfa.gyp
@@ -148,7 +148,6 @@
"xfa/src/fee/src/fx_wordbreak/fx_wordbreakdata.cpp",
"xfa/src/fee/src/fx_wordbreak/fx_wordbreak_impl.cpp",
"xfa/src/fee/src/fx_wordbreak/fx_wordbreak_impl.h",
- "xfa/src/fgas/include/fgas.h",
"xfa/src/fgas/include/fx_alg.h",
"xfa/src/fgas/include/fx_cpg.h",
"xfa/src/fgas/include/fx_datetime.h",
diff --git a/xfa/src/fdp/src/css/fde_cssdatatable.cpp b/xfa/src/fdp/src/css/fde_cssdatatable.cpp
index 322835f294..8284ea1b01 100644
--- a/xfa/src/fdp/src/css/fde_cssdatatable.cpp
+++ b/xfa/src/fdp/src/css/fde_cssdatatable.cpp
@@ -5,6 +5,10 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "xfa/src/fdp/src/css/fde_cssdatatable.h"
+
+#include "xfa/src/fgas/include/fx_alg.h"
+#include "xfa/src/fgas/include/fx_cpg.h"
+#include "xfa/src/fgas/include/fx_sys.h"
#include "xfa/src/foxitlib.h"
FX_BOOL FDE_CSSLengthToFloat(const FDE_CSSLENGTH& len,
diff --git a/xfa/src/fdp/src/css/fde_cssdeclaration.cpp b/xfa/src/fdp/src/css/fde_cssdeclaration.cpp
index 19370000bf..46cb42bb59 100644
--- a/xfa/src/fdp/src/css/fde_cssdeclaration.cpp
+++ b/xfa/src/fdp/src/css/fde_cssdeclaration.cpp
@@ -4,8 +4,10 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "xfa/src/fdp/include/fde_mem.h"
#include "xfa/src/fdp/src/css/fde_cssdeclaration.h"
+
+#include "xfa/src/fdp/include/fde_mem.h"
+#include "xfa/src/fgas/include/fx_sys.h"
#include "xfa/src/foxitlib.h"
IFDE_CSSValue* CFDE_CSSDeclaration::GetProperty(FDE_CSSPROPERTY eProperty,
diff --git a/xfa/src/fdp/src/css/fde_cssstylesheet.cpp b/xfa/src/fdp/src/css/fde_cssstylesheet.cpp
index c2a3660ff1..c41571a121 100644
--- a/xfa/src/fdp/src/css/fde_cssstylesheet.cpp
+++ b/xfa/src/fdp/src/css/fde_cssstylesheet.cpp
@@ -4,10 +4,12 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "xfa/src/fdp/src/css/fde_cssstylesheet.h"
+
#include "xfa/src/fdp/include/fde_mem.h"
#include "xfa/src/fdp/src/css/fde_cssdatatable.h"
-#include "xfa/src/fdp/src/css/fde_cssstylesheet.h"
#include "xfa/src/fdp/src/css/fde_csssyntax.h"
+#include "xfa/src/fgas/include/fx_cpg.h"
#include "xfa/src/foxitlib.h"
IFDE_CSSStyleSheet* IFDE_CSSStyleSheet::LoadHTMLStandardStyleSheet() {
diff --git a/xfa/src/fdp/src/css/fde_csssyntax.cpp b/xfa/src/fdp/src/css/fde_csssyntax.cpp
index 35bb32217d..e2724b2187 100644
--- a/xfa/src/fdp/src/css/fde_csssyntax.cpp
+++ b/xfa/src/fdp/src/css/fde_csssyntax.cpp
@@ -4,19 +4,25 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "xfa/src/fdp/src/css/fde_cssdatatable.h"
#include "xfa/src/fdp/src/css/fde_csssyntax.h"
+
+#include "xfa/src/fdp/src/css/fde_cssdatatable.h"
+#include "xfa/src/fgas/include/fx_cpg.h"
#include "xfa/src/foxitlib.h"
+
#ifdef _cplusplus
extern "C" {
#endif
+
inline FX_BOOL FDE_IsSelectorStart(FX_WCHAR wch) {
return wch == '.' || wch == '#' || wch == '*' || (wch >= 'a' && wch <= 'z') ||
(wch >= 'A' && wch <= 'Z');
}
+
#ifdef _cplusplus
};
#endif
+
IFDE_CSSSyntaxParser* IFDE_CSSSyntaxParser::Create() {
return new CFDE_CSSSyntaxParser;
}
diff --git a/xfa/src/fdp/src/css/fde_csssyntax.h b/xfa/src/fdp/src/css/fde_csssyntax.h
index e0f03bba57..1c7ba514b4 100644
--- a/xfa/src/fdp/src/css/fde_csssyntax.h
+++ b/xfa/src/fdp/src/css/fde_csssyntax.h
@@ -7,6 +7,10 @@
#ifndef XFA_SRC_FDP_SRC_CSS_FDE_CSSSYNTAX_H_
#define XFA_SRC_FDP_SRC_CSS_FDE_CSSSYNTAX_H_
+#include "xfa/src/fdp/include/fde_css.h"
+#include "xfa/src/fgas/include/fx_mem.h"
+#include "xfa/src/fgas/include/fx_stm.h"
+
class CFDE_CSSTextBuf : public CFX_Target {
public:
CFDE_CSSTextBuf();
@@ -51,8 +55,10 @@ class CFDE_CSSTextBuf : public CFX_Target {
int32_t m_iDatLen;
int32_t m_iDatPos;
};
+
#define FDE_CSSSYNTAXCHECK_AllowCharset 1
#define FDE_CSSSYNTAXCHECK_AllowImport 2
+
enum FDE_CSSSYNTAXMODE {
FDE_CSSSYNTAXMODE_RuleSet,
FDE_CSSSYNTAXMODE_Comment,
@@ -67,6 +73,7 @@ enum FDE_CSSSYNTAXMODE {
FDE_CSSSYNTAXMODE_PropertyName,
FDE_CSSSYNTAXMODE_PropertyValue,
};
+
class CFDE_CSSSyntaxParser : public IFDE_CSSSyntaxParser, public CFX_Target {
public:
CFDE_CSSSyntaxParser();
diff --git a/xfa/src/fdp/src/xml/fde_xml_imp.cpp b/xfa/src/fdp/src/xml/fde_xml_imp.cpp
index 941d06e74e..6304254feb 100644
--- a/xfa/src/fdp/src/xml/fde_xml_imp.cpp
+++ b/xfa/src/fdp/src/xml/fde_xml_imp.cpp
@@ -4,9 +4,12 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "xfa/src/fdp/src/xml/fde_xml_imp.h"
+
#include <algorithm>
-#include "xfa/src/fdp/src/xml/fde_xml_imp.h"
+#include "xfa/src/fgas/include/fx_cpg.h"
+#include "xfa/src/fgas/include/fx_sys.h"
#include "xfa/src/foxitlib.h"
#define FDE_XMLVALIDCHARRANGENUM 5
diff --git a/xfa/src/fgas/include/fgas.h b/xfa/src/fgas/include/fgas.h
deleted file mode 100644
index 903d7d47c5..0000000000
--- a/xfa/src/fgas/include/fgas.h
+++ /dev/null
@@ -1,28 +0,0 @@
-// 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
-
-// TODO(thestig): Remove this file and do IWYU.
-
-#ifndef XFA_SRC_FGAS_INCLUDE_FGAS_H_
-#define XFA_SRC_FGAS_INCLUDE_FGAS_H_
-
-#include "xfa/src/fgas/include/fx_alg.h"
-#include "xfa/src/fgas/include/fx_cpg.h"
-#include "xfa/src/fgas/include/fx_datetime.h"
-#include "xfa/src/fgas/include/fx_fnt.h"
-#include "xfa/src/fgas/include/fx_lbk.h"
-#include "xfa/src/fgas/include/fx_lgg.h"
-#include "xfa/src/fgas/include/fx_locale.h"
-#include "xfa/src/fgas/include/fx_mem.h"
-#include "xfa/src/fgas/include/fx_rbk.h"
-#include "xfa/src/fgas/include/fx_sax.h"
-#include "xfa/src/fgas/include/fx_stm.h"
-#include "xfa/src/fgas/include/fx_sys.h"
-#include "xfa/src/fgas/include/fx_tbk.h"
-#include "xfa/src/fgas/include/fx_ucd.h"
-#include "xfa/src/fgas/include/fx_utl.h"
-
-#endif // XFA_SRC_FGAS_INCLUDE_FGAS_H_
diff --git a/xfa/src/fgas/include/fx_locale.h b/xfa/src/fgas/include/fx_locale.h
index 5637913a97..cf35491f9b 100644
--- a/xfa/src/fgas/include/fx_locale.h
+++ b/xfa/src/fgas/include/fx_locale.h
@@ -8,11 +8,9 @@
#define XFA_SRC_FGAS_INCLUDE_FX_LOCALE_H_
#include "core/include/fxcrt/fx_xml.h"
+#include "xfa/src/fgas/include/fx_datetime.h"
class CFX_Unitime;
-class IFX_Locale;
-class IFX_FormatString;
-class IFX_LocaleMgr;
enum FX_LOCALENUMSYMBOL {
FX_LOCALENUMSYMBOL_Decimal,
diff --git a/xfa/src/fgas/include/fx_sax.h b/xfa/src/fgas/include/fx_sax.h
index 02468d31d2..e4b72f6328 100644
--- a/xfa/src/fgas/include/fx_sax.h
+++ b/xfa/src/fgas/include/fx_sax.h
@@ -7,8 +7,8 @@
#ifndef XFA_SRC_FGAS_INCLUDE_FX_SAX_H_
#define XFA_SRC_FGAS_INCLUDE_FX_SAX_H_
-class IFX_SAXReaderHandler;
-class IFX_SAXReader;
+#include "core/include/fxcrt/fx_basic.h"
+
#define FX_SAXPARSEMODE_NotConvert_amp 0x0001
#define FX_SAXPARSEMODE_NotConvert_lt 0x0002
#define FX_SAXPARSEMODE_NotConvert_gt 0x0004
@@ -16,6 +16,7 @@ class IFX_SAXReader;
#define FX_SAXPARSEMODE_NotConvert_quot 0x0010
#define FX_SAXPARSEMODE_NotConvert_sharp 0x0020
#define FX_SAXPARSEMODE_NotSkipSpace 0x0100
+
enum FX_SAXNODE {
FX_SAXNODE_Unknown = 0,
FX_SAXNODE_Instruction,
@@ -25,6 +26,7 @@ enum FX_SAXNODE {
FX_SAXNODE_Text,
FX_SAXNODE_CharData,
};
+
class IFX_SAXReaderHandler {
public:
virtual ~IFX_SAXReaderHandler() {}
@@ -48,6 +50,7 @@ class IFX_SAXReaderHandler {
const CFX_ByteStringC& bsData,
FX_DWORD dwStartPos) = 0;
};
+
class IFX_SAXReader {
public:
virtual ~IFX_SAXReader() {}
diff --git a/xfa/src/fgas/include/fx_sys.h b/xfa/src/fgas/include/fx_sys.h
index 5b5382ec14..d4fec2a74d 100644
--- a/xfa/src/fgas/include/fx_sys.h
+++ b/xfa/src/fgas/include/fx_sys.h
@@ -7,6 +7,8 @@
#ifndef XFA_SRC_FGAS_INCLUDE_FX_SYS_H_
#define XFA_SRC_FGAS_INCLUDE_FX_SYS_H_
+#include "core/include/fxcrt/fx_system.h"
+
#define FX_RAD2DEG(r) ((r)*180.0f / FX_PI)
#define FX_DEG2RAD(a) ((a)*FX_PI / 180.0f)
diff --git a/xfa/src/fgas/src/crt/fx_codepage.cpp b/xfa/src/fgas/src/crt/fx_codepage.cpp
index 16c363bd14..7cf82121d3 100644
--- a/xfa/src/fgas/src/crt/fx_codepage.cpp
+++ b/xfa/src/fgas/src/crt/fx_codepage.cpp
@@ -4,7 +4,10 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "xfa/src/fgas/include/fx_cpg.h"
+#include "xfa/src/fgas/include/fx_lgg.h"
#include "xfa/src/fgas/src/fgas_base.h"
+
static const FX_CHARSET_MAP g_FXCharset2CodePageTable[] = {
{0, 1252}, {1, 0}, {2, 42}, {77, 10000}, {78, 10001},
{79, 10003}, {80, 10008}, {81, 10002}, {83, 10005}, {84, 10004},
diff --git a/xfa/src/fgas/src/crt/fx_encode.cpp b/xfa/src/fgas/src/crt/fx_encode.cpp
index 5c5d547eab..8d225047ec 100644
--- a/xfa/src/fgas/src/crt/fx_encode.cpp
+++ b/xfa/src/fgas/src/crt/fx_encode.cpp
@@ -4,7 +4,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "xfa/src/fgas/include/fx_cpg.h"
#include "xfa/src/fgas/src/fgas_base.h"
+
void FX_SwapByteOrder(FX_WCHAR* pStr, int32_t iLength) {
FXSYS_assert(pStr != NULL);
if (iLength < 0) {
diff --git a/xfa/src/fgas/src/crt/fx_stream.cpp b/xfa/src/fgas/src/crt/fx_stream.cpp
index d6630045e4..cca0cb275d 100644
--- a/xfa/src/fgas/src/crt/fx_stream.cpp
+++ b/xfa/src/fgas/src/crt/fx_stream.cpp
@@ -4,10 +4,14 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "xfa/src/fgas/src/crt/fx_stream.h"
+
#include <algorithm>
-#include "xfa/src/fgas/src/crt/fx_stream.h"
+#include "xfa/src/fgas/include/fx_cpg.h"
+#include "xfa/src/fgas/include/fx_sys.h"
#include "xfa/src/fgas/src/fgas_base.h"
+
IFX_Stream* IFX_Stream::CreateStream(IFX_BufferRead* pBufferRead,
FX_DWORD dwAccess,
int32_t iFileSize,
diff --git a/xfa/src/fgas/src/fgas_base.h b/xfa/src/fgas/src/fgas_base.h
index 055f059a49..28356acca3 100644
--- a/xfa/src/fgas/src/fgas_base.h
+++ b/xfa/src/fgas/src/fgas_base.h
@@ -10,7 +10,6 @@
#define XFA_SRC_FGAS_SRC_FGAS_BASE_H_
#include "core/include/fxge/fx_freetype.h"
-#include "xfa/src/fgas/include/fgas.h"
#include "xfa/src/foxitlib.h"
#endif // XFA_SRC_FGAS_SRC_FGAS_BASE_H_
diff --git a/xfa/src/fgas/src/font/fx_gefont.cpp b/xfa/src/fgas/src/font/fx_gefont.cpp
index 2943a99915..e71d83e12e 100644
--- a/xfa/src/fgas/src/font/fx_gefont.cpp
+++ b/xfa/src/fgas/src/font/fx_gefont.cpp
@@ -4,9 +4,11 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "xfa/src/fgas/src/font/fx_gefont.h"
+
+#include "xfa/src/fgas/include/fx_cpg.h"
#include "xfa/src/fgas/src/fgas_base.h"
#include "xfa/src/fgas/src/font/fx_fontutils.h"
-#include "xfa/src/fgas/src/font/fx_gefont.h"
IFX_Font* IFX_Font::LoadFont(const FX_WCHAR* pszFontFamily,
FX_DWORD dwFontStyles,
diff --git a/xfa/src/fgas/src/font/fx_gefont.h b/xfa/src/fgas/src/font/fx_gefont.h
index bea01c04ea..8fb207d588 100644
--- a/xfa/src/fgas/src/font/fx_gefont.h
+++ b/xfa/src/fgas/src/font/fx_gefont.h
@@ -7,10 +7,11 @@
#ifndef XFA_SRC_FGAS_SRC_FONT_FX_GEFONT_H_
#define XFA_SRC_FGAS_SRC_FONT_FX_GEFONT_H_
-class CFX_GEFontMgr;
-#ifndef FXFONT_SUBST_ITALIC
+#include "xfa/src/fgas/include/fx_fnt.h"
+#include "xfa/src/fgas/include/fx_utl.h"
+
#define FXFONT_SUBST_ITALIC 0x02
-#endif
+
class CFX_GEFont : public IFX_Font {
public:
CFX_GEFont(const CFX_GEFont& src, FX_DWORD dwFontStyles);
diff --git a/xfa/src/fgas/src/font/fx_stdfontmgr.cpp b/xfa/src/fgas/src/font/fx_stdfontmgr.cpp
index d881e8da87..e187a2e07d 100644
--- a/xfa/src/fgas/src/font/fx_stdfontmgr.cpp
+++ b/xfa/src/fgas/src/font/fx_stdfontmgr.cpp
@@ -4,10 +4,12 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "xfa/src/fgas/src/font/fx_stdfontmgr.h"
+
#include "core/include/fxcrt/fx_stream.h"
+#include "xfa/src/fgas/include/fx_cpg.h"
#include "xfa/src/fgas/src/fgas_base.h"
#include "xfa/src/fgas/src/font/fx_fontutils.h"
-#include "xfa/src/fgas/src/font/fx_stdfontmgr.h"
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
IFX_FontMgr* IFX_FontMgr::Create(FX_LPEnumAllFonts pEnumerator,
diff --git a/xfa/src/fgas/src/font/fx_stdfontmgr.h b/xfa/src/fgas/src/font/fx_stdfontmgr.h
index 42aea16a3a..55359de829 100644
--- a/xfa/src/fgas/src/font/fx_stdfontmgr.h
+++ b/xfa/src/fgas/src/font/fx_stdfontmgr.h
@@ -7,11 +7,14 @@
#ifndef XFA_SRC_FGAS_SRC_FONT_FX_STDFONTMGR_H_
#define XFA_SRC_FGAS_SRC_FONT_FX_STDFONTMGR_H_
+#include "xfa/src/fgas/include/fx_fnt.h"
+
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
int32_t FX_GetSimilarValue(FX_LPCFONTDESCRIPTOR pFont, FX_DWORD dwFontStyles);
FX_LPCFONTDESCRIPTOR FX_DefFontMatcher(FX_LPFONTMATCHPARAMS pParams,
const CFX_FontDescriptors& fonts,
void* pUserData);
+
class CFX_StdFontMgrImp : public IFX_FontMgr {
public:
CFX_StdFontMgrImp(FX_LPEnumAllFonts pEnumerator,
@@ -70,7 +73,9 @@ class CFX_StdFontMgrImp : public IFX_FontMgr {
IFX_Font* GetFont(FX_LPCFONTDESCRIPTOR pFD, FX_DWORD dwFontStyles);
};
FX_DWORD FX_GetGdiFontStyles(const LOGFONTW& lf);
+
#else
+
class CFX_FontDescriptor {
public:
CFX_FontDescriptor()
@@ -92,6 +97,7 @@ class CFX_FontDescriptor {
FX_DWORD m_dwCsb[2];
};
typedef CFX_ArrayTemplate<CFX_FontDescriptor*> CFX_FontDescriptors;
+
struct FX_FontDescriptorInfo {
public:
CFX_FontDescriptor* pFont;
@@ -107,6 +113,7 @@ struct FX_FontDescriptorInfo {
};
};
typedef CFX_ArrayTemplate<FX_FontDescriptorInfo> CFX_FontDescriptorInfos;
+
struct FX_HandleParentPath {
FX_HandleParentPath() {}
FX_HandleParentPath(const FX_HandleParentPath& x) {
@@ -116,6 +123,7 @@ struct FX_HandleParentPath {
void* pFileHandle;
CFX_ByteString bsParentPath;
};
+
class CFX_FontSourceEnum_File : public IFX_FontSourceEnum {
public:
CFX_FontSourceEnum_File();
@@ -139,6 +147,7 @@ typedef CFX_MapPtrTemplate<FX_WCHAR, IFX_Font*> CFX_UnicodeFontMap;
typedef CFX_MapPtrTemplate<IFX_FileAccess*, CFX_ArrayTemplate<IFX_Font*>*>
CFX_FileFontMap;
typedef CFX_MapPtrTemplate<IFX_Font*, IFX_FileRead*> CFX_FonStreamtMap;
+
class CFX_FontMgrImp : public IFX_FontMgr {
public:
CFX_FontMgrImp(IFX_FontSourceEnum* pFontEnum,
diff --git a/xfa/src/fgas/src/layout/fx_linebreak.cpp b/xfa/src/fgas/src/layout/fx_linebreak.cpp
index e89dfb7486..7bceaf361e 100644
--- a/xfa/src/fgas/src/layout/fx_linebreak.cpp
+++ b/xfa/src/fgas/src/layout/fx_linebreak.cpp
@@ -4,6 +4,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "xfa/src/fgas/include/fx_lbk.h"
#include "xfa/src/fgas/src/fgas_base.h"
const FX_LINEBREAKTYPE gs_FX_LineBreak_PairTable[64][32] = {
diff --git a/xfa/src/fgas/src/layout/fx_rtfbreak.h b/xfa/src/fgas/src/layout/fx_rtfbreak.h
index 39e53ed96c..a54b83bf3d 100644
--- a/xfa/src/fgas/src/layout/fx_rtfbreak.h
+++ b/xfa/src/fgas/src/layout/fx_rtfbreak.h
@@ -8,6 +8,7 @@
#define XFA_SRC_FGAS_SRC_LAYOUT_FX_RTFBREAK_H_
#include "core/include/fxcrt/fx_arb.h"
+#include "xfa/src/fgas/include/fx_rbk.h"
#include "xfa/src/fgas/src/layout/fx_unicode.h"
class CFX_RTFLine;
diff --git a/xfa/src/fgas/src/localization/fx_datetime.cpp b/xfa/src/fgas/src/localization/fx_datetime.cpp
index 99d383b30f..7ea82af802 100644
--- a/xfa/src/fgas/src/localization/fx_datetime.cpp
+++ b/xfa/src/fgas/src/localization/fx_datetime.cpp
@@ -4,6 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "xfa/src/fgas/include/fx_datetime.h"
+
#include "xfa/src/fgas/src/fgas_base.h"
#if _FX_OS_ == _FX_LINUX_DESKTOP_ || _FX_OS_ == _FX_ANDROID_ || \
diff --git a/xfa/src/fgas/src/localization/fx_localeimp.h b/xfa/src/fgas/src/localization/fx_localeimp.h
index 02e4c5254f..2d4783d726 100644
--- a/xfa/src/fgas/src/localization/fx_localeimp.h
+++ b/xfa/src/fgas/src/localization/fx_localeimp.h
@@ -7,7 +7,10 @@
#ifndef XFA_SRC_FGAS_SRC_LOCALIZATION_FX_LOCALEIMP_H_
#define XFA_SRC_FGAS_SRC_LOCALIZATION_FX_LOCALEIMP_H_
+#include "xfa/src/fgas/include/fx_locale.h"
+
class CFX_LCNumeric;
+
class CFX_Locale : public IFX_Locale {
public:
CFX_Locale(CXML_Element* pLocaleData);
@@ -40,6 +43,7 @@ class CFX_Locale : public IFX_Locale {
virtual ~CFX_Locale();
CXML_Element* m_pElement;
};
+
class CFX_FormatString : public IFX_FormatString {
public:
CFX_FormatString(IFX_LocaleMgr* pLocaleMgr, FX_BOOL bUseLCID);
diff --git a/xfa/src/fgas/src/localization/fx_localemgr.h b/xfa/src/fgas/src/localization/fx_localemgr.h
index 96f072a7e2..3405b9ecab 100644
--- a/xfa/src/fgas/src/localization/fx_localemgr.h
+++ b/xfa/src/fgas/src/localization/fx_localemgr.h
@@ -7,6 +7,8 @@
#ifndef XFA_SRC_FGAS_SRC_LOCALIZATION_FX_LOCALEMGR_H_
#define XFA_SRC_FGAS_SRC_LOCALIZATION_FX_LOCALEMGR_H_
+#include "xfa/src/fgas/include/fx_locale.h"
+
class CFX_LocaleMgr : public IFX_LocaleMgr {
public:
CFX_LocaleMgr(FX_WORD wDefLCID);
diff --git a/xfa/src/fgas/src/xml/fx_sax_imp.h b/xfa/src/fgas/src/xml/fx_sax_imp.h
index 8418c4e0c1..13e5036ec3 100644
--- a/xfa/src/fgas/src/xml/fx_sax_imp.h
+++ b/xfa/src/fgas/src/xml/fx_sax_imp.h
@@ -7,6 +7,8 @@
#ifndef XFA_SRC_FGAS_SRC_XML_FX_SAX_IMP_H_
#define XFA_SRC_FGAS_SRC_XML_FX_SAX_IMP_H_
+#include "xfa/src/fgas/include/fx_sax.h"
+
class CFX_SAXFile {
public:
CFX_SAXFile();
@@ -21,6 +23,7 @@ class CFX_SAXFile {
FX_DWORD m_dwBufSize;
FX_DWORD m_dwBufIndex;
};
+
enum FX_SAXMODE {
FX_SAXMODE_Text = 0,
FX_SAXMODE_NodeStart,
@@ -38,6 +41,7 @@ enum FX_SAXMODE {
FX_SAXMODE_TargetData,
FX_SAXMODE_MAX,
};
+
class CFX_SAXItem {
public:
CFX_SAXItem()
@@ -54,12 +58,14 @@ class CFX_SAXItem {
CFX_SAXItem* m_pPrev;
CFX_SAXItem* m_pNext;
};
+
class CFX_SAXCommentContext {
public:
CFX_SAXCommentContext() : m_iHeaderCount(0), m_iTailCount(0) {}
int32_t m_iHeaderCount;
int32_t m_iTailCount;
};
+
class CFX_SAXReader : public IFX_SAXReader {
public:
CFX_SAXReader();
diff --git a/xfa/src/foxitlib.h b/xfa/src/foxitlib.h
index 58373732d6..c30631ce6a 100644
--- a/xfa/src/foxitlib.h
+++ b/xfa/src/foxitlib.h
@@ -13,6 +13,5 @@
#include "xfa/src/fee/include/fx_wordbreak.h"
#include "xfa/src/fee/include/ifde_txtedtengine.h"
#include "xfa/src/fee/include/ifde_txtedtpage.h"
-#include "xfa/src/fgas/include/fgas.h"
#endif // XFA_SRC_FOXITLIB_H_
diff --git a/xfa/src/fxfa/src/app/xfa_checksum.cpp b/xfa/src/fxfa/src/app/xfa_checksum.cpp
index 9c1597811f..22fe715450 100644
--- a/xfa/src/fxfa/src/app/xfa_checksum.cpp
+++ b/xfa/src/fxfa/src/app/xfa_checksum.cpp
@@ -4,9 +4,11 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "xfa/src/foxitlib.h"
#include "xfa/src/fxfa/src/app/xfa_checksum.h"
+#include "xfa/src/fgas/include/fx_alg.h"
+#include "xfa/src/foxitlib.h"
+
CXFA_SAXReaderHandler::CXFA_SAXReaderHandler(CXFA_ChecksumContext* pContext)
: m_pContext(pContext) {
FXSYS_assert(m_pContext);
diff --git a/xfa/src/fxfa/src/app/xfa_checksum.h b/xfa/src/fxfa/src/app/xfa_checksum.h
index 5927e5335f..16e634d877 100644
--- a/xfa/src/fxfa/src/app/xfa_checksum.h
+++ b/xfa/src/fxfa/src/app/xfa_checksum.h
@@ -7,8 +7,12 @@
#ifndef XFA_SRC_FXFA_SRC_APP_XFA_CHECKSUM_H_
#define XFA_SRC_FXFA_SRC_APP_XFA_CHECKSUM_H_
+#include "xfa/include/fxfa/fxfa.h"
+#include "xfa/src/fgas/include/fx_sax.h"
+
class CXFA_SAXReaderHandler;
class CXFA_ChecksumContext;
+
class CXFA_SAXContext {
public:
CXFA_SAXContext() : m_eNode(FX_SAXNODE_Unknown) {}
@@ -46,6 +50,7 @@ class CXFA_SAXReaderHandler : public IFX_SAXReaderHandler {
CXFA_ChecksumContext* m_pContext;
CXFA_SAXContext m_SAXContext;
};
+
class CXFA_ChecksumContext : public IXFA_ChecksumContext {
public:
CXFA_ChecksumContext();
diff --git a/xfa/src/fxfa/src/app/xfa_ffdoc.cpp b/xfa/src/fxfa/src/app/xfa_ffdoc.cpp
index b6f8c90371..770b8ef3de 100644
--- a/xfa/src/fxfa/src/app/xfa_ffdoc.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffdoc.cpp
@@ -7,6 +7,7 @@
#include "xfa/src/fxfa/src/app/xfa_ffdoc.h"
#include "xfa/include/fwl/core/fwl_note.h"
+#include "xfa/src/fgas/include/fx_alg.h"
#include "xfa/src/foxitlib.h"
#include "xfa/src/fxfa/src/app/xfa_ffapp.h"
#include "xfa/src/fxfa/src/app/xfa_ffdocview.h"
diff --git a/xfa/src/fxfa/src/app/xfa_fwltheme.cpp b/xfa/src/fxfa/src/app/xfa_fwltheme.cpp
index 2e95732da2..f1aa18848d 100644
--- a/xfa/src/fxfa/src/app/xfa_fwltheme.cpp
+++ b/xfa/src/fxfa/src/app/xfa_fwltheme.cpp
@@ -4,6 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "xfa/src/fxfa/src/app/xfa_fwltheme.h"
+
#include "xfa/include/fwl/basewidget/fwl_barcode.h"
#include "xfa/include/fwl/basewidget/fwl_caret.h"
#include "xfa/include/fwl/basewidget/fwl_checkbox.h"
@@ -16,10 +18,10 @@
#include "xfa/include/fwl/basewidget/fwl_pushbutton.h"
#include "xfa/include/fwl/basewidget/fwl_scrollbar.h"
#include "xfa/src/fdp/include/fde_tto.h"
+#include "xfa/src/fgas/include/fx_cpg.h"
#include "xfa/src/foxitlib.h"
#include "xfa/src/fxfa/src/app/xfa_ffapp.h"
#include "xfa/src/fxfa/src/app/xfa_ffwidget.h"
-#include "xfa/src/fxfa/src/app/xfa_fwltheme.h"
CXFA_FFWidget* XFA_ThemeGetOuterWidget(IFWL_Widget* pWidget) {
IFWL_Widget* pOuter = pWidget;
diff --git a/xfa/src/fxfa/src/app/xfa_fwltheme.h b/xfa/src/fxfa/src/app/xfa_fwltheme.h
index ed0b681f2a..f58f9569b3 100644
--- a/xfa/src/fxfa/src/app/xfa_fwltheme.h
+++ b/xfa/src/fxfa/src/app/xfa_fwltheme.h
@@ -21,6 +21,7 @@
#include "xfa/include/fwl/theme/pushbuttontp.h"
#include "xfa/include/fwl/theme/scrollbartp.h"
#include "xfa/include/fwl/theme/widgettp.h"
+#include "xfa/src/fxfa/src/app/xfa_ffapp.h"
class CXFA_FWLTheme : public IFWL_ThemeProvider {
public:
diff --git a/xfa/src/fxfa/src/app/xfa_textlayout.cpp b/xfa/src/fxfa/src/app/xfa_textlayout.cpp
index 1c1dad7e42..5192735fda 100644
--- a/xfa/src/fxfa/src/app/xfa_textlayout.cpp
+++ b/xfa/src/fxfa/src/app/xfa_textlayout.cpp
@@ -4,13 +4,16 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "xfa/src/fxfa/src/app/xfa_textlayout.h"
+
#include <algorithm>
+#include "xfa/src/fgas/include/fx_alg.h"
+#include "xfa/src/fgas/include/fx_cpg.h"
#include "xfa/src/foxitlib.h"
#include "xfa/src/fxfa/src/app/xfa_ffapp.h"
#include "xfa/src/fxfa/src/app/xfa_ffdoc.h"
#include "xfa/src/fxfa/src/app/xfa_fontmgr.h"
-#include "xfa/src/fxfa/src/app/xfa_textlayout.h"
CXFA_CSSTagProvider::~CXFA_CSSTagProvider() {
FX_POSITION pos = m_Attributes.GetStartPosition();
diff --git a/xfa/src/fxfa/src/parser/xfa_basic_imp.cpp b/xfa/src/fxfa/src/parser/xfa_basic_imp.cpp
index 848ae44b8c..f724ed654c 100644
--- a/xfa/src/fxfa/src/parser/xfa_basic_imp.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_basic_imp.cpp
@@ -4,6 +4,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "xfa/src/fgas/include/fx_alg.h"
+#include "xfa/src/fgas/include/fx_cpg.h"
+#include "xfa/src/fgas/include/fx_sys.h"
#include "xfa/src/foxitlib.h"
#include "xfa/src/fxfa/src/common/xfa_docdata.h"
#include "xfa/src/fxfa/src/common/xfa_doclayout.h"
diff --git a/xfa/src/fxfa/src/parser/xfa_document_serialize.cpp b/xfa/src/fxfa/src/parser/xfa_document_serialize.cpp
index ab440c23ca..fc05d7de6e 100644
--- a/xfa/src/fxfa/src/parser/xfa_document_serialize.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_document_serialize.cpp
@@ -4,6 +4,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "xfa/src/fxfa/src/parser/xfa_document_serialize.h"
+
+#include "xfa/src/fgas/include/fx_cpg.h"
#include "xfa/src/foxitlib.h"
#include "xfa/src/fxfa/src/common/xfa_docdata.h"
#include "xfa/src/fxfa/src/common/xfa_doclayout.h"
@@ -14,7 +17,7 @@
#include "xfa/src/fxfa/src/common/xfa_parser.h"
#include "xfa/src/fxfa/src/common/xfa_script.h"
#include "xfa/src/fxfa/src/common/xfa_utils.h"
-#include "xfa/src/fxfa/src/parser/xfa_document_serialize.h"
+
IXFA_PacketImport* IXFA_PacketImport::Create(CXFA_Document* pDocument) {
return new CXFA_DataImporter(pDocument);
}
diff --git a/xfa/src/fxfa/src/parser/xfa_document_serialize.h b/xfa/src/fxfa/src/parser/xfa_document_serialize.h
index bcec733772..0aa701a175 100644
--- a/xfa/src/fxfa/src/parser/xfa_document_serialize.h
+++ b/xfa/src/fxfa/src/parser/xfa_document_serialize.h
@@ -7,6 +7,8 @@
#ifndef XFA_SRC_FXFA_SRC_PARSER_XFA_DOCUMENT_SERIALIZE_H_
#define XFA_SRC_FXFA_SRC_PARSER_XFA_DOCUMENT_SERIALIZE_H_
+#include "xfa/src/fxfa/src/common/xfa_docdata.h"
+
class CXFA_DataImporter : public IXFA_PacketImport {
public:
CXFA_DataImporter(CXFA_Document* pDocument);
@@ -16,6 +18,7 @@ class CXFA_DataImporter : public IXFA_PacketImport {
protected:
CXFA_Document* m_pDocument;
};
+
class CXFA_DataExporter : public IXFA_PacketExport {
public:
CXFA_DataExporter(CXFA_Document* pDocument);
diff --git a/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp b/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp
index e1282c1f9e..819a5e121b 100644
--- a/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp
@@ -4,9 +4,12 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "xfa/src/fxfa/src/parser/xfa_layout_itemlayout.h"
+
#include <algorithm>
#include <memory>
+#include "xfa/src/fgas/include/fx_alg.h"
#include "xfa/src/foxitlib.h"
#include "xfa/src/fxfa/src/common/xfa_docdata.h"
#include "xfa/src/fxfa/src/common/xfa_doclayout.h"
@@ -19,8 +22,8 @@
#include "xfa/src/fxfa/src/common/xfa_utils.h"
#include "xfa/src/fxfa/src/parser/xfa_document_layout_imp.h"
#include "xfa/src/fxfa/src/parser/xfa_layout_appadapter.h"
-#include "xfa/src/fxfa/src/parser/xfa_layout_itemlayout.h"
#include "xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.h"
+
CXFA_ItemLayoutProcessor::CXFA_ItemLayoutProcessor(CXFA_Node* pNode,
CXFA_LayoutPageMgr* pPageMgr)
: m_bKeepBreakFinish(FALSE),
diff --git a/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.h b/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.h
index 9ef40935a0..caa48e215f 100644
--- a/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.h
+++ b/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.h
@@ -7,10 +7,14 @@
#ifndef XFA_SRC_FXFA_SRC_PARSER_XFA_LAYOUT_ITEMLAYOUT_H_
#define XFA_SRC_FXFA_SRC_PARSER_XFA_LAYOUT_ITEMLAYOUT_H_
-#include "float.h"
+#include <float.h>
#include <list>
+#include "core/include/fxcrt/fx_basic.h"
+#include "xfa/src/fxfa/src/common/xfa_doclayout.h"
+#include "xfa/src/fxfa/src/parser/xfa_document_layout_imp.h"
+
#define XFA_LAYOUT_INVALIDNODE ((CXFA_Node*)(intptr_t)-1)
#define XFA_LAYOUT_FLOAT_PERCISION (0.0005f)
#define XFA_LAYOUT_FLOAT_MAX FLT_MAX
diff --git a/xfa/src/fxfa/src/parser/xfa_object_imp.cpp b/xfa/src/fxfa/src/parser/xfa_object_imp.cpp
index ec70e133a1..67028ee3cd 100644
--- a/xfa/src/fxfa/src/parser/xfa_object_imp.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_object_imp.cpp
@@ -4,6 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "xfa/src/fgas/include/fx_cpg.h"
+#include "xfa/src/fgas/include/fx_sys.h"
#include "xfa/src/foxitlib.h"
#include "xfa/src/fxfa/src/common/xfa_docdata.h"
#include "xfa/src/fxfa/src/common/xfa_doclayout.h"
@@ -16,6 +18,7 @@
#include "xfa/src/fxfa/src/common/xfa_utils.h"
#include "xfa/src/fxfa/src/parser/xfa_basic_imp.h"
#include "xfa/src/fxfa/src/parser/xfa_document_layout_imp.h"
+
CXFA_Object::CXFA_Object(CXFA_Document* pDocument, FX_DWORD uFlags)
: m_pDocument(pDocument), m_uFlags(uFlags) {}
void CXFA_Object::GetClassName(CFX_WideStringC& wsName) const {
diff --git a/xfa/src/fxfa/src/parser/xfa_parser_imp.cpp b/xfa/src/fxfa/src/parser/xfa_parser_imp.cpp
index 94f04e55f0..3baed96cba 100644
--- a/xfa/src/fxfa/src/parser/xfa_parser_imp.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_parser_imp.cpp
@@ -4,6 +4,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "xfa/src/fxfa/src/parser/xfa_parser_imp.h"
+
+#include "xfa/src/fgas/include/fx_cpg.h"
#include "xfa/src/foxitlib.h"
#include "xfa/src/fxfa/src/common/xfa_docdata.h"
#include "xfa/src/fxfa/src/common/xfa_doclayout.h"
@@ -15,7 +18,7 @@
#include "xfa/src/fxfa/src/common/xfa_script.h"
#include "xfa/src/fxfa/src/common/xfa_utils.h"
#include "xfa/src/fxfa/src/parser/xfa_basic_imp.h"
-#include "xfa/src/fxfa/src/parser/xfa_parser_imp.h"
+
IXFA_Parser* IXFA_Parser::Create(IXFA_ObjFactory* pFactory,
FX_BOOL bDocumentParser) {
return new CXFA_SimpleParser(pFactory, bDocumentParser);
diff --git a/xfa/src/fxfa/src/parser/xfa_parser_imp.h b/xfa/src/fxfa/src/parser/xfa_parser_imp.h
index 6c6593ae03..a9ce2e5eeb 100644
--- a/xfa/src/fxfa/src/parser/xfa_parser_imp.h
+++ b/xfa/src/fxfa/src/parser/xfa_parser_imp.h
@@ -7,8 +7,12 @@
#ifndef XFA_SRC_FXFA_SRC_PARSER_XFA_PARSER_IMP_H_
#define XFA_SRC_FXFA_SRC_PARSER_XFA_PARSER_IMP_H_
+#include "xfa/src/fxfa/src/common/xfa_parser.h"
+
#define _XFA_VERIFY_Checksum_
+
class CXFA_XMLParser;
+
class CXFA_SimpleParser : public IXFA_Parser {
public:
CXFA_SimpleParser(IXFA_ObjFactory* pFactory, FX_BOOL bDocumentParser = FALSE);
@@ -77,6 +81,7 @@ class CXFA_SimpleParser : public IXFA_Parser {
FX_BOOL m_bDocumentParser;
friend class CXFA_DocumentParser;
};
+
class CXFA_DocumentParser : public IXFA_DocParser {
public:
CXFA_DocumentParser(IXFA_Notify* pNotify);
@@ -104,6 +109,7 @@ class CXFA_DocumentParser : public IXFA_DocParser {
CXFA_Document* m_pDocument;
};
typedef CFX_StackTemplate<IFDE_XMLNode*> CXFA_XMLNodeStack;
+
class CXFA_XMLParser : public IFDE_XMLParser {
public:
CXFA_XMLParser(IFDE_XMLNode* pRoot, IFX_Stream* pStream);