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

Side by Side Diff: core/fpdfdoc/cpvt_wordinfo.h

Issue 2083943003: Use FXFONT defines in place of integers. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: nits Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « core/fpdfdoc/cpvt_fontmap.cpp ('k') | core/fpdfdoc/doc_form.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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_CPVT_WORDINFO_H_ 7 #ifndef CORE_FPDFDOC_CPVT_WORDINFO_H_
8 #define CORE_FPDFDOC_CPVT_WORDINFO_H_ 8 #define CORE_FPDFDOC_CPVT_WORDINFO_H_
9 9
10 #include "core/fpdfdoc/include/cpvt_wordprops.h" 10 #include "core/fpdfdoc/include/cpvt_wordprops.h"
11 #include "core/fxcrt/include/fx_system.h" 11 #include "core/fxcrt/include/fx_system.h"
12 12
13 struct CPVT_WordInfo { 13 struct CPVT_WordInfo {
14 CPVT_WordInfo() 14 CPVT_WordInfo()
15 : Word(0), 15 : Word(0),
16 nCharset(0), 16 nCharset(FXFONT_ANSI_CHARSET),
17 fWordX(0.0f), 17 fWordX(0.0f),
18 fWordY(0.0f), 18 fWordY(0.0f),
19 fWordTail(0.0f), 19 fWordTail(0.0f),
20 nFontIndex(-1), 20 nFontIndex(-1),
21 pWordProps(nullptr) {} 21 pWordProps(nullptr) {}
22 22
23 CPVT_WordInfo(uint16_t word, 23 CPVT_WordInfo(uint16_t word,
24 int32_t charset, 24 int32_t charset,
25 int32_t fontIndex, 25 int32_t fontIndex,
26 CPVT_WordProps* pProps) 26 CPVT_WordProps* pProps)
27 : Word(word), 27 : Word(word),
28 nCharset(charset), 28 nCharset(charset),
29 fWordX(0.0f), 29 fWordX(0.0f),
30 fWordY(0.0f), 30 fWordY(0.0f),
31 fWordTail(0.0f), 31 fWordTail(0.0f),
32 nFontIndex(fontIndex), 32 nFontIndex(fontIndex),
33 pWordProps(pProps) {} 33 pWordProps(pProps) {}
34 34
35 CPVT_WordInfo(const CPVT_WordInfo& word) 35 CPVT_WordInfo(const CPVT_WordInfo& word)
36 : Word(0), 36 : Word(0),
37 nCharset(0), 37 nCharset(FXFONT_ANSI_CHARSET),
38 fWordX(0.0f), 38 fWordX(0.0f),
39 fWordY(0.0f), 39 fWordY(0.0f),
40 fWordTail(0.0f), 40 fWordTail(0.0f),
41 nFontIndex(-1), 41 nFontIndex(-1),
42 pWordProps(nullptr) { 42 pWordProps(nullptr) {
43 operator=(word); 43 operator=(word);
44 } 44 }
45 45
46 ~CPVT_WordInfo() { delete pWordProps; } 46 ~CPVT_WordInfo() { delete pWordProps; }
47 47
(...skipping 15 matching lines...) Expand all
63 uint16_t Word; 63 uint16_t Word;
64 int32_t nCharset; 64 int32_t nCharset;
65 FX_FLOAT fWordX; 65 FX_FLOAT fWordX;
66 FX_FLOAT fWordY; 66 FX_FLOAT fWordY;
67 FX_FLOAT fWordTail; 67 FX_FLOAT fWordTail;
68 int32_t nFontIndex; 68 int32_t nFontIndex;
69 CPVT_WordProps* pWordProps; 69 CPVT_WordProps* pWordProps;
70 }; 70 };
71 71
72 #endif // CORE_FPDFDOC_CPVT_WORDINFO_H_ 72 #endif // CORE_FPDFDOC_CPVT_WORDINFO_H_
OLDNEW
« no previous file with comments | « core/fpdfdoc/cpvt_fontmap.cpp ('k') | core/fpdfdoc/doc_form.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698