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

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 if (!m_pIface)
159 return FALSE; 159 return FALSE;
160 return static_cast<IFWL_Edit*>(m_pIface)->Redo(bsRecord); 160 return static_cast<IFWL_Edit*>(m_pIface)->Redo(pRecord);
Tom Sepez 2016/05/17 20:37:59 same here, return m_pIface && ...
dsinclair 2016/05/17 20:50:03 Done.
161 } 161 }
162 162
163 FX_BOOL CFWL_Edit::Undo(const CFX_ByteStringC& bsRecord) { 163 FX_BOOL CFWL_Edit::Undo(const IFDE_TxtEdtDoRecord* pRecord) {
164 if (!m_pIface) 164 if (!m_pIface)
165 return FALSE; 165 return FALSE;
166 return static_cast<IFWL_Edit*>(m_pIface)->Undo(bsRecord); 166 return static_cast<IFWL_Edit*>(m_pIface)->Undo(pRecord);
Tom Sepez 2016/05/17 20:37:59 and here
dsinclair 2016/05/17 20:50:02 Done.
167 } 167 }
168 168
169 FWL_Error CFWL_Edit::SetTabWidth(FX_FLOAT fTabWidth, FX_BOOL bEquidistant) { 169 FWL_Error CFWL_Edit::SetTabWidth(FX_FLOAT fTabWidth, FX_BOOL bEquidistant) {
170 if (!m_pIface) 170 if (!m_pIface)
171 return FWL_Error::Indefinite; 171 return FWL_Error::Indefinite;
172 return static_cast<IFWL_Edit*>(m_pIface) 172 return static_cast<IFWL_Edit*>(m_pIface)
173 ->SetTabWidth(fTabWidth, bEquidistant); 173 ->SetTabWidth(fTabWidth, bEquidistant);
174 } 174 }
175 175
176 FWL_Error CFWL_Edit::SetNumberRange(int32_t iMin, int32_t iMax) { 176 FWL_Error CFWL_Edit::SetNumberRange(int32_t iMin, int32_t iMax) {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 235
236 FX_BOOL CFWL_Edit::ReplaceSpellCheckWord(CFX_PointF pointf, 236 FX_BOOL CFWL_Edit::ReplaceSpellCheckWord(CFX_PointF pointf,
237 const CFX_ByteStringC& bsReplace) { 237 const CFX_ByteStringC& bsReplace) {
238 return static_cast<IFWL_Edit*>(m_pIface) 238 return static_cast<IFWL_Edit*>(m_pIface)
239 ->ReplaceSpellCheckWord(pointf, bsReplace); 239 ->ReplaceSpellCheckWord(pointf, bsReplace);
240 } 240 }
241 241
242 CFWL_Edit::CFWL_Edit() {} 242 CFWL_Edit::CFWL_Edit() {}
243 243
244 CFWL_Edit::~CFWL_Edit() {} 244 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