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

Unified 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, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | core/src/fpdfdoc/doc_bookmark.cpp » ('j') | core/src/fpdfdoc/doc_bookmark.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/include/fpdfdoc/fpdf_doc.h
diff --git a/core/include/fpdfdoc/fpdf_doc.h b/core/include/fpdfdoc/fpdf_doc.h
index e4cf777c1f9c662ec9d63809ce5990834f233dc5..2bae022c4449fd37a5f791345652ffd953847f8a 100644
--- a/core/include/fpdfdoc/fpdf_doc.h
+++ b/core/include/fpdfdoc/fpdf_doc.h
@@ -76,26 +76,15 @@ protected:
class CPDF_BookmarkTree : public CFX_Object
{
public:
+ CPDF_BookmarkTree(CPDF_Document* pDoc) : m_pDocument(pDoc) {}
- CPDF_BookmarkTree(CPDF_Document* pDoc)
- {
- m_pDocument = pDoc;
- }
-public:
-
-
-
- CPDF_Bookmark GetFirstChild(CPDF_Bookmark parent);
+ 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.
- CPDF_Bookmark GetNextSibling(CPDF_Bookmark bookmark);
+ CPDF_Bookmark GetNextSibling(CPDF_Bookmark bookmark) const;
+ CPDF_Document* GetDocument() const { return m_pDocument; }
- CPDF_Document* GetDocument() const
- {
- return m_pDocument;
- }
protected:
-
CPDF_Document* m_pDocument;
};
#define PDFBOOKMARK_ITALIC 1
@@ -104,31 +93,19 @@ class CPDF_Bookmark : public CFX_Object
{
public:
- CPDF_Bookmark(CPDF_Dictionary* pDict = NULL)
- {
- m_pDict = pDict;
- }
-
- operator CPDF_Dictionary*() const
- {
- return m_pDict;
- }
-
+ CPDF_Bookmark(CPDF_Dictionary* pDict = NULL) : m_pDict(pDict) {}
+ 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.
- FX_DWORD GetColorRef();
+ FX_DWORD GetColorRef() const;
- FX_DWORD GetFontStyle();
+ FX_DWORD GetFontStyle() const;
- CFX_WideString GetTitle();
+ CFX_WideString GetTitle() const;
+ CPDF_Dest GetDest(CPDF_Document* pDocument) const;
-
-
- CPDF_Dest GetDest(CPDF_Document* pDocument);
-
- CPDF_Action GetAction();
-
+ CPDF_Action GetAction() const;
CPDF_Dictionary* m_pDict;
};
@@ -139,7 +116,6 @@ public:
#define PDFZOOM_FITRECT 5
#define PDFZOOM_FITBBOX 6
#define PDFZOOM_FITBHORZ 7
-
#define PDFZOOM_FITBVERT 8
class CPDF_Dest : public CFX_Object
{
« 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