summaryrefslogtreecommitdiff
path: root/chromium/third_party/pdfium/fpdfsdk/fpdf_flatten.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-11-20 15:06:40 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-11-22 11:48:58 +0000
commitdaa093eea7c773db06799a13bd7e4e2e2a9f8f14 (patch)
tree96cc5e7b9194c1b29eab927730bfa419e7111c25 /chromium/third_party/pdfium/fpdfsdk/fpdf_flatten.cpp
parentbe59a35641616a4cf23c4a13fa0632624b021c1b (diff)
downloadqtwebengine-chromium-daa093eea7c773db06799a13bd7e4e2e2a9f8f14.tar.gz
BASELINE: Update Chromium to 63.0.3239.58
Change-Id: Ia93b322a00ba4dd4004f3bcf1254063ba90e1605 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/third_party/pdfium/fpdfsdk/fpdf_flatten.cpp')
-rw-r--r--chromium/third_party/pdfium/fpdfsdk/fpdf_flatten.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/chromium/third_party/pdfium/fpdfsdk/fpdf_flatten.cpp b/chromium/third_party/pdfium/fpdfsdk/fpdf_flatten.cpp
index b8e84c8cc4d..a276e3a3682 100644
--- a/chromium/third_party/pdfium/fpdfsdk/fpdf_flatten.cpp
+++ b/chromium/third_party/pdfium/fpdfsdk/fpdf_flatten.cpp
@@ -97,7 +97,7 @@ int ParserAnnots(CPDF_Document* pSourceDoc,
if (!pAnnotDic)
continue;
- CFX_ByteString sSubtype = pAnnotDic->GetStringFor("Subtype");
+ ByteString sSubtype = pAnnotDic->GetStringFor("Subtype");
if (sSubtype == "Popup")
continue;
@@ -168,18 +168,18 @@ CFX_FloatRect CalculateRect(std::vector<CFX_FloatRect>* pRectArray) {
return rcRet;
}
-uint32_t NewIndirectContentsStream(const CFX_ByteString& key,
+uint32_t NewIndirectContentsStream(const ByteString& key,
CPDF_Document* pDocument) {
CPDF_Stream* pNewContents = pDocument->NewIndirect<CPDF_Stream>(
nullptr, 0,
pdfium::MakeUnique<CPDF_Dictionary>(pDocument->GetByteStringPool()));
- CFX_ByteString sStream;
+ ByteString sStream;
sStream.Format("q 1 0 0 1 0 0 cm /%s Do Q", key.c_str());
pNewContents->SetData(sStream.raw_str(), sStream.GetLength());
return pNewContents->GetObjNum();
}
-void SetPageContents(const CFX_ByteString& key,
+void SetPageContents(const ByteString& key,
CPDF_Dictionary* pPage,
CPDF_Document* pDocument) {
CPDF_Array* pContentsArray = nullptr;
@@ -199,9 +199,9 @@ void SetPageContents(const CFX_ByteString& key,
pContentsArray = pDocument->NewIndirect<CPDF_Array>();
auto pAcc = pdfium::MakeRetain<CPDF_StreamAcc>(pContentsStream);
pAcc->LoadAllData();
- CFX_ByteString sStream = "q\n";
- CFX_ByteString sBody =
- CFX_ByteString((const char*)pAcc->GetData(), pAcc->GetSize());
+ ByteString sStream = "q\n";
+ ByteString sBody =
+ ByteString((const char*)pAcc->GetData(), pAcc->GetSize());
sStream = sStream + sBody + "\nQ";
pContentsStream->SetDataAndRemoveFilter(sStream.raw_str(),
sStream.GetLength());
@@ -299,10 +299,10 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFPage_Flatten(FPDF_PAGE page, int nFlag) {
if (!pPageXObject)
pPageXObject = pRes->SetNewFor<CPDF_Dictionary>("XObject");
- CFX_ByteString key;
+ ByteString key;
int nStreams = pdfium::CollectionSize<int>(ObjectArray);
if (nStreams > 0) {
- CFX_ByteString sKey;
+ ByteString sKey;
int i = 0;
while (i < INT_MAX) {
sKey.Format("FFT%d", i);
@@ -336,7 +336,7 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFPage_Flatten(FPDF_PAGE page, int nFlag) {
CFX_FloatRect rcAnnot = pAnnotDic->GetRectFor("Rect");
rcAnnot.Normalize();
- CFX_ByteString sAnnotState = pAnnotDic->GetStringFor("AS");
+ ByteString sAnnotState = pAnnotDic->GetStringFor("AS");
CPDF_Dictionary* pAnnotAP = pAnnotDic->GetDictFor("AP");
if (!pAnnotAP)
continue;
@@ -392,17 +392,17 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFPage_Flatten(FPDF_PAGE page, int nFlag) {
if (!pXObject)
pXObject = pNewXORes->SetNewFor<CPDF_Dictionary>("XObject");
- CFX_ByteString sFormName;
+ ByteString sFormName;
sFormName.Format("F%d", i);
pXObject->SetNewFor<CPDF_Reference>(sFormName, pDocument,
pObj->GetObjNum());
auto pAcc = pdfium::MakeRetain<CPDF_StreamAcc>(pNewXObject);
pAcc->LoadAllData();
- CFX_ByteString sStream(pAcc->GetData(), pAcc->GetSize());
+ ByteString sStream(pAcc->GetData(), pAcc->GetSize());
CFX_Matrix matrix = pAPDic->GetMatrixFor("Matrix");
CFX_Matrix m = GetMatrix(rcAnnot, rcStream, matrix);
- CFX_ByteString sTemp;
+ ByteString sTemp;
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;