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

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

Issue 1612243002: Merge to XFA: Rename CPDF_PageObjects to CPDF_PageObjectList (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 4 years, 11 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/fpdfapi/fpdf_render/render_int.h ('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 "core/include/fpdfapi/fpdf_page.h" 7 #include "core/include/fpdfapi/fpdf_page.h"
8 #include "core/include/fpdfapi/fpdf_pageobj.h" 8 #include "core/include/fpdfapi/fpdf_pageobj.h"
9 #include "text_int.h" 9 #include "text_int.h"
10 10
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 for (int i = 0; i < unicode_str.GetLength(); i++) { 289 for (int i = 0; i < unicode_str.GetLength(); i++) {
290 m_pObjArray->Add((void*)pObj); 290 m_pObjArray->Add((void*)pObj);
291 m_pObjArray->Add((void*)(intptr_t)item_index); 291 m_pObjArray->Add((void*)(intptr_t)item_index);
292 } 292 }
293 } 293 }
294 } 294 }
295 } 295 }
296 return FALSE; 296 return FALSE;
297 } 297 }
298 void GetTextStream_Unicode(CFX_WideTextBuf& buffer, 298 void GetTextStream_Unicode(CFX_WideTextBuf& buffer,
299 CPDF_PageObjects* pPage, 299 CPDF_PageObjectList* pPage,
300 FX_BOOL bUseLF, 300 FX_BOOL bUseLF,
301 CFX_PtrArray* pObjArray) { 301 CFX_PtrArray* pObjArray) {
302 CPDF_TextStream textstream(buffer, bUseLF, pObjArray); 302 CPDF_TextStream textstream(buffer, bUseLF, pObjArray);
303 FX_POSITION pos = pPage->GetFirstObjectPosition(); 303 FX_POSITION pos = pPage->GetFirstObjectPosition();
304 while (pos) { 304 while (pos) {
305 CPDF_PageObject* pObject = pPage->GetNextObject(pos); 305 CPDF_PageObject* pObject = pPage->GetNextObject(pos);
306 if (pObject && pObject->m_Type == PDFPAGE_TEXT) 306 if (pObject && pObject->m_Type == PDFPAGE_TEXT)
307 textstream.ProcessObject((CPDF_TextObject*)pObject, FALSE); 307 textstream.ProcessObject((CPDF_TextObject*)pObject, FALSE);
308 } 308 }
309 } 309 }
(...skipping 13 matching lines...) Expand all
323 CPDF_PageObject* pObject = page.GetNextObject(pos); 323 CPDF_PageObject* pObject = page.GetNextObject(pos);
324 if (pObject->m_Type != PDFPAGE_TEXT) { 324 if (pObject->m_Type != PDFPAGE_TEXT) {
325 continue; 325 continue;
326 } 326 }
327 if (textstream.ProcessObject((CPDF_TextObject*)pObject, TRUE)) { 327 if (textstream.ProcessObject((CPDF_TextObject*)pObject, TRUE)) {
328 break; 328 break;
329 } 329 }
330 } 330 }
331 return buffer.GetWideString(); 331 return buffer.GetWideString();
332 } 332 }
OLDNEW
« no previous file with comments | « core/src/fpdfapi/fpdf_render/render_int.h ('k') | core/src/fpdftext/text_int.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698