summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_ppo.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-05-25 22:38:49 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-25 22:38:49 +0000
commit2aa4b2f3928ccd8393f60db8f7b740c75f4e8a8d (patch)
tree3c31b98ac48d5bb95c782cfe3c754037e66119d9 /fpdfsdk/fpdf_ppo.cpp
parentb1ec280837cc6e1932754ef40de26d12b77aa910 (diff)
downloadpdfium-2aa4b2f3928ccd8393f60db8f7b740c75f4e8a8d.tar.xz
Make CPDF_Page retainable.
Small step to reducing the differences between XFA and non-XFA. We still use the RetainPtr pretty much as if it were an unique_ptr, in that we're not yet caching pages and handing out multiple pointers to the same page in the non-XFA case. The one change is in page view cleanup, where we no longer need a boolean and can take (sufficient) page ownership with a RetainPtr. Tidy up some document.h -> page.h -> document.h circular inclusion while we're at it. NOTE: Wait for imminent branch to pass before landing. We'll want this to bake a while. Change-Id: I64a2f12ac3424ece1063d40583995b834117cf34 Reviewed-on: https://pdfium-review.googlesource.com/32790 Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdf_ppo.cpp')
-rw-r--r--fpdfsdk/fpdf_ppo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/fpdfsdk/fpdf_ppo.cpp b/fpdfsdk/fpdf_ppo.cpp
index 1790e17fb3..b73042466b 100644
--- a/fpdfsdk/fpdf_ppo.cpp
+++ b/fpdfsdk/fpdf_ppo.cpp
@@ -618,9 +618,9 @@ bool CPDF_NPageToOneExporter::ExportNPagesToOne(
if (!pSrcPageDict)
return false;
- CPDF_Page srcPage(src(), pSrcPageDict, true);
+ auto srcPage = pdfium::MakeRetain<CPDF_Page>(src(), pSrcPageDict, true);
NupPageSettings settings =
- nupState.CalculateNewPagePosition(srcPage.GetPageSize());
+ nupState.CalculateNewPagePosition(srcPage->GetPageSize());
AddSubPage(pSrcPageDict, settings, &objectNumberMap, &pageXObjectMap,
&xObjNameNumberMap, &bsContent);
}