Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Side by Side Diff: xfa/fwl/lightwidget/cfwl_edit.cpp

Issue 1980293004: Pass objects instead of strings for undo/redo records. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 return FWL_Error::Indefinite; 147 return FWL_Error::Indefinite;
148 return static_cast<IFWL_Edit*>(m_pIface)->Replace(nStart, nLen, wsReplace); 148 return static_cast<IFWL_Edit*>(m_pIface)->Replace(nStart, nLen, wsReplace);
149 } 149 }
150 150
151 FWL_Error CFWL_Edit::DoClipboard(int32_t iCmd) { 151 FWL_Error CFWL_Edit::DoClipboard(int32_t iCmd) {
152 if (!m_pIface) 152 if (!m_pIface)
153 return FWL_Error::Indefinite; 153 return FWL_Error::Indefinite;
154 return static_cast<IFWL_Edit*>(m_pIface)->DoClipboard(iCmd); 154 return static_cast<IFWL_Edit*>(m_pIface)->DoClipboard(iCmd);
155 } 155 }
156 156
157 FX_BOOL CFWL_Edit::Redo(const CFX_ByteStringC& bsRecord) { 157 FX_BOOL CFWL_Edit::Redo(const IFDE_TxtEdtDoRecord* pRecord) {
158 if (!m_pIface) 158 return m_pIface && static_cast<IFWL_Edit*>(m_pIface)->Redo(pRecord);
159 return FALSE;
160 return static_cast<IFWL_Edit*>(m_pIface)->Redo(bsRecord);
161 } 159 }
162 160
163 FX_BOOL CFWL_Edit::Undo(const CFX_ByteStringC& bsRecord) { 161 FX_BOOL CFWL_Edit::Undo(const IFDE_TxtEdtDoRecord* pRecord) {
164 if (!m_pIface) 162 return m_pIface && static_cast<IFWL_Edit*>(m_pIface)->Undo(pRecord);
165 return FALSE;
166 return static_cast<IFWL_Edit*>(m_pIface)->Undo(bsRecord);
167 } 163 }
168 164
169 FWL_Error CFWL_Edit::SetTabWidth(FX_FLOAT fTabWidth, FX_BOOL bEquidistant) { 165 FWL_Error CFWL_Edit::SetTabWidth(FX_FLOAT fTabWidth, FX_BOOL bEquidistant) {
170 if (!m_pIface) 166 if (!m_pIface)
171 return FWL_Error::Indefinite; 167 return FWL_Error::Indefinite;
172 return static_cast<IFWL_Edit*>(m_pIface) 168 return static_cast<IFWL_Edit*>(m_pIface)
173 ->SetTabWidth(fTabWidth, bEquidistant); 169 ->SetTabWidth(fTabWidth, bEquidistant);
174 } 170 }
175 171
176 FWL_Error CFWL_Edit::SetNumberRange(int32_t iMin, int32_t iMax) { 172 FWL_Error CFWL_Edit::SetNumberRange(int32_t iMin, int32_t iMax) {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 231
236 FX_BOOL CFWL_Edit::ReplaceSpellCheckWord(CFX_PointF pointf, 232 FX_BOOL CFWL_Edit::ReplaceSpellCheckWord(CFX_PointF pointf,
237 const CFX_ByteStringC& bsReplace) { 233 const CFX_ByteStringC& bsReplace) {
238 return static_cast<IFWL_Edit*>(m_pIface) 234 return static_cast<IFWL_Edit*>(m_pIface)
239 ->ReplaceSpellCheckWord(pointf, bsReplace); 235 ->ReplaceSpellCheckWord(pointf, bsReplace);
240 } 236 }
241 237
242 CFWL_Edit::CFWL_Edit() {} 238 CFWL_Edit::CFWL_Edit() {}
243 239
244 CFWL_Edit::~CFWL_Edit() {} 240 CFWL_Edit::~CFWL_Edit() {}
OLDNEW
« xfa/fwl/basewidget/fwl_editimp.cpp ('K') | « xfa/fwl/lightwidget/cfwl_edit.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698