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/src/fee/fde_txtedtparag.h" | 7 #include "xfa/fee/fde_txtedtparag.h" |
8 | 8 |
9 #include "xfa/src/fee/fde_txtedtbuf.h" | 9 #include "xfa/fee/fde_txtedtbuf.h" |
10 #include "xfa/src/fee/fde_txtedtengine.h" | 10 #include "xfa/fee/fde_txtedtengine.h" |
11 #include "xfa/src/fee/fx_wordbreak/fx_wordbreak.h" | 11 #include "xfa/fee/fx_wordbreak/fx_wordbreak.h" |
12 #include "xfa/src/fee/ifde_txtedtbuf.h" | 12 #include "xfa/fee/ifde_txtedtbuf.h" |
13 #include "xfa/src/fee/ifde_txtedtengine.h" | 13 #include "xfa/fee/ifde_txtedtengine.h" |
14 #include "xfa/src/fgas/layout/fgas_textbreak.h" | 14 #include "xfa/fgas/layout/fgas_textbreak.h" |
15 | 15 |
16 CFDE_TxtEdtParag::CFDE_TxtEdtParag(CFDE_TxtEdtEngine* pEngine) | 16 CFDE_TxtEdtParag::CFDE_TxtEdtParag(CFDE_TxtEdtEngine* pEngine) |
17 : m_nCharStart(0), | 17 : m_nCharStart(0), |
18 m_nCharCount(0), | 18 m_nCharCount(0), |
19 m_nLineCount(0), | 19 m_nLineCount(0), |
20 m_lpData(NULL), | 20 m_lpData(NULL), |
21 m_pEngine(pEngine) { | 21 m_pEngine(pEngine) { |
22 FXSYS_assert(m_pEngine); | 22 FXSYS_assert(m_pEngine); |
23 } | 23 } |
24 CFDE_TxtEdtParag::~CFDE_TxtEdtParag() { | 24 CFDE_TxtEdtParag::~CFDE_TxtEdtParag() { |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 int32_t* pLineBaseArr = (int32_t*)m_lpData; | 141 int32_t* pLineBaseArr = (int32_t*)m_lpData; |
142 FXSYS_assert(nLineIndex < m_nLineCount); | 142 FXSYS_assert(nLineIndex < m_nLineCount); |
143 nStart = m_nCharStart; | 143 nStart = m_nCharStart; |
144 pLineBaseArr++; | 144 pLineBaseArr++; |
145 for (int32_t i = 0; i < nLineIndex; i++) { | 145 for (int32_t i = 0; i < nLineIndex; i++) { |
146 nStart += *pLineBaseArr; | 146 nStart += *pLineBaseArr; |
147 pLineBaseArr++; | 147 pLineBaseArr++; |
148 } | 148 } |
149 nCount = *pLineBaseArr; | 149 nCount = *pLineBaseArr; |
150 } | 150 } |
OLD | NEW |