chromium/third_party/pdfium/core/fpdftext/cpdf_linkextract.cpp

// Copyright 2016 The PDFium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com

#include "core/fpdftext/cpdf_linkextract.h"

#include <wchar.h>

#include <vector>

#include "core/fpdftext/cpdf_textpage.h"
#include "core/fxcrt/fx_extension.h"
#include "core/fxcrt/fx_string.h"
#include "core/fxcrt/fx_system.h"

namespace {

// Find the end of a web link starting from offset |start| and ending at offset
// |end|. The purpose of this function is to separate url from the surrounding
// context characters, we do not intend to fully validate the url. |str|
// contains lower case characters only.
size_t FindWebLinkEnding(const WideString& str, size_t start, size_t end) {}

// Remove characters from the end of |str|, delimited by |start| and |end|, up
// to and including |charToFind|. No-op if |charToFind| is not present. Updates
// |end| if characters were removed.
void TrimBackwardsToChar(const WideString& str,
                         wchar_t charToFind,
                         size_t start,
                         size_t* end) {}

// Finds opening brackets ()[]{}<> and quotes "'  before the URL delimited by
// |start| and |end| in |str|. Matches a closing bracket or quote for each
// opening character and, if present, removes everything afterwards. Returns the
// new end position for the string.
size_t TrimExternalBracketsFromWebLink(const WideString& str,
                                       size_t start,
                                       size_t end) {}

}  // namespace

CPDF_LinkExtract::CPDF_LinkExtract(const CPDF_TextPage* pTextPage)
    :{}

CPDF_LinkExtract::~CPDF_LinkExtract() = default;

void CPDF_LinkExtract::ExtractLinks() {}

std::optional<CPDF_LinkExtract::Link> CPDF_LinkExtract::CheckWebLink(
    const WideString& strBeCheck) {}

bool CPDF_LinkExtract::CheckMailLink(WideString* str) {}

WideString CPDF_LinkExtract::GetURL(size_t index) const {}

std::vector<CFX_FloatRect> CPDF_LinkExtract::GetRects(size_t index) const {}

std::optional<CPDF_LinkExtract::Range> CPDF_LinkExtract::GetTextRange(
    size_t index) const {}