| 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_txtedtengine.h" | 7 #include "xfa/fde/cfde_txtedtengine.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 } // namespace | 28 } // namespace |
| 29 | 29 |
| 30 FDE_TXTEDTPARAMS::FDE_TXTEDTPARAMS() | 30 FDE_TXTEDTPARAMS::FDE_TXTEDTPARAMS() |
| 31 : fPlateWidth(0), | 31 : fPlateWidth(0), |
| 32 fPlateHeight(0), | 32 fPlateHeight(0), |
| 33 nLineCount(0), | 33 nLineCount(0), |
| 34 dwLayoutStyles(0), | 34 dwLayoutStyles(0), |
| 35 dwAlignment(0), | 35 dwAlignment(0), |
| 36 dwMode(0), | 36 dwMode(0), |
| 37 pFont(nullptr), | |
| 38 fFontSize(10.0f), | 37 fFontSize(10.0f), |
| 39 dwFontColor(0xff000000), | 38 dwFontColor(0xff000000), |
| 40 fLineSpace(10.0f), | 39 fLineSpace(10.0f), |
| 41 fTabWidth(36), | 40 fTabWidth(36), |
| 42 bTabEquidistant(false), | 41 bTabEquidistant(false), |
| 43 wDefChar(0xFEFF), | 42 wDefChar(0xFEFF), |
| 44 wLineBreakChar('\n'), | 43 wLineBreakChar('\n'), |
| 45 nCharRotation(0), | 44 nCharRotation(0), |
| 46 nLineEnd(0), | 45 nLineEnd(0), |
| 47 nHorzScale(100), | 46 nHorzScale(100), |
| 48 fCharSpace(0), | 47 fCharSpace(0), |
| 49 pEventSink(nullptr) {} | 48 pEventSink(nullptr) {} |
| 50 | 49 |
| 50 FDE_TXTEDTPARAMS::~FDE_TXTEDTPARAMS() {} |
| 51 |
| 51 FDE_TXTEDT_TEXTCHANGE_INFO::FDE_TXTEDT_TEXTCHANGE_INFO() {} | 52 FDE_TXTEDT_TEXTCHANGE_INFO::FDE_TXTEDT_TEXTCHANGE_INFO() {} |
| 52 | 53 |
| 53 FDE_TXTEDT_TEXTCHANGE_INFO::~FDE_TXTEDT_TEXTCHANGE_INFO() {} | 54 FDE_TXTEDT_TEXTCHANGE_INFO::~FDE_TXTEDT_TEXTCHANGE_INFO() {} |
| 54 | 55 |
| 55 CFDE_TxtEdtEngine::CFDE_TxtEdtEngine() | 56 CFDE_TxtEdtEngine::CFDE_TxtEdtEngine() |
| 56 : m_pTxtBuf(new CFDE_TxtEdtBuf()), | 57 : m_pTxtBuf(new CFDE_TxtEdtBuf()), |
| 57 m_nPageLineCount(20), | 58 m_nPageLineCount(20), |
| 58 m_nLineCount(0), | 59 m_nLineCount(0), |
| 59 m_nAnchorPos(-1), | 60 m_nAnchorPos(-1), |
| 60 m_nLayoutPos(0), | 61 m_nLayoutPos(0), |
| (...skipping 1415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1476 m_SelRangePtrArr.RemoveAt(nCountRange); | 1477 m_SelRangePtrArr.RemoveAt(nCountRange); |
| 1477 DeleteRange_DoRecord(nSelStart, nSelCount, true); | 1478 DeleteRange_DoRecord(nSelStart, nSelCount, true); |
| 1478 } | 1479 } |
| 1479 ClearSelection(); | 1480 ClearSelection(); |
| 1480 m_Param.pEventSink->OnTextChanged(m_ChangeInfo); | 1481 m_Param.pEventSink->OnTextChanged(m_ChangeInfo); |
| 1481 m_Param.pEventSink->OnSelChanged(); | 1482 m_Param.pEventSink->OnSelChanged(); |
| 1482 SetCaretPos(nSelStart, true); | 1483 SetCaretPos(nSelStart, true); |
| 1483 return; | 1484 return; |
| 1484 } | 1485 } |
| 1485 } | 1486 } |
| OLD | NEW |