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

Unified Diff: core/src/fpdfapi/fpdf_page/fpdf_page_parser.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/fpdfapi/fpdf_page/fpdf_page_colors.cpp ('k') | core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
index 1283a3a596be9b1fb3e4b04ba99cb2ddb3406391..fbb364ee12fad7c99fb44ec18246f2d45badf755 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
@@ -1359,10 +1359,8 @@ void CPDF_StreamContentParser::Handle_ShowText_Positioning() {
}
int n = pArray->GetCount(), nsegs = 0, i;
for (i = 0; i < n; i++) {
- CPDF_Object* pObj = pArray->GetElementValue(i);
- if (pObj->GetType() == PDFOBJ_STRING) {
+ if (pArray->GetElementValue(i)->IsString())
nsegs++;
- }
}
if (nsegs == 0) {
for (i = 0; i < n; i++) {
@@ -1379,7 +1377,7 @@ void CPDF_StreamContentParser::Handle_ShowText_Positioning() {
FX_FLOAT fInitKerning = 0;
for (i = 0; i < n; i++) {
CPDF_Object* pObj = pArray->GetElementValue(i);
- if (pObj->GetType() == PDFOBJ_STRING) {
+ if (pObj->IsString()) {
CFX_ByteString str = pObj->GetString();
if (str.IsEmpty()) {
continue;
« no previous file with comments | « core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp ('k') | core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698