From 455a4199482324c888ea5892c660da354435c091 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 16 Mar 2016 09:48:56 -0400 Subject: Move core/include/fpdfapi/fpdf_page.h to correct locations. This CL splits the fpdf_page.h header into the individual classes and moves them to the correct core/fpdfapi locations. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1805663002 . --- core/fpdfapi/fpdf_page/cpdf_pageobjectlist.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 core/fpdfapi/fpdf_page/cpdf_pageobjectlist.cpp (limited to 'core/fpdfapi/fpdf_page/cpdf_pageobjectlist.cpp') diff --git a/core/fpdfapi/fpdf_page/cpdf_pageobjectlist.cpp b/core/fpdfapi/fpdf_page/cpdf_pageobjectlist.cpp new file mode 100644 index 0000000000..36fb672849 --- /dev/null +++ b/core/fpdfapi/fpdf_page/cpdf_pageobjectlist.cpp @@ -0,0 +1,17 @@ +// Copyright 2016 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 + +#include "core/fpdfapi/fpdf_page/cpdf_pageobjectlist.h" + +#include "core/fpdfapi/fpdf_page/pageint.h" +#include "core/include/fpdfapi/fpdf_pageobj.h" +#include "third_party/base/stl_util.h" + +CPDF_PageObject* CPDF_PageObjectList::GetPageObjectByIndex(int index) { + if (index < 0 || index >= pdfium::CollectionSize(*this)) + return nullptr; + return (*this)[index].get(); +} -- cgit v1.2.3