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 "../../../third_party/base/nonstd_unique_ptr.h" | |
8 #include "../../include/fpdfapi/fpdf_page.h" | 7 #include "../../include/fpdfapi/fpdf_page.h" |
9 #include "../../include/fpdfapi/fpdf_pageobj.h" | 8 #include "../../include/fpdfapi/fpdf_pageobj.h" |
10 #include "../../include/fpdfapi/fpdf_resource.h" | 9 #include "../../include/fpdfapi/fpdf_resource.h" |
11 #include "../../include/fpdftext/fpdf_text.h" | 10 #include "../../include/fpdftext/fpdf_text.h" |
12 #include "../../include/fxcrt/fx_bidi.h" | 11 #include "../../include/fxcrt/fx_bidi.h" |
13 #include "../../include/fxcrt/fx_ucd.h" | 12 #include "../../include/fxcrt/fx_ucd.h" |
14 #include "text_int.h" | 13 #include "text_int.h" |
| 14 #include "third_party/base/nonstd_unique_ptr.h" |
15 #include "txtproc.h" | 15 #include "txtproc.h" |
16 | 16 |
17 CFX_ByteString CharFromUnicodeAlt(FX_WCHAR unicode, | 17 CFX_ByteString CharFromUnicodeAlt(FX_WCHAR unicode, |
18 int destcp, | 18 int destcp, |
19 const FX_CHAR* defchar) { | 19 const FX_CHAR* defchar) { |
20 if (destcp == 0) { | 20 if (destcp == 0) { |
21 if (unicode < 0x80) { | 21 if (unicode < 0x80) { |
22 return CFX_ByteString((char)unicode); | 22 return CFX_ByteString((char)unicode); |
23 } | 23 } |
24 const FX_CHAR* altstr = FCS_GetAltStr(unicode); | 24 const FX_CHAR* altstr = FCS_GetAltStr(unicode); |
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
783 FX_DWORD flags) { | 783 FX_DWORD flags) { |
784 buffer.EstimateSize(0, 10240); | 784 buffer.EstimateSize(0, 10240); |
785 CPDF_Page page; | 785 CPDF_Page page; |
786 page.Load(pDoc, pPage); | 786 page.Load(pDoc, pPage); |
787 CPDF_ParseOptions options; | 787 CPDF_ParseOptions options; |
788 options.m_bTextOnly = TRUE; | 788 options.m_bTextOnly = TRUE; |
789 options.m_bSeparateForm = FALSE; | 789 options.m_bSeparateForm = FALSE; |
790 page.ParseContent(&options); | 790 page.ParseContent(&options); |
791 GetTextStream_Unicode(buffer, &page, TRUE, NULL); | 791 GetTextStream_Unicode(buffer, &page, TRUE, NULL); |
792 } | 792 } |
OLD | NEW |