| OLD | NEW |
| 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 CORE_FPDFDOC_INCLUDE_FPDF_DOC_H_ | 7 #ifndef CORE_FPDFDOC_INCLUDE_FPDF_DOC_H_ |
| 8 #define CORE_FPDFDOC_INCLUDE_FPDF_DOC_H_ | 8 #define CORE_FPDFDOC_INCLUDE_FPDF_DOC_H_ |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 class CPDF_NameTree { | 51 class CPDF_NameTree { |
| 52 public: | 52 public: |
| 53 explicit CPDF_NameTree(CPDF_Dictionary* pRoot) : m_pRoot(pRoot) {} | 53 explicit CPDF_NameTree(CPDF_Dictionary* pRoot) : m_pRoot(pRoot) {} |
| 54 CPDF_NameTree(CPDF_Document* pDoc, const CFX_ByteStringC& category); | 54 CPDF_NameTree(CPDF_Document* pDoc, const CFX_ByteStringC& category); |
| 55 | 55 |
| 56 CPDF_Object* LookupValue(int nIndex, CFX_ByteString& csName) const; | 56 CPDF_Object* LookupValue(int nIndex, CFX_ByteString& csName) const; |
| 57 CPDF_Object* LookupValue(const CFX_ByteString& csName) const; | 57 CPDF_Object* LookupValue(const CFX_ByteString& csName) const; |
| 58 CPDF_Array* LookupNamedDest(CPDF_Document* pDoc, | 58 CPDF_Array* LookupNamedDest(CPDF_Document* pDoc, |
| 59 const CFX_ByteStringC& sName); | 59 const CFX_ByteStringC& sName); |
| 60 int GetIndex(const CFX_ByteString& csName) const; | 60 int GetIndex(const CFX_ByteString& csName) const; |
| 61 int GetCount() const; | 61 size_t GetCount() const; |
| 62 CPDF_Dictionary* GetRoot() const { return m_pRoot; } | 62 CPDF_Dictionary* GetRoot() const { return m_pRoot; } |
| 63 | 63 |
| 64 protected: | 64 protected: |
| 65 CPDF_Dictionary* m_pRoot; | 65 CPDF_Dictionary* m_pRoot; |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 class CPDF_BookmarkTree { | 68 class CPDF_BookmarkTree { |
| 69 public: | 69 public: |
| 70 explicit CPDF_BookmarkTree(CPDF_Document* pDoc) : m_pDocument(pDoc) {} | 70 explicit CPDF_BookmarkTree(CPDF_Document* pDoc) : m_pDocument(pDoc) {} |
| 71 | 71 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 | 147 |
| 148 CPDF_Document* m_pDocument; | 148 CPDF_Document* m_pDocument; |
| 149 UsageType m_eUsageType; | 149 UsageType m_eUsageType; |
| 150 std::map<const CPDF_Dictionary*, FX_BOOL> m_OCGStates; | 150 std::map<const CPDF_Dictionary*, FX_BOOL> m_OCGStates; |
| 151 }; | 151 }; |
| 152 | 152 |
| 153 class CPDF_ActionFields { | 153 class CPDF_ActionFields { |
| 154 public: | 154 public: |
| 155 explicit CPDF_ActionFields(const CPDF_Action* pAction) : m_pAction(pAction) {} | 155 explicit CPDF_ActionFields(const CPDF_Action* pAction) : m_pAction(pAction) {} |
| 156 | 156 |
| 157 uint32_t GetFieldsCount() const; | 157 size_t GetFieldsCount() const; |
| 158 std::vector<CPDF_Object*> GetAllFields() const; | 158 std::vector<CPDF_Object*> GetAllFields() const; |
| 159 CPDF_Object* GetField(uint32_t iIndex) const; | 159 CPDF_Object* GetField(size_t iIndex) const; |
| 160 | 160 |
| 161 protected: | 161 protected: |
| 162 const CPDF_Action* const m_pAction; | 162 const CPDF_Action* const m_pAction; |
| 163 }; | 163 }; |
| 164 | 164 |
| 165 #define PDFNAMED_NEXTPAGE 1 | 165 #define PDFNAMED_NEXTPAGE 1 |
| 166 #define PDFNAMED_PREVPAGE 2 | 166 #define PDFNAMED_PREVPAGE 2 |
| 167 #define PDFNAMED_FIRSTPAGE 3 | 167 #define PDFNAMED_FIRSTPAGE 3 |
| 168 #define PDFNAMED_LASTPAGE 4 | 168 #define PDFNAMED_LASTPAGE 4 |
| 169 #define PDFJS_MAXLENGTH 64 | 169 #define PDFJS_MAXLENGTH 64 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 CFX_ByteString GetNamedAction() const { return m_pDict->GetStringBy("N"); } | 206 CFX_ByteString GetNamedAction() const { return m_pDict->GetStringBy("N"); } |
| 207 uint32_t GetFlags() const { return m_pDict->GetIntegerBy("Flags"); } | 207 uint32_t GetFlags() const { return m_pDict->GetIntegerBy("Flags"); } |
| 208 CFX_WideString GetJavaScript() const; | 208 CFX_WideString GetJavaScript() const; |
| 209 CPDF_Dictionary* GetAnnot() const; | 209 CPDF_Dictionary* GetAnnot() const; |
| 210 int32_t GetOperationType() const; | 210 int32_t GetOperationType() const; |
| 211 CPDF_Stream* GetSoundStream() const { return m_pDict->GetStreamBy("Sound"); } | 211 CPDF_Stream* GetSoundStream() const { return m_pDict->GetStreamBy("Sound"); } |
| 212 FX_FLOAT GetVolume() const { return m_pDict->GetNumberBy("Volume"); } | 212 FX_FLOAT GetVolume() const { return m_pDict->GetNumberBy("Volume"); } |
| 213 FX_BOOL IsSynchronous() const { return m_pDict->GetBooleanBy("Synchronous"); } | 213 FX_BOOL IsSynchronous() const { return m_pDict->GetBooleanBy("Synchronous"); } |
| 214 FX_BOOL IsRepeat() const { return m_pDict->GetBooleanBy("Repeat"); } | 214 FX_BOOL IsRepeat() const { return m_pDict->GetBooleanBy("Repeat"); } |
| 215 FX_BOOL IsMixPlay() const { return m_pDict->GetBooleanBy("Mix"); } | 215 FX_BOOL IsMixPlay() const { return m_pDict->GetBooleanBy("Mix"); } |
| 216 uint32_t GetSubActionsCount() const; | 216 size_t GetSubActionsCount() const; |
| 217 CPDF_Action GetSubAction(uint32_t iIndex) const; | 217 CPDF_Action GetSubAction(size_t iIndex) const; |
| 218 | 218 |
| 219 protected: | 219 protected: |
| 220 CPDF_Dictionary* const m_pDict; | 220 CPDF_Dictionary* const m_pDict; |
| 221 }; | 221 }; |
| 222 | 222 |
| 223 class CPDF_AAction { | 223 class CPDF_AAction { |
| 224 public: | 224 public: |
| 225 enum AActionType { | 225 enum AActionType { |
| 226 CursorEnter = 0, | 226 CursorEnter = 0, |
| 227 CursorExit, | 227 CursorExit, |
| (...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1044 CFX_WideString GetCaption(const CFX_ByteStringC& csEntry) const; | 1044 CFX_WideString GetCaption(const CFX_ByteStringC& csEntry) const; |
| 1045 | 1045 |
| 1046 CPDF_Stream* GetIcon(const CFX_ByteStringC& csEntry) const; | 1046 CPDF_Stream* GetIcon(const CFX_ByteStringC& csEntry) const; |
| 1047 | 1047 |
| 1048 CPDF_Dictionary* const m_pDict; | 1048 CPDF_Dictionary* const m_pDict; |
| 1049 }; | 1049 }; |
| 1050 | 1050 |
| 1051 CFX_WideString FILESPEC_EncodeFileName(const CFX_WideStringC& filepath); | 1051 CFX_WideString FILESPEC_EncodeFileName(const CFX_WideStringC& filepath); |
| 1052 | 1052 |
| 1053 #endif // CORE_FPDFDOC_INCLUDE_FPDF_DOC_H_ | 1053 #endif // CORE_FPDFDOC_INCLUDE_FPDF_DOC_H_ |
| OLD | NEW |