summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_page_object_avail.cpp
blob: 6673885f61f6c4b5a8d6ea6684b3346787d1ad34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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";
}