summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/parser')
-rw-r--r--core/fpdfapi/parser/cfdf_document.h2
-rw-r--r--core/fpdfapi/parser/cpdf_array.h2
-rw-r--r--core/fpdfapi/parser/cpdf_boolean.h2
-rw-r--r--core/fpdfapi/parser/cpdf_dictionary.h2
-rw-r--r--core/fpdfapi/parser/cpdf_document_unittest.cpp10
-rw-r--r--core/fpdfapi/parser/cpdf_hint_tables_unittest.cpp2
-rw-r--r--core/fpdfapi/parser/cpdf_indirect_object_holder_unittest.cpp2
-rw-r--r--core/fpdfapi/parser/cpdf_name.h2
-rw-r--r--core/fpdfapi/parser/cpdf_null.h2
-rw-r--r--core/fpdfapi/parser/cpdf_number.h2
-rw-r--r--core/fpdfapi/parser/cpdf_object_avail_unittest.cpp10
-rw-r--r--core/fpdfapi/parser/cpdf_object_walker.cpp6
-rw-r--r--core/fpdfapi/parser/cpdf_object_walker.h2
-rw-r--r--core/fpdfapi/parser/cpdf_page_object_avail.h2
-rw-r--r--core/fpdfapi/parser/cpdf_page_object_avail_unittest.cpp5
-rw-r--r--core/fpdfapi/parser/cpdf_parser.cpp2
-rw-r--r--core/fpdfapi/parser/cpdf_parser_unittest.cpp2
-rw-r--r--core/fpdfapi/parser/cpdf_read_validator_unittest.cpp4
-rw-r--r--core/fpdfapi/parser/cpdf_reference.h2
-rw-r--r--core/fpdfapi/parser/cpdf_stream.h2
-rw-r--r--core/fpdfapi/parser/cpdf_stream_acc.h2
-rw-r--r--core/fpdfapi/parser/cpdf_stream_acc_unittest.cpp2
-rw-r--r--core/fpdfapi/parser/cpdf_string.h2
-rw-r--r--core/fpdfapi/parser/cpdf_syntax_parser.cpp2
24 files changed, 36 insertions, 37 deletions
diff --git a/core/fpdfapi/parser/cfdf_document.h b/core/fpdfapi/parser/cfdf_document.h
index 6efaa4ce06..6ab751e4dd 100644
--- a/core/fpdfapi/parser/cfdf_document.h
+++ b/core/fpdfapi/parser/cfdf_document.h
@@ -17,7 +17,7 @@
class CPDF_Dictionary;
class IFX_SeekableReadStream;
-class CFDF_Document : public CPDF_IndirectObjectHolder {
+class CFDF_Document final : public CPDF_IndirectObjectHolder {
public:
static std::unique_ptr<CFDF_Document> CreateNewDoc();
static std::unique_ptr<CFDF_Document> ParseMemory(
diff --git a/core/fpdfapi/parser/cpdf_array.h b/core/fpdfapi/parser/cpdf_array.h
index 1e63983d51..0c9251ca23 100644
--- a/core/fpdfapi/parser/cpdf_array.h
+++ b/core/fpdfapi/parser/cpdf_array.h
@@ -18,7 +18,7 @@
#include "core/fxcrt/fx_coordinates.h"
#include "third_party/base/ptr_util.h"
-class CPDF_Array : public CPDF_Object {
+class CPDF_Array final : public CPDF_Object {
public:
using const_iterator =
std::vector<std::unique_ptr<CPDF_Object>>::const_iterator;
diff --git a/core/fpdfapi/parser/cpdf_boolean.h b/core/fpdfapi/parser/cpdf_boolean.h
index 61c213bdb9..406381b1b9 100644
--- a/core/fpdfapi/parser/cpdf_boolean.h
+++ b/core/fpdfapi/parser/cpdf_boolean.h
@@ -13,7 +13,7 @@
#include "core/fxcrt/fx_string.h"
#include "core/fxcrt/fx_system.h"
-class CPDF_Boolean : public CPDF_Object {
+class CPDF_Boolean final : public CPDF_Object {
public:
CPDF_Boolean();
explicit CPDF_Boolean(bool value);
diff --git a/core/fpdfapi/parser/cpdf_dictionary.h b/core/fpdfapi/parser/cpdf_dictionary.h
index 5cd0e8be22..4930e5e2e3 100644
--- a/core/fpdfapi/parser/cpdf_dictionary.h
+++ b/core/fpdfapi/parser/cpdf_dictionary.h
@@ -21,7 +21,7 @@
class CPDF_IndirectObjectHolder;
-class CPDF_Dictionary : public CPDF_Object {
+class CPDF_Dictionary final : public CPDF_Object {
public:
using const_iterator =
std::map<ByteString, std::unique_ptr<CPDF_Object>>::const_iterator;
diff --git a/core/fpdfapi/parser/cpdf_document_unittest.cpp b/core/fpdfapi/parser/cpdf_document_unittest.cpp
index c64da6382a..daaab5de32 100644
--- a/core/fpdfapi/parser/cpdf_document_unittest.cpp
+++ b/core/fpdfapi/parser/cpdf_document_unittest.cpp
@@ -47,7 +47,7 @@ std::unique_ptr<CPDF_Dictionary> CreateNumberedPage(size_t number) {
return page;
}
-class CPDF_TestDocumentForPages : public CPDF_Document {
+class CPDF_TestDocumentForPages final : public CPDF_Document {
public:
CPDF_TestDocumentForPages() : CPDF_Document() {
// Set up test
@@ -99,7 +99,7 @@ class CPDF_TestDocumentForPages : public CPDF_Document {
}
};
-class CPDF_TestDocumentWithPageWithoutPageNum : public CPDF_Document {
+class CPDF_TestDocumentWithPageWithoutPageNum final : public CPDF_Document {
public:
CPDF_TestDocumentWithPageWithoutPageNum() : CPDF_Document() {
// Set up test
@@ -124,13 +124,13 @@ class CPDF_TestDocumentWithPageWithoutPageNum : public CPDF_Document {
const CPDF_Object* inlined_page_;
};
-class TestLinearized : public CPDF_LinearizedHeader {
+class TestLinearized final : public CPDF_LinearizedHeader {
public:
explicit TestLinearized(CPDF_Dictionary* dict)
: CPDF_LinearizedHeader(dict, 0) {}
};
-class CPDF_TestDocPagesWithoutKids : public CPDF_Document {
+class CPDF_TestDocPagesWithoutKids final : public CPDF_Document {
public:
CPDF_TestDocPagesWithoutKids() : CPDF_Document() {
CPDF_Dictionary* pagesDict = NewIndirect<CPDF_Dictionary>();
@@ -143,7 +143,7 @@ class CPDF_TestDocPagesWithoutKids : public CPDF_Document {
}
};
-class CPDF_TestDocumentAllowSetParser : public CPDF_Document {
+class CPDF_TestDocumentAllowSetParser final : public CPDF_Document {
public:
using CPDF_Document::SetParser;
};
diff --git a/core/fpdfapi/parser/cpdf_hint_tables_unittest.cpp b/core/fpdfapi/parser/cpdf_hint_tables_unittest.cpp
index c372d74a00..c3b05acbc4 100644
--- a/core/fpdfapi/parser/cpdf_hint_tables_unittest.cpp
+++ b/core/fpdfapi/parser/cpdf_hint_tables_unittest.cpp
@@ -40,7 +40,7 @@ std::unique_ptr<CPDF_DataAvail> MakeDataAvailFromFile(
nullptr, MakeValidatorFromFile(file_name), true);
}
-class TestLinearizedHeader : public CPDF_LinearizedHeader {
+class TestLinearizedHeader final : public CPDF_LinearizedHeader {
public:
TestLinearizedHeader(const CPDF_Dictionary* pDict,
FX_FILESIZE szLastXRefOffset)
diff --git a/core/fpdfapi/parser/cpdf_indirect_object_holder_unittest.cpp b/core/fpdfapi/parser/cpdf_indirect_object_holder_unittest.cpp
index 666264f50b..6f913ca01b 100644
--- a/core/fpdfapi/parser/cpdf_indirect_object_holder_unittest.cpp
+++ b/core/fpdfapi/parser/cpdf_indirect_object_holder_unittest.cpp
@@ -14,7 +14,7 @@
namespace {
-class MockIndirectObjectHolder : public CPDF_IndirectObjectHolder {
+class MockIndirectObjectHolder final : public CPDF_IndirectObjectHolder {
public:
MockIndirectObjectHolder() {}
~MockIndirectObjectHolder() override {}
diff --git a/core/fpdfapi/parser/cpdf_name.h b/core/fpdfapi/parser/cpdf_name.h
index eef6bca715..1ef6c64c59 100644
--- a/core/fpdfapi/parser/cpdf_name.h
+++ b/core/fpdfapi/parser/cpdf_name.h
@@ -13,7 +13,7 @@
#include "core/fxcrt/string_pool_template.h"
#include "core/fxcrt/weak_ptr.h"
-class CPDF_Name : public CPDF_Object {
+class CPDF_Name final : public CPDF_Object {
public:
CPDF_Name(WeakPtr<ByteStringPool> pPool, const ByteString& str);
~CPDF_Name() override;
diff --git a/core/fpdfapi/parser/cpdf_null.h b/core/fpdfapi/parser/cpdf_null.h
index 003ad2feee..c72d3b02d5 100644
--- a/core/fpdfapi/parser/cpdf_null.h
+++ b/core/fpdfapi/parser/cpdf_null.h
@@ -11,7 +11,7 @@
#include "core/fpdfapi/parser/cpdf_object.h"
-class CPDF_Null : public CPDF_Object {
+class CPDF_Null final : public CPDF_Object {
public:
CPDF_Null();
diff --git a/core/fpdfapi/parser/cpdf_number.h b/core/fpdfapi/parser/cpdf_number.h
index 4681bb216a..b5faf82bb2 100644
--- a/core/fpdfapi/parser/cpdf_number.h
+++ b/core/fpdfapi/parser/cpdf_number.h
@@ -13,7 +13,7 @@
#include "core/fxcrt/fx_string.h"
#include "core/fxcrt/fx_system.h"
-class CPDF_Number : public CPDF_Object {
+class CPDF_Number final : public CPDF_Object {
public:
CPDF_Number();
explicit CPDF_Number(int value);
diff --git a/core/fpdfapi/parser/cpdf_object_avail_unittest.cpp b/core/fpdfapi/parser/cpdf_object_avail_unittest.cpp
index 5c3da70530..e2b23d44f4 100644
--- a/core/fpdfapi/parser/cpdf_object_avail_unittest.cpp
+++ b/core/fpdfapi/parser/cpdf_object_avail_unittest.cpp
@@ -20,7 +20,7 @@
namespace {
-class TestReadValidator : public CPDF_ReadValidator {
+class TestReadValidator final : public CPDF_ReadValidator {
public:
template <typename T, typename... Args>
friend RetainPtr<T> pdfium::MakeRetain(Args&&... args);
@@ -35,7 +35,7 @@ class TestReadValidator : public CPDF_ReadValidator {
~TestReadValidator() override {}
};
-class TestHolder : public CPDF_IndirectObjectHolder {
+class TestHolder final : public CPDF_IndirectObjectHolder {
public:
enum class ObjectState {
Unavailable,
@@ -93,7 +93,7 @@ class TestHolder : public CPDF_IndirectObjectHolder {
RetainPtr<TestReadValidator> validator_;
};
-class CPDF_ObjectAvailFailOnExclude : public CPDF_ObjectAvail {
+class CPDF_ObjectAvailFailOnExclude final : public CPDF_ObjectAvail {
public:
using CPDF_ObjectAvail::CPDF_ObjectAvail;
~CPDF_ObjectAvailFailOnExclude() override {}
@@ -103,7 +103,7 @@ class CPDF_ObjectAvailFailOnExclude : public CPDF_ObjectAvail {
}
};
-class CPDF_ObjectAvailExcludeArray : public CPDF_ObjectAvail {
+class CPDF_ObjectAvailExcludeArray final : public CPDF_ObjectAvail {
public:
using CPDF_ObjectAvail::CPDF_ObjectAvail;
~CPDF_ObjectAvailExcludeArray() override {}
@@ -112,7 +112,7 @@ class CPDF_ObjectAvailExcludeArray : public CPDF_ObjectAvail {
}
};
-class CPDF_ObjectAvailExcludeTypeKey : public CPDF_ObjectAvail {
+class CPDF_ObjectAvailExcludeTypeKey final : public CPDF_ObjectAvail {
public:
using CPDF_ObjectAvail::CPDF_ObjectAvail;
~CPDF_ObjectAvailExcludeTypeKey() override {}
diff --git a/core/fpdfapi/parser/cpdf_object_walker.cpp b/core/fpdfapi/parser/cpdf_object_walker.cpp
index 8424c0fc89..91638662c3 100644
--- a/core/fpdfapi/parser/cpdf_object_walker.cpp
+++ b/core/fpdfapi/parser/cpdf_object_walker.cpp
@@ -12,7 +12,7 @@
namespace {
-class StreamIterator : public CPDF_ObjectWalker::SubobjectIterator {
+class StreamIterator final : public CPDF_ObjectWalker::SubobjectIterator {
public:
explicit StreamIterator(const CPDF_Stream* stream)
: SubobjectIterator(stream) {}
@@ -33,7 +33,7 @@ class StreamIterator : public CPDF_ObjectWalker::SubobjectIterator {
bool is_finished_ = false;
};
-class DictionaryIterator : public CPDF_ObjectWalker::SubobjectIterator {
+class DictionaryIterator final : public CPDF_ObjectWalker::SubobjectIterator {
public:
explicit DictionaryIterator(const CPDF_Dictionary* dictionary)
: SubobjectIterator(dictionary) {}
@@ -64,7 +64,7 @@ class DictionaryIterator : public CPDF_ObjectWalker::SubobjectIterator {
ByteString dict_key_;
};
-class ArrayIterator : public CPDF_ObjectWalker::SubobjectIterator {
+class ArrayIterator final : public CPDF_ObjectWalker::SubobjectIterator {
public:
explicit ArrayIterator(const CPDF_Array* array) : SubobjectIterator(array) {}
diff --git a/core/fpdfapi/parser/cpdf_object_walker.h b/core/fpdfapi/parser/cpdf_object_walker.h
index 57506b9545..e0fd35de29 100644
--- a/core/fpdfapi/parser/cpdf_object_walker.h
+++ b/core/fpdfapi/parser/cpdf_object_walker.h
@@ -55,7 +55,7 @@ class CPDF_ObjectWalker {
std::stack<std::unique_ptr<SubobjectIterator>> stack_;
};
-class CPDF_NonConstObjectWalker : public CPDF_ObjectWalker {
+class CPDF_NonConstObjectWalker final : public CPDF_ObjectWalker {
public:
explicit CPDF_NonConstObjectWalker(CPDF_Object* root)
: CPDF_ObjectWalker(root) {}
diff --git a/core/fpdfapi/parser/cpdf_page_object_avail.h b/core/fpdfapi/parser/cpdf_page_object_avail.h
index 8c740ed045..b62ca4c33a 100644
--- a/core/fpdfapi/parser/cpdf_page_object_avail.h
+++ b/core/fpdfapi/parser/cpdf_page_object_avail.h
@@ -9,7 +9,7 @@
// Helper for check availability of page's object tree.
// Exclude references to pages.
-class CPDF_PageObjectAvail : public CPDF_ObjectAvail {
+class CPDF_PageObjectAvail final : public CPDF_ObjectAvail {
public:
using CPDF_ObjectAvail::CPDF_ObjectAvail;
~CPDF_PageObjectAvail() override;
diff --git a/core/fpdfapi/parser/cpdf_page_object_avail_unittest.cpp b/core/fpdfapi/parser/cpdf_page_object_avail_unittest.cpp
index 14ba0e3273..f278b6e57c 100644
--- a/core/fpdfapi/parser/cpdf_page_object_avail_unittest.cpp
+++ b/core/fpdfapi/parser/cpdf_page_object_avail_unittest.cpp
@@ -21,8 +21,7 @@
namespace {
-
-class TestReadValidator : public CPDF_ReadValidator {
+class TestReadValidator final : public CPDF_ReadValidator {
public:
template <typename T, typename... Args>
friend RetainPtr<T> pdfium::MakeRetain(Args&&... args);
@@ -37,7 +36,7 @@ class TestReadValidator : public CPDF_ReadValidator {
~TestReadValidator() override {}
};
-class TestHolder : public CPDF_IndirectObjectHolder {
+class TestHolder final : public CPDF_IndirectObjectHolder {
public:
enum class ObjectState {
Unavailable,
diff --git a/core/fpdfapi/parser/cpdf_parser.cpp b/core/fpdfapi/parser/cpdf_parser.cpp
index 029851570a..32629bc873 100644
--- a/core/fpdfapi/parser/cpdf_parser.cpp
+++ b/core/fpdfapi/parser/cpdf_parser.cpp
@@ -47,7 +47,7 @@ uint32_t GetVarInt(const uint8_t* p, int32_t n) {
return result;
}
-class ObjectsHolderStub : public CPDF_Parser::ParsedObjectsHolder {
+class ObjectsHolderStub final : public CPDF_Parser::ParsedObjectsHolder {
public:
ObjectsHolderStub() = default;
~ObjectsHolderStub() override = default;
diff --git a/core/fpdfapi/parser/cpdf_parser_unittest.cpp b/core/fpdfapi/parser/cpdf_parser_unittest.cpp
index 00f3770e87..28c907a101 100644
--- a/core/fpdfapi/parser/cpdf_parser_unittest.cpp
+++ b/core/fpdfapi/parser/cpdf_parser_unittest.cpp
@@ -29,7 +29,7 @@ CPDF_CrossRefTable::ObjectInfo GetObjInfo(const CPDF_Parser& parser,
} // namespace
// A wrapper class to help test member functions of CPDF_Parser.
-class CPDF_TestParser : public CPDF_Parser {
+class CPDF_TestParser final : public CPDF_Parser {
public:
CPDF_TestParser() {}
~CPDF_TestParser() {}
diff --git a/core/fpdfapi/parser/cpdf_read_validator_unittest.cpp b/core/fpdfapi/parser/cpdf_read_validator_unittest.cpp
index 640269884d..cf8b9b65a1 100644
--- a/core/fpdfapi/parser/cpdf_read_validator_unittest.cpp
+++ b/core/fpdfapi/parser/cpdf_read_validator_unittest.cpp
@@ -20,7 +20,7 @@ std::pair<FX_FILESIZE, FX_FILESIZE> MakeRange(uint32_t start, uint32_t end) {
return std::pair<FX_FILESIZE, FX_FILESIZE>(start, end);
}
-class MockFileAvail : public CPDF_DataAvail::FileAvail {
+class MockFileAvail final : public CPDF_DataAvail::FileAvail {
public:
MockFileAvail() : available_range_(0, 0) {}
~MockFileAvail() override {}
@@ -42,7 +42,7 @@ class MockFileAvail : public CPDF_DataAvail::FileAvail {
std::pair<FX_FILESIZE, FX_FILESIZE> available_range_;
};
-class MockDownloadHints : public CPDF_DataAvail::DownloadHints {
+class MockDownloadHints final : public CPDF_DataAvail::DownloadHints {
public:
MockDownloadHints() : last_requested_range_(0, 0) {}
~MockDownloadHints() override {}
diff --git a/core/fpdfapi/parser/cpdf_reference.h b/core/fpdfapi/parser/cpdf_reference.h
index cdb5d5e674..cb9c6ed1d4 100644
--- a/core/fpdfapi/parser/cpdf_reference.h
+++ b/core/fpdfapi/parser/cpdf_reference.h
@@ -15,7 +15,7 @@
class CPDF_IndirectObjectHolder;
-class CPDF_Reference : public CPDF_Object {
+class CPDF_Reference final : public CPDF_Object {
public:
CPDF_Reference(CPDF_IndirectObjectHolder* pDoc, uint32_t objnum);
~CPDF_Reference() override;
diff --git a/core/fpdfapi/parser/cpdf_stream.h b/core/fpdfapi/parser/cpdf_stream.h
index 3deb9cddec..9d8cf6d896 100644
--- a/core/fpdfapi/parser/cpdf_stream.h
+++ b/core/fpdfapi/parser/cpdf_stream.h
@@ -15,7 +15,7 @@
#include "core/fpdfapi/parser/cpdf_object.h"
#include "core/fxcrt/fx_stream.h"
-class CPDF_Stream : public CPDF_Object {
+class CPDF_Stream final : public CPDF_Object {
public:
CPDF_Stream();
CPDF_Stream(std::unique_ptr<uint8_t, FxFreeDeleter> pData,
diff --git a/core/fpdfapi/parser/cpdf_stream_acc.h b/core/fpdfapi/parser/cpdf_stream_acc.h
index 5d18723df5..fae8ba0516 100644
--- a/core/fpdfapi/parser/cpdf_stream_acc.h
+++ b/core/fpdfapi/parser/cpdf_stream_acc.h
@@ -16,7 +16,7 @@
#include "core/fxcrt/retain_ptr.h"
#include "third_party/base/span.h"
-class CPDF_StreamAcc : public Retainable {
+class CPDF_StreamAcc final : public Retainable {
public:
template <typename T, typename... Args>
friend RetainPtr<T> pdfium::MakeRetain(Args&&... args);
diff --git a/core/fpdfapi/parser/cpdf_stream_acc_unittest.cpp b/core/fpdfapi/parser/cpdf_stream_acc_unittest.cpp
index dcebf0b3a7..1fbb342548 100644
--- a/core/fpdfapi/parser/cpdf_stream_acc_unittest.cpp
+++ b/core/fpdfapi/parser/cpdf_stream_acc_unittest.cpp
@@ -12,7 +12,7 @@
namespace {
-class InvalidStream : public IFX_SeekableReadStream {
+class InvalidStream final : public IFX_SeekableReadStream {
public:
InvalidStream() = default;
~InvalidStream() override = default;
diff --git a/core/fpdfapi/parser/cpdf_string.h b/core/fpdfapi/parser/cpdf_string.h
index 144fe64cba..75cc3c4fe1 100644
--- a/core/fpdfapi/parser/cpdf_string.h
+++ b/core/fpdfapi/parser/cpdf_string.h
@@ -15,7 +15,7 @@
#include "core/fxcrt/string_pool_template.h"
#include "core/fxcrt/weak_ptr.h"
-class CPDF_String : public CPDF_Object {
+class CPDF_String final : public CPDF_Object {
public:
CPDF_String();
CPDF_String(WeakPtr<ByteStringPool> pPool, const ByteString& str, bool bHex);
diff --git a/core/fpdfapi/parser/cpdf_syntax_parser.cpp b/core/fpdfapi/parser/cpdf_syntax_parser.cpp
index 65a8d78b13..bba96d9b34 100644
--- a/core/fpdfapi/parser/cpdf_syntax_parser.cpp
+++ b/core/fpdfapi/parser/cpdf_syntax_parser.cpp
@@ -34,7 +34,7 @@ namespace {
enum class ReadStatus { Normal, Backslash, Octal, FinishOctal, CarriageReturn };
-class ReadableSubStream : public IFX_SeekableReadStream {
+class ReadableSubStream final : public IFX_SeekableReadStream {
public:
ReadableSubStream(const RetainPtr<IFX_SeekableReadStream>& pFileRead,
FX_FILESIZE part_offset,