summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdf_flatten.cpp5
-rw-r--r--fpdfsdk/fpdfannot.cpp2
-rw-r--r--fpdfsdk/pwl/cpwl_appstream.cpp3
3 files changed, 6 insertions, 4 deletions
diff --git a/fpdfsdk/fpdf_flatten.cpp b/fpdfsdk/fpdf_flatten.cpp
index e530553f5a..16528c2ee3 100644
--- a/fpdfsdk/fpdf_flatten.cpp
+++ b/fpdfsdk/fpdf_flatten.cpp
@@ -203,7 +203,8 @@ void SetPageContents(const CFX_ByteString& key,
CFX_ByteString sBody =
CFX_ByteString((const char*)pAcc->GetData(), pAcc->GetSize());
sStream = sStream + sBody + "\nQ";
- pContentsStream->SetData(sStream.raw_str(), sStream.GetLength());
+ pContentsStream->SetDataAndRemoveFilter(sStream.raw_str(),
+ sStream.GetLength());
pContentsArray->AddNew<CPDF_Reference>(pDocument,
pContentsStream->GetObjNum());
pPage->SetNewFor<CPDF_Reference>("Contents", pDocument,
@@ -405,7 +406,7 @@ DLLEXPORT int STDCALL FPDFPage_Flatten(FPDF_PAGE page, int nFlag) {
sTemp.Format("q %f 0 0 %f %f %f cm /%s Do Q\n", m.a, m.d, m.e, m.f,
sFormName.c_str());
sStream += sTemp;
- pNewXObject->SetData(sStream.raw_str(), sStream.GetLength());
+ pNewXObject->SetDataAndRemoveFilter(sStream.raw_str(), sStream.GetLength());
}
pPageDict->RemoveFor("Annots");
return FLATTEN_SUCCESS;
diff --git a/fpdfsdk/fpdfannot.cpp b/fpdfsdk/fpdfannot.cpp
index fcbed5c2ce..64c95a3777 100644
--- a/fpdfsdk/fpdfannot.cpp
+++ b/fpdfsdk/fpdfannot.cpp
@@ -179,7 +179,7 @@ void UpdateContentStream(CPDF_Form* pForm, CPDF_Stream* pStream) {
CPDF_PageContentGenerator generator(pForm);
std::ostringstream buf;
generator.ProcessPageObjects(&buf);
- pStream->SetData(&buf);
+ pStream->SetDataAndRemoveFilter(&buf);
}
} // namespace
diff --git a/fpdfsdk/pwl/cpwl_appstream.cpp b/fpdfsdk/pwl/cpwl_appstream.cpp
index fe401639da..405a205507 100644
--- a/fpdfsdk/pwl/cpwl_appstream.cpp
+++ b/fpdfsdk/pwl/cpwl_appstream.cpp
@@ -1943,7 +1943,8 @@ void CPWL_AppStream::Write(const CFX_ByteString& sAPType,
}
pStreamDict->SetMatrixFor("Matrix", widget_->GetMatrix());
pStreamDict->SetRectFor("BBox", widget_->GetRotatedRect());
- pStream->SetData((uint8_t*)(sContents.c_str()), sContents.GetLength());
+ pStream->SetDataAndRemoveFilter((uint8_t*)(sContents.c_str()),
+ sContents.GetLength());
}
void CPWL_AppStream::Remove(const CFX_ByteString& sAPType) {