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

Side by Side Diff: core/fpdftext/cpdf_linkextract.cpp

Issue 2382723003: Move core/fxcrt/include to core/fxcrt (Closed)
Patch Set: Rebase to master Created 4 years, 2 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/cpdf_linkextract.h ('k') | core/fpdftext/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
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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 "core/fpdftext/cpdf_linkextract.h" 7 #include "core/fpdftext/cpdf_linkextract.h"
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "core/fpdftext/cpdf_textpage.h" 11 #include "core/fpdftext/cpdf_textpage.h"
12 #include "core/fxcrt/include/fx_ext.h" 12 #include "core/fxcrt/fx_ext.h"
13 #include "core/fxcrt/include/fx_string.h" 13 #include "core/fxcrt/fx_string.h"
14 #include "core/fxcrt/include/fx_system.h" 14 #include "core/fxcrt/fx_system.h"
15 15
16 CPDF_LinkExtract::CPDF_LinkExtract(const CPDF_TextPage* pTextPage) 16 CPDF_LinkExtract::CPDF_LinkExtract(const CPDF_TextPage* pTextPage)
17 : m_pTextPage(pTextPage) {} 17 : m_pTextPage(pTextPage) {}
18 18
19 CPDF_LinkExtract::~CPDF_LinkExtract() {} 19 CPDF_LinkExtract::~CPDF_LinkExtract() {}
20 20
21 void CPDF_LinkExtract::ExtractLinks() { 21 void CPDF_LinkExtract::ExtractLinks() {
22 m_LinkArray.clear(); 22 m_LinkArray.clear();
23 if (!m_pTextPage->IsParsed()) 23 if (!m_pTextPage->IsParsed())
24 return; 24 return;
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 return index < m_LinkArray.size() ? m_LinkArray[index].m_strUrl : L""; 164 return index < m_LinkArray.size() ? m_LinkArray[index].m_strUrl : L"";
165 } 165 }
166 166
167 std::vector<CFX_FloatRect> CPDF_LinkExtract::GetRects(size_t index) const { 167 std::vector<CFX_FloatRect> CPDF_LinkExtract::GetRects(size_t index) const {
168 if (index >= m_LinkArray.size()) 168 if (index >= m_LinkArray.size())
169 return std::vector<CFX_FloatRect>(); 169 return std::vector<CFX_FloatRect>();
170 170
171 return m_pTextPage->GetRectArray(m_LinkArray[index].m_Start, 171 return m_pTextPage->GetRectArray(m_LinkArray[index].m_Start,
172 m_LinkArray[index].m_Count); 172 m_LinkArray[index].m_Count);
173 } 173 }
OLDNEW
« no previous file with comments | « core/fpdftext/cpdf_linkextract.h ('k') | core/fpdftext/cpdf_textpage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698