summaryrefslogtreecommitdiff
path: root/xfa/fwl
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-08-15 10:31:17 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-08-15 15:22:12 +0000
commit22fcbeaa80c54bef3bb6fd4180ba5519fab30962 (patch)
treeb1642f91b36d45b11b76d02c59547186dc6c524b /xfa/fwl
parenta0377dc31bccf0e3427bd94fab5fed17c1283098 (diff)
downloadpdfium-22fcbeaa80c54bef3bb6fd4180ba5519fab30962.tar.xz
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 <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fwl')
-rw-r--r--xfa/fwl/cfwl_edit.cpp14
-rw-r--r--xfa/fwl/cfwl_edit.h2
2 files changed, 4 insertions, 12 deletions
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();