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

Side by Side Diff: core/fpdftext/include/cpdf_linkextract.h

Issue 1897993002: Remove IPDF_TextPage, IPDF_TextPageFind and IPDF_LinkExtract interfaces. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 months 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 | « core/fpdftext/fpdf_text_int_unittest.cpp ('k') | core/fpdftext/include/cpdf_textpage.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #ifndef CORE_FPDFTEXT_INCLUDE_CPDF_LINKEXTRACT_H_
8 #define CORE_FPDFTEXT_INCLUDE_CPDF_LINKEXTRACT_H_
9
10 #include "core/fxcrt/include/fx_basic.h"
11 #include "core/fxcrt/include/fx_coordinates.h"
12 #include "core/fxcrt/include/fx_string.h"
13 #include "core/fxcrt/include/fx_system.h"
14
15 class CPDF_TextPage;
16
17 class CPDF_LinkExt {
18 public:
19 CPDF_LinkExt() {}
20 ~CPDF_LinkExt() {}
21
22 int m_Start;
23 int m_Count;
24 CFX_WideString m_strUrl;
25 };
26
27 class CPDF_LinkExtract {
28 public:
29 CPDF_LinkExtract();
30 ~CPDF_LinkExtract();
31
32 FX_BOOL ExtractLinks(const CPDF_TextPage* pTextPage);
33 int CountLinks() const;
34 CFX_WideString GetURL(int index) const;
35 void GetBoundedSegment(int index, int& start, int& count) const;
36 void GetRects(int index, CFX_RectArray& rects) const;
37
38 FX_BOOL IsExtract() const { return m_bIsParsed; }
39
40 protected:
41 void ParseLink();
42 void DeleteLinkList();
43 FX_BOOL CheckWebLink(CFX_WideString& strBeCheck);
44 bool CheckMailLink(CFX_WideString& str);
45 void AppendToLinkList(int start, int count, const CFX_WideString& strUrl);
46
47 private:
48 CFX_ArrayTemplate<CPDF_LinkExt*> m_LinkList;
49 const CPDF_TextPage* m_pTextPage;
50 CFX_WideString m_strPageText;
51 bool m_bIsParsed;
52 };
53
54 #endif // CORE_FPDFTEXT_INCLUDE_CPDF_LINKEXTRACT_H_
OLDNEW
« no previous file with comments | « core/fpdftext/fpdf_text_int_unittest.cpp ('k') | core/fpdftext/include/cpdf_textpage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698