Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: fpdfsdk/fpdf_flatten.cpp

Issue 1868293002: Make converstion explicit from CFX_ByteString to uint8_t* (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fxge/ge/fx_ge_fontmap.cpp ('k') | xfa/fxfa/app/xfa_ffimageedit.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/fpdf_flatten.cpp
diff --git a/fpdfsdk/fpdf_flatten.cpp b/fpdfsdk/fpdf_flatten.cpp
index 99f97d7ca2c572e4fde9b9bdc2f8af318a570d3d..54e606397fb7c9400f5d1cd6173a41aacad4e2b5 100644
--- a/fpdfsdk/fpdf_flatten.cpp
+++ b/fpdfsdk/fpdf_flatten.cpp
@@ -201,7 +201,7 @@ void SetPageContents(CFX_ByteString key,
CFX_ByteString sStream;
sStream.Format("q 1 0 0 1 0 0 cm /%s Do Q", key.c_str());
- pNewContents->SetData((const uint8_t*)sStream, sStream.GetLength(), FALSE,
+ pNewContents->SetData(sStream.raw_str(), sStream.GetLength(), FALSE,
FALSE);
}
return;
@@ -220,8 +220,7 @@ void SetPageContents(CFX_ByteString key,
CFX_ByteString sBody =
CFX_ByteString((const FX_CHAR*)acc.GetData(), acc.GetSize());
sStream = sStream + sBody + "\nQ";
- pContents->SetData((const uint8_t*)sStream, sStream.GetLength(), FALSE,
- FALSE);
+ pContents->SetData(sStream.raw_str(), sStream.GetLength(), FALSE, FALSE);
pContentsArray->AddReference(pDocument, dwObjNum);
break;
}
@@ -247,8 +246,7 @@ void SetPageContents(CFX_ByteString key,
CFX_ByteString sStream;
sStream.Format("q 1 0 0 1 0 0 cm /%s Do Q", key.c_str());
- pNewContents->SetData((const uint8_t*)sStream, sStream.GetLength(), FALSE,
- FALSE);
+ pNewContents->SetData(sStream.raw_str(), sStream.GetLength(), FALSE, FALSE);
}
}
@@ -508,9 +506,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((const uint8_t*)sStream, sStream.GetLength(), FALSE,
- FALSE);
+ pNewXObject->SetData(sStream.raw_str(), sStream.GetLength(), FALSE, FALSE);
}
pPageDict->RemoveAt("Annots");
« no previous file with comments | « core/fxge/ge/fx_ge_fontmap.cpp ('k') | xfa/fxfa/app/xfa_ffimageedit.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698