Chromium Code Reviews| 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..b52a592d83cf656b51d887dd3a7fb8c9e36c224b 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; |
|
Tom Sepez
2015/10/21 17:12:50
nit: one per line, also make i local to |for (int
dsinclair
2015/10/21 17:40:01
Done.
|
| for (i = 0; i < n; i++) { |
| - CPDF_Object* pObj = pArray->GetElementValue(i); |
| - if (pObj->GetType() == PDFOBJ_STRING) { |
| + if (pArray->GetElementValue(i)->AsString()) |
|
Lei Zhang
2015/10/21 16:55:56
IsString ?
dsinclair
2015/10/21 17:08:05
Done.
|
| 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; |