Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Side by Side Diff: core/include/fpdfdoc/fpdf_doc.h

Issue 828203002: Clean up bookmark related codes. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | core/src/fpdfdoc/doc_bookmark.cpp » ('j') | core/src/fpdfdoc/doc_bookmark.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef _FPDF_DOC_H_ 7 #ifndef _FPDF_DOC_H_
8 #define _FPDF_DOC_H_ 8 #define _FPDF_DOC_H_
9 #ifndef _FPDF_PARSER_ 9 #ifndef _FPDF_PARSER_
10 #include "../fpdfapi/fpdf_parser.h" 10 #include "../fpdfapi/fpdf_parser.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 return m_pRoot; 69 return m_pRoot;
70 } 70 }
71 71
72 protected: 72 protected:
73 73
74 CPDF_Dictionary* m_pRoot; 74 CPDF_Dictionary* m_pRoot;
75 }; 75 };
76 class CPDF_BookmarkTree : public CFX_Object 76 class CPDF_BookmarkTree : public CFX_Object
77 { 77 {
78 public: 78 public:
79 CPDF_BookmarkTree(CPDF_Document* pDoc) : m_pDocument(pDoc) {}
79 80
80 CPDF_BookmarkTree(CPDF_Document* pDoc) 81 CPDF_Bookmark» » GetFirstChild(CPDF_Bookmark parent) const;
Tom Sepez 2015/01/05 18:08:32 nit: args here should probably of type const CPDF_
Bo Xu 2015/01/05 18:45:09 Done.
81 {
82 m_pDocument = pDoc;
83 }
84 public:
85 82
83 CPDF_Bookmark GetNextSibling(CPDF_Bookmark bookmark) const;
86 84
85 CPDF_Document* GetDocument() const { return m_pDocument; }
87 86
88 CPDF_Bookmark GetFirstChild(CPDF_Bookmark parent);
89
90 CPDF_Bookmark GetNextSibling(CPDF_Bookmark bookmark);
91
92
93 CPDF_Document* GetDocument() const
94 {
95 return m_pDocument;
96 }
97 protected: 87 protected:
98
99 CPDF_Document* m_pDocument; 88 CPDF_Document* m_pDocument;
100 }; 89 };
101 #define PDFBOOKMARK_ITALIC 1 90 #define PDFBOOKMARK_ITALIC 1
102 #define PDFBOOKMARK_BOLD 2 91 #define PDFBOOKMARK_BOLD 2
103 class CPDF_Bookmark : public CFX_Object 92 class CPDF_Bookmark : public CFX_Object
104 { 93 {
105 public: 94 public:
106 95
107 CPDF_Bookmark(CPDF_Dictionary* pDict = NULL) 96 CPDF_Bookmark(CPDF_Dictionary* pDict = NULL) : m_pDict(pDict) {}
108 {
109 m_pDict = pDict;
110 }
111 97
112 operator CPDF_Dictionary*() const 98 CPDF_Dictionary* GetDict() const {return m_pDict;}
Tom Sepez 2015/01/05 18:08:32 nit: space after { and before }.
Bo Xu 2015/01/05 18:45:09 Done.
113 {
114 return m_pDict;
115 }
116 99
100 FX_DWORD GetColorRef() const;
117 101
102 FX_DWORD GetFontStyle() const;
118 103
119 FX_DWORD» » » GetColorRef(); 104 CFX_WideString» » GetTitle() const;
120 105
121 FX_DWORD» » » GetFontStyle(); 106 CPDF_Dest» » » GetDest(CPDF_Document* pDocument) const;
122 107
123 CFX_WideString» » GetTitle(); 108 CPDF_Action»» » GetAction() const;
124
125
126
127
128 CPDF_Dest» » » GetDest(CPDF_Document* pDocument);
129
130 CPDF_Action»» » GetAction();
131
132 109
133 CPDF_Dictionary* m_pDict; 110 CPDF_Dictionary* m_pDict;
134 }; 111 };
135 #define PDFZOOM_XYZ 1 112 #define PDFZOOM_XYZ 1
136 #define PDFZOOM_FITPAGE 2 113 #define PDFZOOM_FITPAGE 2
137 #define PDFZOOM_FITHORZ 3 114 #define PDFZOOM_FITHORZ 3
138 #define PDFZOOM_FITVERT 4 115 #define PDFZOOM_FITVERT 4
139 #define PDFZOOM_FITRECT 5 116 #define PDFZOOM_FITRECT 5
140 #define PDFZOOM_FITBBOX 6 117 #define PDFZOOM_FITBBOX 6
141 #define PDFZOOM_FITBHORZ 7 118 #define PDFZOOM_FITBHORZ 7
142
143 #define PDFZOOM_FITBVERT 8 119 #define PDFZOOM_FITBVERT 8
144 class CPDF_Dest : public CFX_Object 120 class CPDF_Dest : public CFX_Object
145 { 121 {
146 public: 122 public:
147 123
148 CPDF_Dest(CPDF_Object* pObj = NULL) 124 CPDF_Dest(CPDF_Object* pObj = NULL)
149 { 125 {
150 m_pObj = pObj; 126 m_pObj = pObj;
151 } 127 }
152 128
(...skipping 1635 matching lines...) Expand 10 before | Expand all | Expand 10 after
1788 FX_FLOAT GetOriginalColor(int index, FX_BSTR csEn try); 1764 FX_FLOAT GetOriginalColor(int index, FX_BSTR csEn try);
1789 1765
1790 void GetOriginalColor(int& iColorType , FX_FLOAT fc[4], FX_BSTR csEntry); 1766 void GetOriginalColor(int& iColorType , FX_FLOAT fc[4], FX_BSTR csEntry);
1791 1767
1792 CFX_WideString GetCaption(FX_BSTR csEntry); 1768 CFX_WideString GetCaption(FX_BSTR csEntry);
1793 1769
1794 CPDF_Stream* GetIcon(FX_BSTR csEntry); 1770 CPDF_Stream* GetIcon(FX_BSTR csEntry);
1795 friend class CPDF_FormControl; 1771 friend class CPDF_FormControl;
1796 }; 1772 };
1797 #endif 1773 #endif
OLDNEW
« no previous file with comments | « no previous file | core/src/fpdfdoc/doc_bookmark.cpp » ('j') | core/src/fpdfdoc/doc_bookmark.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698