summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_flatten.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-04-08 14:38:54 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-08 14:38:54 -0700
commitcfd4d57800835011b028435e064f13c29243d6e6 (patch)
tree59f3aa156ea2dca9ea4f5b0e964bd41fa4f9455e /fpdfsdk/fpdf_flatten.cpp
parent4c3debb3c91f5842784be30a911b52cdabcab7df (diff)
downloadpdfium-cfd4d57800835011b028435e064f13c29243d6e6.tar.xz
Make converstion explicit from CFX_ByteString to uint8_t*
BUG= Review URL: https://codereview.chromium.org/1868293002
Diffstat (limited to 'fpdfsdk/fpdf_flatten.cpp')
-rw-r--r--fpdfsdk/fpdf_flatten.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/fpdfsdk/fpdf_flatten.cpp b/fpdfsdk/fpdf_flatten.cpp
index 99f97d7ca2..54e606397f 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");