OLD | NEW |
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 #include "core/fpdfdoc/cpvt_wordinfo.h" | 7 #include "core/fpdfdoc/cpvt_wordinfo.h" |
| 8 #include "third_party/base/ptr_util.h" |
8 | 9 |
9 CPVT_WordInfo::CPVT_WordInfo() | 10 CPVT_WordInfo::CPVT_WordInfo() |
10 : Word(0), | 11 : Word(0), |
11 nCharset(FXFONT_ANSI_CHARSET), | 12 nCharset(FXFONT_ANSI_CHARSET), |
12 fWordX(0.0f), | 13 fWordX(0.0f), |
13 fWordY(0.0f), | 14 fWordY(0.0f), |
14 fWordTail(0.0f), | 15 fWordTail(0.0f), |
15 nFontIndex(-1) {} | 16 nFontIndex(-1) {} |
16 | 17 |
17 CPVT_WordInfo::CPVT_WordInfo(uint16_t word, | 18 CPVT_WordInfo::CPVT_WordInfo(uint16_t word, |
(...skipping 23 matching lines...) Expand all Loading... |
41 if (this == &word) | 42 if (this == &word) |
42 return; | 43 return; |
43 | 44 |
44 Word = word.Word; | 45 Word = word.Word; |
45 nCharset = word.nCharset; | 46 nCharset = word.nCharset; |
46 nFontIndex = word.nFontIndex; | 47 nFontIndex = word.nFontIndex; |
47 fWordX = word.fWordX; | 48 fWordX = word.fWordX; |
48 fWordY = word.fWordY; | 49 fWordY = word.fWordY; |
49 fWordTail = word.fWordTail; | 50 fWordTail = word.fWordTail; |
50 if (word.pWordProps) | 51 if (word.pWordProps) |
51 pWordProps.reset(new CPVT_WordProps(*word.pWordProps)); | 52 pWordProps = pdfium::MakeUnique<CPVT_WordProps>(*word.pWordProps); |
52 else | 53 else |
53 pWordProps.reset(); | 54 pWordProps.reset(); |
54 } | 55 } |
OLD | NEW |