OLD | NEW |
---|---|
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 CountLines() const { return m_nLineCount; } |
22 virtual void GetLineRange(int32_t nLineIndex, | 22 void GetLineRange(int32_t nLineIndex, int32_t& nStart, int32_t& nCount) const; |
23 int32_t& nStart, | |
24 int32_t& nCount) const; | |
25 void LoadParag(); | 23 void LoadParag(); |
26 void UnloadParag(); | 24 void UnloadParag(); |
27 void CalcLines(); | 25 void CalcLines(); |
26 | |
28 int32_t m_nCharStart; | 27 int32_t m_nCharStart; |
Tom Sepez
2016/04/28 16:51:09
can these be private given the Get* methods above?
dsinclair
2016/04/28 17:35:56
Added Set methods and updated the code to actually
| |
29 int32_t m_nCharCount; | 28 int32_t m_nCharCount; |
30 int32_t m_nLineCount; | 29 int32_t m_nLineCount; |
31 | 30 |
32 private: | 31 private: |
33 void* m_lpData; | 32 void* m_lpData; |
34 CFDE_TxtEdtEngine* m_pEngine; | 33 CFDE_TxtEdtEngine* m_pEngine; |
35 }; | 34 }; |
36 | 35 |
37 #endif // XFA_FEE_FDE_TXTEDTPARAG_H_ | 36 #endif // XFA_FEE_FDE_TXTEDTPARAG_H_ |
OLD | NEW |