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

Unified Diff: core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp

Issue 1417933002: Add type cast definitions for CPDF_String. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 2 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/include/fpdfapi/fpdf_objects.h ('k') | core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
index 3d669a04105ee8383cd7952582f570829f64eec4..b097389160efbbd5fa9bb0bf10f96ae90d7ba626 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
@@ -42,7 +42,7 @@ int32_t PDF_CreatorAppendObject(const CPDF_Object* pObj,
break;
case PDFOBJ_STRING: {
CFX_ByteString str = pObj->GetString();
- FX_BOOL bHex = ((CPDF_String*)pObj)->IsHex();
+ FX_BOOL bHex = pObj->AsString()->IsHex();
if ((len = pFile->AppendString(PDF_EncodeString(str, bHex))) < 0) {
return -1;
}
@@ -1116,7 +1116,7 @@ int32_t CPDF_Creator::WriteDirectObj(FX_DWORD objnum,
break;
case PDFOBJ_STRING: {
CFX_ByteString str = pObj->GetString();
- FX_BOOL bHex = ((CPDF_String*)pObj)->IsHex();
+ FX_BOOL bHex = pObj->AsString()->IsHex();
if (m_pCryptoHandler == NULL || !bEncrypt) {
CFX_ByteString content = PDF_EncodeString(str, bHex);
if ((len = m_File.AppendString(content)) < 0) {
« no previous file with comments | « core/include/fpdfapi/fpdf_objects.h ('k') | core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698