summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-06-04 18:53:39 -0700
committerTom Sepez <tsepez@chromium.org>2015-06-04 18:53:39 -0700
commit738ca226d4093e9e422b48e9bb460bb65076f973 (patch)
tree0700ab152ccb6c71e4135b748b22e2157a176301 /core
parent80b597d3f32ef2509627c7561abb84a6f5ac09bf (diff)
downloadpdfium-738ca226d4093e9e422b48e9bb460bb65076f973.tar.xz
Move fx_safe_types.h to include/ directory.
Small bit of OCD here, since this file is included cross-library (i.e. from fpdfsk), it can't be in src/. In other words, the following should be empty: grep -R 'include.*core/src/' fpdfsdk Fix some IWYU in it at the same time. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1147353006
Diffstat (limited to 'core')
-rw-r--r--core/include/fxcrt/fx_safe_types.h (renamed from core/src/fxcrt/fx_safe_types.h)8
-rw-r--r--core/src/fdrm/crypto/fx_crypt.cpp4
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp4
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp9
-rw-r--r--core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp9
-rw-r--r--core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp8
-rw-r--r--core/src/fpdfdoc/doc_link.cpp2
-rw-r--r--core/src/fxcodec/codec/fx_codec_jpeg.cpp3
-rw-r--r--core/src/fxcodec/jbig2/JBig2_Image.cpp3
-rw-r--r--core/src/fxcrt/extension.h2
10 files changed, 29 insertions, 23 deletions
diff --git a/core/src/fxcrt/fx_safe_types.h b/core/include/fxcrt/fx_safe_types.h
index 35a906cf27..e45e6d3c8d 100644
--- a/core/src/fxcrt/fx_safe_types.h
+++ b/core/include/fxcrt/fx_safe_types.h
@@ -2,16 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CORE_SRC_FXCRT_FX_SAFE_TYPES_H_
-#define CORE_SRC_FXCRT_FX_SAFE_TYPES_H_
+#ifndef CORE_INCLUDE_FXCRT_FX_SAFE_TYPES_H_
+#define CORE_INCLUDE_FXCRT_FX_SAFE_TYPES_H_
#include <stdlib.h> // For size_t.
#include "../../../third_party/base/numerics/safe_math.h"
+#include "fx_stream.h" // for FX_FILESIZE.
+#include "fx_system.h"
typedef pdfium::base::CheckedNumeric<FX_DWORD> FX_SAFE_DWORD;
typedef pdfium::base::CheckedNumeric<FX_INT32> FX_SAFE_INT32;
typedef pdfium::base::CheckedNumeric<size_t> FX_SAFE_SIZE_T;
typedef pdfium::base::CheckedNumeric<FX_FILESIZE> FX_SAFE_FILESIZE;
-#endif // CORE_SRC_FXCRT_FX_SAFE_TYPES_H_
+#endif // CORE_INCLUDE_FXCRT_FX_SAFE_TYPES_H_
diff --git a/core/src/fdrm/crypto/fx_crypt.cpp b/core/src/fdrm/crypto/fx_crypt.cpp
index 1fbba993d2..e67e5d7aab 100644
--- a/core/src/fdrm/crypto/fx_crypt.cpp
+++ b/core/src/fdrm/crypto/fx_crypt.cpp
@@ -4,9 +4,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../../../include/fxcrt/fx_basic.h"
#include "../../../include/fdrm/fx_crypt.h"
-#include "../../../src/fxcrt/fx_safe_types.h"
+#include "../../../include/fxcrt/fx_basic.h"
+#include "../../../include/fxcrt/fx_safe_types.h"
#ifdef __cplusplus
extern "C" {
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp
index 924c88e421..d29dee77d8 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp
@@ -6,9 +6,9 @@
#include <limits.h>
-#include "../../../include/fpdfapi/fpdf_page.h"
#include "../../../include/fpdfapi/fpdf_module.h"
-#include "../../../src/fxcrt/fx_safe_types.h"
+#include "../../../include/fpdfapi/fpdf_page.h"
+#include "../../../include/fxcrt/fx_safe_types.h"
#include "../../../third_party/base/numerics/safe_conversions_impl.h"
#include "pageint.h"
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
index 0d4ed27c06..09d1d3ed4d 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
@@ -4,13 +4,14 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../../../include/fpdfapi/fpdf_parser.h"
+#include <utility>
+#include <vector>
+
#include "../../../include/fpdfapi/fpdf_module.h"
#include "../../../include/fpdfapi/fpdf_page.h"
-#include "../../../src/fxcrt/fx_safe_types.h"
+#include "../../../include/fpdfapi/fpdf_parser.h"
+#include "../../../include/fxcrt/fx_safe_types.h"
#include "../fpdf_page/pageint.h"
-#include <utility>
-#include <vector>
FX_BOOL IsSignatureDict(const CPDF_Dictionary* pDict)
{
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp
index 9a11fa8798..214e4314da 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp
@@ -4,14 +4,15 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../../../include/fxge/fx_ge.h"
-#include "../../../include/fxcodec/fx_codec.h"
#include "../../../include/fpdfapi/fpdf_module.h"
-#include "../../../include/fpdfapi/fpdf_render.h"
#include "../../../include/fpdfapi/fpdf_pageobj.h"
-#include "../../fxcrt/fx_safe_types.h"
+#include "../../../include/fpdfapi/fpdf_render.h"
+#include "../../../include/fxcodec/fx_codec.h"
+#include "../../../include/fxcrt/fx_safe_types.h"
+#include "../../../include/fxge/fx_ge.h"
#include "../fpdf_page/pageint.h"
#include "render_int.h"
+
FX_BOOL CPDF_RenderStatus::ProcessImage(CPDF_ImageObject* pImageObj, const CFX_AffineMatrix* pObj2Device)
{
CPDF_ImageRenderer render;
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
index b45d9c3e5d..3fabdf9f4f 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
@@ -4,12 +4,12 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../../../include/fxge/fx_ge.h"
-#include "../../../include/fxcodec/fx_codec.h"
#include "../../../include/fpdfapi/fpdf_module.h"
-#include "../../../include/fpdfapi/fpdf_render.h"
#include "../../../include/fpdfapi/fpdf_pageobj.h"
-#include "../../../src/fxcrt/fx_safe_types.h"
+#include "../../../include/fpdfapi/fpdf_render.h"
+#include "../../../include/fxcodec/fx_codec.h"
+#include "../../../include/fxcrt/fx_safe_types.h"
+#include "../../../include/fxge/fx_ge.h"
#include "../fpdf_page/pageint.h"
#include "render_int.h"
diff --git a/core/src/fpdfdoc/doc_link.cpp b/core/src/fpdfdoc/doc_link.cpp
index 9a08d1583e..1957960d0f 100644
--- a/core/src/fpdfdoc/doc_link.cpp
+++ b/core/src/fpdfdoc/doc_link.cpp
@@ -5,7 +5,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "../../include/fpdfdoc/fpdf_doc.h"
-#include "../../src/fxcrt/fx_safe_types.h"
+#include "../../include/fxcrt/fx_safe_types.h"
CPDF_LinkList::~CPDF_LinkList()
{
diff --git a/core/src/fxcodec/codec/fx_codec_jpeg.cpp b/core/src/fxcodec/codec/fx_codec_jpeg.cpp
index 3ef187e8fb..b80facfad6 100644
--- a/core/src/fxcodec/codec/fx_codec_jpeg.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jpeg.cpp
@@ -5,9 +5,10 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "../../../include/fxcodec/fx_codec.h"
+#include "../../../include/fxcrt/fx_safe_types.h"
#include "../../../include/fxge/fx_dib.h"
-#include "../../../src/fxcrt/fx_safe_types.h"
#include "codec_int.h"
+
extern "C" {
static void _JpegScanSOI(const FX_BYTE*& src_buf, FX_DWORD& src_size)
{
diff --git a/core/src/fxcodec/jbig2/JBig2_Image.cpp b/core/src/fxcodec/jbig2/JBig2_Image.cpp
index 8e27bca80c..f2cea597c1 100644
--- a/core/src/fxcodec/jbig2/JBig2_Image.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_Image.cpp
@@ -5,9 +5,10 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include <limits.h>
+
#include "../../../include/fxcrt/fx_basic.h"
#include "../../../include/fxcrt/fx_coordinates.h"
-#include "../../../src/fxcrt/fx_safe_types.h"
+#include "../../../include/fxcrt/fx_safe_types.h"
#include "JBig2_Image.h"
CJBig2_Image::CJBig2_Image(FX_INT32 w, FX_INT32 h)
diff --git a/core/src/fxcrt/extension.h b/core/src/fxcrt/extension.h
index e678cbbe2b..a59f81e08f 100644
--- a/core/src/fxcrt/extension.h
+++ b/core/src/fxcrt/extension.h
@@ -7,7 +7,7 @@
#ifndef CORE_SRC_FXCRT_EXTENSION_H_
#define CORE_SRC_FXCRT_EXTENSION_H_
-#include "fx_safe_types.h"
+#include "../../include/fxcrt/fx_safe_types.h"
class IFXCRT_FileAccess
{