summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_page_object_avail.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/parser/cpdf_page_object_avail.cpp')
-rw-r--r--core/fpdfapi/parser/cpdf_page_object_avail.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/core/fpdfapi/parser/cpdf_page_object_avail.cpp b/core/fpdfapi/parser/cpdf_page_object_avail.cpp
new file mode 100644
index 0000000000..6673885f61
--- /dev/null
+++ b/core/fpdfapi/parser/cpdf_page_object_avail.cpp
@@ -0,0 +1,17 @@
+// Copyright 2017 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.
+
+#include "core/fpdfapi/parser/cpdf_page_object_avail.h"
+
+#include "core/fpdfapi/parser/cpdf_dictionary.h"
+
+CPDF_PageObjectAvail::~CPDF_PageObjectAvail() {}
+
+bool CPDF_PageObjectAvail::ExcludeObject(const CPDF_Object* object) const {
+ if (CPDF_ObjectAvail::ExcludeObject(object))
+ return true;
+
+ return object->IsDictionary() &&
+ object->GetDict()->GetStringFor("Type") == "Page";
+}