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_txtedtpage.h" | 7 #include "xfa/fee/fde_txtedtpage.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
11 #include "xfa/src/fee/fx_wordbreak/fx_wordbreak.h" | 11 #include "xfa/fee/fde_txtedtbuf.h" |
12 #include "xfa/src/fee/fde_txtedtbuf.h" | 12 #include "xfa/fee/fde_txtedtengine.h" |
13 #include "xfa/src/fee/fde_txtedtengine.h" | 13 #include "xfa/fee/fde_txtedtparag.h" |
14 #include "xfa/src/fee/fde_txtedtparag.h" | 14 #include "xfa/fee/fx_wordbreak/fx_wordbreak.h" |
15 #include "xfa/src/fee/ifde_txtedtbuf.h" | 15 #include "xfa/fee/ifde_txtedtbuf.h" |
16 #include "xfa/src/fee/ifde_txtedtengine.h" | 16 #include "xfa/fee/ifde_txtedtengine.h" |
17 #include "xfa/src/fee/ifde_txtedtpage.h" | 17 #include "xfa/fee/ifde_txtedtpage.h" |
18 | 18 |
19 #define FDE_TXTEDT_TOLERANCE 0.1f | 19 #define FDE_TXTEDT_TOLERANCE 0.1f |
20 | 20 |
21 IFDE_TxtEdtPage* IFDE_TxtEdtPage::Create(IFDE_TxtEdtEngine* pEngine, | 21 IFDE_TxtEdtPage* IFDE_TxtEdtPage::Create(IFDE_TxtEdtEngine* pEngine, |
22 int32_t nIndex) { | 22 int32_t nIndex) { |
23 return (IFDE_TxtEdtPage*)new CFDE_TxtEdtPage(pEngine, nIndex); | 23 return (IFDE_TxtEdtPage*)new CFDE_TxtEdtPage(pEngine, nIndex); |
24 } | 24 } |
25 CFDE_TxtEdtTextSet::CFDE_TxtEdtTextSet(CFDE_TxtEdtPage* pPage) | 25 CFDE_TxtEdtTextSet::CFDE_TxtEdtTextSet(CFDE_TxtEdtPage* pPage) |
26 : m_pPage(pPage) {} | 26 : m_pPage(pPage) {} |
27 CFDE_TxtEdtTextSet::~CFDE_TxtEdtTextSet() {} | 27 CFDE_TxtEdtTextSet::~CFDE_TxtEdtTextSet() {} |
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
641 ptF.x = rtF.left; | 641 ptF.x = rtF.left; |
642 } else if (ptF.x >= rtF.right()) { | 642 } else if (ptF.x >= rtF.right()) { |
643 ptF.x = rtF.right() - fTolerance; | 643 ptF.x = rtF.right() - fTolerance; |
644 } | 644 } |
645 if (ptF.y < rtF.top) { | 645 if (ptF.y < rtF.top) { |
646 ptF.y = rtF.top; | 646 ptF.y = rtF.top; |
647 } else if (ptF.y >= rtF.bottom()) { | 647 } else if (ptF.y >= rtF.bottom()) { |
648 ptF.y = rtF.bottom() - fTolerance; | 648 ptF.y = rtF.bottom() - fTolerance; |
649 } | 649 } |
650 } | 650 } |
OLD | NEW |