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 "public/fpdf_text.h" | 7 #include "public/fpdf_text.h" |
8 | 8 |
9 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" | 9 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" |
10 #include "core/fpdfdoc/include/fpdf_doc.h" | 10 #include "core/fpdfdoc/include/fpdf_doc.h" |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 CPDF_TextPageFind* textpageFind = CPDFTextPageFindFromFPDFSchHandle(handle); | 266 CPDF_TextPageFind* textpageFind = CPDFTextPageFindFromFPDFSchHandle(handle); |
267 delete textpageFind; | 267 delete textpageFind; |
268 handle = nullptr; | 268 handle = nullptr; |
269 } | 269 } |
270 | 270 |
271 // web link | 271 // web link |
272 DLLEXPORT FPDF_PAGELINK STDCALL FPDFLink_LoadWebLinks(FPDF_TEXTPAGE text_page) { | 272 DLLEXPORT FPDF_PAGELINK STDCALL FPDFLink_LoadWebLinks(FPDF_TEXTPAGE text_page) { |
273 if (!text_page) | 273 if (!text_page) |
274 return nullptr; | 274 return nullptr; |
275 | 275 |
276 CPDF_LinkExtract* pageLink = new CPDF_LinkExtract; | 276 CPDF_LinkExtract* pageLink = |
277 pageLink->ExtractLinks(CPDFTextPageFromFPDFTextPage(text_page)); | 277 new CPDF_LinkExtract(CPDFTextPageFromFPDFTextPage(text_page)); |
| 278 pageLink->ExtractLinks(); |
278 return pageLink; | 279 return pageLink; |
279 } | 280 } |
280 | 281 |
281 DLLEXPORT int STDCALL FPDFLink_CountWebLinks(FPDF_PAGELINK link_page) { | 282 DLLEXPORT int STDCALL FPDFLink_CountWebLinks(FPDF_PAGELINK link_page) { |
282 if (!link_page) | 283 if (!link_page) |
283 return 0; | 284 return 0; |
284 | 285 |
285 CPDF_LinkExtract* pageLink = CPDFLinkExtractFromFPDFPageLink(link_page); | 286 CPDF_LinkExtract* pageLink = CPDFLinkExtractFromFPDFPageLink(link_page); |
286 return pageLink->CountLinks(); | 287 return pageLink->CountLinks(); |
287 } | 288 } |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 CFX_FloatRect rect = rectArray.GetAt(rect_index); | 339 CFX_FloatRect rect = rectArray.GetAt(rect_index); |
339 *left = rect.left; | 340 *left = rect.left; |
340 *right = rect.right; | 341 *right = rect.right; |
341 *top = rect.top; | 342 *top = rect.top; |
342 *bottom = rect.bottom; | 343 *bottom = rect.bottom; |
343 } | 344 } |
344 } | 345 } |
345 DLLEXPORT void STDCALL FPDFLink_CloseWebLinks(FPDF_PAGELINK link_page) { | 346 DLLEXPORT void STDCALL FPDFLink_CloseWebLinks(FPDF_PAGELINK link_page) { |
346 delete CPDFLinkExtractFromFPDFPageLink(link_page); | 347 delete CPDFLinkExtractFromFPDFPageLink(link_page); |
347 } | 348 } |
OLD | NEW |