Index: fpdfsdk/src/fsdk_mgr.cpp |
diff --git a/fpdfsdk/src/fsdk_mgr.cpp b/fpdfsdk/src/fsdk_mgr.cpp |
index e9de9e4000bb1796855c4fa6e8242115ce7bf4d4..76e0d2de2087c8c2cf66c42ae3a20cc6ed1d540b 100644 |
--- a/fpdfsdk/src/fsdk_mgr.cpp |
+++ b/fpdfsdk/src/fsdk_mgr.cpp |
@@ -390,6 +390,13 @@ CFFL_IFormFiller* CPDFDoc_Environment::GetIFormFiller() { |
return m_pIFormFiller.get(); |
} |
+// static |
+CPDFSDK_Document* CPDFSDK_Document::FromFPDFFormHandle( |
+ FPDF_FORMHANDLE hHandle) { |
+ CPDFDoc_Environment* pEnv = static_cast<CPDFDoc_Environment*>(hHandle); |
+ return pEnv ? pEnv->GetSDKDocument() : nullptr; |
+} |
+ |
CPDFSDK_Document::CPDFSDK_Document(UnderlyingDocumentType* pDoc, |
CPDFDoc_Environment* pEnv) |
: m_pDoc(pDoc), |