| 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_FDE_CFDE_TXTEDTPAGE_H_ | 7 #ifndef XFA_FDE_CFDE_TXTEDTPAGE_H_ |
| 8 #define XFA_FDE_CFDE_TXTEDTPAGE_H_ | 8 #define XFA_FDE_CFDE_TXTEDTPAGE_H_ |
| 9 | 9 |
| 10 #include <memory> |
| 11 #include <vector> |
| 12 |
| 10 #include "xfa/fde/ifde_txtedtpage.h" | 13 #include "xfa/fde/ifde_txtedtpage.h" |
| 11 #include "xfa/fde/ifx_chariter.h" | 14 #include "xfa/fde/ifx_chariter.h" |
| 12 | 15 |
| 13 class CFDE_TxtEdtEngine; | 16 class CFDE_TxtEdtEngine; |
| 14 class CFDE_TxtEdtParag; | 17 class CFDE_TxtEdtParag; |
| 15 class CFDE_TxtEdtTextSet; | 18 class CFDE_TxtEdtTextSet; |
| 16 | 19 |
| 17 class CFDE_TxtEdtPage : public IFDE_TxtEdtPage { | 20 class CFDE_TxtEdtPage : public IFDE_TxtEdtPage { |
| 18 public: | 21 public: |
| 19 CFDE_TxtEdtPage(CFDE_TxtEdtEngine* pEngine, int32_t nLineIndex); | 22 CFDE_TxtEdtPage(CFDE_TxtEdtEngine* pEngine, int32_t nLineIndex); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 int32_t index) const override; | 56 int32_t index) const override; |
| 54 int32_t GetWidth(const FDE_TEXTEDITPIECE* pIdentity, | 57 int32_t GetWidth(const FDE_TEXTEDITPIECE* pIdentity, |
| 55 int32_t index) const override; | 58 int32_t index) const override; |
| 56 | 59 |
| 57 private: | 60 private: |
| 58 void NormalizePt2Rect(CFX_PointF& ptF, | 61 void NormalizePt2Rect(CFX_PointF& ptF, |
| 59 const CFX_RectF& rtF, | 62 const CFX_RectF& rtF, |
| 60 FX_FLOAT fTolerance) const; | 63 FX_FLOAT fTolerance) const; |
| 61 | 64 |
| 62 std::unique_ptr<IFX_CharIter> m_pIter; | 65 std::unique_ptr<IFX_CharIter> m_pIter; |
| 63 CFDE_TxtEdtTextSet* m_pTextSet; | 66 std::unique_ptr<CFDE_TxtEdtTextSet> m_pTextSet; |
| 64 CFDE_TxtEdtEngine* m_pEditEngine; | 67 CFDE_TxtEdtEngine* const m_pEditEngine; |
| 65 CFX_MassArrayTemplate<FDE_TEXTEDITPIECE> m_PieceMassArr; | 68 CFX_MassArrayTemplate<FDE_TEXTEDITPIECE> m_PieceMassArr; |
| 66 CFDE_TxtEdtParag* m_pBgnParag; | 69 CFDE_TxtEdtParag* m_pBgnParag; |
| 67 CFDE_TxtEdtParag* m_pEndParag; | 70 CFDE_TxtEdtParag* m_pEndParag; |
| 68 int32_t m_nRefCount; | 71 int32_t m_nRefCount; |
| 69 int32_t m_nPageStart; | 72 int32_t m_nPageStart; |
| 70 int32_t m_nCharCount; | 73 int32_t m_nCharCount; |
| 71 int32_t m_nPageIndex; | 74 int32_t m_nPageIndex; |
| 72 FX_BOOL m_bLoaded; | 75 FX_BOOL m_bLoaded; |
| 73 CFX_RectF m_rtPage; | 76 CFX_RectF m_rtPage; |
| 74 CFX_RectF m_rtPageMargin; | 77 CFX_RectF m_rtPageMargin; |
| 75 CFX_RectF m_rtPageContents; | 78 CFX_RectF m_rtPageContents; |
| 76 CFX_RectF m_rtPageCanvas; | 79 CFX_RectF m_rtPageCanvas; |
| 77 int32_t* m_pCharWidth; | 80 std::vector<int32_t> m_CharWidths; |
| 78 }; | 81 }; |
| 79 | 82 |
| 80 #endif // XFA_FDE_CFDE_TXTEDTPAGE_H_ | 83 #endif // XFA_FDE_CFDE_TXTEDTPAGE_H_ |
| OLD | NEW |