summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_pageview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/cpdfsdk_pageview.cpp')
-rw-r--r--fpdfsdk/cpdfsdk_pageview.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/fpdfsdk/cpdfsdk_pageview.cpp b/fpdfsdk/cpdfsdk_pageview.cpp
index b7f8cdfe10..b68828b144 100644
--- a/fpdfsdk/cpdfsdk_pageview.cpp
+++ b/fpdfsdk/cpdfsdk_pageview.cpp
@@ -268,6 +268,42 @@ void CPDFSDK_PageView::ReplaceSelection(const WideString& text) {
}
}
+bool CPDFSDK_PageView::CanUndo() {
+ if (CPDFSDK_Annot* pAnnot = GetFocusAnnot()) {
+ CPDFSDK_AnnotHandlerMgr* pAnnotHandlerMgr =
+ m_pFormFillEnv->GetAnnotHandlerMgr();
+ return pAnnotHandlerMgr->Annot_CanUndo(pAnnot);
+ }
+ return false;
+}
+
+bool CPDFSDK_PageView::CanRedo() {
+ if (CPDFSDK_Annot* pAnnot = GetFocusAnnot()) {
+ CPDFSDK_AnnotHandlerMgr* pAnnotHandlerMgr =
+ m_pFormFillEnv->GetAnnotHandlerMgr();
+ return pAnnotHandlerMgr->Annot_CanRedo(pAnnot);
+ }
+ return false;
+}
+
+bool CPDFSDK_PageView::Undo() {
+ if (CPDFSDK_Annot* pAnnot = GetFocusAnnot()) {
+ CPDFSDK_AnnotHandlerMgr* pAnnotHandlerMgr =
+ m_pFormFillEnv->GetAnnotHandlerMgr();
+ return pAnnotHandlerMgr->Annot_Undo(pAnnot);
+ }
+ return false;
+}
+
+bool CPDFSDK_PageView::Redo() {
+ if (CPDFSDK_Annot* pAnnot = GetFocusAnnot()) {
+ CPDFSDK_AnnotHandlerMgr* pAnnotHandlerMgr =
+ m_pFormFillEnv->GetAnnotHandlerMgr();
+ return pAnnotHandlerMgr->Annot_Redo(pAnnot);
+ }
+ return false;
+}
+
bool CPDFSDK_PageView::OnFocus(const CFX_PointF& point, uint32_t nFlag) {
CPDFSDK_Annot::ObservedPtr pAnnot(GetFXWidgetAtPoint(point));
if (!pAnnot) {