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

Unified Diff: core/src/fpdftext/fpdf_text_int.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/src/fpdfdoc/doc_link.cpp ('k') | fpdfsdk/src/formfiller/FFL_Utils.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdftext/fpdf_text_int.cpp
diff --git a/core/src/fpdftext/fpdf_text_int.cpp b/core/src/fpdftext/fpdf_text_int.cpp
index 99f36a08585e1002e74ff4f82eda544f6899e8d0..9ab09e19e44dab52fd3a2779ed6d525d95cfa4ae 100644
--- a/core/src/fpdftext/fpdf_text_int.cpp
+++ b/core/src/fpdftext/fpdf_text_int.cpp
@@ -1288,8 +1288,7 @@ int32_t CPDF_TextPage::PreMarkedContent(PDFTEXT_Obj Obj) {
CFX_ByteString tagStr = (CFX_ByteString)item.GetName();
pDict = ToDictionary(static_cast<CPDF_Object*>(item.GetParam()));
CPDF_String* temp =
- (CPDF_String*)(pDict ? pDict->GetElement(FX_BSTRC("ActualText"))
- : NULL);
+ ToString(pDict ? pDict->GetElement(FX_BSTRC("ActualText")) : nullptr);
if (temp) {
bExist = TRUE;
actText = temp->GetUnicodeText();
@@ -1359,8 +1358,7 @@ void CPDF_TextPage::ProcessMarkedContent(PDFTEXT_Obj Obj) {
CFX_ByteString tagStr = (CFX_ByteString)item.GetName();
pDict = ToDictionary(static_cast<CPDF_Object*>(item.GetParam()));
CPDF_String* temp =
- (CPDF_String*)(pDict ? pDict->GetElement(FX_BSTRC("ActualText"))
- : NULL);
+ ToString(pDict ? pDict->GetElement(FX_BSTRC("ActualText")) : nullptr);
if (temp) {
actText = temp->GetUnicodeText();
}
« no previous file with comments | « core/src/fpdfdoc/doc_link.cpp ('k') | fpdfsdk/src/formfiller/FFL_Utils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698