summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffwidgethandler.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-04-19 20:55:54 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-19 20:55:54 +0000
commitee96772e0878fa385b9a4a736a2fc109e19fd01e (patch)
treedef5fed9024c0aef25d7d1f81729b6f0a6687179 /xfa/fxfa/cxfa_ffwidgethandler.cpp
parentc84ea8eda5a53229cf1faaed7cb54013b9ea18c3 (diff)
downloadpdfium-ee96772e0878fa385b9a4a736a2fc109e19fd01e.tar.xz
Add public APIs for undo / redo in forms.
Add FORM_CanUndo(), FORM_CanRedo(), FORM_Undo(), and FORM_Redo(). BUG=chromium:764260 Change-Id: I1d9ea67152d9b35d9b8e1d7ef7d019706fdfa30a Reviewed-on: https://pdfium-review.googlesource.com/30872 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_ffwidgethandler.cpp')
-rw-r--r--xfa/fxfa/cxfa_ffwidgethandler.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/xfa/fxfa/cxfa_ffwidgethandler.cpp b/xfa/fxfa/cxfa_ffwidgethandler.cpp
index c3efd60b1d..a820db8083 100644
--- a/xfa/fxfa/cxfa_ffwidgethandler.cpp
+++ b/xfa/fxfa/cxfa_ffwidgethandler.cpp
@@ -166,6 +166,22 @@ void CXFA_FFWidgetHandler::PasteText(CXFA_FFWidget* widget,
widget->Paste(text);
}
+bool CXFA_FFWidgetHandler::CanUndo(CXFA_FFWidget* widget) {
+ return widget->CanUndo();
+}
+
+bool CXFA_FFWidgetHandler::CanRedo(CXFA_FFWidget* widget) {
+ return widget->CanRedo();
+}
+
+bool CXFA_FFWidgetHandler::Undo(CXFA_FFWidget* widget) {
+ return widget->Undo();
+}
+
+bool CXFA_FFWidgetHandler::Redo(CXFA_FFWidget* widget) {
+ return widget->Redo();
+}
+
FWL_WidgetHit CXFA_FFWidgetHandler::OnHitTest(CXFA_FFWidget* hWidget,
const CFX_PointF& point) {
if (!(hWidget->GetStatus() & XFA_WidgetStatus_Visible))