From 22fcbeaa80c54bef3bb6fd4180ba5519fab30962 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 15 Aug 2017 10:31:17 -0400 Subject: Hide the undo/redo record classes inside the engine This CL moves the implementation of the records which handle undo/redo in the text edit engine into an anonymous namespace in the engine. Change-Id: I299b9738b72e3eccbbec972fd3ea956c491859fa Reviewed-on: https://pdfium-review.googlesource.com/11010 Reviewed-by: Ryan Harrison Commit-Queue: dsinclair --- xfa/fwl/cfwl_edit.cpp | 14 ++++---------- xfa/fwl/cfwl_edit.h | 2 -- 2 files changed, 4 insertions(+), 12 deletions(-) (limited to 'xfa/fwl') diff --git a/xfa/fwl/cfwl_edit.cpp b/xfa/fwl/cfwl_edit.cpp index 92d8c0266b..eb54375e29 100644 --- a/xfa/fwl/cfwl_edit.cpp +++ b/xfa/fwl/cfwl_edit.cpp @@ -363,24 +363,18 @@ bool CFWL_Edit::Paste(const CFX_WideString& wsPaste) { return true; } -bool CFWL_Edit::Redo(const IFDE_TxtEdtDoRecord* pRecord) { - return m_EdtEngine.Redo(pRecord); -} - -bool CFWL_Edit::Undo(const IFDE_TxtEdtDoRecord* pRecord) { - return m_EdtEngine.Undo(pRecord); -} - bool CFWL_Edit::Undo() { if (!CanUndo()) return false; - return Undo(m_DoRecords[m_iCurRecord--].get()); + m_EdtEngine.Undo(m_DoRecords[m_iCurRecord--].get()); + return true; } bool CFWL_Edit::Redo() { if (!CanRedo()) return false; - return Redo(m_DoRecords[++m_iCurRecord].get()); + m_EdtEngine.Redo(m_DoRecords[++m_iCurRecord].get()); + return true; } bool CFWL_Edit::CanUndo() { diff --git a/xfa/fwl/cfwl_edit.h b/xfa/fwl/cfwl_edit.h index dd165032a3..27fd205287 100644 --- a/xfa/fwl/cfwl_edit.h +++ b/xfa/fwl/cfwl_edit.h @@ -84,8 +84,6 @@ class CFWL_Edit : public CFWL_Widget { bool Copy(CFX_WideString& wsCopy); bool Cut(CFX_WideString& wsCut); bool Paste(const CFX_WideString& wsPaste); - bool Redo(const IFDE_TxtEdtDoRecord* pRecord); - bool Undo(const IFDE_TxtEdtDoRecord* pRecord); bool Undo(); bool Redo(); bool CanUndo(); -- cgit v1.2.3