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

Side by Side Diff: core/fpdfdoc/csection.h

Issue 1947093002: Revert of Remove unneeded CPVT classes. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Created 4 years, 7 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/cpvt_generateap.cpp ('k') | core/fpdfdoc/ctypeset.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 #ifndef CORE_FPDFDOC_CSECTION_H_ 7 #ifndef CORE_FPDFDOC_CSECTION_H_
8 #define CORE_FPDFDOC_CSECTION_H_ 8 #define CORE_FPDFDOC_CSECTION_H_
9 9
10 #include "core/fpdfdoc/cpvt_sectioninfo.h" 10 #include "core/fpdfdoc/cpvt_sectioninfo.h"
11 #include "core/fpdfdoc/ctypeset.h" 11 #include "core/fpdfdoc/ctypeset.h"
12 #include "core/fxcrt/include/fx_coordinates.h" 12 #include "core/fxcrt/include/fx_coordinates.h"
13 #include "core/fxcrt/include/fx_system.h" 13 #include "core/fxcrt/include/fx_system.h"
14 14
15 class CPDF_VariableText; 15 class CPDF_VariableText;
16 16
17 struct CPVT_LineInfo; 17 struct CPVT_LineInfo;
18 struct CPVT_WordLine; 18 struct CPVT_WordLine;
19 struct CPVT_WordPlace; 19 struct CPVT_WordPlace;
20 20
21 class CSection { 21 class CSection {
22 public: 22 public:
23 explicit CSection(CPDF_VariableText* pVT); 23 explicit CSection(CPDF_VariableText* pVT);
24 ~CSection(); 24 virtual ~CSection();
25
26 void ResetAll(); 25 void ResetAll();
27 void ResetLineArray(); 26 void ResetLineArray();
28 void ResetWordArray(); 27 void ResetWordArray();
29 void ResetLinePlace(); 28 void ResetLinePlace();
30 CPVT_WordPlace AddWord(const CPVT_WordPlace& place, 29 CPVT_WordPlace AddWord(const CPVT_WordPlace& place,
31 const CPVT_WordInfo& wordinfo); 30 const CPVT_WordInfo& wordinfo);
32 CPVT_WordPlace AddLine(const CPVT_LineInfo& lineinfo); 31 CPVT_WordPlace AddLine(const CPVT_LineInfo& lineinfo);
33 void ClearWords(const CPVT_WordRange& PlaceRange); 32 void ClearWords(const CPVT_WordRange& PlaceRange);
34 void ClearWord(const CPVT_WordPlace& place); 33 void ClearWord(const CPVT_WordPlace& place);
35 CPVT_FloatRect Rearrange(); 34 CPVT_FloatRect Rearrange();
36 CFX_PointF GetSectionSize(FX_FLOAT fFontSize); 35 CPVT_Size GetSectionSize(FX_FLOAT fFontSize);
37 CPVT_WordPlace GetBeginWordPlace() const; 36 CPVT_WordPlace GetBeginWordPlace() const;
38 CPVT_WordPlace GetEndWordPlace() const; 37 CPVT_WordPlace GetEndWordPlace() const;
39 CPVT_WordPlace GetPrevWordPlace(const CPVT_WordPlace& place) const; 38 CPVT_WordPlace GetPrevWordPlace(const CPVT_WordPlace& place) const;
40 CPVT_WordPlace GetNextWordPlace(const CPVT_WordPlace& place) const; 39 CPVT_WordPlace GetNextWordPlace(const CPVT_WordPlace& place) const;
41 void UpdateWordPlace(CPVT_WordPlace& place) const; 40 void UpdateWordPlace(CPVT_WordPlace& place) const;
42 CPVT_WordPlace SearchWordPlace(const CFX_FloatPoint& point) const; 41 CPVT_WordPlace SearchWordPlace(const CFX_FloatPoint& point) const;
43 CPVT_WordPlace SearchWordPlace(FX_FLOAT fx, 42 CPVT_WordPlace SearchWordPlace(FX_FLOAT fx,
44 const CPVT_WordPlace& lineplace) const; 43 const CPVT_WordPlace& lineplace) const;
45 CPVT_WordPlace SearchWordPlace(FX_FLOAT fx, 44 CPVT_WordPlace SearchWordPlace(FX_FLOAT fx,
46 const CPVT_WordRange& range) const; 45 const CPVT_WordRange& range) const;
47 46
48 CPVT_WordPlace SecPlace; 47 CPVT_WordPlace SecPlace;
49 CPVT_SectionInfo m_SecInfo; 48 CPVT_SectionInfo m_SecInfo;
50 CLines m_LineArray; 49 CLines m_LineArray;
51 CFX_ArrayTemplate<CPVT_WordInfo*> m_WordArray; 50 CPVT_ArrayTemplate<CPVT_WordInfo*> m_WordArray;
52 51
53 private: 52 private:
54 friend class CTypeset; 53 friend class CTypeset;
55 54
56 void ClearLeftWords(int32_t nWordIndex); 55 void ClearLeftWords(int32_t nWordIndex);
57 void ClearRightWords(int32_t nWordIndex); 56 void ClearRightWords(int32_t nWordIndex);
58 void ClearMidWords(int32_t nBeginIndex, int32_t nEndIndex); 57 void ClearMidWords(int32_t nBeginIndex, int32_t nEndIndex);
59 58
60 CPDF_VariableText* m_pVT; 59 CPDF_VariableText* m_pVT;
61 }; 60 };
62 61
63 #endif // CORE_FPDFDOC_CSECTION_H_ 62 #endif // CORE_FPDFDOC_CSECTION_H_
OLDNEW
« no previous file with comments | « core/fpdfdoc/cpvt_generateap.cpp ('k') | core/fpdfdoc/ctypeset.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698