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

Unified Diff: fpdfsdk/fpdf_flatten.cpp

Issue 1853233002: Make down-conversion explicit from CFX_ByteString to CFX_ByteStringC. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix CPDF_Name::GetConstString() 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 | « fpdfsdk/fpdf_ext.cpp ('k') | fpdfsdk/fpdfppo.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 46501865e5a8d0f8d0a60a42e8e533ec7d9cd21a..bbd5ad3dd3dd6be02d3c9ba87a73b1baa2b9f3cd 100644
--- a/fpdfsdk/fpdf_flatten.cpp
+++ b/fpdfsdk/fpdf_flatten.cpp
@@ -395,8 +395,7 @@ DLLEXPORT int STDCALL FPDFPage_Flatten(FPDF_PAGE page, int nFlag) {
char sExtend[5] = {};
FXSYS_itoa(iKey, sExtend, 10);
key = CFX_ByteString("FFT") + CFX_ByteString(sExtend);
-
- if (!pPageXObject->KeyExist(key))
+ if (!pPageXObject->KeyExist(key.AsByteStringC()))
break;
}
}
@@ -406,7 +405,7 @@ DLLEXPORT int STDCALL FPDFPage_Flatten(FPDF_PAGE page, int nFlag) {
CPDF_Dictionary* pNewXORes = NULL;
if (!key.IsEmpty()) {
- pPageXObject->SetAtReference(key, pDocument, dwObjNum);
+ pPageXObject->SetAtReference(key.AsByteStringC(), pDocument, dwObjNum);
CPDF_Dictionary* pNewOXbjectDic = pNewXObject->GetDict();
pNewXORes = new CPDF_Dictionary;
pNewOXbjectDic->SetAt("Resources", pNewXORes);
@@ -438,7 +437,7 @@ DLLEXPORT int STDCALL FPDFPage_Flatten(FPDF_PAGE page, int nFlag) {
continue;
if (!sAnnotState.IsEmpty()) {
- pAPStream = pAPDic->GetStreamBy(sAnnotState);
+ pAPStream = pAPDic->GetStreamBy(sAnnotState.AsByteStringC());
} else {
auto it = pAPDic->begin();
if (it != pAPDic->end()) {
@@ -487,7 +486,7 @@ DLLEXPORT int STDCALL FPDFPage_Flatten(FPDF_PAGE page, int nFlag) {
CFX_ByteString sFormName;
sFormName.Format("F%d", i);
uint32_t dwObjNum = pDocument->AddIndirectObject(pObj);
- pXObject->SetAtReference(sFormName, pDocument, dwObjNum);
+ pXObject->SetAtReference(sFormName.AsByteStringC(), pDocument, dwObjNum);
CPDF_StreamAcc acc;
acc.LoadAllData(pNewXObject);
« no previous file with comments | « fpdfsdk/fpdf_ext.cpp ('k') | fpdfsdk/fpdfppo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698