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 "../../core/include/fpdfdoc/fpdf_doc.h" | 7 #include "../../core/include/fpdfdoc/fpdf_doc.h" |
8 #include "../../core/include/fpdftext/fpdf_text.h" | 8 #include "../../core/include/fpdftext/fpdf_text.h" |
9 #include "../../public/fpdf_text.h" | 9 #include "../../public/fpdf_text.h" |
10 | 10 |
11 #ifdef _WIN32 | 11 #ifdef _WIN32 |
12 #include <tchar.h> | 12 #include <tchar.h> |
13 #endif | 13 #endif |
14 | 14 |
15 // jabdelmalek: commented out to build on Linux. Not used. | |
16 // extern HANDLE g_hModule; | |
17 | |
18 DLLEXPORT FPDF_TEXTPAGE STDCALL FPDFText_LoadPage(FPDF_PAGE page) { | 15 DLLEXPORT FPDF_TEXTPAGE STDCALL FPDFText_LoadPage(FPDF_PAGE page) { |
19 if (!page) | 16 if (!page) |
20 return NULL; | 17 return NULL; |
21 IPDF_TextPage* textpage = NULL; | 18 IPDF_TextPage* textpage = NULL; |
22 CPDF_ViewerPreferences viewRef(((CPDF_Page*)page)->m_pDocument); | 19 CPDF_ViewerPreferences viewRef(((CPDF_Page*)page)->m_pDocument); |
23 textpage = | 20 textpage = |
24 IPDF_TextPage::CreateTextPage((CPDF_Page*)page, viewRef.IsDirectionR2L()); | 21 IPDF_TextPage::CreateTextPage((CPDF_Page*)page, viewRef.IsDirectionR2L()); |
25 textpage->ParseTextPage(); | 22 textpage->ParseTextPage(); |
26 return textpage; | 23 return textpage; |
27 } | 24 } |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 CFX_FloatRect rect = rectArray.GetAt(rect_index); | 275 CFX_FloatRect rect = rectArray.GetAt(rect_index); |
279 *left = rect.left; | 276 *left = rect.left; |
280 *right = rect.right; | 277 *right = rect.right; |
281 *top = rect.top; | 278 *top = rect.top; |
282 *bottom = rect.bottom; | 279 *bottom = rect.bottom; |
283 } | 280 } |
284 } | 281 } |
285 DLLEXPORT void STDCALL FPDFLink_CloseWebLinks(FPDF_PAGELINK link_page) { | 282 DLLEXPORT void STDCALL FPDFLink_CloseWebLinks(FPDF_PAGELINK link_page) { |
286 delete (IPDF_LinkExtract*)link_page; | 283 delete (IPDF_LinkExtract*)link_page; |
287 } | 284 } |
OLD | NEW |