summaryrefslogtreecommitdiff
path: root/core/include/fpdfapi/fpdf_page.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-02-17 16:46:26 -0800
committerTom Sepez <tsepez@chromium.org>2016-02-17 16:46:26 -0800
commit2398d8938277a2492b411f8f807bf1935918ccae (patch)
tree0f8c13509e23d6a0ea80d461ab803fae62a4638f /core/include/fpdfapi/fpdf_page.h
parentefbc1912f10f5a53e7df3a24ebfd6b78412f0bba (diff)
downloadpdfium-2398d8938277a2492b411f8f807bf1935918ccae.tar.xz
Remove CFX_PtrList from renderer main loop.
Exposes an iterator over the object list, but not the object holder, since pages and forms inherit from object holder, and we don't want to imply that there's only one thing that might be iterated over for those classes. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1700183002 .
Diffstat (limited to 'core/include/fpdfapi/fpdf_page.h')
-rw-r--r--core/include/fpdfapi/fpdf_page.h27
1 files changed, 5 insertions, 22 deletions
diff --git a/core/include/fpdfapi/fpdf_page.h b/core/include/fpdfapi/fpdf_page.h
index fb951280a2..3d98e34578 100644
--- a/core/include/fpdfapi/fpdf_page.h
+++ b/core/include/fpdfapi/fpdf_page.h
@@ -7,6 +7,7 @@
#ifndef CORE_INCLUDE_FPDFAPI_FPDF_PAGE_H_
#define CORE_INCLUDE_FPDFAPI_FPDF_PAGE_H_
+#include <list>
#include <memory>
#include "core/include/fpdfapi/fpdf_parser.h"
@@ -27,33 +28,15 @@ class CPDF_StreamContentParser;
#define PDFTRANS_ISOLATED 0x0200
#define PDFTRANS_KNOCKOUT 0x0400
-class CPDF_PageObjectList : public CFX_PtrList {
+class CPDF_PageObjectList : public std::list<std::unique_ptr<CPDF_PageObject>> {
public:
- explicit CPDF_PageObjectList(int nBlockSize) : CFX_PtrList(nBlockSize) {}
-
- CPDF_PageObject* GetNextObject(FX_POSITION& pos) const {
- return static_cast<CPDF_PageObject*>(GetNext(pos));
- }
-
- CPDF_PageObject* GetPrevObject(FX_POSITION& pos) const {
- return static_cast<CPDF_PageObject*>(GetPrev(pos));
- }
-
- CPDF_PageObject* GetObjectAt(FX_POSITION pos) const {
- return static_cast<CPDF_PageObject*>(GetAt(pos));
- }
-
// Linear complexity, to be avoided except as needed by public APIs.
- CPDF_PageObject* GetObjectByIndex(int index) const;
-
- FX_POSITION InsertObject(FX_POSITION posInsertAfter,
- CPDF_PageObject* pNewObject);
+ CPDF_PageObject* GetPageObjectByIndex(int index);
};
class CPDF_PageObjectHolder {
public:
CPDF_PageObjectHolder();
- ~CPDF_PageObjectHolder();
void ContinueParse(IFX_Pause* pPause);
FX_BOOL IsParsed() const { return m_ParseState == CONTENT_PARSED; }
@@ -165,8 +148,8 @@ class CPDF_Form : public CPDF_PageObjectHolder {
};
class CPDF_PageContentGenerator {
public:
- CPDF_PageContentGenerator(CPDF_Page* pPage);
- ~CPDF_PageContentGenerator();
+ explicit CPDF_PageContentGenerator(CPDF_Page* pPage);
+
FX_BOOL InsertPageObject(CPDF_PageObject* pPageObject);
void GenerateContent();
void TransformContent(CFX_Matrix& matrix);