summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfformfill.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-10-05 11:14:12 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-10-05 17:22:58 +0000
commit921fe6bfde3b4cf3da4b55fab77103af3a65cab4 (patch)
tree2587bf5ab7c8d72a085137c9986235c0c1514b2c /fpdfsdk/fpdfformfill.cpp
parent023d645733cddcf026897c51f3d4c34090eb4b2d (diff)
downloadpdfium-921fe6bfde3b4cf3da4b55fab77103af3a65cab4.tar.xz
Move CPDF_RenderOptions members to private
This CL moves the members of CPDF_RenderOptions to be private members and adds accessor methods as needed. Change-Id: Ie91665ff53ae00cc4c53741d089d375503fabe11 Reviewed-on: https://pdfium-review.googlesource.com/15531 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfformfill.cpp')
-rw-r--r--fpdfsdk/fpdfformfill.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/fpdfsdk/fpdfformfill.cpp b/fpdfsdk/fpdfformfill.cpp
index 3d821b601f..e789df461e 100644
--- a/fpdfsdk/fpdfformfill.cpp
+++ b/fpdfsdk/fpdfformfill.cpp
@@ -120,25 +120,27 @@ void FFLCommon(FPDF_FORMHANDLE hHandle,
pDevice->SetClip_Rect(clip);
CPDF_RenderOptions options;
+ uint32_t option_flags = options.GetFlags();
if (flags & FPDF_LCD_TEXT)
- options.m_Flags |= RENDER_CLEARTYPE;
+ option_flags |= RENDER_CLEARTYPE;
else
- options.m_Flags &= ~RENDER_CLEARTYPE;
+ option_flags &= ~RENDER_CLEARTYPE;
+ options.SetFlags(option_flags);
// Grayscale output
if (flags & FPDF_GRAYSCALE)
- options.m_ColorMode = CPDF_RenderOptions::kGray;
+ options.SetColorMode(CPDF_RenderOptions::kGray);
- options.m_bDrawAnnots = flags & FPDF_ANNOT;
+ options.SetDrawAnnots(flags & FPDF_ANNOT);
#ifdef PDF_ENABLE_XFA
- options.m_pOCContext =
- pdfium::MakeRetain<CPDF_OCContext>(pPDFDoc, CPDF_OCContext::View);
+ options.SetOCContext(
+ pdfium::MakeRetain<CPDF_OCContext>(pPDFDoc, CPDF_OCContext::View));
if (CPDFSDK_PageView* pPageView = pFormFillEnv->GetPageView(pPage, true))
pPageView->PageView_OnDraw(pDevice.get(), &matrix, &options, clip);
#else // PDF_ENABLE_XFA
- options.m_pOCContext = pdfium::MakeRetain<CPDF_OCContext>(
- pPage->m_pDocument.Get(), CPDF_OCContext::View);
+ options.SetOCContext(pdfium::MakeRetain<CPDF_OCContext>(
+ pPage->m_pDocument.Get(), CPDF_OCContext::View));
if (CPDFSDK_PageView* pPageView = FormHandleToPageView(hHandle, pPage))
pPageView->PageView_OnDraw(pDevice.get(), &matrix, &options);
#endif // PDF_ENABLE_XFA