Chromium Code Reviews| 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 <map> | 10 #include <map> |
| (...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 944 HighlightingMode GetHighlightingMode(); | 944 HighlightingMode GetHighlightingMode(); |
| 945 | 945 |
| 946 FX_BOOL HasMKEntry(CFX_ByteString csEntry); | 946 FX_BOOL HasMKEntry(CFX_ByteString csEntry); |
| 947 | 947 |
| 948 int GetRotation(); | 948 int GetRotation(); |
| 949 | 949 |
| 950 inline FX_ARGB GetBorderColor(int& iColorType) { | 950 inline FX_ARGB GetBorderColor(int& iColorType) { |
| 951 return GetColor(iColorType, "BC"); | 951 return GetColor(iColorType, "BC"); |
| 952 } | 952 } |
| 953 | 953 |
| 954 inline FX_FLOAT GetOriginalBorderColor(int index) { | 954 FX_FLOAT GetOriginalBorderColor(int index) { |
| 955 return GetOriginalColor(index, "BC"); | 955 return GetOriginalColor(index, "BC"); |
| 956 } | 956 } |
| 957 | 957 |
| 958 inline void GetOriginalBorderColor(int& iColorType, FX_FLOAT fc[4]) { | 958 void GetOriginalBorderColor(int& iColorType, FX_FLOAT fc[4]) { |
| 959 GetOriginalColor(iColorType, fc, "BC"); | 959 GetOriginalColor(iColorType, fc, "BC"); |
| 960 } | 960 } |
| 961 | 961 |
| 962 inline FX_ARGB GetBackgroundColor(int& iColorType) { | 962 FX_ARGB GetBackgroundColor(int& iColorType) { |
| 963 return GetColor(iColorType, "BG"); | 963 return GetColor(iColorType, "BG"); |
| 964 } | 964 } |
| 965 | 965 |
| 966 inline FX_FLOAT GetOriginalBackgroundColor(int index) { | 966 FX_FLOAT GetOriginalBackgroundColor(int index) { |
| 967 return GetOriginalColor(index, "BG"); | 967 return GetOriginalColor(index, "BG"); |
| 968 } | 968 } |
| 969 | 969 |
| 970 inline void GetOriginalBackgroundColor(int& iColorType, FX_FLOAT fc[4]) { | 970 void GetOriginalBackgroundColor(int& iColorType, FX_FLOAT fc[4]) { |
| 971 GetOriginalColor(iColorType, fc, "BG"); | 971 GetOriginalColor(iColorType, fc, "BG"); |
| 972 } | 972 } |
| 973 | 973 |
| 974 inline CFX_WideString GetNormalCaption() { return GetCaption("CA"); } | 974 CFX_WideString GetNormalCaption() { return GetCaption("CA"); } |
| 975 | 975 |
| 976 inline CFX_WideString GetRolloverCaption() { return GetCaption("RC"); } | 976 CFX_WideString GetRolloverCaption() { return GetCaption("RC"); } |
| 977 | 977 |
| 978 inline CFX_WideString GetDownCaption() { return GetCaption("AC"); } | 978 CFX_WideString GetDownCaption() { return GetCaption("AC"); } |
| 979 | 979 |
| 980 inline CPDF_Stream* GetNormalIcon() { return GetIcon("I"); } | 980 CPDF_Stream* GetNormalIcon() { return GetIcon("I"); } |
| 981 | 981 |
| 982 inline CPDF_Stream* GetRolloverIcon() { return GetIcon("RI"); } | 982 CPDF_Stream* GetRolloverIcon() { return GetIcon("RI"); } |
| 983 | 983 |
| 984 inline CPDF_Stream* GetDownIcon() { return GetIcon("IX"); } | 984 CPDF_Stream* GetDownIcon() { return GetIcon("IX"); } |
| 985 | 985 |
| 986 CPDF_IconFit GetIconFit(); | 986 CPDF_IconFit GetIconFit(); |
| 987 | 987 |
| 988 int GetTextPosition(); | 988 int GetTextPosition(); |
| 989 | 989 |
| 990 CPDF_Action GetAction(); | 990 CPDF_Action GetAction(); |
| 991 | 991 |
| 992 CPDF_AAction GetAdditionalAction(); | 992 CPDF_AAction GetAdditionalAction(); |
| 993 | 993 |
| 994 CPDF_DefaultAppearance GetDefaultAppearance(); | 994 CPDF_DefaultAppearance GetDefaultAppearance(); |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 1011 FX_FLOAT GetOriginalColor(int index, CFX_ByteString csEntry); | 1011 FX_FLOAT GetOriginalColor(int index, CFX_ByteString csEntry); |
| 1012 | 1012 |
| 1013 void GetOriginalColor(int& iColorType, | 1013 void GetOriginalColor(int& iColorType, |
| 1014 FX_FLOAT fc[4], | 1014 FX_FLOAT fc[4], |
| 1015 CFX_ByteString csEntry); | 1015 CFX_ByteString csEntry); |
| 1016 | 1016 |
| 1017 CFX_WideString GetCaption(CFX_ByteString csEntry); | 1017 CFX_WideString GetCaption(CFX_ByteString csEntry); |
| 1018 | 1018 |
| 1019 CPDF_Stream* GetIcon(CFX_ByteString csEntry); | 1019 CPDF_Stream* GetIcon(CFX_ByteString csEntry); |
| 1020 | 1020 |
| 1021 CPDF_ApSettings GetMK(FX_BOOL bCreate); | 1021 CPDF_ApSettings GetMK(); |
| 1022 | 1022 |
| 1023 CPDF_InterForm* m_pForm; | 1023 CPDF_InterForm* m_pForm; |
| 1024 | 1024 |
| 1025 CPDF_FormField* m_pField; | 1025 CPDF_FormField* m_pField; |
| 1026 | 1026 |
| 1027 CPDF_Dictionary* m_pWidgetDict; | 1027 CPDF_Dictionary* m_pWidgetDict; |
| 1028 friend class CPDF_InterForm; | 1028 friend class CPDF_InterForm; |
| 1029 friend class CPDF_FormField; | 1029 friend class CPDF_FormField; |
| 1030 }; | 1030 }; |
| 1031 class CPDF_FormNotify { | 1031 class CPDF_FormNotify { |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1100 CPDF_Array* PrintPageRange() const; | 1100 CPDF_Array* PrintPageRange() const; |
| 1101 | 1101 |
| 1102 CFX_ByteString Duplex() const; | 1102 CFX_ByteString Duplex() const; |
| 1103 | 1103 |
| 1104 protected: | 1104 protected: |
| 1105 CPDF_Document* const m_pDoc; | 1105 CPDF_Document* const m_pDoc; |
| 1106 }; | 1106 }; |
| 1107 | 1107 |
| 1108 class CPDF_ApSettings { | 1108 class CPDF_ApSettings { |
| 1109 public: | 1109 public: |
| 1110 // TODO(thestig): Examine why this cannot be explicit. | 1110 explicit CPDF_ApSettings(CPDF_Dictionary* pDict); |
| 1111 CPDF_ApSettings(CPDF_Dictionary* pDict = NULL) { m_pDict = pDict; } | |
| 1112 | 1111 |
| 1113 operator CPDF_Dictionary*() const { return m_pDict; } | 1112 FX_BOOL HasMKEntry(const CFX_ByteStringC& csEntry) const; |
|
Tom Sepez
2015/11/10 17:28:04
You removed this, right? Are we sure there aren't
Tom Sepez
2015/11/10 17:31:20
Guess not:
$ git grep '(\s*CPDF_Dictionary\s*\*\s
Lei Zhang
2015/11/11 02:27:55
Acknowledged.
Lei Zhang
2015/11/11 02:27:55
cs.chromium.org's xref also shows all uses of this
| |
| 1113 int GetRotation() const; | |
| 1114 | 1114 |
| 1115 FX_BOOL HasMKEntry(const CFX_ByteStringC& csEntry); | 1115 FX_ARGB GetBorderColor(int& iColorType) const { |
| 1116 | |
| 1117 int GetRotation(); | |
| 1118 | |
| 1119 inline FX_ARGB GetBorderColor(int& iColorType) { | |
| 1120 return GetColor(iColorType, FX_BSTRC("BC")); | 1116 return GetColor(iColorType, FX_BSTRC("BC")); |
| 1121 } | 1117 } |
| 1122 | 1118 |
| 1123 inline FX_FLOAT GetOriginalBorderColor(int index) { | 1119 FX_FLOAT GetOriginalBorderColor(int index) const { |
| 1124 return GetOriginalColor(index, FX_BSTRC("BC")); | 1120 return GetOriginalColor(index, FX_BSTRC("BC")); |
| 1125 } | 1121 } |
| 1126 | 1122 |
| 1127 inline void GetOriginalBorderColor(int& iColorType, FX_FLOAT fc[4]) { | 1123 void GetOriginalBorderColor(int& iColorType, FX_FLOAT fc[4]) const { |
| 1128 GetOriginalColor(iColorType, fc, FX_BSTRC("BC")); | 1124 GetOriginalColor(iColorType, fc, FX_BSTRC("BC")); |
| 1129 } | 1125 } |
| 1130 | 1126 |
| 1131 inline FX_ARGB GetBackgroundColor(int& iColorType) { | 1127 FX_ARGB GetBackgroundColor(int& iColorType) const { |
| 1132 return GetColor(iColorType, FX_BSTRC("BG")); | 1128 return GetColor(iColorType, FX_BSTRC("BG")); |
| 1133 } | 1129 } |
| 1134 | 1130 |
| 1135 inline FX_FLOAT GetOriginalBackgroundColor(int index) { | 1131 FX_FLOAT GetOriginalBackgroundColor(int index) const { |
| 1136 return GetOriginalColor(index, FX_BSTRC("BG")); | 1132 return GetOriginalColor(index, FX_BSTRC("BG")); |
| 1137 } | 1133 } |
| 1138 | 1134 |
| 1139 inline void GetOriginalBackgroundColor(int& iColorType, FX_FLOAT fc[4]) { | 1135 void GetOriginalBackgroundColor(int& iColorType, FX_FLOAT fc[4]) const { |
| 1140 GetOriginalColor(iColorType, fc, FX_BSTRC("BG")); | 1136 GetOriginalColor(iColorType, fc, FX_BSTRC("BG")); |
| 1141 } | 1137 } |
| 1142 | 1138 |
| 1143 inline CFX_WideString GetNormalCaption() { | 1139 CFX_WideString GetNormalCaption() const { return GetCaption(FX_BSTRC("CA")); } |
| 1144 return GetCaption(FX_BSTRC("CA")); | |
| 1145 } | |
| 1146 | 1140 |
| 1147 inline CFX_WideString GetRolloverCaption() { | 1141 CFX_WideString GetRolloverCaption() const { |
| 1148 return GetCaption(FX_BSTRC("RC")); | 1142 return GetCaption(FX_BSTRC("RC")); |
| 1149 } | 1143 } |
| 1150 | 1144 |
| 1151 inline CFX_WideString GetDownCaption() { return GetCaption(FX_BSTRC("AC")); } | 1145 CFX_WideString GetDownCaption() const { return GetCaption(FX_BSTRC("AC")); } |
| 1152 | 1146 |
| 1153 inline CPDF_Stream* GetNormalIcon() { return GetIcon(FX_BSTRC("I")); } | 1147 CPDF_Stream* GetNormalIcon() const { return GetIcon(FX_BSTRC("I")); } |
| 1154 | 1148 |
| 1155 inline CPDF_Stream* GetRolloverIcon() { return GetIcon(FX_BSTRC("RI")); } | 1149 CPDF_Stream* GetRolloverIcon() const { return GetIcon(FX_BSTRC("RI")); } |
| 1156 | 1150 |
| 1157 inline CPDF_Stream* GetDownIcon() { return GetIcon(FX_BSTRC("IX")); } | 1151 CPDF_Stream* GetDownIcon() const { return GetIcon(FX_BSTRC("IX")); } |
| 1158 | 1152 |
| 1159 CPDF_IconFit GetIconFit(); | 1153 CPDF_IconFit GetIconFit() const; |
| 1160 | 1154 |
| 1161 int GetTextPosition(); | 1155 int GetTextPosition() const; |
| 1162 | |
| 1163 CPDF_Dictionary* m_pDict; | |
| 1164 | 1156 |
| 1165 protected: | 1157 protected: |
| 1166 FX_ARGB GetColor(int& iColorType, const CFX_ByteStringC& csEntry); | 1158 friend class CPDF_FormControl; |
| 1167 | 1159 |
| 1168 FX_FLOAT GetOriginalColor(int index, const CFX_ByteStringC& csEntry); | 1160 FX_ARGB GetColor(int& iColorType, const CFX_ByteStringC& csEntry) const; |
| 1161 | |
| 1162 FX_FLOAT GetOriginalColor(int index, const CFX_ByteStringC& csEntry) const; | |
| 1169 | 1163 |
| 1170 void GetOriginalColor(int& iColorType, | 1164 void GetOriginalColor(int& iColorType, |
| 1171 FX_FLOAT fc[4], | 1165 FX_FLOAT fc[4], |
| 1172 const CFX_ByteStringC& csEntry); | 1166 const CFX_ByteStringC& csEntry) const; |
| 1173 | 1167 |
| 1174 CFX_WideString GetCaption(const CFX_ByteStringC& csEntry); | 1168 CFX_WideString GetCaption(const CFX_ByteStringC& csEntry) const; |
| 1175 | 1169 |
| 1176 CPDF_Stream* GetIcon(const CFX_ByteStringC& csEntry); | 1170 CPDF_Stream* GetIcon(const CFX_ByteStringC& csEntry) const; |
| 1177 friend class CPDF_FormControl; | 1171 |
| 1172 CPDF_Dictionary* const m_pDict; | |
| 1178 }; | 1173 }; |
| 1179 | 1174 |
| 1175 CFX_WideString FILESPEC_EncodeFileName(const CFX_WideStringC& filepath); | |
| 1176 | |
| 1180 #endif // CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ | 1177 #endif // CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_ |
| OLD | NEW |