From b4a261855b34b4c8d938118762ae609a34a3ae99 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 1 Mar 2017 12:15:00 -0800 Subject: Create virtual codec APIs so chrome/fuzzers can link separately The one step to make an actual concrete class is conditionalized in fpdfview and is unconditional in the fuzzer. Also replace the clumsy C-style callbacks with a delegate interface as long as we are making new interfaces. Change-Id: I733a437483ce5e0c34211cfbbda05105336f55b5 Reviewed-on: https://pdfium-review.googlesource.com/2887 Commit-Queue: Tom Sepez Commit-Queue: dsinclair Reviewed-by: dsinclair --- xfa/fxfa/app/xfa_ffwidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xfa/fxfa') diff --git a/xfa/fxfa/app/xfa_ffwidget.cpp b/xfa/fxfa/app/xfa_ffwidget.cpp index 1ffd712a3a..9995fd11b2 100644 --- a/xfa/fxfa/app/xfa_ffwidget.cpp +++ b/xfa/fxfa/app/xfa_ffwidget.cpp @@ -1128,7 +1128,7 @@ CFX_DIBitmap* XFA_LoadImageFromBuffer( CFX_DIBAttribute dibAttr; CFX_DIBitmap* pBitmap = nullptr; - CCodec_ProgressiveDecoder* pProgressiveDecoder = + std::unique_ptr pProgressiveDecoder = pCodecMgr->CreateProgressiveDecoder(); pProgressiveDecoder->LoadImageInfo(pImageFileRead, type, &dibAttr, false); switch (dibAttr.m_wDPIUnit) { @@ -1164,9 +1164,9 @@ CFX_DIBitmap* XFA_LoadImageFromBuffer( pProgressiveDecoder->ContinueDecode(); } } - delete pProgressiveDecoder; return pBitmap; } + void XFA_RectWidthoutMargin(CFX_RectF& rt, const CXFA_Margin& mg, bool bUI) { if (!mg) { return; -- cgit v1.2.3