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_FXCRT_FX_BASIC_H_ | 7 #ifndef CORE_INCLUDE_FXCRT_FX_BASIC_H_ |
8 #define CORE_INCLUDE_FXCRT_FX_BASIC_H_ | 8 #define CORE_INCLUDE_FXCRT_FX_BASIC_H_ |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 private: | 198 private: |
199 static const size_t kBufSize = 32768; | 199 static const size_t kBufSize = 32768; |
200 | 200 |
201 size_t m_Length; | 201 size_t m_Length; |
202 std::unique_ptr<uint8_t, FxFreeDeleter> m_pBuffer; | 202 std::unique_ptr<uint8_t, FxFreeDeleter> m_pBuffer; |
203 IFX_StreamWrite* m_pFile; | 203 IFX_StreamWrite* m_pFile; |
204 }; | 204 }; |
205 | 205 |
206 class CFX_CharMap { | 206 class CFX_CharMap { |
207 public: | 207 public: |
208 static CFX_ByteString GetByteString(FX_WORD codepage, | 208 static CFX_ByteString GetByteString(uint16_t codepage, |
209 const CFX_WideString& wstr); | 209 const CFX_WideString& wstr); |
210 | 210 |
211 static CFX_WideString GetWideString(FX_WORD codepage, | 211 static CFX_WideString GetWideString(uint16_t codepage, |
212 const CFX_ByteString& bstr); | 212 const CFX_ByteString& bstr); |
213 | 213 |
214 CFX_CharMap() = delete; | 214 CFX_CharMap() = delete; |
215 }; | 215 }; |
216 | 216 |
217 class CFX_UTF8Decoder { | 217 class CFX_UTF8Decoder { |
218 public: | 218 public: |
219 CFX_UTF8Decoder() { m_PendingBytes = 0; } | 219 CFX_UTF8Decoder() { m_PendingBytes = 0; } |
220 | 220 |
221 void Clear(); | 221 void Clear(); |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 if (((TYPE*)m_pData)[iStart] == data) { | 395 if (((TYPE*)m_pData)[iStart] == data) { |
396 return iStart; | 396 return iStart; |
397 } | 397 } |
398 return -1; | 398 return -1; |
399 } | 399 } |
400 }; | 400 }; |
401 typedef CFX_ArrayTemplate<FX_DWORD> CFX_DWordArray; | 401 typedef CFX_ArrayTemplate<FX_DWORD> CFX_DWordArray; |
402 | 402 |
403 #ifdef PDF_ENABLE_XFA | 403 #ifdef PDF_ENABLE_XFA |
404 typedef CFX_ArrayTemplate<CFX_WideStringC> CFX_WideStringCArray; | 404 typedef CFX_ArrayTemplate<CFX_WideStringC> CFX_WideStringCArray; |
405 typedef CFX_ArrayTemplate<FX_WORD> CFX_WordArray; | |
406 typedef CFX_ArrayTemplate<FX_FLOAT> CFX_FloatArray; | 405 typedef CFX_ArrayTemplate<FX_FLOAT> CFX_FloatArray; |
407 typedef CFX_ArrayTemplate<uint8_t> CFX_ByteArray; | 406 typedef CFX_ArrayTemplate<uint8_t> CFX_ByteArray; |
408 typedef CFX_ArrayTemplate<int32_t> CFX_Int32Array; | 407 typedef CFX_ArrayTemplate<int32_t> CFX_Int32Array; |
409 typedef CFX_ArrayTemplate<void*> CFX_PtrArray; | 408 typedef CFX_ArrayTemplate<void*> CFX_PtrArray; |
410 #endif // PDF_ENABLE_XFA | 409 #endif // PDF_ENABLE_XFA |
411 | 410 |
412 #ifdef PDF_ENABLE_XFA | 411 #ifdef PDF_ENABLE_XFA |
413 template <class ObjectClass> | 412 template <class ObjectClass> |
414 class CFX_ObjectArray : public CFX_BasicArray { | 413 class CFX_ObjectArray : public CFX_BasicArray { |
415 public: | 414 public: |
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1145 FX_FLOAT c; | 1144 FX_FLOAT c; |
1146 FX_FLOAT d; | 1145 FX_FLOAT d; |
1147 FX_FLOAT e; | 1146 FX_FLOAT e; |
1148 FX_FLOAT f; | 1147 FX_FLOAT f; |
1149 FX_FLOAT g; | 1148 FX_FLOAT g; |
1150 FX_FLOAT h; | 1149 FX_FLOAT h; |
1151 FX_FLOAT i; | 1150 FX_FLOAT i; |
1152 }; | 1151 }; |
1153 | 1152 |
1154 #endif // CORE_INCLUDE_FXCRT_FX_BASIC_H_ | 1153 #endif // CORE_INCLUDE_FXCRT_FX_BASIC_H_ |
OLD | NEW |