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

Side by Side Diff: core/src/fpdftext/fpdf_text_search.cpp

Issue 1172793002: Merge to XFA: Use stdint.h types throughout PDFium. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 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/src/fpdftext/fpdf_text_int.cpp ('k') | core/src/fpdftext/text_int.h » ('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 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_pageobj.h" 7 #include "../../include/fpdfapi/fpdf_pageobj.h"
8 #include "../../include/fpdftext/fpdf_text.h" 8 #include "../../include/fpdftext/fpdf_text.h"
9 #include "../../include/fpdfapi/fpdf_page.h" 9 #include "../../include/fpdfapi/fpdf_page.h"
10 class CPDF_TextStream 10 class CPDF_TextStream
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 if (item.m_CharCode == (FX_DWORD) - 1) { 259 if (item.m_CharCode == (FX_DWORD) - 1) {
260 continue; 260 continue;
261 } 261 }
262 spacing = 0; 262 spacing = 0;
263 } 263 }
264 CFX_WideString unicode_str = pFont->UnicodeFromCharCode(item.m_CharCode) ; 264 CFX_WideString unicode_str = pFont->UnicodeFromCharCode(item.m_CharCode) ;
265 if (unicode_str.IsEmpty()) { 265 if (unicode_str.IsEmpty()) {
266 m_Buffer.AppendChar((FX_WCHAR)item.m_CharCode); 266 m_Buffer.AppendChar((FX_WCHAR)item.m_CharCode);
267 if (m_pObjArray) { 267 if (m_pObjArray) {
268 m_pObjArray->Add((void*)pObj); 268 m_pObjArray->Add((void*)pObj);
269 m_pObjArray->Add((void*)(FX_INTPTR)item_index); 269 m_pObjArray->Add((void*)(intptr_t)item_index);
270 } 270 }
271 } else { 271 } else {
272 m_Buffer << unicode_str; 272 m_Buffer << unicode_str;
273 if (m_pObjArray) { 273 if (m_pObjArray) {
274 for (int i = 0; i < unicode_str.GetLength(); i ++) { 274 for (int i = 0; i < unicode_str.GetLength(); i ++) {
275 m_pObjArray->Add((void*)pObj); 275 m_pObjArray->Add((void*)pObj);
276 m_pObjArray->Add((void*)(FX_INTPTR)item_index); 276 m_pObjArray->Add((void*)(intptr_t)item_index);
277 } 277 }
278 } 278 }
279 } 279 }
280 } 280 }
281 return FALSE; 281 return FALSE;
282 } 282 }
283 void _PDF_GetTextStream_Unicode(CFX_WideTextBuf& buffer, CPDF_PageObjects* pPage , FX_BOOL bUseLF, 283 void _PDF_GetTextStream_Unicode(CFX_WideTextBuf& buffer, CPDF_PageObjects* pPage , FX_BOOL bUseLF,
284 CFX_PtrArray* pObjArray) 284 CFX_PtrArray* pObjArray)
285 { 285 {
286 CPDF_TextStream textstream(buffer, bUseLF, pObjArray); 286 CPDF_TextStream textstream(buffer, bUseLF, pObjArray);
(...skipping 25 matching lines...) Expand all
312 CPDF_PageObject* pObject = page.GetNextObject(pos); 312 CPDF_PageObject* pObject = page.GetNextObject(pos);
313 if (pObject->m_Type != PDFPAGE_TEXT) { 313 if (pObject->m_Type != PDFPAGE_TEXT) {
314 continue; 314 continue;
315 } 315 }
316 if (textstream.ProcessObject((CPDF_TextObject*)pObject, TRUE)) { 316 if (textstream.ProcessObject((CPDF_TextObject*)pObject, TRUE)) {
317 break; 317 break;
318 } 318 }
319 } 319 }
320 return buffer.GetWideString(); 320 return buffer.GetWideString();
321 } 321 }
OLDNEW
« no previous file with comments | « core/src/fpdftext/fpdf_text_int.cpp ('k') | core/src/fpdftext/text_int.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698