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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 RemoveAllParags(); | 77 RemoveAllParags(); |
78 RemoveAllPages(); | 78 RemoveAllPages(); |
79 m_Param.pEventSink = nullptr; | 79 m_Param.pEventSink = nullptr; |
80 ClearSelection(); | 80 ClearSelection(); |
81 } | 81 } |
82 | 82 |
83 void CFDE_TxtEdtEngine::SetEditParams(const FDE_TXTEDTPARAMS& params) { | 83 void CFDE_TxtEdtEngine::SetEditParams(const FDE_TXTEDTPARAMS& params) { |
84 if (!m_pTextBreak) | 84 if (!m_pTextBreak) |
85 m_pTextBreak = pdfium::MakeUnique<CFX_TxtBreak>(FX_TXTBREAKPOLICY_None); | 85 m_pTextBreak = pdfium::MakeUnique<CFX_TxtBreak>(FX_TXTBREAKPOLICY_None); |
86 | 86 |
87 FXSYS_memcpy(&m_Param, ¶ms, sizeof(FDE_TXTEDTPARAMS)); | 87 m_Param = params; |
88 m_wLineEnd = params.wLineBreakChar; | 88 m_wLineEnd = params.wLineBreakChar; |
89 m_bAutoLineEnd = (m_Param.nLineEnd == FDE_TXTEDIT_LINEEND_Auto); | 89 m_bAutoLineEnd = (m_Param.nLineEnd == FDE_TXTEDIT_LINEEND_Auto); |
90 UpdateTxtBreak(); | 90 UpdateTxtBreak(); |
91 } | 91 } |
92 | 92 |
93 FDE_TXTEDTPARAMS* CFDE_TxtEdtEngine::GetEditParams() { | 93 FDE_TXTEDTPARAMS* CFDE_TxtEdtEngine::GetEditParams() { |
94 return &m_Param; | 94 return &m_Param; |
95 } | 95 } |
96 | 96 |
97 int32_t CFDE_TxtEdtEngine::CountPages() const { | 97 int32_t CFDE_TxtEdtEngine::CountPages() const { |
(...skipping 1375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1473 m_SelRangePtrArr.RemoveAt(nCountRange); | 1473 m_SelRangePtrArr.RemoveAt(nCountRange); |
1474 DeleteRange_DoRecord(nSelStart, nSelCount, true); | 1474 DeleteRange_DoRecord(nSelStart, nSelCount, true); |
1475 } | 1475 } |
1476 ClearSelection(); | 1476 ClearSelection(); |
1477 m_Param.pEventSink->OnTextChanged(m_ChangeInfo); | 1477 m_Param.pEventSink->OnTextChanged(m_ChangeInfo); |
1478 m_Param.pEventSink->OnSelChanged(); | 1478 m_Param.pEventSink->OnSelChanged(); |
1479 SetCaretPos(nSelStart, true); | 1479 SetCaretPos(nSelStart, true); |
1480 return; | 1480 return; |
1481 } | 1481 } |
1482 } | 1482 } |
OLD | NEW |