Chromium Code Reviews| Index: fpdfsdk/src/fpdf_flatten.cpp |
| diff --git a/fpdfsdk/src/fpdf_flatten.cpp b/fpdfsdk/src/fpdf_flatten.cpp |
| index 6d3440f556c2a68159002897648ed8cfdec598d1..43ebe27b4b6c8ac43000884841749121b5b9783f 100644 |
| --- a/fpdfsdk/src/fpdf_flatten.cpp |
| +++ b/fpdfsdk/src/fpdf_flatten.cpp |
| @@ -220,7 +220,7 @@ void SetPageContents(CFX_ByteString key, CPDF_Dictionary* pPage, CPDF_Document* |
| pPage->SetAtReference("Contents", pDocument, pDocument->AddIndirectObject(pNewContents)); |
| CFX_ByteString sStream; |
| - sStream.Format("q 1 0 0 1 0 0 cm /%s Do Q", (FX_LPCSTR)key); |
| + sStream.Format("q 1 0 0 1 0 0 cm /%s Do Q", key.c_str()); |
|
brucedawson
2014/12/30 23:13:02
What happened to the indenting here? Tabs versus s
|
| pNewContents->SetData((FX_LPCBYTE)sStream, sStream.GetLength(), FALSE, FALSE); |
| } |
| return; |
| @@ -267,7 +267,7 @@ void SetPageContents(CFX_ByteString key, CPDF_Dictionary* pPage, CPDF_Document* |
| pContentsArray->AddReference(pDocument, dwObjNum); |
| CFX_ByteString sStream; |
| - sStream.Format("q 1 0 0 1 0 0 cm /%s Do Q", (FX_LPCSTR)key); |
| + sStream.Format("q 1 0 0 1 0 0 cm /%s Do Q", key.c_str()); |
|
brucedawson
2014/12/30 23:13:02
Ditto on the indenting.
|
| pNewContents->SetData((FX_LPCBYTE)sStream, sStream.GetLength(), FALSE, FALSE); |
| } |
| } |
| @@ -547,7 +547,7 @@ DLLEXPORT int STDCALL FPDFPage_Flatten( FPDF_PAGE page, int nFlag) |
| } |
| CFX_AffineMatrix m = GetMatrix(rcAnnot, rcStream, matrix); |
| - sTemp.Format("q %f 0 0 %f %f %f cm /%s Do Q\n", m.a, m.d, m.e, m.f, (FX_LPCSTR)sFormName); |
| + 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()); |
|
brucedawson
2014/12/30 23:13:02
Ditto on the indenting.
|
| sStream += sTemp; |
| pNewXObject->SetData((FX_LPCBYTE)sStream, sStream.GetLength(), FALSE, FALSE); |