summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/Document.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-01-05 16:26:32 -0800
committerTom Sepez <tsepez@chromium.org>2016-01-05 16:26:32 -0800
commit6ba32d9e65ef5d40d357876f9457e228a5fab308 (patch)
treed9ee0b40065076a3780f5143a2f8c110788b4847 /fpdfsdk/src/javascript/Document.h
parent343f2fc5e2789d7a64cb80c814b3b2b24d06e9d7 (diff)
downloadpdfium-6ba32d9e65ef5d40d357876f9457e228a5fab308.tar.xz
Merge to XFA: Replace IconTree class with std::list.
Original Review URL: https://codereview.chromium.org/1566433003 . (cherry picked from commit cc3727f88e48f4d26a589131dc03adca4eaac301) R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1560333002 .
Diffstat (limited to 'fpdfsdk/src/javascript/Document.h')
-rw-r--r--fpdfsdk/src/javascript/Document.h29
1 files changed, 7 insertions, 22 deletions
diff --git a/fpdfsdk/src/javascript/Document.h b/fpdfsdk/src/javascript/Document.h
index 3e957a6057..350ab05682 100644
--- a/fpdfsdk/src/javascript/Document.h
+++ b/fpdfsdk/src/javascript/Document.h
@@ -7,6 +7,9 @@
#ifndef FPDFSDK_SRC_JAVASCRIPT_DOCUMENT_H_
#define FPDFSDK_SRC_JAVASCRIPT_DOCUMENT_H_
+#include <list>
+#include <memory>
+
#include "JS_Define.h"
class PrintParamsObj : public CJS_EmbedObj {
@@ -37,31 +40,13 @@ class Icon;
class Field;
struct IconElement {
- IconElement() : IconName(L""), NextIcon(NULL), IconStream(NULL) {}
- virtual ~IconElement() {}
+ IconElement(const CFX_WideString& name, Icon* stream)
+ : IconName(name), IconStream(stream) {}
+
CFX_WideString IconName;
- IconElement* NextIcon;
Icon* IconStream;
};
-class IconTree {
- public:
- IconTree() : m_pHead(NULL), m_pEnd(NULL), m_iLength(0) {}
-
- virtual ~IconTree() {}
-
- public:
- void InsertIconElement(IconElement* pNewIcon);
- void DeleteIconTree();
- int GetLength();
- IconElement* operator[](int iIndex);
-
- private:
- IconElement* m_pHead;
- IconElement* m_pEnd;
- int m_iLength;
-};
-
struct CJS_DelayData;
struct CJS_DelayAnnot;
struct CJS_AnnotObj;
@@ -295,7 +280,7 @@ class Document : public CJS_EmbedObj {
CFX_WideString GetObjWordStr(CPDF_TextObject* pTextObj, int nWordIndex);
v8::Isolate* m_isolate;
- IconTree* m_pIconTree;
+ std::list<std::unique_ptr<IconElement>> m_IconList;
CPDFSDK_Document* m_pDocument;
CFX_WideString m_cwBaseURL;
bool m_bDelay;