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 |
11 #include "xfa/fde/cfde_txtedtbuf.h" | 11 #include "xfa/fde/cfde_txtedtbuf.h" |
12 #include "xfa/fde/cfde_txtedtbufiter.h" | 12 #include "xfa/fde/cfde_txtedtbufiter.h" |
13 #include "xfa/fde/cfde_txtedtengine.h" | 13 #include "xfa/fde/cfde_txtedtengine.h" |
14 #include "xfa/fde/cfde_txtedtparag.h" | 14 #include "xfa/fde/cfde_txtedtparag.h" |
| 15 #include "xfa/fde/cfde_txtedttextset.h" |
| 16 #include "xfa/fde/cfx_wordbreak.h" |
15 #include "xfa/fde/ifde_txtedtengine.h" | 17 #include "xfa/fde/ifde_txtedtengine.h" |
16 #include "xfa/fde/ifde_txtedtpage.h" | 18 #include "xfa/fde/ifde_txtedtpage.h" |
17 #include "xfa/fde/cfde_txtedttextset.h" | |
18 #include "xfa/fde/cfx_wordbreak.h" | |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
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 new CFDE_TxtEdtPage(pEngine, nIndex); | 28 return new CFDE_TxtEdtPage(pEngine, nIndex); |
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 ptF.x = rtF.left; | 509 ptF.x = rtF.left; |
510 } else if (ptF.x >= rtF.right()) { | 510 } else if (ptF.x >= rtF.right()) { |
511 ptF.x = rtF.right() - fTolerance; | 511 ptF.x = rtF.right() - fTolerance; |
512 } | 512 } |
513 if (ptF.y < rtF.top) { | 513 if (ptF.y < rtF.top) { |
514 ptF.y = rtF.top; | 514 ptF.y = rtF.top; |
515 } else if (ptF.y >= rtF.bottom()) { | 515 } else if (ptF.y >= rtF.bottom()) { |
516 ptF.y = rtF.bottom() - fTolerance; | 516 ptF.y = rtF.bottom() - fTolerance; |
517 } | 517 } |
518 } | 518 } |
OLD | NEW |