diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2016-02-23 09:09:24 -0500 |
---|---|---|
committer | Dan Sinclair <dsinclair@chromium.org> | 2016-02-23 09:09:24 -0500 |
commit | 880962cb81b7a34e4b90a2ecb1992f1afb13d529 (patch) | |
tree | 0c308484095670633092b1d26e5b9335610e9935 /xfa/src/fgas | |
parent | 7f9fddeaaaddb5a898f1431e7d2d8b89d40fad87 (diff) | |
download | pdfium-880962cb81b7a34e4b90a2ecb1992f1afb13d529.tar.xz |
Sort includes in xfa/.
This CL sorts all the includes in the xfa/ directory. There are a lot of IWYU
errors that have been fixed to make things compile again.
BUG=pdfium:65
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1722803002 .
Diffstat (limited to 'xfa/src/fgas')
-rw-r--r-- | xfa/src/fgas/include/fgas.h | 18 | ||||
-rw-r--r-- | xfa/src/fgas/include/fx_alg.h | 7 | ||||
-rw-r--r-- | xfa/src/fgas/include/fx_cpg.h | 3 | ||||
-rw-r--r-- | xfa/src/fgas/include/fx_fnt.h | 9 | ||||
-rw-r--r-- | xfa/src/fgas/include/fx_locale.h | 3 | ||||
-rw-r--r-- | xfa/src/fgas/include/fx_mem.h | 1 | ||||
-rw-r--r-- | xfa/src/fgas/include/fx_rbk.h | 6 | ||||
-rw-r--r-- | xfa/src/fgas/include/fx_stm.h | 3 | ||||
-rw-r--r-- | xfa/src/fgas/include/fx_tbk.h | 4 | ||||
-rw-r--r-- | xfa/src/fgas/include/fx_utl.h | 2 | ||||
-rw-r--r-- | xfa/src/fgas/src/crt/fx_memory.cpp | 2 | ||||
-rw-r--r-- | xfa/src/fgas/src/crt/fx_memory.h | 2 | ||||
-rw-r--r-- | xfa/src/fgas/src/crt/fx_stream.cpp | 2 | ||||
-rw-r--r-- | xfa/src/fgas/src/crt/fx_stream.h | 5 | ||||
-rw-r--r-- | xfa/src/fgas/src/crt/fx_utils.cpp | 2 | ||||
-rw-r--r-- | xfa/src/fgas/src/fgas_base.h | 2 | ||||
-rw-r--r-- | xfa/src/fgas/src/font/fx_gefont.cpp | 2 | ||||
-rw-r--r-- | xfa/src/fgas/src/layout/fx_rtfbreak.cpp | 2 | ||||
-rw-r--r-- | xfa/src/fgas/src/layout/fx_rtfbreak.h | 1 | ||||
-rw-r--r-- | xfa/src/fgas/src/layout/fx_textbreak.cpp | 2 | ||||
-rw-r--r-- | xfa/src/fgas/src/layout/fx_textbreak.h | 1 | ||||
-rw-r--r-- | xfa/src/fgas/src/localization/fx_datetime.cpp | 13 |
22 files changed, 67 insertions, 25 deletions
diff --git a/xfa/src/fgas/include/fgas.h b/xfa/src/fgas/include/fgas.h index 8031269f1e..903d7d47c5 100644 --- a/xfa/src/fgas/include/fgas.h +++ b/xfa/src/fgas/include/fgas.h @@ -9,20 +9,20 @@ #ifndef XFA_SRC_FGAS_INCLUDE_FGAS_H_ #define XFA_SRC_FGAS_INCLUDE_FGAS_H_ -#include "xfa/src/fgas/include/fx_sys.h" -#include "xfa/src/fgas/include/fx_mem.h" -#include "xfa/src/fgas/include/fx_lgg.h" -#include "xfa/src/fgas/include/fx_utl.h" #include "xfa/src/fgas/include/fx_alg.h" #include "xfa/src/fgas/include/fx_cpg.h" -#include "xfa/src/fgas/include/fx_stm.h" #include "xfa/src/fgas/include/fx_datetime.h" -#include "xfa/src/fgas/include/fx_locale.h" -#include "xfa/src/fgas/include/fx_sax.h" #include "xfa/src/fgas/include/fx_fnt.h" -#include "xfa/src/fgas/include/fx_ucd.h" #include "xfa/src/fgas/include/fx_lbk.h" -#include "xfa/src/fgas/include/fx_tbk.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_alg.h b/xfa/src/fgas/include/fx_alg.h index dd593202da..e2682729a3 100644 --- a/xfa/src/fgas/include/fx_alg.h +++ b/xfa/src/fgas/include/fx_alg.h @@ -7,10 +7,16 @@ #ifndef XFA_SRC_FGAS_INCLUDE_FX_ALG_H_ #define XFA_SRC_FGAS_INCLUDE_FX_ALG_H_ +#include <cstdint> + +#include "core/include/fxcrt/fx_basic.h" + #define FX_IsOdd(a) ((a)&1) + #ifdef __cplusplus extern "C" { #endif + int32_t FX_Base64EncodeA(const uint8_t* pSrc, int32_t iSrcLen, FX_CHAR* pDst); int32_t FX_Base64DecodeA(const FX_CHAR* pSrc, int32_t iSrcLen, uint8_t* pDst); int32_t FX_Base64DecodeW(const FX_WCHAR* pSrc, int32_t iSrcLen, uint8_t* pDst); @@ -22,6 +28,7 @@ int32_t FX_SeparateStringW(const FX_WCHAR* pStr, #ifdef __cplusplus }; #endif + template <class baseType> class CFX_DSPATemplate { public: diff --git a/xfa/src/fgas/include/fx_cpg.h b/xfa/src/fgas/include/fx_cpg.h index 84914766e6..970066156a 100644 --- a/xfa/src/fgas/include/fx_cpg.h +++ b/xfa/src/fgas/include/fx_cpg.h @@ -7,7 +7,8 @@ #ifndef XFA_SRC_FGAS_INCLUDE_FX_CPG_H_ #define XFA_SRC_FGAS_INCLUDE_FX_CPG_H_ -class IFX_CodePage; +#include "core/include/fxcrt/fx_basic.h" + #define FX_CODEPAGE_DefANSI 0 #define FX_CODEPAGE_DefOEM 1 #define FX_CODEPAGE_DefMAC 2 diff --git a/xfa/src/fgas/include/fx_fnt.h b/xfa/src/fgas/include/fx_fnt.h index 34abab8846..78c9b5ee13 100644 --- a/xfa/src/fgas/include/fx_fnt.h +++ b/xfa/src/fgas/include/fx_fnt.h @@ -7,8 +7,17 @@ #ifndef XFA_SRC_FGAS_INCLUDE_FX_FNT_H_ #define XFA_SRC_FGAS_INCLUDE_FX_FNT_H_ +#include "core/include/fxge/fx_font.h" +#include "xfa/src/fgas/include/fx_stm.h" + +#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ +#include "xfa/src/fgas/include/fx_mem.h" +#include "xfa/src/fgas/include/fx_utl.h" +#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ + class IFX_Font; class IFX_FontMgr; + #define FX_FONTSTYLE_Normal 0x00 #define FX_FONTSTYLE_FixedPitch 0x01 #define FX_FONTSTYLE_Serif 0x02 diff --git a/xfa/src/fgas/include/fx_locale.h b/xfa/src/fgas/include/fx_locale.h index 36d19b5e14..5637913a97 100644 --- a/xfa/src/fgas/include/fx_locale.h +++ b/xfa/src/fgas/include/fx_locale.h @@ -7,10 +7,13 @@ #ifndef XFA_SRC_FGAS_INCLUDE_FX_LOCALE_H_ #define XFA_SRC_FGAS_INCLUDE_FX_LOCALE_H_ +#include "core/include/fxcrt/fx_xml.h" + class CFX_Unitime; class IFX_Locale; class IFX_FormatString; class IFX_LocaleMgr; + enum FX_LOCALENUMSYMBOL { FX_LOCALENUMSYMBOL_Decimal, FX_LOCALENUMSYMBOL_Grouping, diff --git a/xfa/src/fgas/include/fx_mem.h b/xfa/src/fgas/include/fx_mem.h index d59d391d44..e768c454ac 100644 --- a/xfa/src/fgas/include/fx_mem.h +++ b/xfa/src/fgas/include/fx_mem.h @@ -47,6 +47,7 @@ class CFX_Target { void* operator new(size_t size, void* place) { return place; } void operator delete(void* p, void* place) {} }; + #define FXTARGET_NewWith(__allocator__) new (__allocator__) #define FXTARGET_DeleteWith(__class__, __allocator__, pointer) \ { \ diff --git a/xfa/src/fgas/include/fx_rbk.h b/xfa/src/fgas/include/fx_rbk.h index e3e0595f59..a56040de67 100644 --- a/xfa/src/fgas/include/fx_rbk.h +++ b/xfa/src/fgas/include/fx_rbk.h @@ -7,12 +7,16 @@ #ifndef XFA_SRC_FGAS_INCLUDE_FX_RBK_H_ #define XFA_SRC_FGAS_INCLUDE_FX_RBK_H_ +#include "core/include/fxcrt/fx_ucd.h" +#include "core/include/fxge/fx_ge.h" +#include "xfa/src/fgas/include/fx_ucd.h" + class IFX_Unknown; class IFX_Font; class CFX_Char; -class CFX_RTFChar; class CFX_RTFBreakPiece; class IFX_RTFBreak; + #define FX_RTFBREAKPOLICY_None 0x00 #define FX_RTFBREAKPOLICY_SpaceBreak 0x01 #define FX_RTFBREAKPOLICY_NumberBreak 0x02 diff --git a/xfa/src/fgas/include/fx_stm.h b/xfa/src/fgas/include/fx_stm.h index cfd863d08c..199a03f677 100644 --- a/xfa/src/fgas/include/fx_stm.h +++ b/xfa/src/fgas/include/fx_stm.h @@ -7,7 +7,10 @@ #ifndef XFA_SRC_FGAS_INCLUDE_FX_STM_H_ #define XFA_SRC_FGAS_INCLUDE_FX_STM_H_ +#include "core/include/fxcrt/fx_stream.h" + class IFX_Stream; + IFX_FileRead* FX_CreateFileRead(IFX_Stream* pBaseStream, FX_BOOL bReleaseStream = FALSE); IFX_FileRead* FX_CreateFileRead(IFX_BufferRead* pBufferRead, diff --git a/xfa/src/fgas/include/fx_tbk.h b/xfa/src/fgas/include/fx_tbk.h index 6ebfd4ce04..5063aec142 100644 --- a/xfa/src/fgas/include/fx_tbk.h +++ b/xfa/src/fgas/include/fx_tbk.h @@ -8,6 +8,9 @@ #define XFA_SRC_FGAS_INCLUDE_FX_TBK_H_ #include "core/include/fxcrt/fx_ucd.h" +#include "core/include/fxge/fx_ge.h" +#include "xfa/src/fgas/include/fx_ucd.h" +#include "xfa/src/fgas/include/fx_utl.h" class IFX_Font; class CFX_Char; @@ -15,6 +18,7 @@ class IFX_TxtAccess; class CFX_TxtChar; class CFX_TxtPiece; class IFX_TxtBreak; + #define FX_TXTBREAKPOLICY_None 0x00 #define FX_TXTBREAKPOLICY_Pagination 0x01 #define FX_TXTBREAKPOLICY_SpaceBreak 0x02 diff --git a/xfa/src/fgas/include/fx_utl.h b/xfa/src/fgas/include/fx_utl.h index f6c7c09f13..e95d82005a 100644 --- a/xfa/src/fgas/include/fx_utl.h +++ b/xfa/src/fgas/include/fx_utl.h @@ -7,8 +7,8 @@ #ifndef XFA_SRC_FGAS_INCLUDE_FX_UTL_H_ #define XFA_SRC_FGAS_INCLUDE_FX_UTL_H_ -#include "xfa/src/fgas/include/fx_mem.h" #include "core/include/fxcrt/fx_coordinates.h" // For CFX_Rect. +#include "xfa/src/fgas/include/fx_mem.h" class CFX_BaseArray; template <class baseType> diff --git a/xfa/src/fgas/src/crt/fx_memory.cpp b/xfa/src/fgas/src/crt/fx_memory.cpp index 6c0f98c382..68a76bf184 100644 --- a/xfa/src/fgas/src/crt/fx_memory.cpp +++ b/xfa/src/fgas/src/crt/fx_memory.cpp @@ -6,8 +6,8 @@ #include <algorithm> -#include "xfa/src/fgas/src/fgas_base.h" #include "xfa/src/fgas/src/crt/fx_memory.h" +#include "xfa/src/fgas/src/fgas_base.h" #define FX_4BYTEALIGN(size) (((size) + 3) / 4 * 4) IFX_MEMAllocator* FX_CreateAllocator(FX_ALLOCTYPE eType, size_t chunkSize, diff --git a/xfa/src/fgas/src/crt/fx_memory.h b/xfa/src/fgas/src/crt/fx_memory.h index 931bfbf334..75f4327c0c 100644 --- a/xfa/src/fgas/src/crt/fx_memory.h +++ b/xfa/src/fgas/src/crt/fx_memory.h @@ -7,6 +7,8 @@ #ifndef XFA_SRC_FGAS_SRC_CRT_FX_MEMORY_H_ #define XFA_SRC_FGAS_SRC_CRT_FX_MEMORY_H_ +#include "xfa/src/fgas/include/fx_mem.h" + class CFX_DefStore; class CFX_StaticStore; class CFX_FixedStore; diff --git a/xfa/src/fgas/src/crt/fx_stream.cpp b/xfa/src/fgas/src/crt/fx_stream.cpp index 79a0e4c78b..d6630045e4 100644 --- a/xfa/src/fgas/src/crt/fx_stream.cpp +++ b/xfa/src/fgas/src/crt/fx_stream.cpp @@ -6,8 +6,8 @@ #include <algorithm> -#include "xfa/src/fgas/src/fgas_base.h" #include "xfa/src/fgas/src/crt/fx_stream.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/crt/fx_stream.h b/xfa/src/fgas/src/crt/fx_stream.h index d58b52c1ac..6fd8ff9af8 100644 --- a/xfa/src/fgas/src/crt/fx_stream.h +++ b/xfa/src/fgas/src/crt/fx_stream.h @@ -7,7 +7,9 @@ #ifndef XFA_SRC_FGAS_SRC_CRT_FX_STREAM_H_ #define XFA_SRC_FGAS_SRC_CRT_FX_STREAM_H_ -class CFX_StreamImp; +#include "core/include/fxcrt/fx_system.h" +#include "xfa/src/fgas/include/fx_stm.h" + class CFX_FileStreamImp; class CFX_BufferStreamImp; class CFX_FileReadStreamImp; @@ -18,6 +20,7 @@ class CFX_TextStream; class CFX_FileRead; class CFX_FileWrite; class CFX_BufferAccImp; + class CFX_StreamImp { public: virtual void Release() { delete this; } diff --git a/xfa/src/fgas/src/crt/fx_utils.cpp b/xfa/src/fgas/src/crt/fx_utils.cpp index 8f43d4474b..fda9637467 100644 --- a/xfa/src/fgas/src/crt/fx_utils.cpp +++ b/xfa/src/fgas/src/crt/fx_utils.cpp @@ -7,8 +7,8 @@ #include <algorithm> #include "xfa/src/fgas/include/fx_utl.h" -#include "xfa/src/fgas/src/fgas_base.h" #include "xfa/src/fgas/src/crt/fx_utils.h" +#include "xfa/src/fgas/src/fgas_base.h" class FX_BASEARRAYDATA : public CFX_Target { public: diff --git a/xfa/src/fgas/src/fgas_base.h b/xfa/src/fgas/src/fgas_base.h index 32ef9aff1f..055f059a49 100644 --- a/xfa/src/fgas/src/fgas_base.h +++ b/xfa/src/fgas/src/fgas_base.h @@ -9,8 +9,8 @@ #ifndef XFA_SRC_FGAS_SRC_FGAS_BASE_H_ #define XFA_SRC_FGAS_SRC_FGAS_BASE_H_ -#include "xfa/src/foxitlib.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 079814f5b3..a81a2a4a99 100644 --- a/xfa/src/fgas/src/font/fx_gefont.cpp +++ b/xfa/src/fgas/src/font/fx_gefont.cpp @@ -5,8 +5,8 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "xfa/src/fgas/src/fgas_base.h" -#include "xfa/src/fgas/src/font/fx_gefont.h" #include "xfa/src/fgas/src/font/fx_fontutils.h" +#include "xfa/src/fgas/src/font/fx_gefont.h" #ifndef _FXPLUS IFX_Font* IFX_Font::LoadFont(const FX_WCHAR* pszFontFamily, FX_DWORD dwFontStyles, diff --git a/xfa/src/fgas/src/layout/fx_rtfbreak.cpp b/xfa/src/fgas/src/layout/fx_rtfbreak.cpp index 8b28395119..7f566979ed 100644 --- a/xfa/src/fgas/src/layout/fx_rtfbreak.cpp +++ b/xfa/src/fgas/src/layout/fx_rtfbreak.cpp @@ -8,8 +8,8 @@ #include "xfa/src/fgas/include/fx_lbk.h" #include "xfa/src/fgas/src/fgas_base.h" -#include "xfa/src/fgas/src/layout/fx_unicode.h" #include "xfa/src/fgas/src/layout/fx_rtfbreak.h" +#include "xfa/src/fgas/src/layout/fx_unicode.h" IFX_RTFBreak* IFX_RTFBreak::Create(FX_DWORD dwPolicies) { return new CFX_RTFBreak(dwPolicies); diff --git a/xfa/src/fgas/src/layout/fx_rtfbreak.h b/xfa/src/fgas/src/layout/fx_rtfbreak.h index 895661149d..673eb628b5 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/src/layout/fx_unicode.h" class CFX_RTFLine; class CFX_RTFBreak; diff --git a/xfa/src/fgas/src/layout/fx_textbreak.cpp b/xfa/src/fgas/src/layout/fx_textbreak.cpp index d36b477f3c..20089c966f 100644 --- a/xfa/src/fgas/src/layout/fx_textbreak.cpp +++ b/xfa/src/fgas/src/layout/fx_textbreak.cpp @@ -9,8 +9,8 @@ #include "core/include/fxcrt/fx_arb.h" #include "xfa/src/fgas/include/fx_lbk.h" #include "xfa/src/fgas/src/fgas_base.h" -#include "xfa/src/fgas/src/layout/fx_unicode.h" #include "xfa/src/fgas/src/layout/fx_textbreak.h" +#include "xfa/src/fgas/src/layout/fx_unicode.h" extern const FX_LINEBREAKTYPE gs_FX_LineBreak_PairTable[64][32]; IFX_TxtBreak* IFX_TxtBreak::Create(FX_DWORD dwPolicies) { diff --git a/xfa/src/fgas/src/layout/fx_textbreak.h b/xfa/src/fgas/src/layout/fx_textbreak.h index e9164fdade..9e32f8da2e 100644 --- a/xfa/src/fgas/src/layout/fx_textbreak.h +++ b/xfa/src/fgas/src/layout/fx_textbreak.h @@ -8,6 +8,7 @@ #define XFA_SRC_FGAS_SRC_LAYOUT_FX_TEXTBREAK_H_ #include "core/include/fxcrt/fx_memory.h" +#include "xfa/src/fgas/src/layout/fx_unicode.h" class IFX_ArabicChar; class CFX_Txtbreak; diff --git a/xfa/src/fgas/src/localization/fx_datetime.cpp b/xfa/src/fgas/src/localization/fx_datetime.cpp index 76b7eb14d6..1d4a73672c 100644 --- a/xfa/src/fgas/src/localization/fx_datetime.cpp +++ b/xfa/src/fgas/src/localization/fx_datetime.cpp @@ -4,7 +4,14 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com +#if _FX_OS_ == _FX_LINUX_DESKTOP_ || _FX_OS_ == _FX_ANDROID_ || \ + _FX_OS_ == _FX_MACOSX_ || _FX_OS_ == _FX_IOS_ +#include <sys/time.h> +#include <time.h> +#endif + #include "xfa/src/fgas/src/fgas_base.h" + const uint8_t g_FXDaysPerMonth[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; const uint8_t g_FXDaysPerLeapMonth[12] = {31, 29, 31, 30, 31, 30, @@ -122,11 +129,7 @@ static void FX_DaysToDate(int64_t iDays, } iDay += (uint8_t)iDays; } -#if _FX_OS_ == _FX_LINUX_DESKTOP_ || _FX_OS_ == _FX_ANDROID_ || \ - _FX_OS_ == _FX_MACOSX_ || _FX_OS_ == _FX_IOS_ -#include <time.h> -#include <sys/time.h> -#endif + typedef struct _FXUT_SYSTEMTIME { FX_WORD wYear; FX_WORD wMonth; |