summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fsdk_mgr.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-01-29 16:18:28 -0800
committerTom Sepez <tsepez@chromium.org>2016-01-29 16:18:28 -0800
commit1bce5f62f3292a6baf35491bf4c9b4fde2fb73e3 (patch)
tree0367ce72d182d10ebf75413b728065c5e39fac1d /fpdfsdk/src/fsdk_mgr.cpp
parentb0b6373e685e0591fb47fe6cb90e767728241e7f (diff)
downloadpdfium-1bce5f62f3292a6baf35491bf4c9b4fde2fb73e3.tar.xz
Add tests for CBA_AnnotIterator.
I'm about to replace the sort() that underlies this class, so I first want to be sure I don't disrupt the order. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1652533002 .
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 3299b8f909..25783a8c02 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),