summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_ppo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdf_ppo.cpp')
-rw-r--r--fpdfsdk/fpdf_ppo.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/fpdfsdk/fpdf_ppo.cpp b/fpdfsdk/fpdf_ppo.cpp
index 722070547f..3c99304a98 100644
--- a/fpdfsdk/fpdf_ppo.cpp
+++ b/fpdfsdk/fpdf_ppo.cpp
@@ -715,17 +715,14 @@ uint32_t CPDF_NPageToOneExporter::MakeXObject(
bsSrcContentStream += bsStream;
bsSrcContentStream += "\n";
}
- pNewXObject->SetDataAndRemoveFilter(bsSrcContentStream.raw_str(),
- bsSrcContentStream.GetLength());
+ pNewXObject->SetDataAndRemoveFilter(bsSrcContentStream.AsRawSpan());
} else {
const CPDF_Stream* pStream = pSrcContentObj->AsStream();
auto pAcc = pdfium::MakeRetain<CPDF_StreamAcc>(pStream);
pAcc->LoadAllDataFiltered();
ByteString bsStream(pAcc->GetData(), pAcc->GetSize());
- pNewXObject->SetDataAndRemoveFilter(bsStream.raw_str(),
- bsStream.GetLength());
+ pNewXObject->SetDataAndRemoveFilter(bsStream.AsRawSpan());
}
-
return pNewXObject->GetObjNum();
}
@@ -752,7 +749,7 @@ void CPDF_NPageToOneExporter::FinishPage(
auto pDict = pdfium::MakeUnique<CPDF_Dictionary>(dest()->GetByteStringPool());
CPDF_Stream* pStream =
dest()->NewIndirect<CPDF_Stream>(nullptr, 0, std::move(pDict));
- pStream->SetData(bsContent.raw_str(), bsContent.GetLength());
+ pStream->SetData(bsContent.AsRawSpan());
pDestPageDict->SetFor(pdfium::page_object::kContents,
pStream->MakeReference(dest()));
}