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

Side by Side Diff: fpdfsdk/fpdftext.cpp

Issue 2453683011: Remove FX_BOOL from fpdfsdk. (Closed)
Patch Set: Regenerate patch after rebase. Created 4 years, 1 month 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 | « fpdfsdk/fpdfsave.cpp ('k') | fpdfsdk/fpdfview.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 "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
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
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 }
OLDNEW
« no previous file with comments | « fpdfsdk/fpdfsave.cpp ('k') | fpdfsdk/fpdfview.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698