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.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/fpdfsdk/formfiller/cffl_formfiller.cpp b/fpdfsdk/formfiller/cffl_formfiller.cpp
index 297d5b78d6..526f4b947d 100644
--- a/fpdfsdk/formfiller/cffl_formfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_formfiller.cpp
@@ -239,6 +239,17 @@ bool CFFL_FormFiller::OnChar(CPDFSDK_Annot* pAnnot,
return false;
}
+CFX_WideString CFFL_FormFiller::GetSelectedText(CPDFSDK_Annot* pAnnot) {
+ if (!IsValid())
+ return CFX_WideString();
+
+ CPDFSDK_PageView* pPageView = GetCurPageView(true);
+ ASSERT(pPageView);
+
+ CPWL_Wnd* pWnd = GetPDFWindow(pPageView, false);
+ return pWnd ? pWnd->GetSelectedText() : CFX_WideString();
+}
+
void CFFL_FormFiller::SetFocusForAnnot(CPDFSDK_Annot* pAnnot, uint32_t nFlag) {
CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
UnderlyingPageType* pPage = pWidget->GetUnderlyingPage();