| 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_SRC_FPDFDOC_PDF_VT_H_ | 7 #ifndef CORE_SRC_FPDFDOC_PDF_VT_H_ |
| 8 #define CORE_SRC_FPDFDOC_PDF_VT_H_ | 8 #define CORE_SRC_FPDFDOC_PDF_VT_H_ |
| 9 | 9 |
| 10 class CPVT_Size; | 10 class CPVT_Size; |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 return top - bottom; | 77 return top - bottom; |
| 78 return bottom - top; | 78 return bottom - top; |
| 79 } | 79 } |
| 80 }; | 80 }; |
| 81 struct CPVT_SectionInfo { | 81 struct CPVT_SectionInfo { |
| 82 CPVT_SectionInfo() : rcSection(), nTotalLine(0), pSecProps(NULL), pWordProps
(NULL) | 82 CPVT_SectionInfo() : rcSection(), nTotalLine(0), pSecProps(NULL), pWordProps
(NULL) |
| 83 { | 83 { |
| 84 } | 84 } |
| 85 virtual ~CPVT_SectionInfo() | 85 virtual ~CPVT_SectionInfo() |
| 86 { | 86 { |
| 87 if (pSecProps) { | 87 delete pSecProps; |
| 88 delete pSecProps; | 88 delete pWordProps; |
| 89 } | |
| 90 if (pWordProps) { | |
| 91 delete pWordProps; | |
| 92 } | |
| 93 } | 89 } |
| 94 CPVT_SectionInfo(const CPVT_SectionInfo & other): rcSection(), nTotalLine(0)
, pSecProps(NULL), pWordProps(NULL) | 90 CPVT_SectionInfo(const CPVT_SectionInfo & other): rcSection(), nTotalLine(0)
, pSecProps(NULL), pWordProps(NULL) |
| 95 { | 91 { |
| 96 operator = (other); | 92 operator = (other); |
| 97 } | 93 } |
| 98 void operator = (const CPVT_SectionInfo & other) | 94 void operator = (const CPVT_SectionInfo & other) |
| 99 { | 95 { |
| 100 if (this == &other) { | 96 if (this == &other) { |
| 101 return; | 97 return; |
| 102 } | 98 } |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 fWordX(0.0f), fWordY(0.0f), fWordTail(0.0f), nFontIndex(-1), pWordProps(
NULL) | 137 fWordX(0.0f), fWordY(0.0f), fWordTail(0.0f), nFontIndex(-1), pWordProps(
NULL) |
| 142 { | 138 { |
| 143 } | 139 } |
| 144 CPVT_WordInfo(FX_WORD word, int32_t charset, int32_t fontIndex, CPVT_WordPro
ps * pProps): | 140 CPVT_WordInfo(FX_WORD word, int32_t charset, int32_t fontIndex, CPVT_WordPro
ps * pProps): |
| 145 Word(word), nCharset(charset), fWordX(0.0f), fWordY(0.0f), fWordTail(0.0
f), | 141 Word(word), nCharset(charset), fWordX(0.0f), fWordY(0.0f), fWordTail(0.0
f), |
| 146 nFontIndex(fontIndex), pWordProps(pProps) | 142 nFontIndex(fontIndex), pWordProps(pProps) |
| 147 { | 143 { |
| 148 } | 144 } |
| 149 virtual ~CPVT_WordInfo() | 145 virtual ~CPVT_WordInfo() |
| 150 { | 146 { |
| 151 if (pWordProps) { | 147 delete pWordProps; |
| 152 delete pWordProps; | |
| 153 } | |
| 154 } | 148 } |
| 155 CPVT_WordInfo(const CPVT_WordInfo & word): Word(0), nCharset(0), | 149 CPVT_WordInfo(const CPVT_WordInfo & word): Word(0), nCharset(0), |
| 156 fWordX(0.0f), fWordY(0.0f), fWordTail(0.0f), nFontIndex(-1), pWordProps(
NULL) | 150 fWordX(0.0f), fWordY(0.0f), fWordTail(0.0f), nFontIndex(-1), pWordProps(
NULL) |
| 157 { | 151 { |
| 158 operator = (word); | 152 operator = (word); |
| 159 } | 153 } |
| 160 void operator = (const CPVT_WordInfo & word) | 154 void operator = (const CPVT_WordInfo & word) |
| 161 { | 155 { |
| 162 if (this == &word) { | 156 if (this == &word) { |
| 163 return; | 157 return; |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 const CPVT_WordPlace & GetAt() const | 623 const CPVT_WordPlace & GetAt() const |
| 630 { | 624 { |
| 631 return m_CurPos; | 625 return m_CurPos; |
| 632 }; | 626 }; |
| 633 private: | 627 private: |
| 634 CPVT_WordPlace m_CurPos
; | 628 CPVT_WordPlace m_CurPos
; |
| 635 CPDF_VariableText * m_pVT; | 629 CPDF_VariableText * m_pVT; |
| 636 }; | 630 }; |
| 637 | 631 |
| 638 #endif // CORE_SRC_FPDFDOC_PDF_VT_H_ | 632 #endif // CORE_SRC_FPDFDOC_PDF_VT_H_ |
| OLD | NEW |