diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-08-23 23:52:53 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-08-23 23:52:53 +0000 |
commit | 367ed462b51799c008795b19e886ccbed221b9be (patch) | |
tree | 3c94f25900ec5617954dbfd3e615e6a4751ddfcd /core/fpdfdoc/cpvt_generateap.cpp | |
parent | c1dde5d9b3da2af6e6f81df09ed41ab9c34bbde4 (diff) | |
download | pdfium-367ed462b51799c008795b19e886ccbed221b9be.tar.xz |
Use pdfium::span<> in CPDF_Stream::SetData().
Conversion to span makes this more elegant in a number of places,
owing to std::vector directly converting to span, and the bytestring's
ToRawSpan().
Disambiguate single-argument forms to allow passing {} as
an argument.
Change-Id: Ibd5eaadca8d8cbbd589338f375c7ee8439fd3eb2
Reviewed-on: https://pdfium-review.googlesource.com/41272
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfdoc/cpvt_generateap.cpp')
-rw-r--r-- | core/fpdfdoc/cpvt_generateap.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fpdfdoc/cpvt_generateap.cpp b/core/fpdfdoc/cpvt_generateap.cpp index 7faa4bfeca..dc2f22d0e6 100644 --- a/core/fpdfdoc/cpvt_generateap.cpp +++ b/core/fpdfdoc/cpvt_generateap.cpp @@ -504,7 +504,7 @@ void GenerateAndSetAPDict(CPDF_Document* pDoc, std::unique_ptr<CPDF_Dictionary> pResourceDict, bool bIsTextMarkupAnnotation) { CPDF_Stream* pNormalStream = pDoc->NewIndirect<CPDF_Stream>(); - pNormalStream->SetData(psAppStream); + pNormalStream->SetDataFromStringstream(psAppStream); CPDF_Dictionary* pAPDict = pAnnotDict->GetDictFor("AP"); if (!pAPDict) @@ -1300,7 +1300,7 @@ void CPVT_GenerateAP::GenerateFormAP(Type type, } if (pNormalStream) { - pNormalStream->SetDataAndRemoveFilter(&sAppStream); + pNormalStream->SetDataFromStringstreamAndRemoveFilter(&sAppStream); pStreamDict = pNormalStream->GetDict(); if (pStreamDict) { pStreamDict->SetMatrixFor("Matrix", matrix); |