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/page/cpdf_page.h" | 9 #include "core/fpdfapi/page/cpdf_page.h" |
10 #include "core/fpdfdoc/cpdf_viewerpreferences.h" | 10 #include "core/fpdfdoc/cpdf_viewerpreferences.h" |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 CPDF_TextPageFind* textpageFind = | 225 CPDF_TextPageFind* textpageFind = |
226 new CPDF_TextPageFind(CPDFTextPageFromFPDFTextPage(text_page)); | 226 new CPDF_TextPageFind(CPDFTextPageFromFPDFTextPage(text_page)); |
227 FX_STRSIZE len = CFX_WideString::WStringLength(findwhat); | 227 FX_STRSIZE len = CFX_WideString::WStringLength(findwhat); |
228 textpageFind->FindFirst(CFX_WideString::FromUTF16LE(findwhat, len), flags, | 228 textpageFind->FindFirst(CFX_WideString::FromUTF16LE(findwhat, len), flags, |
229 start_index); | 229 start_index); |
230 return textpageFind; | 230 return textpageFind; |
231 } | 231 } |
232 | 232 |
233 DLLEXPORT FPDF_BOOL STDCALL FPDFText_FindNext(FPDF_SCHHANDLE handle) { | 233 DLLEXPORT FPDF_BOOL STDCALL FPDFText_FindNext(FPDF_SCHHANDLE handle) { |
234 if (!handle) | 234 if (!handle) |
235 return FALSE; | 235 return false; |
236 | 236 |
237 CPDF_TextPageFind* textpageFind = CPDFTextPageFindFromFPDFSchHandle(handle); | 237 CPDF_TextPageFind* textpageFind = CPDFTextPageFindFromFPDFSchHandle(handle); |
238 return textpageFind->FindNext(); | 238 return textpageFind->FindNext(); |
239 } | 239 } |
240 | 240 |
241 DLLEXPORT FPDF_BOOL STDCALL FPDFText_FindPrev(FPDF_SCHHANDLE handle) { | 241 DLLEXPORT FPDF_BOOL STDCALL FPDFText_FindPrev(FPDF_SCHHANDLE handle) { |
242 if (!handle) | 242 if (!handle) |
243 return FALSE; | 243 return false; |
244 | 244 |
245 CPDF_TextPageFind* textpageFind = CPDFTextPageFindFromFPDFSchHandle(handle); | 245 CPDF_TextPageFind* textpageFind = CPDFTextPageFindFromFPDFSchHandle(handle); |
246 return textpageFind->FindPrev(); | 246 return textpageFind->FindPrev(); |
247 } | 247 } |
248 | 248 |
249 DLLEXPORT int STDCALL FPDFText_GetSchResultIndex(FPDF_SCHHANDLE handle) { | 249 DLLEXPORT int STDCALL FPDFText_GetSchResultIndex(FPDF_SCHHANDLE handle) { |
250 if (!handle) | 250 if (!handle) |
251 return 0; | 251 return 0; |
252 | 252 |
253 CPDF_TextPageFind* textpageFind = CPDFTextPageFindFromFPDFSchHandle(handle); | 253 CPDF_TextPageFind* textpageFind = CPDFTextPageFindFromFPDFSchHandle(handle); |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 | 338 |
339 *left = rectArray[rect_index].left; | 339 *left = rectArray[rect_index].left; |
340 *right = rectArray[rect_index].right; | 340 *right = rectArray[rect_index].right; |
341 *top = rectArray[rect_index].top; | 341 *top = rectArray[rect_index].top; |
342 *bottom = rectArray[rect_index].bottom; | 342 *bottom = rectArray[rect_index].bottom; |
343 } | 343 } |
344 | 344 |
345 DLLEXPORT void STDCALL FPDFLink_CloseWebLinks(FPDF_PAGELINK link_page) { | 345 DLLEXPORT void STDCALL FPDFLink_CloseWebLinks(FPDF_PAGELINK link_page) { |
346 delete CPDFLinkExtractFromFPDFPageLink(link_page); | 346 delete CPDFLinkExtractFromFPDFPageLink(link_page); |
347 } | 347 } |
OLD | NEW |