From ab3909796cf2e9fa192040bcd7cb9da7bb3328a5 Mon Sep 17 00:00:00 2001 From: Diana Gage Date: Fri, 28 Jul 2017 17:07:39 -0700 Subject: Add FORM_ReplaceSelection() and embedder tests. This method replaces the selected text in a user-editable form text area with another text string (which can be empty or non-empty). If there is no selected text, FORM_ReplaceSelection() will append the replacement text after the current caret position. BUG=chromium:59266 Change-Id: I76448ef757d107888c33ebd5656457ebac93b952 Reviewed-on: https://pdfium-review.googlesource.com/8812 Reviewed-by: Lei Zhang Commit-Queue: Diana Gage --- fpdfsdk/ipdfsdk_annothandler.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'fpdfsdk/ipdfsdk_annothandler.h') diff --git a/fpdfsdk/ipdfsdk_annothandler.h b/fpdfsdk/ipdfsdk_annothandler.h index 5340978308..3a35cdc8ff 100644 --- a/fpdfsdk/ipdfsdk_annothandler.h +++ b/fpdfsdk/ipdfsdk_annothandler.h @@ -37,7 +37,8 @@ class IPDFSDK_AnnotHandler { virtual CFX_FloatRect GetViewBBox(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot) = 0; virtual CFX_WideString GetSelectedText(CPDFSDK_Annot* pAnnot) = 0; - virtual void DeleteSelectedText(CPDFSDK_Annot* pAnnot) = 0; + virtual void ReplaceSelection(CPDFSDK_Annot* pAnnot, + const CFX_WideString& text) = 0; virtual bool HitTest(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot, const CFX_PointF& point) = 0; -- cgit v1.2.3