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 #include "../../../include/fpdfapi/fpdf_page.h" | 7 #include "../../../include/fpdfapi/fpdf_page.h" |
8 #include "../../../include/fpdfapi/fpdf_module.h" | 8 #include "../../../include/fpdfapi/fpdf_module.h" |
9 #include "pageint.h" | 9 #include "pageint.h" |
10 CPDF_PageObject* CPDF_PageObject::Create(int type) | 10 CPDF_PageObject* CPDF_PageObject::Create(int type) |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 m_pCharCodes = NULL; | 197 m_pCharCodes = NULL; |
198 } | 198 } |
199 if (m_pCharPos) { | 199 if (m_pCharPos) { |
200 FX_Free(m_pCharPos); | 200 FX_Free(m_pCharPos); |
201 m_pCharPos = NULL; | 201 m_pCharPos = NULL; |
202 } | 202 } |
203 m_nChars = pSrcObj->m_nChars; | 203 m_nChars = pSrcObj->m_nChars; |
204 if (m_nChars > 1) { | 204 if (m_nChars > 1) { |
205 m_pCharCodes = FX_Alloc(FX_DWORD, m_nChars); | 205 m_pCharCodes = FX_Alloc(FX_DWORD, m_nChars); |
206 m_pCharPos = FX_Alloc(FX_FLOAT, m_nChars - 1); | 206 m_pCharPos = FX_Alloc(FX_FLOAT, m_nChars - 1); |
207 for (int i = 0; i < m_nChars; i ++) { | 207 int i; |
| 208 for (i = 0; i < m_nChars; i ++) { |
208 m_pCharCodes[i] = pSrcObj->m_pCharCodes[i]; | 209 m_pCharCodes[i] = pSrcObj->m_pCharCodes[i]; |
209 } | 210 } |
210 for (int i = 0; i < m_nChars - 1; i ++) { | 211 for (i = 0; i < m_nChars - 1; i ++) { |
211 m_pCharPos[i] = pSrcObj->m_pCharPos[i]; | 212 m_pCharPos[i] = pSrcObj->m_pCharPos[i]; |
212 } | 213 } |
213 } else { | 214 } else { |
214 m_pCharCodes = pSrcObj->m_pCharCodes; | 215 m_pCharCodes = pSrcObj->m_pCharCodes; |
215 } | 216 } |
216 m_PosX = pSrcObj->m_PosX; | 217 m_PosX = pSrcObj->m_PosX; |
217 m_PosY = pSrcObj->m_PosY; | 218 m_PosY = pSrcObj->m_PosY; |
218 } | 219 } |
219 void CPDF_TextObject::GetTextMatrix(CFX_AffineMatrix* pMatrix) const | 220 void CPDF_TextObject::GetTextMatrix(CFX_AffineMatrix* pMatrix) const |
220 { | 221 { |
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1021 matrix = m_PageMatrix; | 1022 matrix = m_PageMatrix; |
1022 matrix.Concat(display_matrix); | 1023 matrix.Concat(display_matrix); |
1023 } | 1024 } |
1024 CPDF_ParseOptions::CPDF_ParseOptions() | 1025 CPDF_ParseOptions::CPDF_ParseOptions() |
1025 { | 1026 { |
1026 m_bTextOnly = FALSE; | 1027 m_bTextOnly = FALSE; |
1027 m_bMarkedContent = TRUE; | 1028 m_bMarkedContent = TRUE; |
1028 m_bSeparateForm = TRUE; | 1029 m_bSeparateForm = TRUE; |
1029 m_bDecodeInlineImage = FALSE; | 1030 m_bDecodeInlineImage = FALSE; |
1030 } | 1031 } |
OLD | NEW |