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 int i; | 207 for (int i = 0; i < m_nChars; i ++) { |
208 for (i = 0; i < m_nChars; i ++) { | |
209 m_pCharCodes[i] = pSrcObj->m_pCharCodes[i]; | 208 m_pCharCodes[i] = pSrcObj->m_pCharCodes[i]; |
210 } | 209 } |
211 for (i = 0; i < m_nChars - 1; i ++) { | 210 for (int i = 0; i < m_nChars - 1; i ++) { |
212 m_pCharPos[i] = pSrcObj->m_pCharPos[i]; | 211 m_pCharPos[i] = pSrcObj->m_pCharPos[i]; |
213 } | 212 } |
214 } else { | 213 } else { |
215 m_pCharCodes = pSrcObj->m_pCharCodes; | 214 m_pCharCodes = pSrcObj->m_pCharCodes; |
216 } | 215 } |
217 m_PosX = pSrcObj->m_PosX; | 216 m_PosX = pSrcObj->m_PosX; |
218 m_PosY = pSrcObj->m_PosY; | 217 m_PosY = pSrcObj->m_PosY; |
219 } | 218 } |
220 void CPDF_TextObject::GetTextMatrix(CFX_AffineMatrix* pMatrix) const | 219 void CPDF_TextObject::GetTextMatrix(CFX_AffineMatrix* pMatrix) const |
221 { | 220 { |
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1022 matrix = m_PageMatrix; | 1021 matrix = m_PageMatrix; |
1023 matrix.Concat(display_matrix); | 1022 matrix.Concat(display_matrix); |
1024 } | 1023 } |
1025 CPDF_ParseOptions::CPDF_ParseOptions() | 1024 CPDF_ParseOptions::CPDF_ParseOptions() |
1026 { | 1025 { |
1027 m_bTextOnly = FALSE; | 1026 m_bTextOnly = FALSE; |
1028 m_bMarkedContent = TRUE; | 1027 m_bMarkedContent = TRUE; |
1029 m_bSeparateForm = TRUE; | 1028 m_bSeparateForm = TRUE; |
1030 m_bDecodeInlineImage = FALSE; | 1029 m_bDecodeInlineImage = FALSE; |
1031 } | 1030 } |
OLD | NEW |