| 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_INCLUDE_FPDFDOC_FPDF_DOC_H_ | 7 #ifndef CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ |
| 8 #define CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ | 8 #define CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ |
| 9 | 9 |
| 10 #include "../fpdfapi/fpdf_parser.h" | 10 #include "../fpdfapi/fpdf_parser.h" |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 | 324 |
| 325 FX_DWORD GetFlags() const | 325 FX_DWORD GetFlags() const |
| 326 { | 326 { |
| 327 return m_pDict->GetInteger("Flags"); | 327 return m_pDict->GetInteger("Flags"); |
| 328 } | 328 } |
| 329 | 329 |
| 330 CFX_WideString GetJavaScript() const; | 330 CFX_WideString GetJavaScript() const; |
| 331 | 331 |
| 332 CPDF_Dictionary* GetAnnot() const; | 332 CPDF_Dictionary* GetAnnot() const; |
| 333 | 333 |
| 334 FX_INT32» » » GetOperationType() const; | 334 int32_t» » » » GetOperationType() const; |
| 335 | 335 |
| 336 CPDF_Stream* GetSoundStream() const | 336 CPDF_Stream* GetSoundStream() const |
| 337 { | 337 { |
| 338 return m_pDict->GetStream("Sound"); | 338 return m_pDict->GetStream("Sound"); |
| 339 } | 339 } |
| 340 | 340 |
| 341 FX_FLOAT GetVolume() const | 341 FX_FLOAT GetVolume() const |
| 342 { | 342 { |
| 343 return m_pDict->GetNumber("Volume"); | 343 return m_pDict->GetNumber("Volume"); |
| 344 } | 344 } |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 726 | 726 |
| 727 static FX_BOOL UpdatingAPEnabled(); | 727 static FX_BOOL UpdatingAPEnabled(); |
| 728 | 728 |
| 729 | 729 |
| 730 static CFX_ByteString GenerateNewResourceName(const CPDF_Dictionary* p
ResDict, FX_LPCSTR csType, int iMinLen = 2, FX_LPCSTR csPrefix = ""); | 730 static CFX_ByteString GenerateNewResourceName(const CPDF_Dictionary* p
ResDict, FX_LPCSTR csType, int iMinLen = 2, FX_LPCSTR csPrefix = ""); |
| 731 | 731 |
| 732 | 732 |
| 733 | 733 |
| 734 static CPDF_Font* AddSystemDefaultFont(const CPDF_Document* pDocum
ent); | 734 static CPDF_Font* AddSystemDefaultFont(const CPDF_Document* pDocum
ent); |
| 735 | 735 |
| 736 static CPDF_Font*» » AddSystemFont(const CPDF_Document* pDocument, CF
X_ByteString csFontName, FX_BYTE iCharSet = 1); | 736 static CPDF_Font*» » AddSystemFont(const CPDF_Document* pDocument, CF
X_ByteString csFontName, uint8_t iCharSet = 1); |
| 737 | 737 |
| 738 static CPDF_Font*» » AddSystemFont(const CPDF_Document* pDocument, CF
X_WideString csFontName, FX_BYTE iCharSet = 1); | 738 static CPDF_Font*» » AddSystemFont(const CPDF_Document* pDocument, CF
X_WideString csFontName, uint8_t iCharSet = 1); |
| 739 | 739 |
| 740 static CPDF_Font* AddStandardFont(const CPDF_Document* pDocument,
CFX_ByteString csFontName); | 740 static CPDF_Font* AddStandardFont(const CPDF_Document* pDocument,
CFX_ByteString csFontName); |
| 741 | 741 |
| 742 static CFX_ByteString» GetNativeFont(FX_BYTE iCharSet, FX_LPVOID pLogFo
nt = NULL); | 742 static CFX_ByteString» GetNativeFont(uint8_t iCharSet, FX_LPVOID pLogFo
nt = NULL); |
| 743 | 743 |
| 744 static CFX_ByteString GetNativeFont(FX_LPVOID pLogFont = NULL); | 744 static CFX_ByteString GetNativeFont(FX_LPVOID pLogFont = NULL); |
| 745 | 745 |
| 746 static FX_BYTE» » » GetNativeCharSet(); | 746 static uint8_t» » » GetNativeCharSet(); |
| 747 | 747 |
| 748 static CPDF_Font*» » AddNativeFont(FX_BYTE iCharSet, const CPDF_Docum
ent* pDocument); | 748 static CPDF_Font*» » AddNativeFont(uint8_t iCharSet, const CPDF_Docum
ent* pDocument); |
| 749 | 749 |
| 750 static CPDF_Font* AddNativeFont(const CPDF_Document* pDocument); | 750 static CPDF_Font* AddNativeFont(const CPDF_Document* pDocument); |
| 751 | 751 |
| 752 | 752 |
| 753 | 753 |
| 754 | 754 |
| 755 FX_BOOL ValidateFieldName(CFX_WideString
& csNewFieldName, int iType); | 755 FX_BOOL ValidateFieldName(CFX_WideString
& csNewFieldName, int iType); |
| 756 | 756 |
| 757 FX_BOOL ValidateFieldName(const CPDF_For
mField* pField, CFX_WideString& csNewFieldName); | 757 FX_BOOL ValidateFieldName(const CPDF_For
mField* pField, CFX_WideString& csNewFieldName); |
| 758 | 758 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 830 | 830 |
| 831 | 831 |
| 832 FX_DWORD CountFormFonts(); | 832 FX_DWORD CountFormFonts(); |
| 833 | 833 |
| 834 CPDF_Font* GetFormFont(FX_DWORD index, CFX_ByteStri
ng& csNameTag); | 834 CPDF_Font* GetFormFont(FX_DWORD index, CFX_ByteStri
ng& csNameTag); |
| 835 | 835 |
| 836 CPDF_Font* GetFormFont(CFX_ByteString csNameTag); | 836 CPDF_Font* GetFormFont(CFX_ByteString csNameTag); |
| 837 | 837 |
| 838 CPDF_Font* GetFormFont(CFX_ByteString csFontName, C
FX_ByteString& csNameTag); | 838 CPDF_Font* GetFormFont(CFX_ByteString csFontName, C
FX_ByteString& csNameTag); |
| 839 | 839 |
| 840 CPDF_Font*» » » » GetNativeFormFont(FX_BYTE iCharSet, CFX_
ByteString& csNameTag); | 840 CPDF_Font*» » » » GetNativeFormFont(uint8_t iCharSet, CFX_
ByteString& csNameTag); |
| 841 | 841 |
| 842 CPDF_Font* GetNativeFormFont(CFX_ByteString& csName
Tag); | 842 CPDF_Font* GetNativeFormFont(CFX_ByteString& csName
Tag); |
| 843 | 843 |
| 844 FX_BOOL FindFormFont(const CPDF_Font* pF
ont, CFX_ByteString& csNameTag); | 844 FX_BOOL FindFormFont(const CPDF_Font* pF
ont, CFX_ByteString& csNameTag); |
| 845 | 845 |
| 846 FX_BOOL FindFormFont(CFX_ByteString csFo
ntName, CPDF_Font*& pFont, CFX_ByteString& csNameTag); | 846 FX_BOOL FindFormFont(CFX_ByteString csFo
ntName, CPDF_Font*& pFont, CFX_ByteString& csNameTag); |
| 847 | 847 |
| 848 inline FX_BOOL FindFormFont(CFX_WideString csFontName,
CPDF_Font*& pFont, CFX_ByteString& csNameTag) | 848 inline FX_BOOL FindFormFont(CFX_WideString csFontName,
CPDF_Font*& pFont, CFX_ByteString& csNameTag) |
| 849 { | 849 { |
| 850 return FindFormFont(PDF_EncodeText(csFontName), pFont, csNameTag); | 850 return FindFormFont(PDF_EncodeText(csFontName), pFont, csNameTag); |
| 851 } | 851 } |
| 852 | 852 |
| 853 | 853 |
| 854 | 854 |
| 855 | 855 |
| 856 | 856 |
| 857 void AddFormFont(const CPDF_Font* pFo
nt, CFX_ByteString& csNameTag); | 857 void AddFormFont(const CPDF_Font* pFo
nt, CFX_ByteString& csNameTag); |
| 858 | 858 |
| 859 CPDF_Font*» » » » AddNativeFormFont(FX_BYTE iCharSet, CFX_
ByteString& csNameTag); | 859 CPDF_Font*» » » » AddNativeFormFont(uint8_t iCharSet, CFX_
ByteString& csNameTag); |
| 860 | 860 |
| 861 CPDF_Font* AddNativeFormFont(CFX_ByteString& csName
Tag); | 861 CPDF_Font* AddNativeFormFont(CFX_ByteString& csName
Tag); |
| 862 | 862 |
| 863 void RemoveFormFont(const CPDF_Font*
pFont); | 863 void RemoveFormFont(const CPDF_Font*
pFont); |
| 864 | 864 |
| 865 void RemoveFormFont(CFX_ByteString cs
NameTag); | 865 void RemoveFormFont(CFX_ByteString cs
NameTag); |
| 866 | 866 |
| 867 | 867 |
| 868 | 868 |
| 869 | 869 |
| (...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1509 public: | 1509 public: |
| 1510 | 1510 |
| 1511 CPDF_PageLabel(CPDF_Document* pDocument) | 1511 CPDF_PageLabel(CPDF_Document* pDocument) |
| 1512 { | 1512 { |
| 1513 m_pDocument = pDocument; | 1513 m_pDocument = pDocument; |
| 1514 } | 1514 } |
| 1515 | 1515 |
| 1516 | 1516 |
| 1517 CFX_WideString GetLabel(int nPage) cons
t; | 1517 CFX_WideString GetLabel(int nPage) cons
t; |
| 1518 | 1518 |
| 1519 FX_INT32» » » » » » GetPageByLabel(FX_BSTR b
sLabel) const; | 1519 int32_t» » » » » » GetPageByLabel(FX_BSTR b
sLabel) const; |
| 1520 | 1520 |
| 1521 | 1521 |
| 1522 FX_INT32» » » » » » GetPageByLabel(FX_WSTR w
sLabel) const; | 1522 int32_t» » » » » » GetPageByLabel(FX_WSTR w
sLabel) const; |
| 1523 | 1523 |
| 1524 protected: | 1524 protected: |
| 1525 CPDF_Document* m_pDocument; | 1525 CPDF_Document* m_pDocument; |
| 1526 }; | 1526 }; |
| 1527 class CPDF_Metadata | 1527 class CPDF_Metadata |
| 1528 { | 1528 { |
| 1529 public: | 1529 public: |
| 1530 | 1530 |
| 1531 CPDF_Metadata(); | 1531 CPDF_Metadata(); |
| 1532 | 1532 |
| 1533 | 1533 |
| 1534 ~CPDF_Metadata(); | 1534 ~CPDF_Metadata(); |
| 1535 | 1535 |
| 1536 void LoadDoc(CPDF_Document *pDoc); | 1536 void LoadDoc(CPDF_Document *pDoc); |
| 1537 | 1537 |
| 1538 | 1538 |
| 1539 FX_INT32» » » GetString(FX_BSTR bsItem, CFX_WideString &wsStr)
; | 1539 int32_t» » » GetString(FX_BSTR bsItem, CFX_WideString &wsStr)
; |
| 1540 | 1540 |
| 1541 CXML_Element* GetRoot() const; | 1541 CXML_Element* GetRoot() const; |
| 1542 | 1542 |
| 1543 CXML_Element* GetRDF() const; | 1543 CXML_Element* GetRDF() const; |
| 1544 | 1544 |
| 1545 protected: | 1545 protected: |
| 1546 FX_LPVOID m_pData; | 1546 FX_LPVOID m_pData; |
| 1547 }; | 1547 }; |
| 1548 class CPDF_ViewerPreferences | 1548 class CPDF_ViewerPreferences |
| 1549 { | 1549 { |
| 1550 public: | 1550 public: |
| 1551 | 1551 |
| 1552 CPDF_ViewerPreferences(CPDF_Document *pDoc); | 1552 CPDF_ViewerPreferences(CPDF_Document *pDoc); |
| 1553 | 1553 |
| 1554 | 1554 |
| 1555 ~CPDF_ViewerPreferences(); | 1555 ~CPDF_ViewerPreferences(); |
| 1556 | 1556 |
| 1557 | 1557 |
| 1558 FX_BOOL IsDirectionR2L() const; | 1558 FX_BOOL IsDirectionR2L() const; |
| 1559 | 1559 |
| 1560 FX_BOOL PrintScaling() const; | 1560 FX_BOOL PrintScaling() const; |
| 1561 | 1561 |
| 1562 FX_INT32 NumCopies() const; | 1562 int32_t NumCopies() const; |
| 1563 | 1563 |
| 1564 CPDF_Array* PrintPageRange() const; | 1564 CPDF_Array* PrintPageRange() const; |
| 1565 | 1565 |
| 1566 CFX_ByteString Duplex() const; | 1566 CFX_ByteString Duplex() const; |
| 1567 | 1567 |
| 1568 protected: | 1568 protected: |
| 1569 CPDF_Document* m_pDoc; | 1569 CPDF_Document* m_pDoc; |
| 1570 }; | 1570 }; |
| 1571 class CPDF_ApSettings | 1571 class CPDF_ApSettings |
| 1572 { | 1572 { |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1691 | 1691 |
| 1692 void GetOriginalColor(int& iColorType
, FX_FLOAT fc[4], FX_BSTR csEntry); | 1692 void GetOriginalColor(int& iColorType
, FX_FLOAT fc[4], FX_BSTR csEntry); |
| 1693 | 1693 |
| 1694 CFX_WideString GetCaption(FX_BSTR csEntry); | 1694 CFX_WideString GetCaption(FX_BSTR csEntry); |
| 1695 | 1695 |
| 1696 CPDF_Stream* GetIcon(FX_BSTR csEntry); | 1696 CPDF_Stream* GetIcon(FX_BSTR csEntry); |
| 1697 friend class CPDF_FormControl; | 1697 friend class CPDF_FormControl; |
| 1698 }; | 1698 }; |
| 1699 | 1699 |
| 1700 #endif // CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ | 1700 #endif // CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ |
| OLD | NEW |