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

Side by Side Diff: core/fpdfdoc/doc_vt.cpp

Issue 2060913003: Make code compile with clang_use_chrome_plugin (part II) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase Created 4 years, 6 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/fpdfdoc/doc_tagged.cpp ('k') | core/fpdfdoc/include/cpdf_variabletext.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 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 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/fpdfdoc/pdf_vt.h" 7 #include "core/fpdfdoc/pdf_vt.h"
8 8
9 CLine::CLine() {} 9 CLine::CLine() {}
10
10 CLine::~CLine() {} 11 CLine::~CLine() {}
12
11 CPVT_WordPlace CLine::GetBeginWordPlace() const { 13 CPVT_WordPlace CLine::GetBeginWordPlace() const {
12 return CPVT_WordPlace(LinePlace.nSecIndex, LinePlace.nLineIndex, -1); 14 return CPVT_WordPlace(LinePlace.nSecIndex, LinePlace.nLineIndex, -1);
13 } 15 }
16
14 CPVT_WordPlace CLine::GetEndWordPlace() const { 17 CPVT_WordPlace CLine::GetEndWordPlace() const {
15 return CPVT_WordPlace(LinePlace.nSecIndex, LinePlace.nLineIndex, 18 return CPVT_WordPlace(LinePlace.nSecIndex, LinePlace.nLineIndex,
16 m_LineInfo.nEndWordIndex); 19 m_LineInfo.nEndWordIndex);
17 } 20 }
21
18 CPVT_WordPlace CLine::GetPrevWordPlace(const CPVT_WordPlace& place) const { 22 CPVT_WordPlace CLine::GetPrevWordPlace(const CPVT_WordPlace& place) const {
19 if (place.nWordIndex > m_LineInfo.nEndWordIndex) { 23 if (place.nWordIndex > m_LineInfo.nEndWordIndex) {
20 return CPVT_WordPlace(place.nSecIndex, place.nLineIndex, 24 return CPVT_WordPlace(place.nSecIndex, place.nLineIndex,
21 m_LineInfo.nEndWordIndex); 25 m_LineInfo.nEndWordIndex);
22 } 26 }
23 return CPVT_WordPlace(place.nSecIndex, place.nLineIndex, 27 return CPVT_WordPlace(place.nSecIndex, place.nLineIndex,
24 place.nWordIndex - 1); 28 place.nWordIndex - 1);
25 } 29 }
30
26 CPVT_WordPlace CLine::GetNextWordPlace(const CPVT_WordPlace& place) const { 31 CPVT_WordPlace CLine::GetNextWordPlace(const CPVT_WordPlace& place) const {
27 if (place.nWordIndex < m_LineInfo.nBeginWordIndex) { 32 if (place.nWordIndex < m_LineInfo.nBeginWordIndex) {
28 return CPVT_WordPlace(place.nSecIndex, place.nLineIndex, 33 return CPVT_WordPlace(place.nSecIndex, place.nLineIndex,
29 m_LineInfo.nBeginWordIndex); 34 m_LineInfo.nBeginWordIndex);
30 } 35 }
31 return CPVT_WordPlace(place.nSecIndex, place.nLineIndex, 36 return CPVT_WordPlace(place.nSecIndex, place.nLineIndex,
32 place.nWordIndex + 1); 37 place.nWordIndex + 1);
33 } 38 }
39
40 CPDF_EditContainer::CPDF_EditContainer() {}
41
42 CPDF_EditContainer::~CPDF_EditContainer() {}
43
44 void CPDF_EditContainer::SetPlateRect(const CFX_FloatRect& rect) {
45 m_rcPlate = rect;
46 }
47
48 const CFX_FloatRect& CPDF_EditContainer::GetPlateRect() const {
49 return m_rcPlate;
50 }
51
52 void CPDF_EditContainer::SetContentRect(const CPVT_FloatRect& rect) {
53 m_rcContent = rect;
54 }
55
56 CFX_FloatRect CPDF_EditContainer::GetContentRect() const {
57 return m_rcContent;
58 }
OLDNEW
« no previous file with comments | « core/fpdfdoc/doc_tagged.cpp ('k') | core/fpdfdoc/include/cpdf_variabletext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698