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/fwl/lightwidget/cfwl_edit.h" | 7 #include "xfa/fwl/lightwidget/cfwl_edit.h" |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <vector> | 10 #include <vector> |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 return FWL_Error::Indefinite; | 133 return FWL_Error::Indefinite; |
134 return static_cast<IFWL_Edit*>(m_pIface)->DeleteSelections(); | 134 return static_cast<IFWL_Edit*>(m_pIface)->DeleteSelections(); |
135 } | 135 } |
136 | 136 |
137 FWL_Error CFWL_Edit::DeleteRange(int32_t nStart, int32_t nCount) { | 137 FWL_Error CFWL_Edit::DeleteRange(int32_t nStart, int32_t nCount) { |
138 if (!m_pIface) | 138 if (!m_pIface) |
139 return FWL_Error::Indefinite; | 139 return FWL_Error::Indefinite; |
140 return static_cast<IFWL_Edit*>(m_pIface)->DeleteRange(nStart, nCount); | 140 return static_cast<IFWL_Edit*>(m_pIface)->DeleteRange(nStart, nCount); |
141 } | 141 } |
142 | 142 |
143 FWL_Error CFWL_Edit::ReplaceSelections(const CFX_WideStringC& wsReplace) { | |
144 if (!m_pIface) | |
145 return FWL_Error::Indefinite; | |
146 return static_cast<IFWL_Edit*>(m_pIface)->ReplaceSelections(wsReplace); | |
147 } | |
148 | |
149 FWL_Error CFWL_Edit::Replace(int32_t nStart, | 143 FWL_Error CFWL_Edit::Replace(int32_t nStart, |
150 int32_t nLen, | 144 int32_t nLen, |
151 const CFX_WideStringC& wsReplace) { | 145 const CFX_WideStringC& wsReplace) { |
152 if (!m_pIface) | 146 if (!m_pIface) |
153 return FWL_Error::Indefinite; | 147 return FWL_Error::Indefinite; |
154 return static_cast<IFWL_Edit*>(m_pIface)->Replace(nStart, nLen, wsReplace); | 148 return static_cast<IFWL_Edit*>(m_pIface)->Replace(nStart, nLen, wsReplace); |
155 } | 149 } |
156 | 150 |
157 FWL_Error CFWL_Edit::DoClipboard(int32_t iCmd) { | 151 FWL_Error CFWL_Edit::DoClipboard(int32_t iCmd) { |
158 if (!m_pIface) | 152 if (!m_pIface) |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 | 235 |
242 FX_BOOL CFWL_Edit::ReplaceSpellCheckWord(CFX_PointF pointf, | 236 FX_BOOL CFWL_Edit::ReplaceSpellCheckWord(CFX_PointF pointf, |
243 const CFX_ByteStringC& bsReplace) { | 237 const CFX_ByteStringC& bsReplace) { |
244 return static_cast<IFWL_Edit*>(m_pIface) | 238 return static_cast<IFWL_Edit*>(m_pIface) |
245 ->ReplaceSpellCheckWord(pointf, bsReplace); | 239 ->ReplaceSpellCheckWord(pointf, bsReplace); |
246 } | 240 } |
247 | 241 |
248 CFWL_Edit::CFWL_Edit() {} | 242 CFWL_Edit::CFWL_Edit() {} |
249 | 243 |
250 CFWL_Edit::~CFWL_Edit() {} | 244 CFWL_Edit::~CFWL_Edit() {} |
OLD | NEW |