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 #include "xfa/fde/cfde_txtedtpage.h" | 7 #include "xfa/fde/cfde_txtedtpage.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 const double kTolerance = 0.1f; | 22 const double kTolerance = 0.1f; |
23 | 23 |
24 } // namespace | 24 } // namespace |
25 | 25 |
26 IFDE_TxtEdtPage* IFDE_TxtEdtPage::Create(CFDE_TxtEdtEngine* pEngine, | 26 IFDE_TxtEdtPage* IFDE_TxtEdtPage::Create(CFDE_TxtEdtEngine* pEngine, |
27 int32_t nIndex) { | 27 int32_t nIndex) { |
28 return (IFDE_TxtEdtPage*)new CFDE_TxtEdtPage(pEngine, nIndex); | 28 return (IFDE_TxtEdtPage*)new CFDE_TxtEdtPage(pEngine, nIndex); |
29 } | 29 } |
30 | 30 |
31 CFDE_TxtEdtPage::CFDE_TxtEdtPage(CFDE_TxtEdtEngine* pEngine, int32_t nPageIndex) | 31 CFDE_TxtEdtPage::CFDE_TxtEdtPage(CFDE_TxtEdtEngine* pEngine, int32_t nPageIndex) |
32 : m_pIter(nullptr), | 32 : m_pTextSet(nullptr), |
33 m_pTextSet(nullptr), | |
34 m_pBgnParag(nullptr), | 33 m_pBgnParag(nullptr), |
35 m_pEndParag(nullptr), | 34 m_pEndParag(nullptr), |
36 m_nRefCount(0), | 35 m_nRefCount(0), |
37 m_nPageStart(-1), | 36 m_nPageStart(-1), |
38 m_nCharCount(0), | 37 m_nCharCount(0), |
39 m_nPageIndex(nPageIndex), | 38 m_nPageIndex(nPageIndex), |
40 m_bLoaded(FALSE), | 39 m_bLoaded(FALSE), |
41 m_pCharWidth(nullptr) { | 40 m_pCharWidth(nullptr) { |
42 FXSYS_memset(&m_rtPage, 0, sizeof(CFX_RectF)); | 41 FXSYS_memset(&m_rtPage, 0, sizeof(CFX_RectF)); |
43 FXSYS_memset(&m_rtPageMargin, 0, sizeof(CFX_RectF)); | 42 FXSYS_memset(&m_rtPageMargin, 0, sizeof(CFX_RectF)); |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 ptF.x = rtF.left; | 540 ptF.x = rtF.left; |
542 } else if (ptF.x >= rtF.right()) { | 541 } else if (ptF.x >= rtF.right()) { |
543 ptF.x = rtF.right() - fTolerance; | 542 ptF.x = rtF.right() - fTolerance; |
544 } | 543 } |
545 if (ptF.y < rtF.top) { | 544 if (ptF.y < rtF.top) { |
546 ptF.y = rtF.top; | 545 ptF.y = rtF.top; |
547 } else if (ptF.y >= rtF.bottom()) { | 546 } else if (ptF.y >= rtF.bottom()) { |
548 ptF.y = rtF.bottom() - fTolerance; | 547 ptF.y = rtF.bottom() - fTolerance; |
549 } | 548 } |
550 } | 549 } |
OLD | NEW |