summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdfformfill.cpp5
-rw-r--r--fpdfsdk/fsdk_mgr.cpp6
2 files changed, 7 insertions, 4 deletions
diff --git a/fpdfsdk/fpdfformfill.cpp b/fpdfsdk/fpdfformfill.cpp
index f949da1019..438150974d 100644
--- a/fpdfsdk/fpdfformfill.cpp
+++ b/fpdfsdk/fpdfformfill.cpp
@@ -322,7 +322,8 @@ static void FFLCommon(FPDF_FORMHANDLE hHandle,
options.m_BackColor = 0xffffff;
}
options.m_AddFlags = flags >> 8;
- options.m_pOCContext = new CPDF_OCContext(pPage->m_pDocument);
+ options.m_pOCContext =
+ new CPDF_OCContext(pPage->m_pDocument, CPDF_OCContext::View);
#else // PDF_ENABLE_XFA
CPDFXFA_Document* pDocument = pPage->GetDocument();
if (!pDocument)
@@ -366,7 +367,7 @@ static void FFLCommon(FPDF_FORMHANDLE hHandle,
options.m_BackColor = 0xffffff;
}
options.m_AddFlags = flags >> 8;
- options.m_pOCContext = new CPDF_OCContext(pPDFDoc);
+ options.m_pOCContext = new CPDF_OCContext(pPDFDoc, CPDF_OCContext::View);
if (CPDFSDK_PageView* pPageView = pFXDoc->GetPageView(pPage))
pPageView->PageView_OnDraw(pDevice.get(), &matrix, &options, clip);
diff --git a/fpdfsdk/fsdk_mgr.cpp b/fpdfsdk/fsdk_mgr.cpp
index e4ceadc43c..fac98d8aa3 100644
--- a/fpdfsdk/fsdk_mgr.cpp
+++ b/fpdfsdk/fsdk_mgr.cpp
@@ -328,8 +328,10 @@ FX_BOOL CPDFSDK_Document::ProcOpenAction() {
}
CPDF_OCContext* CPDFSDK_Document::GetOCContext() {
- if (!m_pOccontent)
- m_pOccontent.reset(new CPDF_OCContext(GetPDFDocument()));
+ if (!m_pOccontent) {
+ m_pOccontent.reset(
+ new CPDF_OCContext(GetPDFDocument(), CPDF_OCContext::View));
+ }
return m_pOccontent.get();
}