Index: fpdfsdk/src/fsdk_mgr.cpp |
diff --git a/fpdfsdk/src/fsdk_mgr.cpp b/fpdfsdk/src/fsdk_mgr.cpp |
index 3299b8f90942ae1eccd70852b580da0c1925cd1a..25783a8c02e74938a1e268b521d57037b9386039 100644 |
--- a/fpdfsdk/src/fsdk_mgr.cpp |
+++ b/fpdfsdk/src/fsdk_mgr.cpp |
@@ -378,6 +378,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), |