Skip to content

Commit

Permalink
Removing PDFiumPage::GetLinks method
Browse files Browse the repository at this point in the history
This CL removes PDFiumPage::GetLinks method because there are no callers
of this function.

Bug: 990050
Change-Id: I627dffcde764bec440f2733db162bd3d443072ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1731789
Reviewed-by: Kevin Babbitt <kbabbitt@microsoft.com>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Kevin Babbitt <kbabbitt@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#683342}
  • Loading branch information
virenms authored and Commit Bot committed Aug 1, 2019
1 parent 983211b commit e6157bb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
23 changes: 0 additions & 23 deletions pdf/pdfium/pdfium_page.cc
Original file line number Diff line number Diff line change
Expand Up @@ -423,29 +423,6 @@ int PDFiumPage::GetLink(int char_index, LinkTarget* target) {
return -1;
}

std::vector<int> PDFiumPage::GetLinks(pp::Rect text_area,
std::vector<LinkTarget>* targets) {
std::vector<int> links;
if (!available_)
return links;

CalculateLinks();

for (size_t i = 0; i < links_.size(); ++i) {
for (const auto& rect : links_[i].rects) {
if (rect.Intersects(text_area)) {
if (targets) {
LinkTarget target;
target.url = links_[i].url;
targets->push_back(target);
}
links.push_back(i);
}
}
}
return links;
}

void PDFiumPage::CalculateLinks() {
if (calculated_links_)
return;
Expand Down
4 changes: 0 additions & 4 deletions pdf/pdfium/pdfium_page.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,6 @@ class PDFiumPage {
// Returns a link index if the given character index is over a link, or -1
// otherwise.
int GetLink(int char_index, LinkTarget* target);
// Returns the link indices if the given rect intersects a link rect, or an
// empty vector otherwise.
std::vector<int> GetLinks(pp::Rect text_area,
std::vector<LinkTarget>* targets);
// Calculate the locations of any links on the page.
void CalculateLinks();
// Returns link type and fills target associated with a link. Returns
Expand Down

0 comments on commit e6157bb

Please sign in to comment.