diff options
author | Lei Zhang <thestig@chromium.org> | 2018-01-11 14:28:01 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-11 14:28:01 +0000 |
commit | 762502141cc93fb22fbfcf536d81752c4c6886aa (patch) | |
tree | 4157373e655fb6c3e2166ad46e45cf68ca349c7a /public/fpdf_text.h | |
parent | 188b2e0333d161ffbac7c896f443b886b113b26a (diff) | |
download | pdfium-762502141cc93fb22fbfcf536d81752c4c6886aa.tar.xz |
Change FPDFText_GetRect() to return a boolean.
BUG=pdfium:858
Change-Id: Idc9900fe6f85b1fef06c97f5023653f77156d410
Reviewed-on: https://pdfium-review.googlesource.com/22730
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'public/fpdf_text.h')
-rw-r--r-- | public/fpdf_text.h | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/public/fpdf_text.h b/public/fpdf_text.h index bad66ad085..90ccaf76ae 100644 --- a/public/fpdf_text.h +++ b/public/fpdf_text.h @@ -219,14 +219,18 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFText_CountRects(FPDF_TEXTPAGE text_page, // bottom - Pointer to a double value receiving the rectangle // bottom boundary. // Return Value: -// None. +// On success, return TRUE and fill in |left|, |top|, |right|, and +// |bottom|. If |link_page| is invalid then return FALSE, and the out +// parameters remain unmodified. If |link_page| is valid but +// |link_index| is out of bounds, then return FALSE and set the out +// parameters to 0. // -FPDF_EXPORT void FPDF_CALLCONV FPDFText_GetRect(FPDF_TEXTPAGE text_page, - int rect_index, - double* left, - double* top, - double* right, - double* bottom); +FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFText_GetRect(FPDF_TEXTPAGE text_page, + int rect_index, + double* left, + double* top, + double* right, + double* bottom); // Function: FPDFText_GetBoundedText // Extract unicode text within a rectangular boundary on the page. @@ -423,9 +427,9 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFLink_CountRects(FPDF_PAGELINK link_page, // bottom boundary. // Return Value: // On success, return TRUE and fill in |left|, |top|, |right|, and -// |bottom|. If |link_index| does not correspond to a valid link, then -// return FALSE, and |left|, |top|, |right|, and |bottom| remain -// unmodified. +// |bottom|. If |link_page| is invalid or if |link_index| does not +// correspond to a valid link, then return FALSE, and the out +// parameters remain unmodified. // FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFLink_GetRect(FPDF_PAGELINK link_page, int link_index, |