summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app/xfa_ffwidget.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-03-01 12:15:00 -0800
committerChromium commit bot <commit-bot@chromium.org>2017-03-01 20:43:46 +0000
commitb4a261855b34b4c8d938118762ae609a34a3ae99 (patch)
tree7b084e874cbf41eec73a3cec949dc810983cc0cf /xfa/fxfa/app/xfa_ffwidget.cpp
parentfed39cf4a23341cf9cb5a5b432248b4247022282 (diff)
downloadpdfium-b4a261855b34b4c8d938118762ae609a34a3ae99.tar.xz
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 <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/app/xfa_ffwidget.cpp')
-rw-r--r--xfa/fxfa/app/xfa_ffwidget.cpp4
1 files changed, 2 insertions, 2 deletions
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<CCodec_ProgressiveDecoder> 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;