summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/parser')
-rw-r--r--core/fpdfapi/parser/cpdf_array.cpp2
-rw-r--r--core/fpdfapi/parser/cpdf_array.h4
-rw-r--r--core/fpdfapi/parser/cpdf_dictionary.cpp2
-rw-r--r--core/fpdfapi/parser/cpdf_dictionary.h4
-rw-r--r--core/fpdfapi/parser/cpdf_number.cpp6
-rw-r--r--core/fpdfapi/parser/cpdf_number.h6
-rw-r--r--core/fpdfapi/parser/cpdf_object.cpp2
-rw-r--r--core/fpdfapi/parser/cpdf_object.h2
-rw-r--r--core/fpdfapi/parser/cpdf_object_unittest.cpp6
-rw-r--r--core/fpdfapi/parser/cpdf_reference.cpp2
-rw-r--r--core/fpdfapi/parser/cpdf_reference.h2
11 files changed, 19 insertions, 19 deletions
diff --git a/core/fpdfapi/parser/cpdf_array.cpp b/core/fpdfapi/parser/cpdf_array.cpp
index 05a93702f1..bf8b51e604 100644
--- a/core/fpdfapi/parser/cpdf_array.cpp
+++ b/core/fpdfapi/parser/cpdf_array.cpp
@@ -108,7 +108,7 @@ int CPDF_Array::GetIntegerAt(size_t i) const {
return m_Objects[i]->GetInteger();
}
-FX_FLOAT CPDF_Array::GetNumberAt(size_t i) const {
+float CPDF_Array::GetNumberAt(size_t i) const {
if (i >= m_Objects.size())
return 0;
return m_Objects[i]->GetNumber();
diff --git a/core/fpdfapi/parser/cpdf_array.h b/core/fpdfapi/parser/cpdf_array.h
index 0b16f7f21b..8f8b600c7e 100644
--- a/core/fpdfapi/parser/cpdf_array.h
+++ b/core/fpdfapi/parser/cpdf_array.h
@@ -41,11 +41,11 @@ class CPDF_Array : public CPDF_Object {
CPDF_Object* GetDirectObjectAt(size_t index) const;
CFX_ByteString GetStringAt(size_t index) const;
int GetIntegerAt(size_t index) const;
- FX_FLOAT GetNumberAt(size_t index) const;
+ float GetNumberAt(size_t index) const;
CPDF_Dictionary* GetDictAt(size_t index) const;
CPDF_Stream* GetStreamAt(size_t index) const;
CPDF_Array* GetArrayAt(size_t index) const;
- FX_FLOAT GetFloatAt(size_t index) const { return GetNumberAt(index); }
+ float GetFloatAt(size_t index) const { return GetNumberAt(index); }
CFX_Matrix GetMatrix();
CFX_FloatRect GetRect();
diff --git a/core/fpdfapi/parser/cpdf_dictionary.cpp b/core/fpdfapi/parser/cpdf_dictionary.cpp
index 40877539b5..653ef45067 100644
--- a/core/fpdfapi/parser/cpdf_dictionary.cpp
+++ b/core/fpdfapi/parser/cpdf_dictionary.cpp
@@ -115,7 +115,7 @@ int CPDF_Dictionary::GetIntegerFor(const CFX_ByteString& key, int def) const {
return p ? p->GetInteger() : def;
}
-FX_FLOAT CPDF_Dictionary::GetNumberFor(const CFX_ByteString& key) const {
+float CPDF_Dictionary::GetNumberFor(const CFX_ByteString& key) const {
CPDF_Object* p = GetObjectFor(key);
return p ? p->GetNumber() : 0;
}
diff --git a/core/fpdfapi/parser/cpdf_dictionary.h b/core/fpdfapi/parser/cpdf_dictionary.h
index 13cbdcf7ac..b14574fd61 100644
--- a/core/fpdfapi/parser/cpdf_dictionary.h
+++ b/core/fpdfapi/parser/cpdf_dictionary.h
@@ -48,13 +48,13 @@ class CPDF_Dictionary : public CPDF_Object {
int GetIntegerFor(const CFX_ByteString& key) const;
int GetIntegerFor(const CFX_ByteString& key, int default_int) const;
bool GetBooleanFor(const CFX_ByteString& key, bool bDefault = false) const;
- FX_FLOAT GetNumberFor(const CFX_ByteString& key) const;
+ float GetNumberFor(const CFX_ByteString& key) const;
CPDF_Dictionary* GetDictFor(const CFX_ByteString& key) const;
CPDF_Stream* GetStreamFor(const CFX_ByteString& key) const;
CPDF_Array* GetArrayFor(const CFX_ByteString& key) const;
CFX_FloatRect GetRectFor(const CFX_ByteString& key) const;
CFX_Matrix GetMatrixFor(const CFX_ByteString& key) const;
- FX_FLOAT GetFloatFor(const CFX_ByteString& key) const {
+ float GetFloatFor(const CFX_ByteString& key) const {
return GetNumberFor(key);
}
diff --git a/core/fpdfapi/parser/cpdf_number.cpp b/core/fpdfapi/parser/cpdf_number.cpp
index 24feb2a2e0..c83b9dcd38 100644
--- a/core/fpdfapi/parser/cpdf_number.cpp
+++ b/core/fpdfapi/parser/cpdf_number.cpp
@@ -11,7 +11,7 @@ CPDF_Number::CPDF_Number() : m_bInteger(true), m_Integer(0) {}
CPDF_Number::CPDF_Number(int value) : m_bInteger(true), m_Integer(value) {}
-CPDF_Number::CPDF_Number(FX_FLOAT value) : m_bInteger(false), m_Float(value) {}
+CPDF_Number::CPDF_Number(float value) : m_bInteger(false), m_Float(value) {}
CPDF_Number::CPDF_Number(const CFX_ByteStringC& str)
: m_bInteger(FX_atonum(str, &m_Integer)) {}
@@ -27,8 +27,8 @@ std::unique_ptr<CPDF_Object> CPDF_Number::Clone() const {
: pdfium::MakeUnique<CPDF_Number>(m_Float);
}
-FX_FLOAT CPDF_Number::GetNumber() const {
- return m_bInteger ? static_cast<FX_FLOAT>(m_Integer) : m_Float;
+float CPDF_Number::GetNumber() const {
+ return m_bInteger ? static_cast<float>(m_Integer) : m_Float;
}
int CPDF_Number::GetInteger() const {
diff --git a/core/fpdfapi/parser/cpdf_number.h b/core/fpdfapi/parser/cpdf_number.h
index 85a78e5f1a..6e85044d2a 100644
--- a/core/fpdfapi/parser/cpdf_number.h
+++ b/core/fpdfapi/parser/cpdf_number.h
@@ -17,7 +17,7 @@ class CPDF_Number : public CPDF_Object {
public:
CPDF_Number();
explicit CPDF_Number(int value);
- explicit CPDF_Number(FX_FLOAT value);
+ explicit CPDF_Number(float value);
explicit CPDF_Number(const CFX_ByteStringC& str);
~CPDF_Number() override;
@@ -25,7 +25,7 @@ class CPDF_Number : public CPDF_Object {
Type GetType() const override;
std::unique_ptr<CPDF_Object> Clone() const override;
CFX_ByteString GetString() const override;
- FX_FLOAT GetNumber() const override;
+ float GetNumber() const override;
int GetInteger() const override;
void SetString(const CFX_ByteString& str) override;
bool IsNumber() const override;
@@ -38,7 +38,7 @@ class CPDF_Number : public CPDF_Object {
bool m_bInteger;
union {
int m_Integer;
- FX_FLOAT m_Float;
+ float m_Float;
};
};
diff --git a/core/fpdfapi/parser/cpdf_object.cpp b/core/fpdfapi/parser/cpdf_object.cpp
index acda334c9e..f0ff81eeed 100644
--- a/core/fpdfapi/parser/cpdf_object.cpp
+++ b/core/fpdfapi/parser/cpdf_object.cpp
@@ -46,7 +46,7 @@ CFX_WideString CPDF_Object::GetUnicodeText() const {
return CFX_WideString();
}
-FX_FLOAT CPDF_Object::GetNumber() const {
+float CPDF_Object::GetNumber() const {
return 0;
}
diff --git a/core/fpdfapi/parser/cpdf_object.h b/core/fpdfapi/parser/cpdf_object.h
index f6bc5b444f..616573724b 100644
--- a/core/fpdfapi/parser/cpdf_object.h
+++ b/core/fpdfapi/parser/cpdf_object.h
@@ -56,7 +56,7 @@ class CPDF_Object {
virtual CPDF_Object* GetDirect() const;
virtual CFX_ByteString GetString() const;
virtual CFX_WideString GetUnicodeText() const;
- virtual FX_FLOAT GetNumber() const;
+ virtual float GetNumber() const;
virtual int GetInteger() const;
virtual CPDF_Dictionary* GetDict() const;
diff --git a/core/fpdfapi/parser/cpdf_object_unittest.cpp b/core/fpdfapi/parser/cpdf_object_unittest.cpp
index 927b106474..9285993c52 100644
--- a/core/fpdfapi/parser/cpdf_object_unittest.cpp
+++ b/core/fpdfapi/parser/cpdf_object_unittest.cpp
@@ -218,14 +218,14 @@ TEST_F(PDFObjectsTest, GetUnicodeText) {
}
TEST_F(PDFObjectsTest, GetNumber) {
- const FX_FLOAT direct_obj_results[] = {0, 0, 1245, 9.00345f, 0, 0,
- 0, 0, 0, 0, 0};
+ const float direct_obj_results[] = {0, 0, 1245, 9.00345f, 0, 0,
+ 0, 0, 0, 0, 0};
// Check for direct objects.
for (size_t i = 0; i < m_DirectObjs.size(); ++i)
EXPECT_EQ(direct_obj_results[i], m_DirectObjs[i]->GetNumber());
// Check indirect references.
- const FX_FLOAT indirect_obj_results[] = {0, 1245, 0, 0, 0, 0, 0};
+ const float indirect_obj_results[] = {0, 1245, 0, 0, 0, 0, 0};
for (size_t i = 0; i < m_RefObjs.size(); ++i)
EXPECT_EQ(indirect_obj_results[i], m_RefObjs[i]->GetNumber());
}
diff --git a/core/fpdfapi/parser/cpdf_reference.cpp b/core/fpdfapi/parser/cpdf_reference.cpp
index 67b67c24dd..942bae58ba 100644
--- a/core/fpdfapi/parser/cpdf_reference.cpp
+++ b/core/fpdfapi/parser/cpdf_reference.cpp
@@ -24,7 +24,7 @@ CFX_ByteString CPDF_Reference::GetString() const {
return obj ? obj->GetString() : CFX_ByteString();
}
-FX_FLOAT CPDF_Reference::GetNumber() const {
+float CPDF_Reference::GetNumber() const {
CPDF_Object* obj = SafeGetDirect();
return obj ? obj->GetNumber() : 0;
}
diff --git a/core/fpdfapi/parser/cpdf_reference.h b/core/fpdfapi/parser/cpdf_reference.h
index be7f18478e..ff8875572c 100644
--- a/core/fpdfapi/parser/cpdf_reference.h
+++ b/core/fpdfapi/parser/cpdf_reference.h
@@ -24,7 +24,7 @@ class CPDF_Reference : public CPDF_Object {
std::unique_ptr<CPDF_Object> Clone() const override;
CPDF_Object* GetDirect() const override;
CFX_ByteString GetString() const override;
- FX_FLOAT GetNumber() const override;
+ float GetNumber() const override;
int GetInteger() const override;
CPDF_Dictionary* GetDict() const override;
bool IsReference() const override;