summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fsdk_mgr.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-01-29 16:26:27 -0800
committerTom Sepez <tsepez@chromium.org>2016-01-29 16:26:27 -0800
commitfe351dbc18e419b0ed9fbe34f2d1fb155b4f7bf1 (patch)
treeac7136643eb602f6fec582b4c3ef71694682730e /fpdfsdk/src/fsdk_mgr.cpp
parent9b76113ae4567eb998618d049afde26d3f0175d5 (diff)
downloadpdfium-fe351dbc18e419b0ed9fbe34f2d1fb155b4f7bf1.tar.xz
Merge to XFA: Add tests for CBA_AnnotIterator.
Original Review URL: https://codereview.chromium.org/1652533002 . (cherry picked from commit 1bce5f62f3292a6baf35491bf4c9b4fde2fb73e3) TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1652543003 .
Diffstat (limited to 'fpdfsdk/src/fsdk_mgr.cpp')
-rw-r--r--fpdfsdk/src/fsdk_mgr.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/fpdfsdk/src/fsdk_mgr.cpp b/fpdfsdk/src/fsdk_mgr.cpp
index e9de9e4000..76e0d2de20 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),