summaryrefslogtreecommitdiff
path: root/fpdfsdk/formfiller/cffl_formfiller.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/formfiller/cffl_formfiller.cpp')
-rw-r--r--fpdfsdk/formfiller/cffl_formfiller.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/fpdfsdk/formfiller/cffl_formfiller.cpp b/fpdfsdk/formfiller/cffl_formfiller.cpp
index a37a7501d0..e0af8955ac 100644
--- a/fpdfsdk/formfiller/cffl_formfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_formfiller.cpp
@@ -245,7 +245,8 @@ CFX_WideString CFFL_FormFiller::GetSelectedText(CPDFSDK_Annot* pAnnot) {
return pWnd ? pWnd->GetSelectedText() : CFX_WideString();
}
-void CFFL_FormFiller::DeleteSelectedText(CPDFSDK_Annot* pAnnot) {
+void CFFL_FormFiller::ReplaceSelection(CPDFSDK_Annot* pAnnot,
+ const CFX_WideString& text) {
if (!IsValid())
return;
@@ -256,7 +257,7 @@ void CFFL_FormFiller::DeleteSelectedText(CPDFSDK_Annot* pAnnot) {
if (!pWnd)
return;
- pWnd->DeleteSelectedText();
+ pWnd->ReplaceSelection(text);
}
void CFFL_FormFiller::SetFocusForAnnot(CPDFSDK_Annot* pAnnot, uint32_t nFlag) {