diff options
Diffstat (limited to 'xfa/src/fgas/src')
24 files changed, 39 insertions, 108 deletions
diff --git a/xfa/src/fgas/src/crt/fx_algorithm.cpp b/xfa/src/fgas/src/crt/fx_algorithm.cpp index eb58cdc8ae..dc848458cf 100644 --- a/xfa/src/fgas/src/crt/fx_algorithm.cpp +++ b/xfa/src/fgas/src/crt/fx_algorithm.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../fgas_base.h"
+#include "xfa/src/fgas/src/fgas_base.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/xfa/src/fgas/src/crt/fx_codepage.cpp b/xfa/src/fgas/src/crt/fx_codepage.cpp index 7154b9ce8d..9348d33065 100644 --- a/xfa/src/fgas/src/crt/fx_codepage.cpp +++ b/xfa/src/fgas/src/crt/fx_codepage.cpp @@ -4,8 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../fgas_base.h"
-#include "fx_codepage.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_codepage.h b/xfa/src/fgas/src/crt/fx_codepage.h deleted file mode 100644 index 031f4642cb..0000000000 --- a/xfa/src/fgas/src/crt/fx_codepage.h +++ /dev/null @@ -1,9 +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
-
-#ifndef _FX_CODEPAGE_IMP
-#define _FX_CODEPAGE_IMP
-#endif
diff --git a/xfa/src/fgas/src/crt/fx_cpmgr.cpp b/xfa/src/fgas/src/crt/fx_cpmgr.cpp deleted file mode 100644 index 4803513180..0000000000 --- a/xfa/src/fgas/src/crt/fx_cpmgr.cpp +++ /dev/null @@ -1,63 +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
-
-#include "../fgas_base.h"
-#include "fx_codepage.h"
-#ifdef _FXCP
-#ifdef __cplusplus
-extern "C" {
-#endif
-extern const FX_CODEPAGE_HEADER g_CP936_MapHeader;
-extern const FX_CODEPAGE_HEADER g_CP932_MapHeader;
-extern const FX_CODEPAGE_HEADER g_CP949_MapHeader;
-extern const FX_CODEPAGE_HEADER g_CP950_MapHeader;
-extern const FX_CODEPAGE_HEADER g_CP874_MapHeader;
-extern const FX_CODEPAGE_HEADER g_CP1250_MapHeader;
-extern const FX_CODEPAGE_HEADER g_CP1251_MapHeader;
-extern const FX_CODEPAGE_HEADER g_CP1252_MapHeader;
-extern const FX_CODEPAGE_HEADER g_CP1253_MapHeader;
-extern const FX_CODEPAGE_HEADER g_CP1254_MapHeader;
-extern const FX_CODEPAGE_HEADER g_CP1255_MapHeader;
-extern const FX_CODEPAGE_HEADER g_CP1256_MapHeader;
-extern const FX_CODEPAGE_HEADER g_CP1257_MapHeader;
-extern const FX_CODEPAGE_HEADER g_CP1258_MapHeader;
-extern const FX_CPCU_MAPINFO g_CP936_CUMap;
-extern const FX_CPCU_MAPINFO g_CP932_CUMap;
-extern const FX_CPCU_MAPINFO g_CP949_CUMap;
-extern const FX_CPCU_MAPINFO g_CP950_CUMap;
-extern const FX_CPCU_MAPINFO g_CP874_CUMap;
-extern const FX_CPCU_MAPINFO g_CP1250_CUMap;
-extern const FX_CPCU_MAPINFO g_CP1251_CUMap;
-extern const FX_CPCU_MAPINFO g_CP1252_CUMap;
-extern const FX_CPCU_MAPINFO g_CP1253_CUMap;
-extern const FX_CPCU_MAPINFO g_CP1254_CUMap;
-extern const FX_CPCU_MAPINFO g_CP1255_CUMap;
-extern const FX_CPCU_MAPINFO g_CP1256_CUMap;
-extern const FX_CPCU_MAPINFO g_CP1257_CUMap;
-extern const FX_CPCU_MAPINFO g_CP1258_CUMap;
-FX_LPCCODEPAGE FX_GetCodePage(FX_WORD wCodePage) {
- int32_t iEnd = sizeof(g_FXCodePageMgr) / sizeof(FX_CODEPAGE) - 1;
- FXSYS_assert(iEnd >= 0);
- int32_t iStart = 0, iMid;
- uint16_t uCPID;
- do {
- iMid = (iStart + iEnd) / 2;
- const FX_CODEPAGE& cp = g_FXCodePageMgr[iMid];
- uCPID = cp.pCPHeader->uCPID;
- if (wCodePage == uCPID) {
- return g_FXCodePageMgr + iMid;
- } else if (wCodePage < uCPID) {
- iEnd = iMid - 1;
- } else {
- iStart = iMid + 1;
- }
- } while (iStart <= iEnd);
- return NULL;
-}
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/xfa/src/fgas/src/crt/fx_encode.cpp b/xfa/src/fgas/src/crt/fx_encode.cpp index f563961a9a..f2c5acb1c1 100644 --- a/xfa/src/fgas/src/crt/fx_encode.cpp +++ b/xfa/src/fgas/src/crt/fx_encode.cpp @@ -4,8 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../fgas_base.h"
-#include "fx_codepage.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_memory.cpp b/xfa/src/fgas/src/crt/fx_memory.cpp index ae387b2ee0..a450119caf 100644 --- a/xfa/src/fgas/src/crt/fx_memory.cpp +++ b/xfa/src/fgas/src/crt/fx_memory.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../fgas_base.h"
+#include "xfa/src/fgas/src/fgas_base.h"
#include "fx_memory.h"
#define FX_4BYTEALIGN(size) (((size) + 3) / 4 * 4)
IFX_MEMAllocator* FX_CreateAllocator(FX_ALLOCTYPE eType,
diff --git a/xfa/src/fgas/src/crt/fx_stream.cpp b/xfa/src/fgas/src/crt/fx_stream.cpp index 57bf13fa29..9bb59782c2 100644 --- a/xfa/src/fgas/src/crt/fx_stream.cpp +++ b/xfa/src/fgas/src/crt/fx_stream.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../fgas_base.h"
+#include "xfa/src/fgas/src/fgas_base.h"
#include "fx_stream.h"
IFX_Stream* IFX_Stream::CreateStream(IFX_BufferRead* pBufferRead,
FX_DWORD dwAccess,
diff --git a/xfa/src/fgas/src/crt/fx_system.cpp b/xfa/src/fgas/src/crt/fx_system.cpp index c965ab2b54..0de8e0eb5b 100644 --- a/xfa/src/fgas/src/crt/fx_system.cpp +++ b/xfa/src/fgas/src/crt/fx_system.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../fgas_base.h"
+#include "xfa/src/fgas/src/fgas_base.h"
#if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN32_MOBILE_ || \
_FX_OS_ == _FX_WIN64_
#include <io.h>
diff --git a/xfa/src/fgas/src/crt/fx_utils.cpp b/xfa/src/fgas/src/crt/fx_utils.cpp index 4d27e5bf19..9d89e240f4 100644 --- a/xfa/src/fgas/src/crt/fx_utils.cpp +++ b/xfa/src/fgas/src/crt/fx_utils.cpp @@ -4,8 +4,8 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../../include/fx_utl.h"
-#include "../fgas_base.h"
+#include "xfa/src/fgas/include/fx_utl.h"
+#include "xfa/src/fgas/src/fgas_base.h"
#include "fx_utils.h"
CFX_ThreadLock::CFX_ThreadLock() {
diff --git a/xfa/src/fgas/src/fgas_base.h b/xfa/src/fgas/src/fgas_base.h index d860ec3c9b..eea3b6cac4 100644 --- a/xfa/src/fgas/src/fgas_base.h +++ b/xfa/src/fgas/src/fgas_base.h @@ -4,9 +4,11 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+// TODO(thestig): Remove this file and do IWYU.
+
#ifndef _FXMATH_BASE_
#define _FXMATH_BASE_
-#include "../../foxitlib.h"
-#include "../../../../core/include/fxge/fx_freetype.h"
-#include "../include/fgas.h"
+#include "xfa/src/foxitlib.h"
+#include "core/include/fxge/fx_freetype.h"
+#include "xfa/src/fgas/include/fgas.h"
#endif
diff --git a/xfa/src/fgas/src/font/fx_fontutils.cpp b/xfa/src/fgas/src/font/fx_fontutils.cpp index 53532f7e4a..a57e059f72 100644 --- a/xfa/src/fgas/src/font/fx_fontutils.cpp +++ b/xfa/src/fgas/src/font/fx_fontutils.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../fgas_base.h"
+#include "xfa/src/fgas/src/fgas_base.h"
#include "fx_fontutils.h"
FX_DWORD FGAS_GetFontHashCode(FX_WORD wCodePage, FX_DWORD dwFontStyles) {
FX_DWORD dwHash = wCodePage;
diff --git a/xfa/src/fgas/src/font/fx_gdifont.cpp b/xfa/src/fgas/src/font/fx_gdifont.cpp index 6840c5bddf..aa923b6a21 100644 --- a/xfa/src/fgas/src/font/fx_gdifont.cpp +++ b/xfa/src/fgas/src/font/fx_gdifont.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../fgas_base.h"
+#include "xfa/src/fgas/src/fgas_base.h"
#include "fx_gdifont.h"
#include "fx_stdfontmgr.h"
#ifdef _FXPLUS
diff --git a/xfa/src/fgas/src/font/fx_gefont.cpp b/xfa/src/fgas/src/font/fx_gefont.cpp index e3f04796de..f76444f68f 100644 --- a/xfa/src/fgas/src/font/fx_gefont.cpp +++ b/xfa/src/fgas/src/font/fx_gefont.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../fgas_base.h"
+#include "xfa/src/fgas/src/fgas_base.h"
#include "fx_gefont.h"
#include "fx_fontutils.h"
#ifndef _FXPLUS
diff --git a/xfa/src/fgas/src/font/fx_stdfontmgr.cpp b/xfa/src/fgas/src/font/fx_stdfontmgr.cpp index 807213394b..6201022323 100644 --- a/xfa/src/fgas/src/font/fx_stdfontmgr.cpp +++ b/xfa/src/fgas/src/font/fx_stdfontmgr.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../fgas_base.h"
+#include "xfa/src/fgas/src/fgas_base.h"
#include "fx_stdfontmgr.h"
#include "fx_fontutils.h"
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
diff --git a/xfa/src/fgas/src/layout/fx_linebreak.cpp b/xfa/src/fgas/src/layout/fx_linebreak.cpp index 76fc222195..2757904250 100644 --- a/xfa/src/fgas/src/layout/fx_linebreak.cpp +++ b/xfa/src/fgas/src/layout/fx_linebreak.cpp @@ -4,9 +4,9 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../fgas_base.h"
+#include "xfa/src/fgas/src/fgas_base.h"
-extern const FX_LINEBREAKTYPE gs_FX_LineBreak_PairTable[64][32] = {
+const FX_LINEBREAKTYPE gs_FX_LineBreak_PairTable[64][32] = {
{FX_LBPB, FX_LBPB, FX_LBPB, FX_LBPB, FX_LBPB, FX_LBPB, FX_LBPB, FX_LBPB,
FX_LBPB, FX_LBPB, FX_LBPB, FX_LBPB, FX_LBPB, FX_LBPB, FX_LBPB, FX_LBPB,
FX_LBPB, FX_LBPB, FX_LBPB, FX_LBCP, FX_LBPB, FX_LBPB, FX_LBPB, FX_LBPB,
@@ -264,6 +264,7 @@ extern const FX_LINEBREAKTYPE gs_FX_LineBreak_PairTable[64][32] = { FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN,
FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN, FX_LBUN},
};
+
void FX_GetLineBreakPositions(const FX_WCHAR* pwsText,
FX_LINEBREAKTYPE* pBrkType,
int32_t iLength) {
diff --git a/xfa/src/fgas/src/layout/fx_rtfbreak.cpp b/xfa/src/fgas/src/layout/fx_rtfbreak.cpp index 15fa5c3b53..8683bcfdb6 100644 --- a/xfa/src/fgas/src/layout/fx_rtfbreak.cpp +++ b/xfa/src/fgas/src/layout/fx_rtfbreak.cpp @@ -4,10 +4,11 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../fgas_base.h"
-#include "fx_unicode.h"
-#include "fx_rtfbreak.h"
-extern const FX_LINEBREAKTYPE gs_FX_LineBreak_PairTable[64][32];
+#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"
+
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 3d1a029e1e..e54e3dbbe2 100644 --- a/xfa/src/fgas/src/layout/fx_rtfbreak.h +++ b/xfa/src/fgas/src/layout/fx_rtfbreak.h @@ -7,7 +7,7 @@ #ifndef _FX_RTFBREAK_IMP
#define _FX_RTFBREAK_IMP
-#include "../../../../../core/include/fxcrt/fx_arb.h"
+#include "core/include/fxcrt/fx_arb.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 461ac03d47..754e10d863 100644 --- a/xfa/src/fgas/src/layout/fx_textbreak.cpp +++ b/xfa/src/fgas/src/layout/fx_textbreak.cpp @@ -4,10 +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"
+#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"
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 7c8d0d39e2..68deed58d6 100644 --- a/xfa/src/fgas/src/layout/fx_textbreak.h +++ b/xfa/src/fgas/src/layout/fx_textbreak.h @@ -7,7 +7,7 @@ #ifndef _FX_TEXTBREAK_IMP
#define _FX_TEXTBREAK_IMP
-#include "../../../../../core/include/fxcrt/fx_memory.h"
+#include "core/include/fxcrt/fx_memory.h"
class IFX_ArabicChar;
class CFX_Txtbreak;
diff --git a/xfa/src/fgas/src/layout/fx_unicode.cpp b/xfa/src/fgas/src/layout/fx_unicode.cpp index 09beb44063..ff98760826 100644 --- a/xfa/src/fgas/src/layout/fx_unicode.cpp +++ b/xfa/src/fgas/src/layout/fx_unicode.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../fgas_base.h"
+#include "xfa/src/fgas/src/fgas_base.h"
#include "fx_unicode.h"
void FX_TEXTLAYOUT_PieceSort(CFX_TPOArray& tpos, int32_t iStart, int32_t iEnd) {
FXSYS_assert(iStart > -1 && iStart < tpos.GetSize());
diff --git a/xfa/src/fgas/src/localization/fx_datetime.cpp b/xfa/src/fgas/src/localization/fx_datetime.cpp index 646bdd6929..e8dc8dcbc0 100644 --- a/xfa/src/fgas/src/localization/fx_datetime.cpp +++ b/xfa/src/fgas/src/localization/fx_datetime.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../fgas_base.h"
+#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,
diff --git a/xfa/src/fgas/src/localization/fx_locale.cpp b/xfa/src/fgas/src/localization/fx_locale.cpp index c97156999a..d9424c39fc 100644 --- a/xfa/src/fgas/src/localization/fx_locale.cpp +++ b/xfa/src/fgas/src/localization/fx_locale.cpp @@ -4,8 +4,8 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../../../../../core/include/fxcrt/fx_xml.h"
-#include "../fgas_base.h"
+#include "core/include/fxcrt/fx_xml.h"
+#include "xfa/src/fgas/src/fgas_base.h"
#include "fx_localeimp.h"
#define FX_LOCALECATEGORY_DateHash 0xbde9abde
diff --git a/xfa/src/fgas/src/localization/fx_localemgr.cpp b/xfa/src/fgas/src/localization/fx_localemgr.cpp index d236630d6b..cea681bf56 100644 --- a/xfa/src/fgas/src/localization/fx_localemgr.cpp +++ b/xfa/src/fgas/src/localization/fx_localemgr.cpp @@ -4,8 +4,8 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../../../../../core/include/fxcrt/fx_xml.h"
-#include "../fgas_base.h"
+#include "core/include/fxcrt/fx_xml.h"
+#include "xfa/src/fgas/src/fgas_base.h"
#include "fx_localemgr.h"
IFX_LocaleMgr* FX_LocaleMgr_Create(const FX_WCHAR* pszLocalPath,
diff --git a/xfa/src/fgas/src/xml/fx_sax_imp.cpp b/xfa/src/fgas/src/xml/fx_sax_imp.cpp index 6ffa206f35..dce96470a6 100644 --- a/xfa/src/fgas/src/xml/fx_sax_imp.cpp +++ b/xfa/src/fgas/src/xml/fx_sax_imp.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../fgas_base.h"
+#include "xfa/src/fgas/src/fgas_base.h"
#include "fx_sax_imp.h"
IFX_SAXReader* FX_SAXReader_Create() {
return new CFX_SAXReader;
|