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

Side by Side Diff: xfa/fee/fde_txtedtparag.h

Issue 1927973003: Remove IFDE_TxtEdt interfaces where possible. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@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 | « xfa/fee/fde_txtedtpage.cpp ('k') | xfa/fee/fde_txtedtparag.cpp » ('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 #ifndef XFA_FEE_FDE_TXTEDTPARAG_H_ 7 #ifndef XFA_FEE_FDE_TXTEDTPARAG_H_
8 #define XFA_FEE_FDE_TXTEDTPARAG_H_ 8 #define XFA_FEE_FDE_TXTEDTPARAG_H_
9 9
10 #include "xfa/fee/ifde_txtedtengine.h" 10 #include <stdint.h>
11 11
12 class CFDE_TxtEdtEngine; 12 class CFDE_TxtEdtEngine;
13 13
14 class CFDE_TxtEdtParag : public IFDE_TxtEdtParag { 14 class CFDE_TxtEdtParag {
15 public: 15 public:
16 explicit CFDE_TxtEdtParag(CFDE_TxtEdtEngine* pEngine); 16 explicit CFDE_TxtEdtParag(CFDE_TxtEdtEngine* pEngine);
17 ~CFDE_TxtEdtParag(); 17 ~CFDE_TxtEdtParag();
18 18
19 virtual int32_t GetTextLength() const { return m_nCharCount; } 19 int32_t GetTextLength() const { return m_nCharCount; }
20 virtual int32_t GetStartIndex() const { return m_nCharStart; } 20 int32_t GetStartIndex() const { return m_nCharStart; }
21 virtual int32_t CountLines() const { return m_nLineCount; } 21 int32_t GetLineCount() const { return m_nLineCount; }
22 virtual void GetLineRange(int32_t nLineIndex, 22
23 int32_t& nStart, 23 void SetTextLength(int32_t len) { m_nCharCount = len; }
24 int32_t& nCount) const; 24 void IncrementTextLength(int32_t len) { m_nCharCount += len; }
25 void SetStartIndex(int32_t idx) { m_nCharStart = idx; }
26 void IncrementStartIndex(int32_t val) { m_nCharStart += val; }
27 void DecrementStartIndex(int32_t val) { m_nCharStart -= val; }
28 void SetLineCount(int32_t count) { m_nLineCount = count; }
29
30 void GetLineRange(int32_t nLineIndex, int32_t& nStart, int32_t& nCount) const;
25 void LoadParag(); 31 void LoadParag();
26 void UnloadParag(); 32 void UnloadParag();
27 void CalcLines(); 33 void CalcLines();
34
35 private:
28 int32_t m_nCharStart; 36 int32_t m_nCharStart;
29 int32_t m_nCharCount; 37 int32_t m_nCharCount;
30 int32_t m_nLineCount; 38 int32_t m_nLineCount;
31
32 private:
33 void* m_lpData; 39 void* m_lpData;
34 CFDE_TxtEdtEngine* m_pEngine; 40 CFDE_TxtEdtEngine* m_pEngine;
35 }; 41 };
36 42
37 #endif // XFA_FEE_FDE_TXTEDTPARAG_H_ 43 #endif // XFA_FEE_FDE_TXTEDTPARAG_H_
OLDNEW
« no previous file with comments | « xfa/fee/fde_txtedtpage.cpp ('k') | xfa/fee/fde_txtedtparag.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698