summaryrefslogtreecommitdiff
path: root/core/fxcrt
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt')
-rw-r--r--core/fxcrt/cfx_bytestring.h1
-rw-r--r--core/fxcrt/cfx_checksumcontext.cpp1
-rw-r--r--core/fxcrt/cfx_retain_ptr.h9
-rw-r--r--core/fxcrt/css/cfx_csscomputedstyle.h1
-rw-r--r--core/fxcrt/css/cfx_cssrulecollection.h2
-rw-r--r--core/fxcrt/css/cfx_cssstyleselector.h1
-rw-r--r--core/fxcrt/fx_arabic.cpp1
-rw-r--r--core/fxcrt/fx_basic.h27
-rw-r--r--core/fxcrt/fx_basic_utf.cpp4
-rw-r--r--core/fxcrt/fx_basic_util.cpp2
-rw-r--r--core/fxcrt/fx_basic_util_unittest.cpp2
-rw-r--r--core/fxcrt/fx_coordinates.h3
-rw-r--r--core/fxcrt/fx_extension.h8
-rw-r--r--core/fxcrt/fx_memory.h6
-rw-r--r--core/fxcrt/fx_ucd.h1
-rw-r--r--core/fxcrt/fx_ucddata.cpp2
-rw-r--r--core/fxcrt/fxcrt_posix.cpp1
-rw-r--r--core/fxcrt/ifxcrt_fileaccess.h3
-rw-r--r--core/fxcrt/xml/cfx_saxcontext.h1
-rw-r--r--core/fxcrt/xml/cfx_saxreader.cpp1
-rw-r--r--core/fxcrt/xml/cfx_saxreader.h4
-rw-r--r--core/fxcrt/xml/cfx_xmlparser.cpp1
-rw-r--r--core/fxcrt/xml/cxml_element.h1
-rw-r--r--core/fxcrt/xml/cxml_object.h2
24 files changed, 31 insertions, 54 deletions
diff --git a/core/fxcrt/cfx_bytestring.h b/core/fxcrt/cfx_bytestring.h
index a8a28169a5..390a4b3b70 100644
--- a/core/fxcrt/cfx_bytestring.h
+++ b/core/fxcrt/cfx_bytestring.h
@@ -14,7 +14,6 @@
#include "core/fxcrt/cfx_retain_ptr.h"
#include "core/fxcrt/cfx_string_c_template.h"
#include "core/fxcrt/cfx_string_data_template.h"
-#include "core/fxcrt/fx_memory.h"
#include "core/fxcrt/fx_system.h"
#include "third_party/base/optional.h"
diff --git a/core/fxcrt/cfx_checksumcontext.cpp b/core/fxcrt/cfx_checksumcontext.cpp
index eb20db69ec..31140169b4 100644
--- a/core/fxcrt/cfx_checksumcontext.cpp
+++ b/core/fxcrt/cfx_checksumcontext.cpp
@@ -7,6 +7,7 @@
#include "core/fxcrt/cfx_checksumcontext.h"
#include "core/fdrm/crypto/fx_crypt.h"
+#include "core/fxcrt/fx_stream.h"
#include "core/fxcrt/xml/cfx_saxreaderhandler.h"
#include "third_party/base/ptr_util.h"
diff --git a/core/fxcrt/cfx_retain_ptr.h b/core/fxcrt/cfx_retain_ptr.h
index 32a77c5a6c..d3896ba6ae 100644
--- a/core/fxcrt/cfx_retain_ptr.h
+++ b/core/fxcrt/cfx_retain_ptr.h
@@ -9,7 +9,13 @@
#include <memory>
#include <utility>
-#include "core/fxcrt/fx_memory.h"
+#include "core/fxcrt/fx_system.h"
+
+// Used with std::unique_ptr to Release() objects that can't be deleted.
+template <class T>
+struct ReleaseDeleter {
+ inline void operator()(T* ptr) const { ptr->Release(); }
+};
// Analogous to base's scoped_refptr.
template <class T>
@@ -25,6 +31,7 @@ class CFX_RetainPtr {
CFX_RetainPtr(CFX_RetainPtr&& that) noexcept { Swap(that); }
// Deliberately implicit to allow returning nullptrs.
+ // NOLINTNEXTLINE(runtime/explicit)
CFX_RetainPtr(std::nullptr_t ptr) {}
template <class U>
diff --git a/core/fxcrt/css/cfx_csscomputedstyle.h b/core/fxcrt/css/cfx_csscomputedstyle.h
index bd7cd8268b..bb4b62bc2b 100644
--- a/core/fxcrt/css/cfx_csscomputedstyle.h
+++ b/core/fxcrt/css/cfx_csscomputedstyle.h
@@ -11,7 +11,6 @@
#include "core/fxcrt/css/cfx_css.h"
#include "core/fxcrt/css/cfx_csscustomproperty.h"
-#include "core/fxcrt/fx_basic.h"
#include "core/fxcrt/fx_string.h"
class CFX_CSSValueList;
diff --git a/core/fxcrt/css/cfx_cssrulecollection.h b/core/fxcrt/css/cfx_cssrulecollection.h
index 6a509d49e7..6b91c6bcd5 100644
--- a/core/fxcrt/css/cfx_cssrulecollection.h
+++ b/core/fxcrt/css/cfx_cssrulecollection.h
@@ -11,7 +11,7 @@
#include <memory>
#include <vector>
-#include "core/fxcrt/fx_basic.h"
+#include "core/fxcrt/fx_string.h"
class CFX_CSSDeclaration;
class CFX_CSSSelector;
diff --git a/core/fxcrt/css/cfx_cssstyleselector.h b/core/fxcrt/css/cfx_cssstyleselector.h
index 56d933b614..143e51ee68 100644
--- a/core/fxcrt/css/cfx_cssstyleselector.h
+++ b/core/fxcrt/css/cfx_cssstyleselector.h
@@ -12,7 +12,6 @@
#include "core/fxcrt/css/cfx_css.h"
#include "core/fxcrt/css/cfx_cssrulecollection.h"
-#include "core/fxcrt/fx_basic.h"
#include "core/fxcrt/fx_system.h"
class CFX_CSSComputedStyle;
diff --git a/core/fxcrt/fx_arabic.cpp b/core/fxcrt/fx_arabic.cpp
index fecfc3f759..a4a65e2cad 100644
--- a/core/fxcrt/fx_arabic.cpp
+++ b/core/fxcrt/fx_arabic.cpp
@@ -9,6 +9,7 @@
#include <algorithm>
#include <vector>
+#include "core/fxcrt/fx_extension.h"
#include "core/fxcrt/fx_ucd.h"
#include "third_party/base/stl_util.h"
diff --git a/core/fxcrt/fx_basic.h b/core/fxcrt/fx_basic.h
deleted file mode 100644
index c60f0d367b..0000000000
--- a/core/fxcrt/fx_basic.h
+++ /dev/null
@@ -1,27 +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 CORE_FXCRT_FX_BASIC_H_
-#define CORE_FXCRT_FX_BASIC_H_
-
-#include <algorithm>
-#include <memory>
-#include <vector>
-
-#include "core/fxcrt/cfx_binarybuf.h"
-#include "core/fxcrt/cfx_retain_ptr.h"
-#include "core/fxcrt/fx_memory.h"
-#include "core/fxcrt/fx_stream.h"
-#include "core/fxcrt/fx_string.h"
-#include "core/fxcrt/fx_system.h"
-
-#ifdef PDF_ENABLE_XFA
-#define FX_IsOdd(a) ((a)&1)
-#endif // PDF_ENABLE_XFA
-
-uint32_t GetBits32(const uint8_t* pData, int bitpos, int nbits);
-
-#endif // CORE_FXCRT_FX_BASIC_H_
diff --git a/core/fxcrt/fx_basic_utf.cpp b/core/fxcrt/fx_basic_utf.cpp
index 8a5587d5c4..e0b87479f2 100644
--- a/core/fxcrt/fx_basic_utf.cpp
+++ b/core/fxcrt/fx_basic_utf.cpp
@@ -4,10 +4,10 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "core/fxcrt/fx_basic.h"
-
#include <vector>
+#include "core/fxcrt/fx_string.h"
+
namespace {
class CFX_UTF8Encoder {
diff --git a/core/fxcrt/fx_basic_util.cpp b/core/fxcrt/fx_basic_util.cpp
index 6f59f32fff..2a9ce05e4b 100644
--- a/core/fxcrt/fx_basic_util.cpp
+++ b/core/fxcrt/fx_basic_util.cpp
@@ -9,8 +9,8 @@
#include <limits>
#include <memory>
-#include "core/fxcrt/fx_basic.h"
#include "core/fxcrt/fx_extension.h"
+#include "core/fxcrt/fx_stream.h"
#include "third_party/base/ptr_util.h"
bool FX_atonum(const CFX_ByteStringC& strc, void* pData) {
diff --git a/core/fxcrt/fx_basic_util_unittest.cpp b/core/fxcrt/fx_basic_util_unittest.cpp
index f4e3f794d3..9a130bece4 100644
--- a/core/fxcrt/fx_basic_util_unittest.cpp
+++ b/core/fxcrt/fx_basic_util_unittest.cpp
@@ -4,7 +4,7 @@
#include <limits>
-#include "core/fxcrt/fx_basic.h"
+#include "core/fxcrt/fx_extension.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
diff --git a/core/fxcrt/fx_coordinates.h b/core/fxcrt/fx_coordinates.h
index d84b866a57..0c0ccb065f 100644
--- a/core/fxcrt/fx_coordinates.h
+++ b/core/fxcrt/fx_coordinates.h
@@ -10,7 +10,8 @@
#include <algorithm>
#include <tuple>
-#include "core/fxcrt/fx_basic.h"
+#include "core/fxcrt/fx_system.h"
+#include "third_party/base/numerics/safe_math.h"
class CFX_Matrix;
diff --git a/core/fxcrt/fx_extension.h b/core/fxcrt/fx_extension.h
index 255ee2e3df..fbb86fea45 100644
--- a/core/fxcrt/fx_extension.h
+++ b/core/fxcrt/fx_extension.h
@@ -11,10 +11,14 @@
#include <cwctype>
#include <memory>
-#include "core/fxcrt/fx_basic.h"
+#include "core/fxcrt/fx_string.h"
#define FX_INVALID_OFFSET static_cast<uint32_t>(-1)
+#ifdef PDF_ENABLE_XFA
+#define FX_IsOdd(a) ((a)&1)
+#endif // PDF_ENABLE_XFA
+
float FXSYS_wcstof(const wchar_t* pwsStr,
int32_t iLength = -1,
int32_t* pUsedLen = nullptr);
@@ -102,4 +106,6 @@ void FX_GUID_CreateV4(FX_GUID* pGUID);
CFX_ByteString FX_GUID_ToString(const FX_GUID* pGUID, bool bSeparator = true);
#endif // PDF_ENABLE_XFA
+uint32_t GetBits32(const uint8_t* pData, int bitpos, int nbits);
+
#endif // CORE_FXCRT_FX_EXTENSION_H_
diff --git a/core/fxcrt/fx_memory.h b/core/fxcrt/fx_memory.h
index 65cf19c980..f89095ad9c 100644
--- a/core/fxcrt/fx_memory.h
+++ b/core/fxcrt/fx_memory.h
@@ -136,12 +136,6 @@ struct FxFreeDeleter {
inline void operator()(void* ptr) const { FX_Free(ptr); }
};
-// Used with std::unique_ptr to Release() objects that can't be deleted.
-template <class T>
-struct ReleaseDeleter {
- inline void operator()(T* ptr) const { ptr->Release(); }
-};
-
#endif // __cplusplus
#endif // CORE_FXCRT_FX_MEMORY_H_
diff --git a/core/fxcrt/fx_ucd.h b/core/fxcrt/fx_ucd.h
index 3b72516324..50f3801c87 100644
--- a/core/fxcrt/fx_ucd.h
+++ b/core/fxcrt/fx_ucd.h
@@ -8,7 +8,6 @@
#define CORE_FXCRT_FX_UCD_H_
#include "core/fxcrt/cfx_retain_ptr.h"
-#include "core/fxcrt/fx_basic.h"
constexpr uint32_t FX_BIDICLASSBITS = 6;
constexpr uint32_t FX_BIDICLASSBITSMASK = 0x1F << FX_BIDICLASSBITS;
diff --git a/core/fxcrt/fx_ucddata.cpp b/core/fxcrt/fx_ucddata.cpp
index 5e3d3afbd4..1f28bfbd37 100644
--- a/core/fxcrt/fx_ucddata.cpp
+++ b/core/fxcrt/fx_ucddata.cpp
@@ -4,7 +4,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "core/fxcrt/fx_basic.h"
+#include "core/fxcrt/fx_memory.h"
#include "core/fxcrt/fx_ucd.h"
const uint32_t kTextLayoutCodeProperties[] = {
diff --git a/core/fxcrt/fxcrt_posix.cpp b/core/fxcrt/fxcrt_posix.cpp
index 4d867dd688..c206268029 100644
--- a/core/fxcrt/fxcrt_posix.cpp
+++ b/core/fxcrt/fxcrt_posix.cpp
@@ -8,7 +8,6 @@
#include <memory>
-#include "core/fxcrt/fx_basic.h"
#include "third_party/base/ptr_util.h"
#ifndef O_BINARY
diff --git a/core/fxcrt/ifxcrt_fileaccess.h b/core/fxcrt/ifxcrt_fileaccess.h
index 340c2d1eeb..f4c686abd5 100644
--- a/core/fxcrt/ifxcrt_fileaccess.h
+++ b/core/fxcrt/ifxcrt_fileaccess.h
@@ -10,8 +10,9 @@
#include <algorithm>
#include <memory>
-#include "core/fxcrt/fx_basic.h"
#include "core/fxcrt/fx_safe_types.h"
+#include "core/fxcrt/fx_stream.h"
+#include "core/fxcrt/fx_string.h"
class IFXCRT_FileAccess {
public:
diff --git a/core/fxcrt/xml/cfx_saxcontext.h b/core/fxcrt/xml/cfx_saxcontext.h
index fcc889f7a3..f66c76c9cc 100644
--- a/core/fxcrt/xml/cfx_saxcontext.h
+++ b/core/fxcrt/xml/cfx_saxcontext.h
@@ -9,7 +9,6 @@
#include <sstream>
-#include "core/fxcrt/fx_basic.h"
#include "core/fxcrt/fx_string.h"
#include "core/fxcrt/xml/cfx_saxreader.h"
diff --git a/core/fxcrt/xml/cfx_saxreader.cpp b/core/fxcrt/xml/cfx_saxreader.cpp
index 42bf510c19..641dc08688 100644
--- a/core/fxcrt/xml/cfx_saxreader.cpp
+++ b/core/fxcrt/xml/cfx_saxreader.cpp
@@ -9,6 +9,7 @@
#include <algorithm>
#include <utility>
+#include "core/fxcrt/fx_stream.h"
#include "core/fxcrt/xml/cfx_saxreaderhandler.h"
#include "third_party/base/ptr_util.h"
#include "third_party/base/stl_util.h"
diff --git a/core/fxcrt/xml/cfx_saxreader.h b/core/fxcrt/xml/cfx_saxreader.h
index 9f1f324062..3db1c7c80c 100644
--- a/core/fxcrt/xml/cfx_saxreader.h
+++ b/core/fxcrt/xml/cfx_saxreader.h
@@ -11,10 +11,12 @@
#include <stack>
#include <vector>
-#include "core/fxcrt/fx_basic.h"
+#include "core/fxcrt/cfx_retain_ptr.h"
+#include "core/fxcrt/fx_string.h"
class CFX_SAXCommentContext;
class CFX_SAXContext;
+class IFX_SeekableReadStream;
enum class CFX_SaxMode;
class CFX_SAXItem {
diff --git a/core/fxcrt/xml/cfx_xmlparser.cpp b/core/fxcrt/xml/cfx_xmlparser.cpp
index 884f6fc477..ce45481512 100644
--- a/core/fxcrt/xml/cfx_xmlparser.cpp
+++ b/core/fxcrt/xml/cfx_xmlparser.cpp
@@ -6,7 +6,6 @@
#include "core/fxcrt/xml/cfx_xmlparser.h"
-#include "core/fxcrt/fx_basic.h"
#include "core/fxcrt/xml/cfx_xmlchardata.h"
#include "core/fxcrt/xml/cfx_xmlelement.h"
#include "core/fxcrt/xml/cfx_xmlinstruction.h"
diff --git a/core/fxcrt/xml/cxml_element.h b/core/fxcrt/xml/cxml_element.h
index d708032adb..a4b4b14129 100644
--- a/core/fxcrt/xml/cxml_element.h
+++ b/core/fxcrt/xml/cxml_element.h
@@ -10,7 +10,6 @@
#include <memory>
#include <vector>
-#include "core/fxcrt/fx_basic.h"
#include "core/fxcrt/xml/cxml_attrmap.h"
#include "core/fxcrt/xml/cxml_object.h"
diff --git a/core/fxcrt/xml/cxml_object.h b/core/fxcrt/xml/cxml_object.h
index e7f23aa988..d009359932 100644
--- a/core/fxcrt/xml/cxml_object.h
+++ b/core/fxcrt/xml/cxml_object.h
@@ -7,8 +7,6 @@
#ifndef CORE_FXCRT_XML_CXML_OBJECT_H_
#define CORE_FXCRT_XML_CXML_OBJECT_H_
-#include "core/fxcrt/fx_basic.h"
-
class CXML_Content;
class CXML_Element;