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

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

Issue 1298393003: Extern in .cpp file is a code smell, part 2. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rename, remove dead fn. Created 5 years, 4 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/fpdfdoc/doc_ap.cpp ('k') | core/src/fpdftext/fpdf_text_search.cpp » ('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 "../../../third_party/base/nonstd_unique_ptr.h" 7 #include "../../../third_party/base/nonstd_unique_ptr.h"
8 #include "../../include/fpdfapi/fpdf_page.h" 8 #include "../../include/fpdfapi/fpdf_page.h"
9 #include "../../include/fpdfapi/fpdf_pageobj.h" 9 #include "../../include/fpdfapi/fpdf_pageobj.h"
10 #include "../../include/fpdfapi/fpdf_resource.h" 10 #include "../../include/fpdfapi/fpdf_resource.h"
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 PDF_GetPageText_Unicode(wlines, pDoc, pPage, iMinWidth, flags); 776 PDF_GetPageText_Unicode(wlines, pDoc, pPage, iMinWidth, flags);
777 for (int i = 0; i < wlines.GetSize(); i++) { 777 for (int i = 0; i < wlines.GetSize(); i++) {
778 CFX_WideString wstr = wlines[i]; 778 CFX_WideString wstr = wlines[i];
779 CFX_ByteString str; 779 CFX_ByteString str;
780 for (int c = 0; c < wstr.GetLength(); c++) { 780 for (int c = 0; c < wstr.GetLength(); c++) {
781 str += CharFromUnicodeAlt(wstr[c], FXSYS_GetACP(), "?"); 781 str += CharFromUnicodeAlt(wstr[c], FXSYS_GetACP(), "?");
782 } 782 }
783 lines.Add(str); 783 lines.Add(str);
784 } 784 }
785 } 785 }
786 extern void _PDF_GetTextStream_Unicode(CFX_WideTextBuf& buffer,
787 CPDF_PageObjects* pPage,
788 FX_BOOL bUseLF,
789 CFX_PtrArray* pObjArray);
790 void PDF_GetTextStream_Unicode(CFX_WideTextBuf& buffer, 786 void PDF_GetTextStream_Unicode(CFX_WideTextBuf& buffer,
791 CPDF_Document* pDoc, 787 CPDF_Document* pDoc,
792 CPDF_Dictionary* pPage, 788 CPDF_Dictionary* pPage,
793 FX_DWORD flags) { 789 FX_DWORD flags) {
794 buffer.EstimateSize(0, 10240); 790 buffer.EstimateSize(0, 10240);
795 CPDF_Page page; 791 CPDF_Page page;
796 page.Load(pDoc, pPage); 792 page.Load(pDoc, pPage);
797 CPDF_ParseOptions options; 793 CPDF_ParseOptions options;
798 options.m_bTextOnly = TRUE; 794 options.m_bTextOnly = TRUE;
799 options.m_bSeparateForm = FALSE; 795 options.m_bSeparateForm = FALSE;
800 page.ParseContent(&options); 796 page.ParseContent(&options);
801 _PDF_GetTextStream_Unicode(buffer, &page, TRUE, NULL); 797 GetTextStream_Unicode(buffer, &page, TRUE, NULL);
802 } 798 }
OLDNEW
« no previous file with comments | « core/src/fpdfdoc/doc_ap.cpp ('k') | core/src/fpdftext/fpdf_text_search.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698